/* ================================================================
   style.css — Protezione Civile Pontelandolfo ODV
   ================================================================
   Architettura:
   01. CSS Custom Properties (token di design)
   02. Reset & Base
   03. Typography
   04. Layout helpers
   05. Top Bar Emergenza
   06. Header & Brand
   07. Navigazione principale + Hamburger
   08. Dropdown sottomenu
   09. Hero Section
   10. Sezione Meteo & Allerte
   11. Sezione Attività
   12. Sezione News
   13. Banner Volontario
   14. Footer
   15. Bottoni (sistema)
   16. Utilities & Animazioni
   17. Media Queries (responsive)
   ================================================================ */


/* ================================================================
   01. CSS CUSTOM PROPERTIES (Token di Design)
   ================================================================ */
:root {
  /* Palette istituzionale */
  --yellow:        #FFCC00;
  --yellow-dark:   #e6b800;
  --yellow-light:  #fff4b0;
  --blue:          #003366;
  --blue-mid:      #004a99;
  --blue-light:    #1a6dc8;
  --red:           #cc0000;
  --red-dark:      #a80000;
  --white:         #ffffff;
  --bg:            #f4f6fa;
  --bg-alt:        #eaf0f8;
  --text:          #1a1e2e;
  --text-muted:    #5a6478;
  --border:        #d0d9e8;

  /* Allerta */
  --alert-green:   #1a9e48;
  --alert-yellow:  #e6b800;
  --alert-orange:  #e8700a;
  --alert-red:     #cc0000;

  /* Spaziatura */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Raggi */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Ombra */
  --shadow-sm:  0 2px 8px rgba(0,30,80,0.08);
  --shadow-md:  0 6px 24px rgba(0,30,80,0.12);
  --shadow-lg:  0 16px 48px rgba(0,30,80,0.15);

  /* Tipografia */
  --font-body:    'Inter', Arial, sans-serif;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-4xl:  3.5rem;

  /* Transizioni */
  --transition: 0.2s ease;

  /* Header height (usata per offset scroll) */
  --header-h: 80px;
}


/* ================================================================
   02. RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 48px);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--blue); }
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

ul { list-style: none; }

/* Riduzione del moto per utenti con preferenze di accessibilità */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ================================================================
   03. TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.15;
  color: var(--blue);
}

h1 { font-size: clamp(var(--text-2xl), 6vw, var(--text-4xl)); }
h2 { font-size: clamp(var(--text-xl), 4vw, var(--text-3xl)); }
h3 { font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl)); }

p { color: var(--text-muted); }


/* ================================================================
   04. LAYOUT HELPERS
   ================================================================ */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 5%;
}

section { padding-block: var(--space-xl); }

.section-head { text-align: center; margin-bottom: var(--space-lg); }
.section-head h2 { margin-bottom: var(--space-xs); }
.section-desc { font-size: var(--text-md); max-width: 640px; margin-inline: auto; }

.section-head-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  text-align: left;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.section-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-light);
  margin-bottom: var(--space-xs);
}


/* ================================================================
   05. TOP BAR EMERGENZA
   ================================================================ */
.emergency-bar {
  background: #2c3444;
  color: #c8d4e8;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 8px 5%;
  position: relative;
  z-index: 100;
  transition: background var(--transition);
}

.emergency-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.emergency-icon { font-size: 16px; }

.emergency-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 8px;
}

/* ---- STATO ALLERTA ATTIVA:
   Aggiungere classe "alert-active" al div#emergency-bar nel HTML
   per attivare il banner rosso lampeggiante ---- */
.emergency-bar.alert-active {
  background: var(--red);
  color: #fff;
  animation: emergencyPulse 1.4s ease-in-out infinite;
}

@keyframes emergencyPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.82; }
}


/* ================================================================
   06. HEADER & BRAND
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--blue);
  box-shadow: 0 3px 20px rgba(0,0,0,0.25);
  height: var(--header-h);
}

.header-inner {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* BRAND (logo + testo) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: inherit;
}
.brand:hover { color: var(--yellow); }

.logo-placeholder {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.logo-placeholder img { width: 72px; height: 72px; }

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

.brand-name {
  font-size: var(--text-md);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--yellow);
  letter-spacing: 0.02em;
}


/* ================================================================
   07. NAVIGAZIONE PRINCIPALE + HAMBURGER
   ================================================================ */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

/* Link di navigazione base */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--yellow);
  background: rgba(255,255,255,0.08);
}

/* Voce Diventa Volontario (CTA evidenziata) */
.nav-cta-vol {
  background: var(--yellow);
  color: var(--blue) !important;
  font-weight: 800;
  border-radius: 999px;
  padding: 7px 13px;
}
.nav-cta-vol:hover {
  background: var(--yellow-dark);
  color: var(--blue) !important;
}

/* Freccia dropdown */
.arrow {
  font-size: 11px;
  transition: transform var(--transition);
  display: inline-block;
}
.has-dropdown.dropdown-open .arrow { transform: rotate(180deg); }

/* ---- HAMBURGER BUTTON ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.ham-bar {
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  display: block;
}

/* Animazione X per hamburger aperto */
.ham-open .ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-open .ham-bar:nth-child(2) { opacity: 0; }
.ham-open .ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ================================================================
   08. DROPDOWN SOTTOMENU
   ================================================================ */
.has-dropdown { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}

.has-dropdown.dropdown-open .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--bg);
  transition: background var(--transition), color var(--transition);
}

.dropdown li:last-child a { border-bottom: none; }

.dropdown li a:hover {
  background: var(--bg-alt);
  color: var(--blue);
}


/* ================================================================
   09. HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: var(--space-xl) 5%;
  overflow: hidden;

  /*
    IMMAGINE DI SFONDO HERO:
    Sostituire il gradiente con:
    background-image: url('hero-bg.jpg');
    Oppure usare entrambi: il gradiente come overlay sopra l'immagine.
    Esempio: background-image: linear-gradient(...), url('hero-bg.jpg');
  */
  background-image:
    linear-gradient(
      135deg,
      rgba(0, 30, 80, 0.92) 0%,
      rgba(0, 51, 102, 0.80) 50%,
      rgba(0, 74, 153, 0.70) 100%
    ),
    url('https://images.unsplash.com/photo-1504701954957-2010ec3bcec1?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
}

/* Overlay aggiuntivo per leggibilità testo */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0,30,80,0.4) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
  background: rgba(255,204,0,0.12);
  border: 1px solid rgba(255,204,0,0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

/* Evidenziazione accent nel titolo: usare <span class="hero-accent"> nel testo -->
/* Esempio: Al servizio del <span class="hero-accent">territorio</span> */
.hero-accent { color: var(--yellow); }

.hero-desc {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Indicatore scroll */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-arrow { animation: scrollBounce 1.8s ease-in-out infinite; }

@media (max-width: 900px) {
  .scroll-hint { display: none; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}


/* ================================================================
   10. SEZIONE METEO & ALLERTE
   ================================================================ */
.weather-section {
  background: var(--bg);
  padding-block: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
}

/* Card base condivisa tra meteo, allerta e numeri di emergenza */
.weather-card,
.alert-card,
.emergency-numbers-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) var(--space-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ---- BOX METEO ---- */
.weather-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.weather-location { font-weight: 700; color: var(--blue); }
.weather-time { font-variant-numeric: tabular-nums; }

.weather-main {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.weather-icon-big { font-size: 3.5rem; line-height: 1; }

.weather-temp {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}

.weather-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

.weather-details {
  display: flex;
  gap: var(--space-sm);
  border-top: 1px solid var(--bg);
  padding-top: var(--space-sm);
}

.w-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.w-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.w-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--blue);
}

.weather-link {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--blue-light);
  margin-top: auto;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--bg);
}
.weather-link:hover { color: var(--blue); }


/* ---- BOX ALLERTA REGIONALE ---- */
.alert-card-title {
  font-weight: 800;
  font-size: var(--text-md);
  color: var(--blue);
}

/* Badge livello allerta */
.alert-level-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f0faf4;
  border: 2px solid var(--alert-green);
}

.alert-level-icon { font-size: 1.8rem; flex-shrink: 0; }

.alert-level-label {
  display: block;
  font-size: var(--text-md);
  font-weight: 900;
  color: var(--alert-green);
  line-height: 1.2;
}

.alert-level-sub {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- VARIANTI COLORE ALLERTA ----
   Aggiungere / rimuovere la classe appropriata dal div.alert-level-badge
   ----------------------------------------------------------------- */

/* Allerta GIALLA */
.alert-yellow {
  background: #fffbe6;
  border-color: var(--alert-yellow);
}
.alert-yellow .alert-level-label { color: var(--alert-yellow); }

/* Allerta ARANCIONE */
.alert-orange {
  background: #fff4ec;
  border-color: var(--alert-orange);
}
.alert-orange .alert-level-label { color: var(--alert-orange); }

/* Allerta ROSSA — aggiunge anche pulsazione */
.alert-red {
  background: #fff0f0;
  border-color: var(--alert-red);
  animation: alertPulse 1.6s ease-in-out infinite;
}
.alert-red .alert-level-label { color: var(--alert-red); }

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(204,0,0,0.2); }
  50%       { box-shadow: 0 0 0 8px rgba(204,0,0,0); }
}

/* Lista rischi */
.risk-list { display: flex; flex-direction: column; gap: 8px; }

.risk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.risk-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.risk-inactive { opacity: 0.45; }

.alert-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--bg);
}


/* ---- BOX NUMERI DI EMERGENZA ---- */
.sos-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--blue);
}

.sos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.sos-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  gap: 10px;
}

.sos-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.sos-number {
  font-size: var(--text-md);
  font-weight: 900;
  color: var(--blue);
  white-space: nowrap;
}

.sos-number.sos-red {
  color: var(--red);
  font-size: var(--text-lg);
}

.sos-number:hover { text-decoration: underline; }


/* ================================================================
   11. SEZIONE ATTIVITÀ
   ================================================================ */
.activities-section { background: var(--white); }

.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.activity-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.activity-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
}

.activity-card h3 { font-size: var(--text-lg); color: var(--blue); }
.activity-card p  { font-size: var(--text-sm); flex: 1; }

.card-link {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--blue-light);
}
.card-link:hover { color: var(--blue); }


/* ================================================================
   12. SEZIONE NEWS
   ================================================================ */
.news-section { background: var(--bg-alt); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Etichetta categoria news */
.news-cat {
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.news-cat-allerta   { background: #fff0f0; color: var(--red); }
.news-cat-formazione { background: #eaf4ff; color: var(--blue); }
.news-cat-territorio { background: #f0fff4; color: var(--alert-green); }
/* Aggiungere altre categorie es: .news-cat-evento, .news-cat-comunicato */

.news-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.news-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.news-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-title a {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--blue);
  line-height: 1.3;
}
.news-title a:hover { color: var(--blue-light); }

.news-excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ================================================================
   13. BANNER VOLONTARIO
   ================================================================ */
.volunteer-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  padding-block: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Decorazione geometrica di sfondo */
.volunteer-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,204,0,0.07);
  pointer-events: none;
}

.volunteer-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.volunteer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.volunteer-text h2 {
  color: var(--white);
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
  margin-bottom: var(--space-xs);
}

.volunteer-text p {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-md);
  max-width: 560px;
}

.volunteer-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex-shrink: 0;
}


/* ================================================================
   14. FOOTER
   ================================================================ */
.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,0.75);
  padding-top: var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.footer-heading {
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: var(--space-md);
}

/* COLONNA 1: Dati legali */
.footer-logo { margin-bottom: var(--space-sm); }

.footer-name {
  display: block;
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.footer-legal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--text-sm);
}

.footer-legal-list li { line-height: 1.4; }
.footer-legal-list span {
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

/* COLONNA 2: Link rapidi */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '›';
  color: var(--yellow);
  font-weight: 900;
}

.footer-links a:hover { color: var(--white); }

/* COLONNA 3: Contatti + Social */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--space-md);
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
}

.contact-icon { font-size: 1rem; flex-shrink: 0; }

.footer-contact-list a {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}
.footer-contact-list a:hover { color: var(--yellow); }

.footer-contact-list small {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-left: 4px;
}

/* Social */
.footer-social-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  transition: background var(--transition), color var(--transition);
}

.social-btn:hover {
  background: var(--yellow);
  color: var(--blue);
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: var(--space-md);
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.footer-bottom a {
  color: rgba(255,255,255,0.6);
}
.footer-bottom a:hover { color: var(--yellow); }


/* ================================================================
   15. BOTTONI (sistema)
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: 800;
  font-family: var(--font-body);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  text-align: center;
  line-height: 1;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-icon { font-size: 1.1em; }

/* Primario (giallo/blue) */
.btn-primary {
  background: var(--yellow);
  color: var(--blue);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  color: var(--blue);
}

/* Emergenza (rosso) */
.btn-emergency {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-emergency:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
}

/* Outline scuro */
.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

/* Outline bianco (su sfondi scuri) */
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.85);
  color: var(--white);
}

/* Outline piccolo (nelle card) */
.btn-outline-small {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  background: transparent;
  color: var(--blue-light);
  border: 1.5px solid var(--blue-light);
  transition: background var(--transition), color var(--transition);
}
.btn-outline-small:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

/* Variante grande */
.btn-lg { padding: 17px 36px; font-size: var(--text-md); }


/* ================================================================
   16. UTILITIES & ANIMAZIONI
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ================================================================
   17. MEDIA QUERIES — RESPONSIVE
   ================================================================ */

/* ---- TABLET GRANDE (max 1100px) ---- */
@media (max-width: 1100px) {
  .activities-grid { grid-template-columns: repeat(2, 1fr); }

  .weather-grid { grid-template-columns: 1fr 1fr; }
  .emergency-numbers-card { grid-column: span 2; }
}

/* ---- MENU: passa a hamburger sotto i 1200px ---- */
@media (max-width: 1200px) {
  :root { --header-h: 72px; }
  .logo-placeholder img { width: 58px; height: 58px; }

  /* Nasconde il menu e mostra l'hamburger */
  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #002255;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: var(--space-md) 5%;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.25s ease;
    z-index: 80;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  }

  .main-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    padding: 13px 16px;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }

  .nav-cta-vol {
    text-align: center;
    margin-top: 8px;
    padding: 13px 18px;
  }

  /* Dropdown su mobile: si apre verso il basso inline (non assoluto) */
  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--yellow);
    border-radius: 0;
    background: rgba(255,255,255,0.06);
    margin-left: 14px;
    transform: none !important;
    opacity: 1;
  }

  .has-dropdown.dropdown-open .dropdown { display: block; }
  .dropdown { display: none; }

  .dropdown li a {
    color: rgba(255,255,255,0.8);
    border-bottom-color: rgba(255,255,255,0.06);
    padding: 10px 16px;
  }
  .dropdown li a:hover {
    background: rgba(255,255,255,0.08);
    color: var(--yellow);
  }
}

/* ---- LAYOUT TABLET (max 900px) ---- */
@media (max-width: 900px) {
  /* Layout footer tablet */
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: span 2; }

  /* Layout news */
  .news-grid { grid-template-columns: 1fr; }

  /* Volunteer banner */
  .volunteer-inner { flex-direction: column; text-align: center; }
  .volunteer-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

/* ---- MOBILE (max 640px) ---- */
@media (max-width: 640px) {
  section { padding-block: var(--space-lg); }

  .hero { min-height: 80vh; padding: var(--space-lg) 5%; align-items: flex-end; padding-bottom: var(--space-xl); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }

  .weather-grid { grid-template-columns: 1fr; }
  .emergency-numbers-card { grid-column: span 1; }

  .activities-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-legal { grid-column: span 1; }

  .section-head-flex { flex-direction: column; align-items: flex-start; }

  .brand-sub { display: block; font-size: 0.7rem; white-space: nowrap; }
  .brand-name { font-size: 0.95rem; line-height: 1.15; white-space: nowrap; }
  .brand-text { min-width: 0; }

  .weather-details { flex-direction: column; gap: 6px; }
  .w-detail { flex-direction: row; justify-content: space-between; }
}

/* ── FIX email lunghe sidebar e footer ── */
.widget-contact-value a[href^="mailto:"],
.footer-contact-list a[href^="mailto:"] {
  font-size: .75rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.widget-contact-item { overflow: hidden; }
.footer-contact-list li { overflow: hidden; }
