/* ==========================================================================
   M.E.D.A. Movimento Europeo Diversamente Abili International
   Foglio di stile unico. Font di sistema (nessun font esterno).
   Palette misurata sul logo: blu #0B0C75, giallo #F8E123 (solo su blu).
   ========================================================================== */

:root {
  /* palette */
  --brand: #0B0C75;        /* blu del disco del logo */
  --brand-600: #13148F;    /* hover dei pulsanti blu */
  --ink: #06073F;          /* blu del logo scurito: hero e footer */
  --accent: #F8E123;       /* giallo del logo: SOLO su fondo blu */
  --accent-600: #E6D11A;   /* hover dei pulsanti gialli */
  --text: #181A45;         /* testo corrente */
  --muted: #4A4D75;        /* testo secondario */
  --on-dark: #FFFFFF;
  --on-dark-muted: #C9CDF5;
  --bg: #FFFFFF;
  --bg-alt: #E8F1FB;       /* azzurro chiaro: fondo delle sezioni alternate */
  --bg-soft: #F4F7FC;      /* campi disattivati */
  --field: #5A5D8C;        /* bordo dei campi: 6,2:1 su bianco */
  --line: rgba(11, 12, 117, .16);
  --line-strong: rgba(11, 12, 117, .32);

  /* tipografia: una sola famiglia, quella del sistema */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* sistema */
  --shadow-sm: 0 2px 8px rgba(6, 7, 63, .08);
  --shadow-md: 0 12px 32px rgba(6, 7, 63, .12);
  --shadow-lg: 0 24px 60px rgba(6, 7, 63, .22);
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --masthead-h: 108px;
  --navbar-h: 60px;
  --section: clamp(64px, 9vw, 118px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-h) + 24px);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;          /* 18 px */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 {
  color: var(--brand);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-weight: 800;
}
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.01em; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; max-width: 70ch; }

a { color: var(--brand); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .16em; }

/* anello di fuoco: 3 px, blu su chiaro, giallo su blu */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible,
.site-footer :focus-visible,
.main-nav :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.cta-band :focus-visible { outline-color: var(--accent); }
/* sottomenu su fondo bianco: anello blu */
.main-nav .submenu :focus-visible { outline-color: var(--brand); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- salta al contenuto ---------- */
.skip-link {
  position: absolute; left: 16px; top: 12px; z-index: 1000;
  background: var(--accent); color: var(--brand);
  font-weight: 800; padding: 12px 20px; border-radius: 10px;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; outline: 3px solid var(--brand); outline-offset: 2px; }

main:focus { outline: none; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .75em 1.5em;
  font: inherit; font-weight: 750; font-size: 1.0625rem; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--bg-alt); }
/* su fondo blu */
.btn-accent { background: var(--accent); color: var(--brand); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
/* disattivato: leggibile, riconoscibile, non cliccabile */
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--bg-alt); color: var(--brand);
  border: 2px dashed var(--brand); cursor: not-allowed; transform: none;
}

/* ==========================================================================
   HEADER — due livelli: testata bianca col marchio + barra blu del menu.
   Scorrendo resta visibile solo la barra del menu (top negativo = testata).
   ========================================================================== */
.site-header {
  position: sticky; top: calc(-1 * var(--masthead-h)); z-index: 90;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.masthead { height: var(--masthead-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
  display: inline-flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--brand); min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand img { width: 80px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-sigla { font-size: 1.75rem; font-weight: 900; letter-spacing: .02em; line-height: 1; }
.brand-nome { font-size: .9375rem; font-weight: 650; line-height: 1.25; color: var(--muted); margin-top: 6px; max-width: 26ch; }

.masthead-actions { display: flex; align-items: center; gap: 20px; }
.masthead-pec { display: flex; flex-direction: column; font-size: .9375rem; line-height: 1.3; text-align: right; }
.masthead-pec span { color: var(--muted); font-weight: 650; }
.masthead-pec a { font-weight: 700; }

/* barra del menu */
.main-nav { background: var(--brand); }
.main-nav .container { display: flex; align-items: stretch; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 2px; }
.nav-menu > li { position: relative; display: flex; }
.nav-link, .sub-toggle {
  display: flex; align-items: center; gap: .4em;
  min-height: var(--navbar-h); padding: 0 16px;
  font: inherit; font-size: 1.0625rem; font-weight: 700; color: #fff;
  background: none; border: 0; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover, .sub-toggle:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.nav-link:focus-visible, .sub-toggle:focus-visible { outline-offset: -6px; }
.nav-link[aria-current="page"], .has-sub.is-current > .sub-toggle { box-shadow: inset 0 -5px 0 var(--accent); }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.submenu {
  list-style: none; margin: 0; padding: 10px;
  position: absolute; top: 100%; left: 0; min-width: 270px; z-index: 95;
  background: #fff; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); border-top: 5px solid var(--brand);
  display: none;
}
.submenu.is-open { display: block; }
/* senza JavaScript il sottomenu si apre col fuoco o col mouse */
.no-js .has-sub:focus-within > .submenu,
.no-js .has-sub:hover > .submenu { display: block; }
.submenu a {
  display: block; padding: 12px 14px; border-radius: 10px;
  color: var(--brand); font-weight: 650; text-decoration: none;
}
.submenu a:hover { background: var(--bg-alt); text-decoration: underline; }
.submenu a[aria-current="page"] { background: var(--bg-alt); box-shadow: inset 4px 0 0 var(--brand); }

.nav-menu > li.nav-cta { display: none; }

/* hamburger */
.nav-toggle {
  display: none; position: relative; z-index: 3;
  width: 52px; height: 52px; flex: none;
  border: 2px solid var(--brand); border-radius: 12px; background: #fff;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span:not(.visually-hidden) {
  display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--brand);
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* menu mobile: blocco pagina, velo, header senza effetti (template sito-html) */
body.is-locked { position: fixed; width: 100%; overflow: hidden; top: var(--scroll-lock-top, 0); overflow-anchor: none; }
.nav-overlay { display: none; }
.site-header.has-menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }

@media (max-width: 900px) {
  :root { --masthead-h: 80px; }
  html { scroll-padding-top: calc(var(--masthead-h) + 20px); }
  .site-header { top: 0; }
  .brand { gap: 12px; }
  .brand img { width: 60px; }
  .brand-sigla { font-size: 1.4rem; }
  .brand-nome { font-size: .8125rem; margin-top: 4px; max-width: 24ch; }
  .masthead-actions .masthead-pec, .masthead-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  /* pannello mobile su fondo bianco: anello blu su tutte le voci */
  .main-nav :focus-visible { outline-color: var(--brand); }

  .main-nav { background: none; }
  .main-nav .container { padding: 0; }

  .nav-overlay {
    display: block; position: fixed; inset: 0; z-index: 89;
    background: rgba(6, 7, 63, .55); border: 0; padding: 0; cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: opacity .38s var(--ease), visibility 0s linear .38s;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .38s var(--ease), visibility 0s linear 0s; }

  .nav-menu {
    position: fixed; inset: 0 0 0 auto; z-index: 2;
    width: min(88vw, 380px);
    background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: calc(var(--masthead-h) + 12px) 18px 40px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); visibility: hidden;
    transition: transform .38s var(--ease), visibility 0s linear .38s;
  }
  .nav-menu.is-open { transform: none; visibility: visible; transition: transform .38s var(--ease), visibility 0s linear 0s; }
  .nav-menu > li { flex-direction: column; }
  .nav-link, .sub-toggle {
    color: var(--brand); min-height: 52px; padding: 12px 14px; border-radius: 12px;
    font-size: 1.125rem; justify-content: space-between; width: 100%; text-align: left;
  }
  .nav-link:hover, .sub-toggle:hover { background: var(--bg-alt); }
  .nav-link:focus-visible, .sub-toggle:focus-visible { outline-color: var(--brand); outline-offset: -3px; }
  .nav-link[aria-current="page"], .has-sub.is-current > .sub-toggle { box-shadow: inset 5px 0 0 var(--brand); background: var(--bg-alt); }
  .submenu {
    position: static; min-width: 0; box-shadow: none; border: 0; border-left: 3px solid var(--line-strong);
    border-radius: 0; margin: 2px 0 8px 14px; padding: 2px 0 2px 8px;
  }
  .submenu a:focus-visible { outline-offset: -3px; }
  .nav-menu > li.nav-cta { display: block; margin-top: 16px; }
  .nav-cta .btn { width: 100%; }
}
@media (max-width: 380px) {
  .brand img { width: 52px; }
  .brand-nome { font-size: .75rem; max-width: 20ch; }
}
/* schermi bassi (telefono in orizzontale): l'header non resta appiccicato */
@media (max-height: 480px) and (max-width: 900px) {
  .site-header { position: relative; }
}

/* ==========================================================================
   HERO della home
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(125deg, var(--brand) 0%, #090A5C 48%, var(--ink) 100%);
  color: #fff;
  padding-block: clamp(56px, 8vw, 112px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { color: #fff; margin: 0; }
.hero-sigla { display: block; font-size: clamp(3.6rem, 11vw, 8.4rem); font-weight: 900; letter-spacing: -.01em; line-height: .95; }
.hero-nome { display: block; margin-top: .6em; font-size: clamp(1.2rem, 2.3vw, 1.75rem); font-weight: 650; letter-spacing: 0; line-height: 1.25; color: var(--on-dark-muted); max-width: 26ch; }
.hero-bar { display: block; width: 88px; height: 7px; background: var(--accent); border-radius: 4px; margin: clamp(26px, 3.5vw, 40px) 0 20px; }
.hero-motto { font-size: clamp(1.9rem, 4.2vw, 3.2rem); font-weight: 850; line-height: 1.08; letter-spacing: -.015em; color: var(--accent); margin: 0 0 clamp(28px, 3.5vw, 40px); max-width: 16ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badge { margin: 28px 0 0; font-size: 1rem; color: var(--on-dark-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-badge span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badge span + span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; }

/* il disco del logo con i cerchi concentrici (motivo astratto, decorativo) */
.hero-emblema { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-emblema svg.anelli { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-emblema img { position: relative; width: clamp(140px, 17vw, 200px); height: auto; border-radius: 50%; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }

/* ---------- testata delle pagine interne ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(125deg, var(--brand) 0%, var(--ink) 100%);
  color: #fff; padding-block: clamp(40px, 6vw, 76px) clamp(44px, 6vw, 80px);
}
.page-hero::after { /* cerchi concentrici: motivo astratto */
  content: ""; position: absolute; z-index: -1; right: -140px; top: 50%;
  width: 520px; height: 520px; transform: translateY(-50%); border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 38px, rgba(255, 255, 255, .07) 38px 40px);
  pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0; max-width: 20ch; }
.page-hero .lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--on-dark-muted); margin: 18px 0 0; max-width: 60ch; }
.page-hero .hero-bar { margin: 22px 0 0; }

.breadcrumb ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 1rem; }
.breadcrumb li { display: inline-flex; align-items: center; color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; color: var(--on-dark-muted); }
.breadcrumb a { color: #fff; }
.breadcrumb [aria-current="page"] { color: var(--on-dark-muted); }

/* ---------- sezioni ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: clamp(44px, 6vw, 72px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: .9375rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 34px; height: 4px; border-radius: 2px; background: var(--brand); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: 1.1875rem; }

/* ---------- citazione "Il nostro punto di forza" ---------- */
.forza { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.forza h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); padding-top: .6em; border-top: 5px solid var(--brand); }
.forza blockquote { margin: 0; }
.forza blockquote p {
  font-size: clamp(1.75rem, 3.6vw, 3rem); font-weight: 750; line-height: 1.2; letter-spacing: -.015em;
  color: var(--brand); max-width: 24ch; margin: 0 0 32px;
}
.forza .virgolette { color: var(--brand); }

/* ---------- le porte del sito ---------- */
.porte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.porta {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 28px 30px; min-height: 230px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.porta:hover, .porta:focus-within { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.porta-num { font-size: .9375rem; font-weight: 800; color: var(--muted); letter-spacing: .06em; }
.porta h3 { margin: 0; }
.porta h3 a { color: var(--brand); text-decoration: none; }
.porta h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.porta h3 a:focus-visible { outline: none; }
.porta:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.porta p { color: var(--muted); margin: 0; }
.porta-freccia { margin-top: auto; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; transition: transform .25s var(--ease); }
.porta-freccia svg { width: 20px; height: 20px; }
.porta:hover .porta-freccia { transform: translateX(4px); }

/* ---------- recapiti istituzionali ---------- */
.recapiti { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 5px solid var(--brand); }
.recapiti > div { padding: 22px 24px 8px 0; }
.recapiti > div + div { padding-left: 24px; border-left: 1px solid var(--line-strong); }
.recapiti dt { font-size: .9375rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.recapiti dd { margin: 0; font-weight: 650; color: var(--text); }

/* ---------- banda d'azione ---------- */
.cta-band { background: var(--brand); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::after {
  content: ""; position: absolute; z-index: -1; left: -180px; bottom: -260px;
  width: 560px; height: 560px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 44px, rgba(248, 225, 35, .12) 44px 47px);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; padding-block: clamp(52px, 7vw, 88px); }
.cta-band h2 { color: #fff; margin: 0 0 10px; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.cta-band p { color: var(--on-dark-muted); margin: 0; font-size: 1.1875rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- contenuti delle pagine interne ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

/* navigazione di sezione (es. Notizie: Comunicati · Eventi · Prima pagina) */
.subnav { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.subnav a { display: inline-flex; align-items: center; min-height: 52px; padding: 0 14px; font-weight: 700; text-decoration: none; }
.subnav a:hover { text-decoration: underline; }
.subnav a[aria-current="page"] { box-shadow: inset 0 -5px 0 var(--brand); }
.subnav a:focus-visible { outline-offset: -4px; }

/* indice interno alla pagina */
.toc { border-left: 5px solid var(--brand); padding: 4px 0 4px 20px; margin: 0 0 40px; }
.toc h2 { font-size: 1.125rem; margin: 0 0 8px; letter-spacing: .02em; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 4px 0; }

.blocco { margin-top: clamp(40px, 5vw, 64px); }
.blocco:first-child { margin-top: 0; }

/* scheda dati (sede, C.F., PEC) */
.scheda { border: 2px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); background: #fff; }
.scheda h2 { font-size: 1.5rem; }
.scheda dl { margin: 0; display: grid; gap: 16px; }
.scheda dt { font-size: .9375rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.scheda dd { margin: 2px 0 0; font-weight: 600; }
.scheda .pec-link { font-size: 1.25rem; font-weight: 800; }

/* ==========================================================================
   SEGNAPOSTO DICHIARATI — un solo marcatore per tutto il sito:
   class="in-preparazione" + data-mancante="Mxx"
   ========================================================================== */
.in-preparazione {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; color: var(--text);
  border: 2px solid var(--brand); border-left-width: 8px; border-radius: var(--radius);
  padding: 20px 22px; margin: 0 0 24px; max-width: 760px;
}
.section-alt .in-preparazione { background: #fff; }
.in-preparazione::before {
  content: ""; flex: none; width: 30px; height: 36px; margin-top: 2px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 36' fill='none' stroke='%230B0C75' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M3 2h16l8 8v24H3z'/%3E%3Cpath d='M19 2v8h8M8 17h14M8 23h14M8 29h9'/%3E%3C/svg%3E");
}
.in-preparazione p { margin: 0; }
.in-preparazione p + p { margin-top: .5em; }
.in-preparazione strong { color: var(--brand); }
/* versione in linea, dentro un testo (privacy, accessibilità) */
span.in-preparazione {
  display: inline; padding: .08em .45em; margin: 0; border-width: 1px; border-style: dashed;
  border-radius: 6px; background: var(--bg-alt);
}
span.in-preparazione::before { content: none; }

/* stato vuoto degli elenchi (comunicati, eventi, prima pagina) */
.elenco-vuoto { min-height: 120px; }

/* ---------- territorio ---------- */
.selettore-regioni { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 0 0 12px; }
.selettore-regioni .campo { margin: 0; flex: 1 1 260px; max-width: 380px; }
.esito-filtro { margin: 0 0 28px; font-weight: 650; color: var(--muted); min-height: 1.6em; }
.regioni { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.regione { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 20px 20px 4px; }
.regione h3 { font-size: 1.3rem; margin-bottom: 14px; }
.regione .in-preparazione { padding: 14px 16px; border-left-width: 6px; margin-bottom: 16px; font-size: 1.0625rem; }
.regione .in-preparazione::before { width: 22px; height: 28px; }

/* ==========================================================================
   MODULI — tutti predisposti e SPENTI in bozza (fieldset disabled)
   ========================================================================== */
.modulo { background: #fff; border: 2px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3.5vw, 40px); }
.section-alt .modulo { border-color: transparent; box-shadow: var(--shadow-sm); }
.modulo h2, .modulo h3 { margin-top: 0; }
.avviso-modulo {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-alt); color: var(--text);
  border-left: 8px solid var(--brand); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 26px; font-weight: 650;
}
.avviso-modulo svg { flex: none; width: 28px; height: 28px; color: var(--brand); margin-top: 1px; }
.avviso-modulo p { margin: 0; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.campi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo-intero { grid-column: 1 / -1; }
.campo label { font-weight: 700; color: var(--text); }
.req { font-weight: 600; color: var(--muted); }
.campo input, .campo select, .campo textarea {
  font: inherit; font-size: 1.125rem; color: var(--text);
  min-height: 52px; padding: 12px 14px;
  background: #fff; border: 2px solid var(--field); border-radius: 10px; width: 100%;
}
.campo textarea { min-height: 150px; resize: vertical; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.aiuto { font-size: 1rem; color: var(--muted); margin: 0; }
.campo input[type="file"] { padding: 10px; }

fieldset[disabled] .campo input,
fieldset[disabled] .campo select,
fieldset[disabled] .campo textarea { background: var(--bg-soft); border-style: dashed; cursor: not-allowed; }
fieldset[disabled] .campo label, fieldset[disabled] .spunta label { cursor: not-allowed; }

.spunte { margin-top: 22px; display: grid; gap: 14px; }
.spunta { display: flex; gap: 12px; align-items: flex-start; }
.spunta input { flex: none; width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--brand); }
.spunta label { font-weight: 600; }

.informativa-breve { margin: 24px 0 18px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 1.0625rem; color: var(--text); background: var(--bg); }
.informativa-breve p { margin: 0; max-width: none; }
.modulo-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.modulo-esito { margin: 12px 0 0; font-weight: 650; }
.trappola { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* donazioni */
.dona { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.dona p { margin: 0; }

/* ---------- tabelle (cookie policy) ---------- */
.tabella-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line-strong); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 1.0625rem; }
caption { text-align: left; font-weight: 750; padding: 14px 16px 0; color: var(--brand); }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-alt); color: var(--brand); font-weight: 750; }
tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--on-dark-muted); font-size: 1.0625rem; }
.site-footer a { color: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: clamp(56px, 7vw, 88px) 44px; }
.footer-brand img { width: 96px; height: auto; margin-bottom: 20px; }
.footer-brand .footer-nome { color: #fff; font-weight: 800; font-size: 1.25rem; line-height: 1.3; margin: 0 0 16px; max-width: 24ch; }
.footer-dati { margin: 0; display: grid; gap: 10px; }
.footer-dati dt { font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.footer-dati dd { margin: 0; color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.0625rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 3px solid var(--accent); display: inline-block; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .16); }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; padding-block: 24px 28px; font-size: 1rem; }
.footer-bottom p { margin: 0; max-width: none; }
.site-footer .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.link-button { font: inherit; color: #fff; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

/* ==========================================================================
   AVVISO COOKIE (informativo, non bloccante) e PANNELLO PREFERENZE
   ========================================================================== */
.avviso-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 760px; margin-inline: auto;
  background: #fff; color: var(--text);
  border: 2px solid var(--brand); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 56px 18px 20px; font-size: 1.0625rem;
}
.avviso-cookie p { margin: 0 0 12px; max-width: none; }
.avviso-cookie .avviso-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.avviso-cookie .btn { min-height: 46px; padding: .6em 1.3em; }
.avviso-chiudi {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--brand); cursor: pointer;
  display: grid; place-items: center;
}
.avviso-chiudi:hover { background: var(--bg-alt); }
.avviso-chiudi svg { width: 20px; height: 20px; }

.pannello-cookie {
  border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg); color: var(--text);
}
.pannello-cookie::backdrop { background: rgba(6, 7, 63, .6); }
.pannello-cookie .pannello-corpo { padding: 28px clamp(20px, 4vw, 32px) 26px; }
.pannello-cookie h2 { font-size: 1.6rem; }
.pannello-cookie ul { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 12px; }
.pannello-cookie li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; }
.pannello-cookie li strong { display: block; color: var(--brand); }
.pannello-cookie li span { display: block; font-size: 1rem; color: var(--muted); }
.interruttore { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 999px; border: 2px solid var(--field); background: var(--bg-soft); position: relative; margin: 0; }
.interruttore::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--field); transition: transform .2s var(--ease); }
.interruttore:checked { background: var(--brand); border-color: var(--brand); }
.interruttore:checked::after { transform: translateX(22px); background: #fff; }
.interruttore:disabled { cursor: not-allowed; }

/* ==========================================================================
   404
   ========================================================================== */
.errore-codice { font-size: clamp(5rem, 16vw, 10rem); font-weight: 900; line-height: .9; color: #fff; margin: 0; letter-spacing: -.03em; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .porte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recapiti { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recapiti > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .recapiti > div:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-emblema { order: -1; max-width: 300px; justify-self: start; margin: -10px 0 -20px -30px; }
  .forza { grid-template-columns: 1fr; }
  .layout-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .porte { grid-template-columns: 1fr; }
  .porta { min-height: 0; }
  .campi { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .recapiti { grid-template-columns: 1fr; }
  .recapiti > div, .recapiti > div + div { padding: 18px 0 8px; border-left: 0; }
  .recapiti > div + div { border-top: 1px solid var(--line-strong); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .avviso-cookie { left: 8px; right: 8px; bottom: 8px; }
}
@media (max-width: 480px) {
  .hero-emblema { max-width: 240px; }
  .page-hero::after { width: 360px; height: 360px; right: -180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .in-preparazione, .avviso-modulo, .porta, .regione, .modulo { border: 2px solid CanvasText; }
  .btn { border: 2px solid ButtonText; }
}

@media print {
  .site-header, .nav-overlay, .avviso-cookie, .cta-band, .skip-link { display: none !important; }
  .hero, .page-hero { background: none; color: #000; }
  .hero h1, .page-hero h1 { color: #000; }
}

/* ---------- aggiunte: citazione in Chi siamo, errori dei moduli, solo-JS ---------- */
.forza-citazione { margin: 0 0 8px; padding-left: 22px; border-left: 6px solid var(--brand); }
.forza-citazione p { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 750; line-height: 1.25; color: var(--brand); margin: 0; }
.modulo-azioni.spaziato { margin-top: 26px; }
.riepilogo-errori { border: 2px solid var(--brand); border-left-width: 8px; border-radius: var(--radius); padding: 14px 18px; margin: 0 0 22px; background: #fff; }
.riepilogo-errori p { margin: 0 0 6px; font-weight: 750; }
.riepilogo-errori ul { margin: 0; padding-left: 1.2em; }
.errore { margin: 0; font-weight: 700; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.errore::before { content: "!"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .875rem; font-weight: 900; display: grid; place-items: center; margin-top: 3px; }
.campo [aria-invalid="true"] { border-width: 3px; border-color: var(--brand); }
.no-js .solo-js { display: none; }
code { font-size: .95em; background: var(--bg-alt); padding: .08em .35em; border-radius: 5px; overflow-wrap: anywhere; }

/* tabella a schede sotto i 640 px: niente scorrimento orizzontale (WCAG 1.4.10) */
@media (max-width: 640px) {
  .tabella-wrap { overflow: visible; }
  .tabella-wrap table, .tabella-wrap tbody, .tabella-wrap tr, .tabella-wrap td { display: block; width: 100%; }
  .tabella-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .tabella-wrap td { border-bottom: 1px solid var(--line); }
  .tabella-wrap td::before { content: attr(data-label); display: block; font-weight: 750; color: var(--brand); font-size: .9375rem; }
}

/* colonna di testo allineata alla griglia del sito */
.container.prose { max-width: var(--container); }
.container.prose > * { max-width: 760px; }
/* pulsante di un modulo spento: si vede che non è attivo */
fieldset[disabled] .btn { background: var(--bg-alt); color: var(--brand); border: 2px dashed var(--brand); cursor: not-allowed; transform: none; }

/* liste dati con coppie dt/dd dirette */
.scheda dl { display: block; }
.scheda dd { margin: 2px 0 16px; }
.scheda dd:last-child { margin-bottom: 0; }
.footer-dati { display: block; }
.footer-dati dd { margin: 0 0 12px; }
@media (max-width: 480px) {
  .hero-badge { flex-direction: column; }
  .hero-badge span + span::before { display: none; }
}
