:root {
  --font-sans: 'Roboto', 'Segoe UI', sans-serif;
  --color-primary: #52a380;
  --color-primary-dark: #2f5947;
  --color-secondary: #e6b84a;
  --color-bg: #f5f8f6;
  --color-surface: #ffffff;
  --color-text: #2d3748;
  --color-text-muted: #5a6b7a;
  --color-header-bg: #e8f4f0;
  --color-header-text: #2f5947;
  --shadow-md: 0 15px 40px rgba(47, 89, 71, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: linear-gradient(120deg, rgba(232, 244, 240, 0.95) 0%, rgba(212, 236, 224, 0.9) 45%, rgba(186, 226, 207, 0.9) 100%);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(47, 89, 71, 0.12);
  backdrop-filter: blur(8px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 1.5rem;
  position: relative;
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 24px rgba(47, 89, 71, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47, 89, 71, 0.16);
}

.brand-logo {
  font-size: 2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-header-text);
}

.brand-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(47, 89, 71, 0.75);
}

.menu-root {
  position: relative;
  margin-left: auto;
}

.nav-primary {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  left: auto;
  min-width: 230px;
  background: var(--color-surface);
  padding: 0.75rem 0.45rem;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(34, 84, 61, 0.16);
  border: 1px solid rgba(82, 163, 128, 0.15);
  z-index: 9999;
}

.nav-primary.open {
  display: block;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  list-style: none;
}

.nav-item > a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--color-header-text);
  text-decoration: none;
}

.nav-item > a:hover,
.nav-item > a:focus {
  background: rgba(82, 163, 128, 0.15);
  color: var(--color-primary);
}

.nav-section-label {
  padding: 0.35rem 0.9rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(34, 84, 61, 0.6);
}

.nav-separator {
  display: block;
  height: 1px;
  margin: 0.45rem 0.65rem;
  border-top: 1px dashed rgba(82, 163, 128, 0.4);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: var(--color-primary);
  color: white;
}

.menu-toggle::before {
  content: '☰';
  font-size: 1.2rem;
}

.hero {
  background: linear-gradient(135deg, rgba(47, 133, 90, 0.92), rgba(34, 84, 61, 0.96)), url('../assets/img/hero-pattern.svg') center/cover;
  color: #ffffff;
  padding: 6rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(214, 158, 46, 0.15);
  border: 1px solid rgba(214, 158, 46, 0.4);
  color: #fbe29f;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  border-radius: 12px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: #ffffff;
  color: var(--color-primary-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn-secondary:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

.section {
  padding: 4.5rem 0;
}

.section.neutral {
  background: var(--color-surface);
}

.section h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  text-align: center;
  margin-bottom: 2.5rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}

.card p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.value-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(47, 89, 71, 0.1);
}

.footer .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer a {
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--color-primary-dark);
}

.footer small {
  display: block;
  text-align: center;
  margin-top: 2rem;
  color: var(--color-text-muted);
}

.mobile-nav {
  display: none;
}


.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media img {
  width: 100%;
  max-width: 520px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.note-hero {
  display: inline-block;
  background: rgba(214, 158, 46, 0.12);
  border: 1px solid rgba(214, 158, 46, 0.45);
  color: var(--color-secondary);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.mission-text {
  padding: 2rem;
}

.mission-media img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-card {
  padding: 0;
  overflow: hidden;
}

.section-card img {
  width: 100%;
  height: auto;
  display: block;
}

.section-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.values-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.values-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.values-list {
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.values-media img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.cta-card {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-cta {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-cta .btn-primary,
.section-cta .btn-secondary {
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
}

.placeholder-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.8rem 2.4rem;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(34, 84, 61, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.placeholder-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: var(--color-primary-dark);
}

.placeholder-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.placeholder-card .btn-primary,
.placeholder-card .btn-secondary {
  align-self: center;
  margin-top: 0.5rem;
}

@media (max-width: 960px) {
  .brand-block {
    padding: 0.3rem 0.65rem;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.7rem;
  }

  .nav-primary {
    left: 0;
    right: 0;
    width: 100%;
  }

  .nav-item > a {
    padding: 0.85rem 1.25rem;
  }

  .nav-section-label {
    padding-left: 1.25rem;
  }

  .nav-separator {
    margin: 0.5rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .brand-block {
    gap: 0.6rem;
  }

  .brand-logo {
    font-size: 1.6rem;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    padding: 4.5rem 0 3.25rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    padding: 1.4rem;
  }
}

/* ============================================
   PANEL HEADER ACTIONS - Bottoni nell'header
   ============================================ */

/* Panel Header con bottoni a destra */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: 2px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.panel-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Admin Tabs Header con azioni */
.admin-tabs__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 2px solid #e5e7eb;
  padding: 0 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-tabs__nav {
  display: flex;
  gap: 0;
}

.admin-tabs__actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

/* Bottoni small per header */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Responsive: su mobile i bottoni vanno sotto */
@media (max-width: 768px) {
  .panel-header,
  .admin-tabs__header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .panel-header-actions,
  .admin-tabs__actions {
    width: 100%;
  }
  
  .panel-header-actions .btn,
  .admin-tabs__actions .btn {
    flex: 1;
  }
}

/* ============================================
   ADMIN TABS CON ACTIONS
   ============================================ */

.admin-tabs__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 2px solid #e5e7eb;
  padding: 0.5rem 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-tabs__nav {
  display: flex;
  gap: 0;
}

.admin-tabs__tab {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.admin-tabs__tab:hover {
  color: #3b82f6;
  background: #f8fafc;
}

.admin-tabs__tab.is-active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: white;
}

.admin-tabs__actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.admin-tabs__panel {
  display: none;
  padding: 1.5rem;
  background: white;
}

.admin-tabs__panel.is-active {
  display: block;
}

/* Bottoni small */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-tabs__header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .admin-tabs__nav {
    width: 100%;
    overflow-x: auto;
  }
  
  .admin-tabs__actions {
    width: 100%;
  }
  
  .admin-tabs__actions .btn {
    flex: 1;
  }
}
