/* =====================================================================
   La Voce delle Idee APS — Foglio di stile principale
   Palette brand (estratta dal sito ufficiale):
     petrolio  #1c4253   oro #f9be53 / #fbb822   crema #f3eee6
   Font: Roboto Slab (titoli) · Mulish (testo)
   ===================================================================== */

:root {
  --petrol:        #1c4253;
  --petrol-700:    #163643;
  --petrol-900:    #0f2731;
  --petrol-soft:   #2c5769;
  --gold:          #f9be53;
  --gold-deep:     #fbb822;
  --gold-soft:     #fdedcc;
  --cream:         #f3eee6;
  --cream-2:       #faf7f1;
  --ink:           #22333b;
  --muted:         #4f5c65;
  --line:          #e6ded2;
  --white:         #ffffff;

  --radius:   14px;
  --radius-lg:22px;
  --shadow-sm: 0 2px 10px rgba(28,66,83,.06);
  --shadow:    0 14px 40px rgba(28,66,83,.12);
  --shadow-gold: 0 12px 30px rgba(249,190,83,.35);

  --container: 1200px;
  --ff-head: "Roboto Slab", Georgia, serif;
  --ff-body: "Mulish", system-ui, -apple-system, Segoe UI, sans-serif;
}

/* ---------- Reset leggero ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream-2);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--petrol); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-deep); }
h1,h2,h3,h4 { font-family: var(--ff-head); color: var(--petrol); line-height: 1.15; font-weight: 700; }
ul { list-style: none; padding: 0; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.icon { flex: none; }

/* ---------- Bottoni ---------- */
.btn {
  --btn-bg: var(--petrol);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--ff-body); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 0;
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, background .2s;
  box-shadow: var(--shadow-sm); letter-spacing: .01em;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn .icon { transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn-gold { --btn-bg: var(--gold); --btn-fg: var(--petrol-900); }
.btn-gold:hover { box-shadow: var(--shadow-gold); }
.btn-petrol { --btn-bg: var(--petrol); }
.btn-petrol:hover { box-shadow: var(--shadow); }
.btn-outline {
  --btn-bg: transparent; --btn-fg: var(--petrol);
  border: 2px solid var(--petrol); box-shadow: none;
}
.btn-outline:hover { background: var(--petrol); --btn-fg:#fff; }
.btn-light { --btn-bg:#fff; --btn-fg: var(--petrol); }
.btn-sm { padding: .55rem 1.15rem; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 100px; }
.brand-logo { height: 94px; width: auto; display: block; }
.primary-nav ul { display: flex; align-items: center; gap: .35rem; }
.primary-nav a {
  display: inline-block; padding: .55rem .85rem; border-radius: 8px;
  font-weight: 600; font-size: .97rem; color: var(--petrol);
  position: relative;
}
.primary-nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .34rem;
  height: 2px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.primary-nav a:hover::after, .primary-nav a.is-active::after { transform: scaleX(1); }
.primary-nav a.is-active { color: var(--petrol); }
.nav-cta { margin-left: .6rem; }
.nav-cta a::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 26px; height: 2.5px; background: var(--petrol); border-radius: 2px; margin: 5px 0; transition: .25s; }

/* ---------- Sezioni generiche ---------- */
.section { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 4vw, 4rem) 0; }
.bg-cream { background: var(--cream); }
.bg-petrol { background: var(--petrol); color: #eaf1f4; }
.bg-petrol h1,.bg-petrol h2,.bg-petrol h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  max-width: 100%;
  font-family: var(--ff-body); font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; font-size: .92rem; color: var(--gold-deep);
  margin-bottom: .9rem;
}
.eyebrow::before { content:""; width: 26px; height: 2px; background: var(--gold); }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: .9rem; }
.lead { font-size: 1.18rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(249,190,83,.20), transparent 60%),
    linear-gradient(160deg, var(--petrol) 0%, var(--petrol-900) 100%);
  color: #fff;
}
.hero::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 59h60M59 0v60' stroke='%23ffffff' stroke-opacity='.03'/%3E%3C/svg%3E");
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}
.hero-inner > * { min-width: 0; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; letter-spacing: -.01em; }
.hero p { color: #cfe0e7; font-size: 1.2rem; max-width: 40ch; margin: 1.4rem 0 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-figure { position: relative; }
.hero-figure img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 30%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hero-badge {
  position: absolute; bottom: -22px; left: -22px;
  background: #fff; color: var(--petrol); border-radius: var(--radius);
  padding: 1rem 1.3rem; box-shadow: var(--shadow); display: flex; gap: .85rem; align-items: center;
}
.hero-badge.right { left: auto; right: -22px; }
.hero-badge .num { font-family: var(--ff-head); font-size: 1.7rem; font-weight: 800; color: var(--gold-deep); }
.hero-badge small { color: var(--muted); font-weight: 600; }

/* ---------- Pilastri ---------- */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.pillar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s; position: relative;
}
.pillar:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.pillar .ic {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-deep); margin-bottom: 1.1rem;
}
.pillar h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.pillar p { color: var(--muted); }

/* ---------- Card griglia (servizi/aree) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.6rem; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 1100px; margin-inline: auto; gap: 1.4rem; }
.card-grid.cols-2 .card { padding: 1.5rem 2rem; }
.card-grid.cols-2 .card .ic { width: 54px; height: 54px; margin-bottom: .8rem; }
@media (max-width: 620px) { .card-grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.1rem 1.9rem; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold); }
.card .ic {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--petrol); color: var(--gold); margin-bottom: 1.2rem;
}
.card h3 { font-size: 1.3rem; margin-bottom: .55rem; }
.card p { color: var(--muted); }

/* ---------- Split (chi siamo / progetto) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .split-media img.chi-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; }
}
.split-body h2 { font-size: clamp(1.8rem,3vw,2.5rem); margin-bottom: 1rem; }
.split-body p { color: var(--muted); margin-bottom: 1rem; }
.split-body p:last-of-type { margin-bottom: 1.6rem; }

/* elenco valori/spunte */
.tick-list { display: grid; gap: .7rem; margin: 1.3rem 0 1.8rem; }
.tick-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ink); font-weight: 500; }
.tick-list .ic { color: var(--gold-deep); margin-top: .15rem; }

.chips-label { font-family: var(--ff-head); font-weight: 700; color: var(--petrol); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; margin-top: 1.6rem; margin-bottom: -.2rem; }
.value-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.value-chips span {
  background: var(--gold-soft); color: var(--petrol-700); font-weight: 700;
  padding: .5rem 1.05rem; border-radius: 999px; font-size: .95rem;
}

/* ---------- CTA fascia ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(249,190,83,.18), transparent 60%),
    linear-gradient(120deg, var(--petrol), var(--petrol-900));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2.4rem,4vw,3.6rem);
  display: grid; grid-template-columns: 1.5fr auto; gap: 2rem; align-items: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem,3vw,2.3rem); }
.cta-band p { color: #cfe0e7; margin-top: .6rem; max-width: 55ch; }
.cta-band .actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Page hero (pagine interne) ---------- */
.page-hero {
  background:
    radial-gradient(800px 360px at 88% -20%, rgba(249,190,83,.18), transparent 60%),
    linear-gradient(160deg, var(--petrol), var(--petrol-900));
  color: #fff; padding: clamp(3rem,5vw,4.6rem) 0 clamp(2.6rem,4vw,3.6rem);
  text-align: center;
}
.page-hero .eyebrow { color: var(--gold); justify-content: center; }
.page-hero h1 { color: #fff; font-size: clamp(2.1rem,4vw,3.2rem); }
.page-hero p { color: #cfe0e7; max-width: 60ch; margin: 1rem auto 0; font-size: 1.12rem; }
.breadcrumb { color: #9fb9c4; font-size: .9rem; margin-bottom: 1rem; }
.breadcrumb a { color: var(--gold); }

/* ---------- Prose (contenuti editoriali) ---------- */
.prose { max-width: 760px; }
.prose p { color: #3a4a51; margin-bottom: 1.15rem; font-size: 1.08rem; }
.prose strong { color: var(--petrol); }

/* Pagine legali */
.legal-prose h3 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; color: var(--petrol); }
.legal-prose h3::before { content:""; display:inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--gold); margin-right: .55rem; vertical-align: middle; }
.legal-prose code { background: var(--cream); padding: .1rem .4rem; border-radius: 5px; font-size: .92em; color: var(--petrol-700); }
.legal-updated { max-width: 760px; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; font-style: italic; }
.legal-prose ul { margin: 0 0 1.15rem; padding-left: 1.3rem; list-style: disc; }
.legal-prose ul li { color: #3a4a51; margin-bottom: .5rem; }
.legal-prose .table-wrap { overflow-x: auto; margin: 0 0 1.3rem; }
.legal-prose table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: .96rem; }
.legal-prose th, .legal-prose td { text-align: left; padding: .7rem .9rem; border: 1px solid var(--line); vertical-align: top; }
.legal-prose thead th { background: var(--cream); color: var(--petrol); font-family: var(--ff-head); }

/* ---------- Convenzioni ---------- */
.conv-group { margin-bottom: 2.6rem; }
.conv-group h3 {
  font-size: 1.4rem; margin-bottom: 1.2rem; padding-bottom: .6rem;
  border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: .6rem;
}
.conv-group h3::before { content:""; width: 12px; height: 12px; border-radius: 3px; background: var(--gold); }
.conv-note { color: var(--muted); font-size: 1rem; margin: -.4rem 0 1.3rem; font-style: italic; }
.conv-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.2rem; }
.conv-item {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.conv-item h4 { font-size: 1.1rem; margin-bottom: .35rem; color: var(--petrol); }
.conv-item p { color: var(--muted); font-size: .98rem; }

/* ---------- Form ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem,3vw,2.6rem); box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .95rem; color: var(--petrol-700); }
.field label .req { color: #c0392b; }
.field input, .field select, .field textarea {
  font-family: var(--ff-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--cream-2); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(249,190,83,.18); background: #fff;
}
.check-line { display: flex; gap: .65rem; align-items: flex-start; font-size: .93rem; color: var(--muted); }
.check-line input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--gold-deep); }
.form-actions { margin-top: 1.4rem; }

.alert { border-radius: 12px; padding: .95rem 1.2rem; margin-bottom: 1.4rem; font-weight: 600; display:flex; gap:.6rem; align-items:center; }
.alert-success { background: #e7f6ec; color: #1e6b3a; border: 1px solid #bfe6cd; }
.alert-error   { background: #fdecec; color: #a5322b; border: 1px solid #f6cbc7; }

.info-panel { display: grid; gap: 1.2rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-item .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; flex: none; }
.info-item h4 { font-size: 1.05rem; margin-bottom: .1rem; }
.info-item a, .info-item span { color: var(--muted); }

/* ---------- Statistiche/founder strip ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; text-align: center; }
.fact { background: #fff; border-radius: var(--radius-lg); padding: 1.8rem 1rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.fact .n { font-family: var(--ff-head); font-size: 2rem; font-weight: 800; color: var(--gold-deep); }
.fact .l { color: var(--muted); font-weight: 600; margin-top: .2rem; }

/* ---------- Tessera ufficiale (immagine) ---------- */
.tessera-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; max-width: 940px; margin: 0 auto; align-items: start; }
.tessera-pair.single { grid-template-columns: 1fr; max-width: 620px; }
.tessera-official {
  margin: 0; padding: 14px; background: #fff;
  border-radius: 24px; border: 1px solid rgba(28,66,83,.08);
  box-shadow: 0 30px 60px -18px rgba(15,39,49,.42), 0 6px 16px rgba(15,39,49,.12);
}
.tessera-pair.single .tessera-official { max-width: 620px; margin: 0 auto; }
.tessera-official img {
  display: block; width: 100%; height: auto; border-radius: 16px;
  image-rendering: -webkit-optimize-contrast;
}
.tessera-official figcaption {
  text-align: center; margin-top: .7rem; font-family: var(--ff-head); font-weight: 700;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 720px) { .tessera-pair { grid-template-columns: 1fr; max-width: 620px; } }

/* ---------- Tessera sociosanitaria (fac-simile) ---------- */
.tessera {
  max-width: 600px; margin: 0 auto; border-radius: 22px; overflow: hidden;
  background: #fff; position: relative;
  box-shadow: 0 30px 60px -18px rgba(15,39,49,.45), 0 6px 16px rgba(15,39,49,.14);
  border: 1px solid rgba(28,66,83,.08);
}
.tessera::after { /* riflesso diagonale sottile per profondità */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 34%);
}
.tessera-top {
  position: relative; color: #fff; display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, var(--petrol-soft) 0%, var(--petrol) 45%, var(--petrol-900) 100%);
}
.tessera-top::before { /* texture a griglia leggera */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M0 43h44M43 0v44' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E");
}
.tessera-top > * { position: relative; z-index: 1; }
.tessera-badge {
  width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  flex: none; padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.22), 0 0 0 4px rgba(255,255,255,.12);
}
.tessera-badge img { max-width: 100%; max-height: 100%; width: auto; }
.tessera-head { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tessera-project { font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.tessera-name { font-family: var(--ff-head); font-weight: 800; text-transform: uppercase; font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.02; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.tessera-num {
  margin-left: auto; flex: none; width: 66px; height: 66px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd688, var(--gold) 60%, var(--gold-deep));
  color: var(--petrol-900); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--ff-head); font-weight: 800; font-size: 1.3rem; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.22), inset 0 0 0 2px rgba(255,255,255,.35);
}
.tessera-num small { font-size: .58rem; font-weight: 800; letter-spacing: .05em; opacity: .8; }
.tessera-mid {
  display: grid; grid-template-columns: 1fr auto; gap: 1.3rem; align-items: center; padding: 1.7rem 1.4rem;
  background: linear-gradient(180deg, #fff 0%, var(--cream-2) 100%);
}
.tessera-fields { display: grid; gap: 1.6rem; }
.tf { display: flex; align-items: flex-end; gap: .9rem; }
.tf span { font-family: var(--ff-head); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--petrol); font-size: .95rem; min-width: 96px; }
.tf-line { flex: 1; height: 0; border-bottom: 2px dashed #c2ccce; }
.tessera-photo {
  width: 172px; height: 124px; border-radius: 14px; overflow: hidden; flex: none;
  box-shadow: 0 8px 20px rgba(15,39,49,.22); border: 3px solid #fff; outline: 1px solid rgba(28,66,83,.08);
}
.tessera-photo img { width: 100%; height: 100%; object-fit: cover; }
.tessera-bottom {
  position: relative; color: #fff; display: flex; gap: 1rem 2.2rem; padding: 1.15rem 1.4rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--petrol) 0%, var(--petrol-900) 100%);
}
.tessera-bottom::before { content:""; position:absolute; left:1.4rem; right:1.4rem; top:0; height:1px; background: linear-gradient(90deg, transparent, rgba(249,190,83,.5), transparent); }
.tc { display: flex; gap: .75rem; align-items: center; }
.tc-ic {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--petrol-900);
  display: grid; place-items: center; flex: none; box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.3);
}
.tc b { display: block; font-size: .67rem; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.tc .v { font-weight: 700; font-size: 1rem; letter-spacing: .01em; }
.tessera-note { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: 1.2rem; }
@media (max-width: 480px) {
  .tessera-mid { grid-template-columns: 1fr; }
  .tessera-photo { width: 100%; height: 150px; order: -1; }
  .tessera-num { width: 56px; height: 56px; font-size: 1.1rem; }
  .tessera-badge { width: 56px; height: 56px; }
}

/* ---------- Banner volontari (a cavallo del footer) ---------- */
.volunteer-banner-wrap { position: relative; z-index: 3; margin-top: clamp(1rem, 3vw, 2rem); }
.volunteer-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap;
  background: linear-gradient(120deg, #fdedcc 0%, var(--gold) 100%);
  border-radius: var(--radius-lg); padding: 1.15rem 1.6rem;
  /* metà sopra (sezione chiara) e metà sotto (footer petrolio) */
  margin: 0 0 -42px; box-shadow: 0 18px 40px rgba(15,39,49,.28);
}
.vb-copy { display: flex; align-items: center; gap: 1rem; }
.vb-ic { width: 48px; height: 48px; border-radius: 50%; background: rgba(28,66,83,.1); color: var(--petrol); display: grid; place-items: center; flex: none; }
.vb-copy strong { display: block; font-family: var(--ff-head); font-size: 1.2rem; color: var(--petrol-900); }
.vb-copy span { color: var(--petrol-700); font-weight: 600; font-size: .95rem; }
.vb-btn { flex: none; }

@media (max-width: 600px) {
  .volunteer-banner-wrap { margin-top: clamp(.5rem, 3vw, 1.2rem); }
  .volunteer-banner {
    flex-direction: column; align-items: stretch; text-align: left;
    gap: 1rem; padding: 1.25rem 1.3rem; margin-bottom: -64px;
  }
  .vb-copy { align-items: flex-start; }
  .vb-copy strong { font-size: 1.25rem; margin-bottom: .15rem; }
  .vb-btn { width: 100%; justify-content: center; }
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1.2rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,39,49,.55); backdrop-filter: blur(3px); animation: fade .25s ease; }
.modal-dialog {
  position: relative; z-index: 1; width: min(620px, 100%); max-height: 90vh; overflow-y: auto;
  background: linear-gradient(120deg, #fdedcc 0%, var(--gold) 100%);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 30px 70px rgba(15,39,49,.4); animation: pop .28s ease;
}
/* leggibilità sul fondo dorato */
.modal-dialog .eyebrow { color: var(--petrol-700); }
.modal-dialog .eyebrow::before { background: var(--petrol); }
.modal-dialog .field input,
.modal-dialog .field textarea { background: #fff; border-color: rgba(28,66,83,.18); }
.modal-dialog .field input:focus,
.modal-dialog .field textarea:focus { border-color: var(--petrol); box-shadow: 0 0 0 4px rgba(28,66,83,.15); }
.modal-dialog .check-line { color: var(--petrol-700); }
.modal-dialog .check-line a { color: var(--petrol); }
.modal-dialog .btn-gold { background: var(--petrol); color: #fff; }
.modal-dialog .btn-gold:hover { box-shadow: var(--shadow); }
.modal-close { background: #fff; }
.modal-dialog h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); margin-bottom: .25rem; }
.modal-sub { color: var(--petrol-700); margin-bottom: 1.1rem; font-size: .95rem; }
/* compattazione per evitare lo scroll interno del popup */
.modal-dialog .eyebrow { margin-bottom: .5rem; }
.modal-dialog .form-grid { gap: .7rem .9rem; }
.modal-dialog .field label { font-size: .9rem; }
.modal-dialog .field input,
.modal-dialog .field textarea { padding: .62rem .8rem; }
.modal-dialog .field textarea { min-height: 78px; }
.modal-dialog .check-line { font-size: .88rem; }
.modal-dialog .form-actions { margin-top: 1rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1.1rem; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--cream); color: var(--petrol); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background .2s, transform .2s;
}
.modal-close:hover { background: var(--gold-soft); transform: rotate(90deg); }
body.modal-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-dialog { animation: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--petrol-900); color: #b9cdd5; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 2.5rem; padding: clamp(3rem,5vw,4.5rem) 0 2.5rem; }
/* su mobile il banner volontari si sovrappone: più spazio sopra il logo del footer */
@media (max-width: 600px) { .footer-grid { padding-top: 130px; } }
.footer-logo { height: 84px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 1rem; }
.footer-tagline { color: var(--gold); font-weight: 700; margin-bottom: .6rem; }
.footer-mission { font-size: .96rem; max-width: 42ch; }
.footer-col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1.1rem; }
.footer-links li, .footer-contact li { margin-bottom: .6rem; }
.footer-links a { color: #b9cdd5; }
.footer-links a:hover { color: var(--gold); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact .icon { color: var(--gold); margin-top: .15rem; }
.footer-contact a { color: #b9cdd5; }
.footer-contact a:hover { color: var(--gold); }
.footer-social { display: flex; gap: .7rem; margin-top: 1rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: background .2s, transform .2s;
}
.footer-social a:hover { background: var(--gold); color: var(--petrol-900); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1.4rem; padding: 1.2rem 0; font-size: .86rem; color: #8fa8b2; flex-wrap: wrap; }
.footer-legal { display: flex; align-items: center; gap: .7rem; }
.footer-legal a { color: #b9cdd5; }
.footer-legal a:hover { color: var(--gold); }
.footer-credit a { color: var(--gold); font-weight: 700; }
.footer-credit a:hover { color: #fff; }

/* ---------- Mission / Come operiamo (due card) ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.mv-card {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line);
  padding: clamp(1.8rem, 3vw, 2.6rem); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.mv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mv-title {
  color: var(--gold-deep); font-family: var(--ff-head); font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; font-size: clamp(1.25rem, 2vw, 1.6rem);
  margin-bottom: 1.1rem;
}
.mv-card p { color: #3a4a51; margin-bottom: 1rem; font-size: 1.05rem; }
.mv-card p:last-of-type { margin-bottom: 0; }
.mv-values { display: grid; gap: .7rem; margin-top: 1.4rem; }
.mv-values li { position: relative; padding-left: 1.6rem; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.mv-values li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
}
@media (max-width: 760px) { .mv-grid { grid-template-columns: 1fr; } }

/* ---------- Organigramma ---------- */
.org { --org-line: #c9d6db; display: flex; flex-direction: column; align-items: center; margin-top: 1rem; max-width: 680px; margin-inline: auto; }
.org-row { display: flex; justify-content: center; width: 100%; }
.org-link { width: 2px; height: 24px; background: var(--org-line); }

.org-node {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem;
  background: #fff; border: 2px solid var(--org-line); border-radius: 13px;
  padding: .85rem 1.15rem; min-width: 165px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.org-node:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.org-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--petrol); }
.org-ic svg { width: 21px; height: 21px; }
.org-ic.gold { background: var(--petrol); color: var(--gold); }
.org-title { font-family: var(--ff-head); font-weight: 700; color: var(--petrol); text-transform: uppercase; letter-spacing: .03em; font-size: .86rem; line-height: 1.15; }
.org-name { font-family: var(--ff-body); font-weight: 700; color: var(--petrol-soft); font-size: .82rem; }
.org-sub { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.org-top    { border-color: var(--petrol); }
.org-pres   { border-color: var(--gold-deep); background: linear-gradient(180deg,#fff, var(--gold-soft)); }
.org-pres .org-ic { background: var(--gold); color: var(--petrol-900); }
.org-council{ border-color: var(--petrol); background: var(--cream-2); min-width: 210px; }

.org-children { display: flex; justify-content: center; gap: 1.1rem; width: 100%; }
.org-child { position: relative; padding-top: 24px; display: flex; justify-content: center; }
.org-child::before { content:""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 24px; background: var(--org-line); }
.org-child::after  { content:""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--org-line); }
.org-child:first-child::after { left: 50%; }
.org-child:last-child::after  { right: 50%; }
.org-child:only-child::after  { display: none; }
.org-child .org-node { min-width: 155px; }
.org-leaf { border-color: var(--petrol); }

@media (max-width: 680px) {
  .org-children { flex-direction: column; align-items: center; gap: 0; }
  .org-child { padding-top: 22px; }
  .org-child::after { display: none; }
  .org-child::before { height: 22px; }
  .org-node, .org-council, .org-child .org-node { min-width: min(260px, 80vw); }
}

/* ---------- Pulsanti flottanti (WhatsApp / scroll-top) ---------- */
.float-btn {
  position: fixed; right: 22px; z-index: 80; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  box-shadow: 0 10px 26px rgba(15,39,49,.28); transition: transform .2s, box-shadow .2s, opacity .3s;
}
.float-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15,39,49,.34); }
.wa-float { bottom: 22px; background: #25d366; color: #fff; }
.wa-float:hover { color: #fff; }
.rev-float { left: 22px; right: auto; bottom: 84px; background: var(--gold); color: var(--petrol-900);
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center;
  width: auto; height: auto; padding: .7rem 1.2rem; border-radius: 999px; gap: .5rem;
  font-family: var(--ff-body); font-weight: 800; font-size: .95rem; letter-spacing: .01em; }
.rev-float svg { flex: none; }
.rev-float .rev-label { white-space: nowrap; }
.rev-float:hover { color: var(--petrol-900); box-shadow: var(--shadow-gold); }
.to-top { bottom: 86px; background: var(--petrol); color: #fff; }
.to-top[hidden] { display: none; }
.to-top.show { display: grid; animation: fbin .3s ease; }
@keyframes fbin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .float-btn { width: 50px; height: 50px; right: 16px; } .wa-float { bottom: 16px; } .to-top { bottom: 76px; } .rev-float { left: 16px; right: auto; bottom: 84px; width: auto; height: auto; padding: .6rem 1rem; font-size: .88rem; } }

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 90;
  width: min(760px, calc(100% - 2rem)); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 1.1rem 1.3rem;
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1 1 300px; }
.cookie-banner a { color: var(--petrol); font-weight: 700; text-decoration: underline; }
.cookie-actions { flex: none; }
@media (max-width: 600px) { .cookie-banner { bottom: 0; left: 0; transform: none; width: 100%; border-radius: 16px 16px 0 0; } }

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

/* ---------- Stampa / esportazione PDF ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fff; }
  .float-btn, .cookie-banner, .nav-toggle, .modal { display: none !important; }
  .site-header { position: static; box-shadow: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .card, .pillar, .mv-card, .conv-item, .tessera-official, .form-card,
  .split, .hero-inner, .cta-band, .footer-cta { break-inside: avoid; }
}

/* ---------- Recensioni ---------- */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 0; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; }
.review-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1rem;
  transition: transform .2s, box-shadow .2s;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.review-text { color: #3a4a51; font-size: 1.05rem; line-height: 1.6; flex: 1; font-style: italic; }
.review-author { display: flex; align-items: center; gap: .8rem; }
.review-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--petrol); color: var(--gold); display: grid; place-items: center; font-family: var(--ff-head); font-weight: 800; font-size: 1.15rem; flex: none; }
.review-author strong { display: block; color: var(--petrol); }
.review-author span { color: var(--muted); font-size: .9rem; }

.rev-hero-stat { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.1rem; color: var(--muted); font-size: 1.02rem; }
.rev-hero-stat strong { color: var(--petrol); font-size: 1.2rem; }
.page-hero .rev-hero-stat { color: #cfe0e7; }
.page-hero .rev-hero-stat strong { color: #fff; }

/* Selettore stelle interattivo (radio) */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-start; gap: .25rem; }
.star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-input label { color: #d6dbda; cursor: pointer; line-height: 0; transition: color .12s, transform .12s; }
.star-input label svg { display: block; }
.star-input input:checked ~ label { color: var(--gold); }
.star-input label:hover, .star-input label:hover ~ label { color: var(--gold-deep); transform: scale(1.06); }
.star-input:hover input:checked ~ label { color: #d6dbda; }
.star-input label:hover, .star-input label:hover ~ label { color: var(--gold-deep) !important; }
.star-input input:focus-visible ~ label { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 4px; }

/* ---------- Honeypot antispam (invisibile agli umani) ---------- */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-figure { max-width: 460px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.reverse .split-media { order: 0; }
  .pillars, .card-grid, .facts { grid-template-columns: 1fr 1fr; }
  .conv-list, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; z-index: 70; }
  .primary-nav {
    position: fixed; inset: 100px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .3s ease; padding: 1rem 0 1.4rem;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: .2rem; padding-inline: 1.25rem; }
  .primary-nav a { padding: .8rem .4rem; border-radius: 8px; }
  .primary-nav a::after { display: none; }
  .nav-cta { margin: .6rem 0 0; }
  .nav-cta a { width: 100%; justify-content: center; text-align: center; font-weight: 800; }
  .pillars, .card-grid, .facts, .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; gap: .3rem; }
  .hero-badge { left: 0; padding: .7rem .9rem; gap: .55rem; }
  .hero-badge.right { right: 0; left: auto; }
  .hero-badge .num { font-size: 1.3rem; }
}
