/* Brixia Adventure MTB — mondo "Segnavia".
   Segnaletica dei sentieri: bandierine blu-bianco-blu dipinte, frecce in
   lamiera smaltata impilate sotto una tabella, bianco vernice su pietra.
   Niente palo disegnato: tolto su richiesta, non rimetterlo.
   L'ocra è riservato alla prossima tappa: non usarlo per altro. */

/* ---------- Font (ospitati in locale) ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Token ---------- */
:root {
  --blu: #1c75bb;            /* blu del logo: bandierine, tavole, campi */
  --blu-scuro: #155d96;      /* hover del blu */
  --blu-notte: #0e3a60;      /* inchiostro scuro, header, footer */
  --blu-notte-2: #0a2c49;
  --vernice: #f3f4f1;        /* fondo: bianco vernice */
  --smalto: #ffffff;         /* tavole smaltate */
  --pietra: #7c817e;         /* palo, filetti */
  --pietra-chiara: #d6d9d5;
  --roccia: #c9ccc7;         /* fondo granito */
  --testo: #15222c;
  --testo-2: #43505a;
  --ocra: #e2a11b;           /* SOLO prossima tappa */
  --ocra-scuro: #7a4f00;

  --f-cartello: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-testo: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --sezione: clamp(4rem, 9vw, 7.5rem);
  --max: 1240px;
  --ombra-tavola: 0 2px 3px rgba(10, 30, 50, 0.22), 0 10px 22px -8px rgba(10, 30, 50, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* bordo "dipinto" irregolare delle bandierine */
  --pennellata: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Cpath d='M3 4 L14 1.2 L27 3.6 L41 0.4 L55 3.1 L68 0.8 L82 3.4 L97 0.6 L99.6 14 L97.4 29 L99.8 44 L98 59.2 L84 56.6 L70 59.6 L56 56.9 L42 59.4 L28 56.5 L15 59.3 L2 57 L0.3 43 L2.6 29 L0.2 15 Z'/%3E%3C/svg%3E");
  /* bandierina dipinta: fasce blu-bianco-blu con bordi di pennello */
  --bandiera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Crect width='100' height='60' fill='%23fff'/%3E%3Cpath fill='%231c75bb' d='M0 0H100V20.4L96.5 19.6L94 21.8L88 20.9L81.5 18.4L77 19.1L69 22.3L63.5 21.2L55 18.9L51 19.8L43 21.9L36.5 20.2L29 18.1L24.5 19.4L17 22.6L11 20.7L6.5 18.8L2.5 19.9L0 21.5Z'/%3E%3Cpath fill='%231c75bb' d='M0 60H100V41.3L97 39.1L92.5 38.4L86 40.6L79.5 41.8L74 38.2L66 38.9L61.5 41.5L53 40.3L47.5 37.9L40 39.6L33.5 42.1L27 40.4L21 38.3L14.5 39.8L9 41.9L4 40.2L0 38.9Z'/%3E%3C/svg%3E");
  --bandiera-sbiadita: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Crect width='100' height='60' fill='%23fff'/%3E%3Cpath fill='%238fb0cb' d='M0 0H100V20.4L96.5 19.6L94 21.8L88 20.9L81.5 18.4L77 19.1L69 22.3L63.5 21.2L55 18.9L51 19.8L43 21.9L36.5 20.2L29 18.1L24.5 19.4L17 22.6L11 20.7L6.5 18.8L2.5 19.9L0 21.5Z'/%3E%3Cpath fill='%238fb0cb' d='M0 60H100V41.3L97 39.1L92.5 38.4L86 40.6L79.5 41.8L74 38.2L66 38.9L61.5 41.5L53 40.3L47.5 37.9L40 39.6L33.5 42.1L27 40.4L21 38.3L14.5 39.8L9 41.9L4 40.2L0 38.9Z'/%3E%3C/svg%3E");
  --bandiera-ocra: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Crect width='100' height='60' fill='%23fff'/%3E%3Cpath fill='%23e2a11b' d='M0 0H100V20.4L96.5 19.6L94 21.8L88 20.9L81.5 18.4L77 19.1L69 22.3L63.5 21.2L55 18.9L51 19.8L43 21.9L36.5 20.2L29 18.1L24.5 19.4L17 22.6L11 20.7L6.5 18.8L2.5 19.9L0 21.5Z'/%3E%3Cpath fill='%23e2a11b' d='M0 60H100V41.3L97 39.1L92.5 38.4L86 40.6L79.5 41.8L74 38.2L66 38.9L61.5 41.5L53 40.3L47.5 37.9L40 39.6L33.5 42.1L27 40.4L21 38.3L14.5 39.8L9 41.9L4 40.2L0 38.9Z'/%3E%3C/svg%3E");
  --grana-roccia: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .32 0 0 0 0 .31 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; scrollbar-color: var(--pietra) var(--vernice); }
body {
  margin: 0;
  background: var(--vernice);
  color: var(--testo);
  font-family: var(--f-testo);
  font-size: 1.0625rem;
  line-height: 1.55;
  caret-color: var(--blu);
}
body.nav-open { overflow: hidden; }
img, picture { max-width: 100%; height: auto; display: block; }
a { color: var(--blu); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blu-notte); }
::selection { background: var(--blu); color: #fff; }
:focus-visible { outline: 3px solid var(--ocra); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-cartello); text-transform: uppercase; line-height: 1; letter-spacing: 0; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; color: var(--blu-notte); }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
time, .num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sezione { padding-block: var(--sezione); }
.testata { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.testata h2 { margin-bottom: 0.9rem; }
.testata p { color: var(--testo-2); font-size: 1.125rem; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--smalto); color: var(--blu-notte); padding: 0.75rem 1rem; font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* ---------- Bandierina dipinta (blu-bianco-blu) ---------- */
.bandierina {
  display: inline-grid;
  place-items: center;
  width: 3.4rem;
  height: 2.1rem;
  background: var(--bandiera) center / 100% 100%;
  -webkit-mask: var(--pennellata) center / 100% 100% no-repeat;
  mask: var(--pennellata) center / 100% 100% no-repeat;
  font-family: var(--f-cartello);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--blu-notte);
  flex: none;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.7em 1.25em;
  font-family: var(--f-cartello);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  border: 0;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.2s, color 0.2s;
}
/* Il bottone principale è una freccia segnavia: la punta indica dove si va. */
.btn--freccia {
  position: relative;
  margin-right: 1.1rem;
  background: var(--smalto);
  color: var(--blu-notte);
}
.btn--freccia::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - 1px);
  width: 1.1rem;
  background: inherit;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.btn--freccia:hover { color: var(--blu-notte); background: var(--vernice); transform: translateX(4px); }
.btn--blu { background: var(--blu); color: #fff; }
.btn--blu:hover { background: var(--blu-scuro); color: #fff; }
.btn--linea { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.btn--linea:hover { color: var(--blu-notte); background: #fff; }

.link-testo {
  font-family: var(--f-cartello);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.link-testo::after {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 0.7em;
  margin-left: 0.4em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Cpath d='M0 6h19V0l11 10-11 10v-6H0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Cpath d='M0 6h19V0l11 10-11 10v-6H0z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s var(--ease);
}
.link-testo:hover::after { transform: translateX(3px); }

.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--blu-notte); color: #fff; }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.brand img { width: auto; height: 2.6rem; }
.site-nav { display: flex; align-items: center; gap: 0.25rem 1.4rem; }
.site-nav a {
  color: #fff;
  font-family: var(--f-cartello);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.4rem;
}
.site-nav a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.site-nav .nav-cta { position: relative; margin-right: 0.9rem; padding: 0.45rem 0.9rem; background: #fff; color: var(--blu-notte); font-weight: 700; }
.site-nav .nav-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(100% - 1px); width: 0.9rem; background: inherit; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.site-nav .nav-cta:hover { color: var(--blu-notte); text-decoration: none; background: var(--vernice); }
.nav-toggle { display: none; }
.nav-scrim { display: none; }

/* Menu mobile a cassetto laterale (stessa struttura del sito Gran Fondo). */
@media (max-width: 1000px) {
  .brand img { height: 2.2rem; }
  .nav-toggle {
    display: flex; position: relative; z-index: 160; flex-shrink: 0;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 2.75rem; height: 2.75rem; padding: 0;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); cursor: pointer;
  }
  .nav-toggle__bar { display: block; width: 1.2rem; height: 2px; margin-inline: auto; background: #fff; transition: transform 0.28s var(--ease), opacity 0.2s; }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: fixed; top: 0; right: 0; z-index: 150;
    width: min(80vw, 20rem); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 5.5rem 1.5rem 2rem;
    background: var(--blu-notte); border-left: 1px solid rgba(255, 255, 255, 0.14);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s var(--ease);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a { width: 100%; font-size: 1.3rem; padding-block: 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .site-nav .nav-cta { margin: 1.5rem 0 0; width: calc(100% - 0.9rem); padding: 0.8rem 1rem; border: 0; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 140; background: rgba(6, 20, 34, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.28s var(--ease); }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (max-width: 1000px) and (prefers-reduced-motion: reduce) {
  .site-nav, .nav-scrim, .nav-toggle__bar { transition: none; }
}

/* ---------- Imbocco (hero) ---------- */
.imbocco {
  --foto-h: 100%;
  position: relative;
  min-height: calc(100svh - 4.25rem);
  color: #fff;
  background: var(--blu-notte-2);
  isolation: isolate;
  overflow: hidden;
}
.imbocco__foto, .imbocco__velo { position: absolute; left: 0; right: 0; top: 0; height: var(--foto-h); z-index: -1; }
.imbocco__foto img, .imbocco__foto picture { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.imbocco__velo {
  background:
    linear-gradient(90deg, rgba(8, 26, 44, 0.86) 0%, rgba(8, 26, 44, 0.6) 42%, rgba(8, 26, 44, 0.12) 72%, rgba(8, 26, 44, 0.3) 100%),
    linear-gradient(0deg, rgba(8, 26, 44, 0.7) 0%, rgba(8, 26, 44, 0) 45%);
}
.imbocco__griglia {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  min-height: inherit;
  padding-block: clamp(2.5rem, 6vh, 4.5rem);
}
.imbocco__testo { padding-bottom: 0.5rem; }
.imbocco h1 {
  font-size: clamp(3rem, 6.2vw, 5.1rem);
  font-weight: 800;
  line-height: 0.9;
  margin-bottom: 1.4rem;
}
.imbocco__lede { max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.45; color: rgba(255, 255, 255, 0.92); margin-bottom: 2rem; }

/* Fase della stagione: la home mostra l'azione giusta (vedi js/stagione.js). */
[data-fase-solo] { display: none; }
html[data-fase="abbonamenti"] [data-fase-solo="abbonamenti"],
html[data-fase="stagione"] [data-fase-solo="stagione"],
html[data-fase="pausa"] [data-fase-solo="pausa"] { display: flex; }

/* ---------- Palo segnavia ---------- */
.palo { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.55rem; }
.palo__tabella, .freccia { position: relative; z-index: 1; }
.palo__tabella {
  padding: 0.75rem 1rem;
  margin-right: 2.2rem;
  background: var(--smalto);
  color: var(--blu-notte);
  box-shadow: var(--ombra-tavola);
}
.palo__titolo { margin: 0; font-family: var(--f-cartello); font-weight: 800; font-size: 1.45rem; text-transform: uppercase; line-height: 1; }
.palo__sottotitolo { margin: 0.15rem 0 0; font-family: var(--f-cartello); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--testo-2); }
.palo__frecce { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

.freccia { filter: drop-shadow(0 2px 2px rgba(10, 30, 50, 0.25)) drop-shadow(0 8px 10px rgba(10, 30, 50, 0.22)); }
.freccia a {
  position: relative;
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  grid-template-areas: "data nome";
  column-gap: 0.8rem;
  align-items: center;
  margin-right: 1.4rem;
  padding: 0.5rem 3.3rem 0.5rem 0.85rem;
  background: var(--smalto);
  color: var(--blu-notte);
  text-decoration: none;
  transition: transform 0.35s var(--ease), background-color 0.2s;
}
.freccia a:hover { transform: translateX(6px); color: var(--blu-notte); }
.freccia__data { grid-area: data; align-self: center; font-family: var(--f-cartello); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.freccia__nome { grid-area: nome; font-family: var(--f-cartello); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; line-height: 1.1; }
/* Punta: bandierina dipinta con il numero di tappa nella fascia bianca. */
.freccia__punta {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -1.4rem;
  width: 4rem;
  display: grid;
  place-items: center;
  padding-right: 1.1rem;
  background: var(--bandiera) center / 100% 100%;
  clip-path: polygon(0 0, calc(100% - 1.4rem) 0, 100% 50%, calc(100% - 1.4rem) 100%, 0 100%);
  font-family: var(--f-cartello);
  font-weight: 800;
  font-size: 1rem;
  color: var(--blu-notte);
}
/* Tappa già corsa: vernice sbiadita. */
.freccia.is-corsa a { background: #e6e8e4; }
.freccia.is-corsa .freccia__punta { background: var(--bandiera-sbiadita) center / 100% 100%; }
.freccia.is-corsa .freccia__data, .freccia.is-corsa .freccia__nome { color: var(--testo-2); }
/* Prossima tappa: l'unico ocra della pagina. */
.freccia.is-prossima a { background: var(--ocra); }

/* Il momento: le tavole vengono montate sul palo, una dopo l'altra. */
@media (prefers-reduced-motion: no-preference) {
  .palo__tabella, .freccia { animation: monta 0.8s var(--ease) both; animation-delay: calc(0.12s + var(--i, 0) * 0.07s); }
  .freccia:nth-child(1) { --i: 1; } .freccia:nth-child(2) { --i: 2; } .freccia:nth-child(3) { --i: 3; } .freccia:nth-child(4) { --i: 4; }
  .freccia:nth-child(5) { --i: 5; } .freccia:nth-child(6) { --i: 6; } .freccia:nth-child(7) { --i: 7; } .freccia:nth-child(8) { --i: 8; }
}
@keyframes monta {
  from { clip-path: inset(-20px 100% -30px -20px); transform: translateX(-12px); }
  to { clip-path: inset(-20px -60px -30px -20px); transform: none; }
}

@media (max-width: 900px) {
  .imbocco { --foto-h: min(68svh, 36rem); min-height: 0; background: var(--roccia) var(--grana-roccia); }
  .imbocco__griglia { grid-template-columns: 1fr; gap: 0; padding-block: 0; }
  .imbocco__testo { min-height: var(--foto-h); display: flex; flex-direction: column; justify-content: flex-end; padding-block: 2rem 1.75rem; }
  .imbocco__velo { background: linear-gradient(0deg, rgba(8, 26, 44, 0.9) 0%, rgba(8, 26, 44, 0.55) 45%, rgba(8, 26, 44, 0.1) 80%); }
  .imbocco__lede { margin-bottom: 1.5rem; }
  .palo { padding: 2rem 0 2.5rem; }
}
.palo__tutte { display: none; }
/* Su telefono i cartelli del segnavia non si mostrano (sono "di visione"):
   le gare sono nelle schede della stagione. Restano nel codice perché
   js/stagione.js legge le date dalle frecce. */
@media (max-width: 720px) {
  .palo { display: none; }
  .stagione { display: none; }
}
@media (max-width: 420px) {
  .freccia a { grid-template-columns: 3.1rem minmax(0, 1fr); padding-right: 3rem; }
  .freccia__data { font-size: 1.3rem; }
  .palo__tabella { margin-right: 1rem; }
}

/* ---------- Stagione e tappe ---------- */
.stagione { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.stagione__mesi { position: relative; list-style: none; margin: 0 0 0.6rem; padding: 0; height: 1.3rem; }
.stagione__mesi li { position: absolute; left: calc(var(--pos) * 1%); font-family: var(--f-cartello); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--testo-2); }
.stagione__linea { position: relative; height: 2.6rem; }
.stagione__linea::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; background: var(--blu); -webkit-mask: var(--pennellata) center / 100% 100% no-repeat; mask: var(--pennellata) center / 100% 100% no-repeat; }
.stagione__tacca {
  position: absolute;
  top: 50%;
  left: calc(var(--pos) * 1%);
  transform: translate(-50%, -50%);
  width: 2.3rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--bandiera) center / 100% 100%;
  -webkit-mask: var(--pennellata) center / 100% 100% no-repeat;
  mask: var(--pennellata) center / 100% 100% no-repeat;
  font-family: var(--f-cartello);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--blu-notte);
}
.stagione__tacca.is-corsa { background: var(--bandiera-sbiadita) center / 100% 100%; }
.stagione__tacca.is-prossima { background: var(--bandiera-ocra) center / 100% 100%; }
.stagione__oggi {
  position: absolute;
  top: 100%;
  left: calc(var(--pos) * 1%);
  transform: translateX(-50%);
  padding-top: 0.5rem;
  font-family: var(--f-cartello);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ocra-scuro);
}
.stagione__oggi::before { content: ""; position: absolute; left: 50%; top: -1.2rem; width: 2px; height: 1.5rem; background: var(--ocra-scuro); }

/* Le otto gare: una scheda per gara, stessa struttura e stessa altezza.
   Fascia (numero, data, località) · logo · nome e società · km · link al sito. */
.gare { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.gara a { display: flex; flex-direction: column; height: 100%; background: var(--smalto); box-shadow: var(--ombra-tavola); color: var(--testo); text-decoration: none; transition: transform 0.35s var(--ease); }
.gara a:hover { transform: translateY(-3px); color: var(--testo); }
.gara:target a { outline: 3px solid var(--ocra); outline-offset: 2px; }
.gara__fascia { display: flex; align-items: baseline; gap: 0.55rem; margin: 0; padding: 0.55rem 0.8rem; background: var(--blu-notte); color: #fff; font-family: var(--f-cartello); text-transform: uppercase; }
.gara.is-prossima .gara__fascia { background: var(--ocra); color: var(--blu-notte); }
.gara.is-corsa .gara__fascia { background: var(--testo-2); }
.gara__n { font-weight: 800; font-size: 0.85rem; opacity: 0.7; }
.gara__fascia time { font-weight: 800; font-size: 1.25rem; line-height: 1; }
.gara__luogo { margin-left: auto; font-weight: 600; font-size: 0.98rem; text-align: right; }
.gara__logo { display: grid; place-items: center; height: 6.5rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--pietra-chiara); }
.gara__logo img { width: auto; height: auto; max-width: 100%; max-height: 4.7rem; object-fit: contain; }
.gara__nome { margin: 0.8rem 0.9rem 0; font-size: 1.15rem; line-height: 1.1; color: var(--blu-notte); min-height: 2.2em; }
.gara__soc { margin: 0.25rem 0.9rem 0; font-size: 0.88rem; color: var(--testo-2); }
.gara__numeri { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0 0.8rem; margin: 0.6rem 0.9rem 0; font-family: var(--f-cartello); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blu-notte); }
.gara__numeri span { white-space: nowrap; }
.gara__link { margin: auto 0.9rem 0.9rem; padding-top: 0.7rem; font-family: var(--f-cartello); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--blu); }
.gara__link::after { content: " \2192"; }
.gara a:hover .gara__link { text-decoration: underline; }
@media (max-width: 1000px) { .gare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Telefono: una scheda per riga, logo a sinistra e informazioni a destra. */
@media (max-width: 600px) {
  .gare { grid-template-columns: 1fr; gap: 0.75rem; }
  .gara a { display: grid; grid-template-columns: 7rem minmax(0, 1fr); grid-template-areas: "fascia fascia" "logo nome" "logo soc" "logo numeri" "logo link"; }
  .gara a:hover { transform: none; }
  .gara__fascia { grid-area: fascia; }
  .gara__logo { grid-area: logo; height: auto; padding: 0.8rem; border-bottom: 0; border-right: 1px solid var(--pietra-chiara); }
  .gara__logo img { max-height: 5.5rem; }
  .gara__nome { grid-area: nome; min-height: 0; font-size: 1.1rem; }
  .gara__soc { grid-area: soc; }
  .gara__numeri { grid-area: numeri; }
  .gara__link { grid-area: link; margin-top: 0.5rem; padding-top: 0; }
}

@media (max-width: 900px) {
  .stagione__mesi li { font-size: 0.78rem; }
  .stagione__tacca { width: 1.7rem; height: 1.35rem; font-size: 0.72rem; }
}

/* ---------- Regole (fascia di passaggio verso il regolamento) ---------- */
.regole { background: var(--blu-notte); color: #fff; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.regole__riga { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-areas: "h p" "h azioni"; gap: 1.25rem clamp(2rem, 6vw, 5rem); align-items: start; }
.regole h2 { grid-area: h; color: #fff; }
.regole p { grid-area: p; max-width: 38rem; margin: 0; font-size: 1.15rem; color: rgba(255, 255, 255, 0.9); }
.regole .azioni { grid-area: azioni; gap: 1rem 2rem; margin-top: 0.5rem; }
.regole .link-testo { color: #fff; }
@media (max-width: 760px) { .regole__riga { grid-template-columns: 1fr; grid-template-areas: "h" "p" "azioni"; } }

/* ---------- Maglia di leader ---------- */
.maglia { display: grid; grid-template-columns: 1.15fr 1fr; padding: 0; background: var(--blu); color: #fff; }
.maglia__foto img, .maglia__foto picture { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.maglia__testo { padding: var(--sezione) clamp(1.5rem, 5vw, 5rem); align-self: center; max-width: 38rem; }
.maglia h2 { color: #fff; margin-bottom: 1.2rem; }
.maglia p { font-size: 1.125rem; }
.maglia .link-testo { color: #fff; }
@media (max-width: 900px) {
  .maglia { grid-template-columns: 1fr; }
  .maglia__foto { aspect-ratio: 4 / 3; }
  .maglia__testo { padding: 3rem var(--gutter) 3.5rem; }
}

/* ---------- Abbonamento ---------- */
.formule { min-width: 0; }
.abbonamento__griglia { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
/* La foto segue l'altezza del testo, non la detta. */
.abbonamento__foto { position: relative; margin: 0; min-height: 18rem; }
.abbonamento__foto picture { position: absolute; inset: 0; }
.abbonamento__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; box-shadow: var(--ombra-tavola); }
.formule__tabella caption { caption-side: top; text-align: left; padding: 0 0 0.7rem; font-size: 0.98rem; color: var(--testo-2); background: var(--vernice); }
@media (max-width: 900px) {
  .abbonamento__griglia { grid-template-columns: 1fr; }
  .abbonamento__foto { min-height: 0; aspect-ratio: 3 / 2; }
}
.formule__tabella { width: 100%; border-collapse: collapse; background: var(--smalto); box-shadow: var(--ombra-tavola); margin-bottom: 1.5rem; }
.formule__tabella th, .formule__tabella td { padding: 1rem clamp(0.75rem, 2vw, 1.4rem); text-align: left; }
.formule__tabella thead th { background: var(--blu-notte); color: #fff; font-family: var(--f-cartello); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.formule__tabella tbody tr + tr { border-top: 1px solid var(--pietra-chiara); }
.formule__tabella tbody th { font-family: var(--f-cartello); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; color: var(--blu-notte); }
.formule__tabella tbody th span { display: block; font-family: var(--f-testo); font-weight: 400; font-size: 0.92rem; text-transform: none; color: var(--testo-2); }
.formule__tabella td { font-family: var(--f-cartello); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--blu-notte); font-variant-numeric: tabular-nums; white-space: nowrap; }
.formule__extra { margin: 0 0 2rem; padding-left: 1.1rem; color: var(--testo-2); }
.formule__extra li + li { margin-top: 0.4rem; }
.formule__extra strong { color: var(--testo); }

/* ---------- Video ---------- */
.video { background: var(--blu-notte); color: #fff; }
.video h2 { color: #fff; }
/* Titolo e video centrati sulla stessa colonna. */
.video .wrap { max-width: calc(64rem + 2 * var(--gutter)); }
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  max-width: 64rem;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: var(--blu-notte);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(10, 30, 50, 0.6);
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.video-facade:hover img { transform: scale(1.03); }
/* Play al centro: tavola smaltata quadrata con il triangolo, come una freccia. */
.video-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(4rem, 9vw, 6rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: var(--smalto);
  box-shadow: var(--ombra-tavola);
  transition: background-color 0.2s, transform 0.35s var(--ease);
}
.video-facade__play::after {
  content: "";
  position: absolute;
  inset: 30% 26% 30% 36%;
  background: var(--blu-notte);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video-facade:hover .video-facade__play,
.video-facade:focus-visible .video-facade__play { background: var(--blu); transform: translate(-50%, -50%) scale(1.06); }
.video-facade:hover .video-facade__play::after,
.video-facade:focus-visible .video-facade__play::after { background: #fff; }
.video-embed { display: block; width: 100%; max-width: 64rem; aspect-ratio: 16 / 9; border: 0; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.news-card__link { display: block; height: 100%; background: var(--smalto); color: var(--testo); text-decoration: none; box-shadow: var(--ombra-tavola); transition: transform 0.35s var(--ease); }
.news-card__link:hover { transform: translateY(-3px); color: var(--testo); }
.news-card__link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.news-card__body { padding: 1.1rem 1.2rem 1.4rem; }
.news-card__date { font-family: var(--f-cartello); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; color: var(--testo-2); }
.news-card__title { margin: 0.35rem 0 0.5rem; font-size: 1.35rem; color: var(--blu-notte); }
.news-card__excerpt { margin: 0; color: var(--testo-2); font-size: 0.98rem; }
.news__tutte { margin-top: 2rem; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }

/* ---------- Classifica (campo blu) ---------- */
.classifica { background: var(--blu); color: #fff; }
.classifica__riga { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "h p" "h azioni"; gap: 1rem clamp(2rem, 6vw, 5rem); align-items: start; }
.classifica h2 { grid-area: h; color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 8ch; }
.classifica p { grid-area: p; max-width: 36rem; font-size: 1.15rem; margin: 0; }
.classifica .azioni { grid-area: azioni; margin-top: 0.75rem; }
@media (max-width: 760px) { .classifica__riga { grid-template-columns: 1fr; grid-template-areas: "h" "p" "azioni"; } }

/* ---------- Sponsor ---------- */
.sponsor { background: var(--smalto); }
.sponsor__elenco { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--pietra-chiara); border: 1px solid var(--pietra-chiara); }
.sponsor__elenco li { display: grid; place-items: center; padding: 1.6rem 1.4rem; background: #fff; min-height: 7rem; }
.sponsor__elenco li.sponsor__main { grid-column: span 2; min-height: 9rem; }
.sponsor__elenco img { max-height: 4rem; width: auto; object-fit: contain; }
.sponsor__elenco li.sponsor__main img { max-height: 5.5rem; }
.sponsor__elenco a { display: grid; place-items: center; width: 100%; height: 100%; }
.sponsor__elenco a img { transition: transform 0.35s var(--ease); }
.sponsor__elenco a:hover img { transform: scale(1.05); }
@media (max-width: 760px) {
  .sponsor__elenco { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sponsor__elenco li { padding: 1.2rem 1rem; min-height: 5.5rem; }
  .sponsor__elenco img { max-height: 3rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blu-notte); color: rgba(255, 255, 255, 0.86); padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.footer-brand img { height: 3.2rem; width: auto; margin-bottom: 1rem; }
.footer-brand p { max-width: 22rem; }
.footer-heading { margin: 0 0 0.8rem; font-family: var(--f-cartello); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.9rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
/* Su telefono i contatti (indirizzo, social) prendono tutta la riga. */
@media (max-width: 560px) { .footer-grid > div:last-child { grid-column: 1 / -1; } }

/* ---------- Pagine interne (templates/page.html) ---------- */
.page-hero { position: relative; isolation: isolate; color: #fff; background: var(--blu-notte); min-height: clamp(18rem, 50vh, 34rem); display: flex; align-items: flex-end; overflow: hidden; }
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img, .page-hero__media picture { width: 100%; height: 100%; object-fit: cover; }
.page-hero__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 26, 44, 0.88) 0%, rgba(8, 26, 44, 0.35) 70%); }
.page-hero__content { padding-block: 2.5rem; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
.page-hero__lede { max-width: 40rem; margin: 0.9rem 0 0; font-size: 1.15rem; color: rgba(255, 255, 255, 0.9); }
.section-pad { padding-block: var(--sezione); }
.page-body { max-width: 46rem; }
.page-body h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 2.8rem 0 1rem; }
.page-body h3 { margin: 2rem 0 0.7rem; color: var(--blu-notte); }
.page-body ul, .page-body ol { padding-left: 1.2rem; }
.page-body li + li { margin-top: 0.35rem; }
.page-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--smalto); font-variant-numeric: tabular-nums; }
.page-body th, .page-body td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--pietra-chiara); }
.page-body thead th { background: var(--blu-notte); color: #fff; font-family: var(--f-cartello); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Componenti delle pagine interne ---------- */
.page-hero__credito { position: absolute; right: var(--gutter); bottom: 0.6rem; margin: 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.page-hero__credito:empty { display: none; }
/* Colonna di lettura centrata; il titolo della testata sta sulla stessa colonna. */
.page-body { max-width: 50rem; margin-inline: auto; }
.page-hero__content { max-width: calc(50rem + 2 * var(--gutter)); }
.page-body > h2:first-child, .page-body > .nota:first-child { margin-top: 0; }
.page-body small { color: var(--testo-2); font-size: 0.85em; }

/* Avviso in testa: tavola smaltata, non una barra laterale colorata. */
.nota { margin: 0 0 2rem; padding: 1.1rem 1.3rem; background: var(--smalto); box-shadow: var(--ombra-tavola); font-size: 1.05rem; }

.indice { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.indice a {
  padding: 0.4rem 0.75rem;
  background: var(--smalto);
  color: var(--blu-notte);
  font-family: var(--f-cartello);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--pietra-chiara);
}
.indice a:hover { background: var(--blu); color: #fff; box-shadow: none; }

.schede-gare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.scheda-gara { padding: 1.1rem 1.2rem 1rem; background: var(--smalto); box-shadow: var(--ombra-tavola); }
.page-body .scheda-gara h3 { margin: 0; font-size: 1.25rem; }
.page-body .scheda-gara h3 a { color: inherit; text-decoration: none; }
.page-body .scheda-gara h3 a:hover { text-decoration: underline; }
.scheda-gara__meta { margin: 0.35rem 0 0.8rem; font-family: var(--f-cartello); font-weight: 600; font-size: 0.98rem; color: var(--testo-2); font-variant-numeric: tabular-nums; }
/* Quote della singola gara: fasce di prezzo in righe, con/senza servizi in colonne. */
.page-body .quote { display: table; width: 100%; margin: 0; background: none; font-size: 0.95rem; }
.page-body .quote th, .page-body .quote td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--pietra-chiara); }
.page-body .quote thead th { background: none; color: var(--testo-2); font-family: var(--f-cartello); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 2px solid var(--blu-notte); }
.page-body .quote tbody th { font-weight: 600; color: var(--testo); white-space: nowrap; }
.page-body .quote td { font-family: var(--f-cartello); font-weight: 700; font-size: 1.1rem; color: var(--blu-notte); text-align: right; white-space: nowrap; }
.page-body .quote thead th:not(:first-child) { text-align: right; }
.page-body .quote th:first-child { padding-left: 0; }
.page-body .quote td:last-child, .page-body .quote th:last-child { padding-right: 0; }
.page-body .quote td.quote__invece { font-family: var(--f-testo); font-weight: 400; font-size: 0.9rem; color: var(--testo-2); text-decoration: line-through; }
.scheda-gara__servizi { margin: 0.7rem 0 0; font-size: 0.92rem; color: var(--testo-2); }
@media (max-width: 720px) { .schede-gare { grid-template-columns: 1fr; } }
/* Moduli di iscrizione: il bottone resta spento finché il PDF non c'è. */
.moduli .btn { margin-top: 0.2rem; }
.btn[aria-disabled="true"] { background: var(--pietra-chiara); color: var(--testo-2); cursor: default; }
.btn[aria-disabled="true"]:hover { background: var(--pietra-chiara); color: var(--testo-2); transform: none; }

.tabella-scorre { overflow-x: auto; }
.tabella-scorre > table { margin: 0; }
.page-body .tabella-scorre { margin: 1.5rem 0; }

/* Calendario del regolamento: tabella su schermi larghi, una scheda per gara su telefono. */
.page-body .calendario td:first-child, .page-body .calendario td:last-child { white-space: nowrap; }
@media (max-width: 720px) {
  .page-body .calendario, .page-body .calendario tbody { display: block; }
  .page-body .calendario thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .page-body .calendario tr { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr) auto; grid-template-areas: "data gara gara" "data soc soc" "data luogo ente"; column-gap: 0.75rem; padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--pietra-chiara); }
  .page-body .calendario td { padding: 0; border: 0; white-space: normal; }
  .page-body .calendario td:nth-child(1) { grid-area: data; font-family: var(--f-cartello); font-weight: 800; font-size: 1.15rem; color: var(--blu-notte); }
  .page-body .calendario td:nth-child(2) { grid-area: gara; font-weight: 600; color: var(--testo); }
  .page-body .calendario td:nth-child(3) { grid-area: soc; color: var(--testo-2); font-size: 0.92rem; }
  .page-body .calendario td:nth-child(4) { grid-area: luogo; color: var(--testo-2); font-size: 0.92rem; }
  .page-body .calendario td:nth-child(5) { grid-area: ente; color: var(--testo-2); font-size: 0.92rem; font-family: var(--f-cartello); font-weight: 700; text-align: right; }
}
.page-body .griglia-punti { min-width: 22rem; }
.page-body .griglia-punti td { padding-block: 0.35rem; }
.page-body .griglia-punti td:nth-child(odd) { color: var(--testo-2); }
.page-body .griglia-punti td:nth-child(even) { font-family: var(--f-cartello); font-weight: 700; font-size: 1.05rem; color: var(--blu-notte); }
.page-body .griglia-punti td:nth-child(2), .page-body .griglia-punti td:nth-child(4) { border-right: 1px solid var(--pietra-chiara); }

.classifica-corrente { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.4rem 1.5rem; background: var(--blu-notte); color: #fff; }
.classifica-corrente p { margin: 0; max-width: 28rem; }

.page-body .archivio { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 2px solid var(--blu-notte); }
.page-body .archivio > li { display: grid; grid-template-columns: 5rem 1fr; align-items: baseline; gap: 1rem; margin: 0; padding: 0.9rem 0; border-bottom: 1px solid var(--pietra-chiara); }
.archivio__anno { font-family: var(--f-cartello); font-weight: 800; font-size: 1.5rem; color: var(--blu-notte); font-variant-numeric: tabular-nums; }
.page-body .archivio__tappe { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.page-body .archivio__tappe li { margin: 0; }

.page-body .importi { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.page-body .importi li { margin: 0; padding: 1rem 1.1rem; background: var(--smalto); box-shadow: var(--ombra-tavola); display: flex; flex-direction: column; gap: 0.2rem; }
.importi__cifra { font-family: var(--f-cartello); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--blu-notte); font-variant-numeric: tabular-nums; }
.importi__voce { font-family: var(--f-cartello); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--testo-2); }
@media (max-width: 720px) { .page-body .importi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rimando { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 3rem; }
/* Su telefono le tabelle larghe scorrono in orizzontale invece di uscire dallo schermo. */
@media (max-width: 720px) {
  .page-body table { font-size: 0.95rem; }
  .page-body .tabella-scorre table:not(.calendario) thead th { white-space: nowrap; }
  .page-body th, .page-body td { padding: 0.6rem 0.55rem; }
  .page-body td:first-child { white-space: nowrap; }
}
.page-body .importi--blu li { background: var(--blu); box-shadow: none; }
.importi--blu .importi__cifra { color: var(--smalto); }
.importi--blu .importi__voce { color: var(--smalto); }

/* ---------- News (pagine generate dall'admin: templates/news-*.html) ---------- */
.page-hero--news h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.02; max-width: 48rem; }
.news-meta { margin: 0 0 0.6rem; font-family: var(--f-cartello); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.news-lede { font-size: 1.2rem; line-height: 1.5; color: var(--blu-notte); font-weight: 500; }
.news-lede:empty { display: none; }
.news-body picture, .news-body img { display: block; max-width: 100%; height: auto; margin-block: 1.5rem; }
.news-body picture img { margin-block: 0; }
.news-back { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--pietra-chiara); }
.news-empty { color: var(--testo-2); }
.page-body-section .news-grid { margin-inline: auto; }
