/* ============================================================
   Curtoni Piazzoli s.a.s. — Amministrazione Immobili
   Foglio di stile principale
   ============================================================ */

/* Font caricati dal nostro server: nessuna richiesta a servizi esterni.
   woff2 per i browser moderni, woff come riserva per i più datati. */
@font-face {
  font-family: 'Quicksand';
  src: url('../assets/fonts/quicksand-500.woff2') format('woff2'),
       url('../assets/fonts/quicksand-500.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('../assets/fonts/quicksand-600.woff2') format('woff2'),
       url('../assets/fonts/quicksand-600.woff') format('woff');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('../assets/fonts/quicksand-700.woff2') format('woff2'),
       url('../assets/fonts/quicksand-700.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --blu: #17497c;
  --blu-hover: #113a64;
  --blu-scuro: #0d2c4e;
  --blu-notte: #092038;
  --blu-chiaro: #eaf1f8;
  --azzurro: #3f7cb6;
  --testo: #1f2d3d;
  --testo-soft: #52657a;
  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --bordo: #e2e9f1;
  --ombra: 0 10px 30px -12px rgba(15, 51, 100, .18);
  --raggio: 14px;
  --font-titoli: 'Quicksand', system-ui, sans-serif;
  --font-testo: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-testo);
  color: var(--testo);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* il pannello menu chiuso sta fuori schermo a destra */
}

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

a { color: var(--blu); text-decoration: none; }
a:hover { color: var(--blu-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-titoli);
  font-weight: 700;
  line-height: 1.25;
  color: var(--blu-scuro);
}

.container { width: min(1140px, 92%); margin-inline: auto; }
.container-narrow { width: min(820px, 92%); margin-inline: auto; }

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--azzurro);
  margin-bottom: .6rem;
}
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: .8rem; }
.section-intro { color: var(--testo-soft); max-width: 640px; margin-bottom: 2.5rem; }
.center { text-align: center; }
.center .section-intro { margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blu); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-titoli);
  font-weight: 600; font-size: .98rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-primario { background: var(--blu); color: #fff; }
.btn-primario:hover { background: var(--blu-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--ombra); }
.btn-secondario { background: transparent; color: var(--blu); border-color: var(--blu); }
.btn-secondario:hover { background: var(--blu); color: #fff; transform: translateY(-2px); }
.btn-bianco { background: #fff; color: var(--blu-scuro); }
.btn-bianco:hover { background: var(--blu-chiaro); color: var(--blu-scuro); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.scrolled { border-color: var(--bordo); box-shadow: 0 4px 20px -10px rgba(15, 51, 100, .15); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { height: 34px; width: auto; }
.brand-name {
  font-family: var(--font-titoli);
  font-weight: 700; font-size: 1.12rem; color: var(--blu-scuro);
  line-height: 1.1;
}
.brand-name small {
  display: block; font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--testo-soft);
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-weight: 500; font-size: .95rem; color: var(--testo);
  padding: .3rem 0; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--blu); transition: width .25s;
}
.nav a:hover::after, .nav a.attivo::after { width: 100%; }
.nav a.attivo { color: var(--blu); font-weight: 600; }
.nav .btn { margin-left: .4rem; }
.nav .btn::after { display: none; }
.nav a.btn-primario {
  color: #fff;
  padding: .65rem 1.45rem;
  font-family: var(--font-titoli);
  font-weight: 600;
  line-height: 1.2;
}
.nav a.btn-primario:hover { color: #fff; }

.hamburger {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
}
.hamburger span {
  display: block; width: 26px; height: 3px; border-radius: 2px;
  background: var(--blu-scuro); margin: 5px 0; transition: all .3s;
}
body.menu-aperto .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-aperto .hamburger span:nth-child(2) { opacity: 0; }
body.menu-aperto .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #f2f7fc 0%, #e4eef8 55%, #d8e7f5 100%);
  padding: 5.5rem 0 6rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(700px 340px at 88% -10%, rgba(63, 124, 182, .16), transparent 65%),
    radial-gradient(560px 300px at -6% 108%, rgba(23, 73, 124, .10), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 100%; }
.hero-filigrana {
  position: absolute;
  right: -4%;
  bottom: -14%;
  width: min(56vw, 660px);
  opacity: .42;
  pointer-events: none;
  user-select: none;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  margin-bottom: 1.1rem;
}
.hero h1 .evidenzia { color: var(--blu); }
.hero p.sottotitolo { font-size: 1.1rem; color: var(--testo-soft); max-width: 540px; margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--bordo);
  padding: .38rem .95rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--blu);
  box-shadow: 0 4px 14px -8px rgba(15, 51, 100, .2);
  margin-bottom: 1.3rem;
}
.hero-badge svg { width: 15px; height: 15px; }
.hero-numeri {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 3.2rem; max-width: 640px;
}
.hero-numeri .numero {
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  padding: .9rem 1.1rem;
}
.hero-numeri strong { font-family: var(--font-titoli); font-size: 1.25rem; color: var(--blu); display: block; }
.hero-numeri span { font-size: .82rem; color: var(--testo-soft); }

/* ---------- Card ---------- */
.griglia { display: grid; gap: 1.4rem; }
.griglia-2 { grid-template-columns: repeat(2, 1fr); }
.griglia-3 { grid-template-columns: repeat(3, 1fr); }
.griglia-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--bordo);
  border-radius: var(--raggio); padding: 1.7rem;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--ombra); }
.card h3 { font-size: 1.08rem; margin: 1rem 0 .5rem; }
.card p { font-size: .93rem; color: var(--testo-soft); }
.card .icona {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blu-chiaro); color: var(--blu);
  display: flex; align-items: center; justify-content: center;
}
.card .icona svg { width: 24px; height: 24px; }

.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }
.card-link .leggi {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600; font-size: .88rem; color: var(--blu); margin-top: .8rem;
}
.card-link .leggi svg { width: 15px; height: 15px; transition: transform .2s; }
.card-link:hover .leggi svg { transform: translateX(4px); }

/* ---------- Chi siamo ---------- */
.due-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.due-colonne .testo p { color: var(--testo-soft); margin-bottom: 1rem; }
.riquadro-blu {
  background: linear-gradient(150deg, var(--blu) 0%, var(--blu-scuro) 100%);
  color: #fff; border-radius: 20px; padding: 2.5rem;
  box-shadow: var(--ombra);
}
.riquadro-blu h3 { color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.riquadro-blu p { color: rgba(255, 255, 255, .85); font-size: .95rem; }
.riquadro-blu ul { list-style: none; margin-top: 1.2rem; }
.riquadro-blu li {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .45rem 0; font-size: .95rem; color: rgba(255, 255, 255, .92);
}
.riquadro-blu li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; color: #9cc3e8; }

/* ---------- Lista con spunte ---------- */
.lista-spunte { list-style: none; }
.lista-spunte li { display: flex; gap: .7rem; align-items: flex-start; padding: .4rem 0; }
.lista-spunte svg { width: 21px; height: 21px; flex-shrink: 0; margin-top: 4px; color: var(--blu); }

/* ---------- ANAMMI ---------- */
.anammi { display: flex; align-items: center; gap: 2.5rem; }
.anammi img { width: 120px; flex-shrink: 0; }
.anammi p { color: var(--testo-soft); }

/* ---------- Contatti ---------- */
.contatto-card { text-align: center; }
.contatto-card .icona { margin-inline: auto; }
.contatto-card a { font-weight: 600; }
.mappa {
  border-radius: var(--raggio); overflow: hidden;
  border: 1px solid var(--bordo); box-shadow: var(--ombra);
  margin-top: 2.5rem;
}
.mappa iframe { display: block; width: 100%; height: 420px; border: 0; }
.mappa-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .7rem; text-align: center;
  min-height: 420px; padding: 2rem;
  background: linear-gradient(150deg, #eef4fa 0%, #e0ebf6 100%);
}
.mappa-placeholder svg { width: 46px; height: 46px; color: var(--blu); }
.mappa-placeholder strong { font-family: var(--font-titoli); color: var(--blu-scuro); font-size: 1.05rem; }
.mappa-placeholder p { max-width: 460px; font-size: .87rem; color: var(--testo-soft); margin-bottom: .4rem; }
.mappa-placeholder a { font-size: .87rem; font-weight: 600; }

/* Pulsante WhatsApp flottante
   Su desktop si allarga al passaggio del mouse mostrando l'etichetta.
   Su mobile resta un cerchio, sopra la barra contatti fissa. */
.whatsapp-flottante {
  position: fixed; right: 22px; bottom: 26px; z-index: 95;
  height: 58px; border-radius: 999px;
  padding: 0 13px;
  background: #25d366;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -6px rgba(37, 211, 102, .6);
  transition: box-shadow .25s ease, background .25s ease;
}
.whatsapp-flottante:hover { background: #1fbb59; box-shadow: 0 12px 28px -6px rgba(37, 211, 102, .75); }
.whatsapp-flottante:focus-visible {
  outline: 3px solid var(--blu-scuro);
  outline-offset: 3px;
}
.whatsapp-flottante svg { width: 32px; height: 32px; color: #fff; flex: none; }
.whatsapp-flottante .etichetta {
  font-family: var(--font-titoli); font-weight: 600; font-size: .95rem;
  color: #fff; white-space: nowrap;
  max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width .3s ease, opacity .25s ease, margin .3s ease;
}
.whatsapp-flottante:hover .etichetta,
.whatsapp-flottante:focus-visible .etichetta {
  max-width: 240px; opacity: 1; margin-left: .5rem; margin-right: .3rem;
}
@media (max-width: 760px) {
  .whatsapp-flottante {
    right: 14px; height: 52px; padding: 0 10px;
    bottom: calc(60px + env(safe-area-inset-bottom) + 14px);
  }
  /* Su touch il :hover resta attivo dopo il tocco: etichetta sempre nascosta */
  .whatsapp-flottante .etichetta,
  .whatsapp-flottante:hover .etichetta { max-width: 0; opacity: 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-flottante, .whatsapp-flottante .etichetta { transition: none; }
}
body.menu-aperto .whatsapp-flottante { display: none; }

/* Barra contatti fissa su mobile */
.barra-mobile { display: none; }
@media (max-width: 760px) {
  .barra-mobile {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #fff; border-top: 1px solid var(--bordo);
    box-shadow: 0 -4px 18px -10px rgba(15, 51, 100, .35);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .barra-mobile a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .9rem .5rem;
    font-family: var(--font-titoli); font-weight: 600; font-size: .95rem;
    color: var(--blu-scuro);
  }
  .barra-mobile a:first-child { border-right: 1px solid var(--bordo); }
  .barra-mobile a.principale { background: var(--blu); color: #fff; }
  .barra-mobile svg { width: 19px; height: 19px; }
  body { padding-bottom: 60px; }
  body.menu-aperto .barra-mobile { display: none; }
}

/* ---------- Banda CTA ---------- */
.cta-banda {
  background: linear-gradient(140deg, var(--blu) 0%, var(--blu-notte) 100%);
  color: #fff; text-align: center;
  padding: 4rem 0;
}
.cta-banda h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .7rem; }
.cta-banda p { color: rgba(255, 255, 255, .8); max-width: 560px; margin: 0 auto 1.8rem; }

/* ---------- Pagina interna / articoli ---------- */
.testata-pagina {
  background: linear-gradient(160deg, #f2f7fc 0%, #e2edf8 100%);
  padding: 3.5rem 0 3rem;
}
.testata-pagina h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); max-width: 800px; }
.testata-pagina .sottotitolo { color: var(--testo-soft); max-width: 640px; margin-top: .8rem; }
.briciole {
  font-size: .85rem; color: var(--testo-soft); margin-bottom: 1rem;
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.briciole svg { width: 13px; height: 13px; }

/* Data di ultimo aggiornamento sotto il titolo */
.data-aggiornamento {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: 1.1rem;
  font-size: .85rem; color: var(--testo-soft);
}
.data-aggiornamento svg { width: 15px; height: 15px; flex: none; }

/* Indice della guida */
.indice-guida {
  background: var(--bg-alt);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  padding: 1.3rem 1.6rem;
  margin-bottom: 2.4rem;
}
.indice-guida h2 {
  font-size: .82rem !important;
  margin: 0 0 .8rem !important;
  letter-spacing: .12em; text-transform: uppercase; color: var(--testo-soft);
}
.indice-guida ol {
  list-style: none; margin: 0 !important; padding: 0;
  counter-reset: voce;
}
.indice-guida li { margin-bottom: .45rem; counter-increment: voce; }
.indice-guida li:last-child { margin-bottom: 0; }
.indice-guida a {
  font-weight: 500; text-decoration: none;
  display: inline-flex; gap: .6rem; align-items: baseline;
  line-height: 1.45;
}
.indice-guida a::before {
  content: counter(voce) ".";
  color: var(--azzurro); font-weight: 600; font-size: .88rem;
  min-width: 1.1rem;
}
.indice-guida a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Ancora visibile solo al passaggio sui titoli di sezione */
.articolo h2 .ancora {
  opacity: 0; margin-left: .4rem; font-weight: 500;
  color: var(--azzurro); text-decoration: none;
  transition: opacity .2s ease;
}
.articolo h2:hover .ancora, .articolo h2 .ancora:focus-visible { opacity: 1; }
@media (hover: none) { .articolo h2 .ancora { display: none; } }

.articolo { padding: 3.5rem 0 4.5rem; }
.articolo h2 { font-size: 1.45rem; margin: 2.4rem 0 .9rem; scroll-margin-top: 100px; }
.articolo h3 { font-size: 1.15rem; margin: 1.8rem 0 .7rem; }
.articolo p { margin-bottom: 1.1rem; }
.articolo ul, .articolo ol { margin: 0 0 1.2rem 1.4rem; }
.articolo li { margin-bottom: .45rem; }
.articolo .nota {
  background: var(--blu-chiaro); border-left: 4px solid var(--blu);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.4rem; margin: 1.6rem 0; font-size: .95rem;
}
.articolo a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.articolo a.btn { text-decoration: none; }
.articolo a.btn-primario, .articolo a.btn-primario:hover { color: #fff; }

/* ---------- Fonti normative ---------- */
.fonti {
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid var(--bordo);
}
.fonti h2 {
  font-size: 1rem !important; margin: 0 0 .9rem !important;
  letter-spacing: .04em; text-transform: uppercase; color: var(--testo-soft);
}
.fonti ul { list-style: none; margin: 0 0 1rem !important; }
.fonti li {
  display: flex; gap: .55rem; align-items: flex-start;
  font-size: .89rem; margin-bottom: .5rem; color: var(--testo-soft);
}
.fonti li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 4px; color: var(--azzurro); }
.fonti a { font-weight: 600; }
.fonti .avviso { font-size: .82rem; color: var(--testo-soft); font-style: italic; margin: 0; }

/* ---------- Guide correlate ---------- */
.guide-correlate {
  margin-top: 3rem; padding-top: 1.8rem;
  border-top: 1px solid var(--bordo);
}
.guide-correlate h2 {
  font-size: 1rem !important; margin: 0 0 1.2rem !important;
  letter-spacing: .04em; text-transform: uppercase; color: var(--testo-soft);
}
.guide-correlate .griglia { gap: 1rem; }
.guide-correlate .card { padding: 1.3rem; }
.guide-correlate .card h3 { font-size: 1rem; margin: .8rem 0 .4rem; }
.guide-correlate .card p { font-size: .86rem; margin: 0; }
.guide-correlate .card .icona { width: 40px; height: 40px; border-radius: 10px; }
.guide-correlate .card .icona svg { width: 20px; height: 20px; }
/* neutralizza lo stile dei link di testo dell'articolo */
.guide-correlate a { text-decoration: none; font-weight: 500; }
.guide-correlate .leggi { font-weight: 600; }

.box-aiuto {
  margin-top: 3rem; background: var(--bg-alt);
  border: 1px solid var(--bordo); border-radius: var(--raggio);
  padding: 1.8rem; display: flex; flex-wrap: wrap; gap: 1.2rem;
  align-items: center; justify-content: space-between;
}
.box-aiuto strong { font-family: var(--font-titoli); color: var(--blu-scuro); font-size: 1.05rem; }
.box-aiuto p { margin: 0; font-size: .92rem; color: var(--testo-soft); }

/* ---------- Emergenze ---------- */
.emerg-critica {
  background: #fbeceb; border: 1px solid #f2b8b4;
  border-left: 5px solid #d64541; border-radius: var(--raggio);
  padding: 1.6rem 1.8rem; margin: 1.8rem 0 2.4rem;
}
.emerg-critica h2 { color: #a5261f; font-size: 1.2rem; margin: 0 0 .4rem; }
.emerg-critica p { font-size: .95rem; color: #7a2019; margin: 0 0 1rem; }
.emerg-numeri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.emerg-numeri a {
  background: #fff; border: 1px solid #f2b8b4; border-radius: 12px;
  padding: .9rem 1rem; text-align: center;
}
.emerg-numeri a .num { display: block; font-family: var(--font-titoli); font-weight: 700; font-size: 1.7rem; color: #d64541; }
.emerg-numeri a .et { display: block; font-size: .8rem; color: var(--testo-soft); margin-top: .2rem; }

.emerg-card { display: flex; flex-direction: column; }
.emerg-card .testa { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.emerg-card .testa .icona { width: 42px; height: 42px; flex-shrink: 0; }
.emerg-card .testa h3 { margin: 0; font-size: 1.08rem; }
.emerg-card .passi { list-style: none; margin: 0 0 1rem; }
.emerg-card .passi li { display: flex; gap: .6rem; align-items: flex-start; padding: .3rem 0; font-size: .92rem; color: var(--testo-soft); }
.emerg-card .passi svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--blu); }
.emerg-card .chiama {
  margin-top: auto; background: var(--blu-chiaro); border-radius: 12px;
  padding: .85rem 1rem; display: flex; flex-direction: column; gap: .1rem;
}
.emerg-card .chiama .servizio { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--testo-soft); }
.emerg-card .chiama a.num { font-family: var(--font-titoli); font-weight: 700; font-size: 1.35rem; color: var(--blu); }
.emerg-card .chiama .disp { font-size: .8rem; color: var(--testo-soft); }
.emerg-card .chiama .ambito {
  align-self: flex-start; margin-top: .45rem; padding: .18rem .55rem;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; line-height: 1.35;
}
.emerg-card .chiama .ambito.locale { background: #fdeaea; color: #a32b28; }
.emerg-card .chiama .ambito.nazionale { background: #e6f2e9; color: #256a3c; }
@media (max-width: 620px) { .emerg-numeri { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-lista { display: grid; gap: .9rem; }
.faq-item {
  background: #fff; border: 1px solid var(--bordo);
  border-radius: var(--raggio); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-titoli); font-weight: 600;
  color: var(--blu-scuro);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: background .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-alt); }
.faq-item summary svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--blu); transition: transform .3s; }
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-item .risposta { padding: 0 1.4rem 1.3rem; color: var(--testo-soft); font-size: .96rem; }
.faq-item .risposta p { margin-bottom: .7rem; }
.faq-item .risposta a { font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--blu-notte); color: rgba(255, 255, 255, .78); }
.footer-main {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 2.5rem; padding: 3.5rem 0 2.5rem;
}
.footer h4 {
  color: #fff; font-size: .95rem; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 1.1rem;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: .55rem; }
.footer a { color: rgba(255, 255, 255, .78); font-size: .93rem; }
.footer a:hover { color: #fff; }
.footer p { font-size: .93rem; }
.footer-brand img { height: 40px; filter: invert(1); opacity: .9; margin-bottom: 1rem; }
.footer-brand .nome { font-family: var(--font-titoli); font-weight: 700; color: #fff; font-size: 1.1rem; }
.footer-brand small { display: block; letter-spacing: .16em; text-transform: uppercase; font-size: .62rem; color: rgba(255,255,255,.55); margin-bottom: 1rem; }
.link-recensione { display: inline-flex; align-items: center; gap: .45rem; }
.link-recensione svg { width: 15px; height: 15px; flex-shrink: 0; color: #f0b429; }
.footer-contatti li { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; }
.footer-contatti svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 4px; color: #7fa9d3; }
.footer-legale {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.4rem 0; font-size: .82rem;
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between;
  color: rgba(255, 255, 255, .55);
}
.footer-legale a { color: rgba(255, 255, 255, .65); font-size: .82rem; }

/* ---------- Tabelle nelle guide ---------- */
.tabella-wrap {
  overflow-x: auto; margin: 1.6rem 0;
  border: 1px solid var(--bordo); border-radius: var(--raggio);
  -webkit-overflow-scrolling: touch;
}
.tabella { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; background: #fff; }
.tabella th, .tabella td {
  padding: .75rem .95rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--bordo);
}
.tabella thead th {
  background: var(--blu-chiaro); font-family: var(--font-titoli);
  color: var(--blu-scuro); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .05em; line-height: 1.4;
}
.tabella tbody tr:last-child td { border-bottom: 0; }
.tabella tbody tr:nth-child(even) { background: var(--bg-alt); }
.tabella td strong { color: var(--blu-scuro); }
.articolo .tabella ul { margin: 0 0 0 1.1rem; }
.articolo .tabella li { margin-bottom: .2rem; }
.tabella-nota { font-size: .82rem; color: var(--testo-soft); font-style: italic; margin: -.9rem 0 1.6rem; }

/* ---------- Riquadro di avvertenza ---------- */
.articolo .avvertenza {
  background: #fdf3e6; border-left: 4px solid #d18324;
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.4rem; margin: 1.6rem 0; font-size: .95rem;
}
.articolo .avvertenza strong { color: #8a4d0f; }

/* ---------- FAQ: ricerca e categorie ---------- */
.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;
}
.faq-ricerca { margin-bottom: 1.6rem; }
.campo-ricerca {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1px solid var(--bordo); border-radius: 999px;
  padding: .2rem .4rem .2rem 1rem; transition: border-color .2s, box-shadow .2s;
}
.campo-ricerca:focus-within { border-color: var(--blu); box-shadow: 0 0 0 3px rgba(23, 73, 124, .12); }
.campo-ricerca > svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--azzurro); }
.campo-ricerca input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--font-testo); font-size: 1rem; color: var(--testo);
  padding: .75rem .7rem;
}
.campo-ricerca input::placeholder { color: var(--testo-soft); opacity: .75; }
.campo-ricerca input::-webkit-search-cancel-button { display: none; }
.pulisci-ricerca {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0; margin-right: .2rem;
  border: 0; border-radius: 50%; background: var(--bg-alt);
  color: var(--testo-soft); cursor: pointer; transition: background .2s, color .2s;
}
.pulisci-ricerca:hover { background: var(--blu-chiaro); color: var(--blu); }
.pulisci-ricerca svg { width: 15px; height: 15px; }
.esito-ricerca {
  margin: .7rem 0 0; padding-left: .3rem;
  font-size: .87rem; color: var(--testo-soft); min-height: 1.2em;
}

.faq-categorie { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; }
.faq-categorie a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .9rem; border-radius: 999px;
  border: 1px solid var(--bordo); background: #fff;
  font-size: .86rem; font-weight: 500; color: var(--testo-soft);
  transition: border-color .2s, color .2s, background .2s;
}
.faq-categorie a:hover { border-color: var(--blu); color: var(--blu); background: var(--blu-chiaro); }
.faq-categorie a span {
  font-size: .74rem; font-weight: 600; color: var(--azzurro);
  background: var(--blu-chiaro); border-radius: 999px; padding: .05rem .42rem;
}
.faq-categorie a:hover span { background: #fff; }

.faq-categoria { margin-bottom: 2.6rem; scroll-margin-top: 100px; }
.faq-categoria:last-of-type { margin-bottom: 0; }
.faq-categoria > h2 {
  font-size: .82rem; margin-bottom: .9rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--testo-soft);
  padding-bottom: .55rem; border-bottom: 1px solid var(--bordo);
}
.faq-item[hidden], .faq-categoria[hidden] { display: none; }
.faq-item .risposta ul { margin: 0 0 .7rem 1.2rem; }
.faq-item .risposta li { margin-bottom: .3rem; }
.nessun-risultato {
  background: var(--bg-alt); border: 1px solid var(--bordo); border-radius: var(--raggio);
  padding: 1.6rem; text-align: center; color: var(--testo-soft); font-size: .95rem;
}

/* ---------- Animazioni ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visibile { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) and (min-width: 761px) {
  .nav { gap: 1.05rem; }
  .nav a { font-size: .88rem; }
  .nav a.btn-primario { padding: .6rem 1.15rem; font-size: .88rem; }
  .brand-name { font-size: 1rem; }
}

@media (max-width: 980px) {
  .hero-filigrana { width: 78vw; right: -14%; bottom: -7%; opacity: .3; }
  .griglia-4 { grid-template-columns: repeat(2, 1fr); }
  .griglia-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .due-colonne { grid-template-columns: 1fr; gap: 2.2rem; }
}

@media (max-width: 760px) {
  .faq-categorie { gap: .4rem; }
  .faq-categorie a { font-size: .8rem; padding: .36rem .75rem; }
  .tabella { font-size: .84rem; min-width: 480px; }
  .tabella th, .tabella td { padding: .6rem .7rem; }
  /* Il menu mobile e' posizionato in modo assoluto rispetto a .header:
     .header ha backdrop-filter, che rende l'header stesso il blocco di
     riferimento dei figli in position:fixed (il pannello risulterebbe
     alto 0px). Con position:absolute il comportamento e' esplicito. */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 76px);
    height: calc(100dvh - 76px);
    background: #fff; flex-direction: column;
    align-items: flex-start; padding: 2rem 8%;
    gap: 1.3rem; font-size: 1.1rem;
    transform: translateX(100%); transition: transform .3s ease, visibility .3s;
    visibility: hidden;
    overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid var(--bordo);
  }
  body.menu-aperto .nav { transform: translateX(0); visibility: visible; }
  body.menu-aperto { overflow: hidden; }
  .nav a { font-size: 1.05rem; }
  .nav .btn { margin: .5rem 0 0; }
  .hamburger { display: block; }
  .section { padding: 3.2rem 0; }
  .griglia-2, .griglia-3, .griglia-4 { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 4rem; }
  .hero-numeri { grid-template-columns: 1fr 1fr; }
  .anammi { flex-direction: column; text-align: center; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .footer-legale { justify-content: center; text-align: center; }
  .mappa iframe { height: 320px; }
}
