/* =========================================================
   OPES Resistance Training — foglio di stile pubblico
   Mobile-first. Colori di brand impostabili dal pannello
   (variabili --ink, --primary, --accent, --hi, --paper).
   I colori dei "dischi" richiamano i dischi olimpici:
   verde 10 kg, giallo 15 kg, blu 20 kg, rosso 25 kg.
   ========================================================= */

:root {
  --ink: #0B2140;
  --primary: #17447D;
  --accent: #C62B33;
  --hi: #F4B400;
  --paper: #F3F5F9;
  --green: #0D713F;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --text: #17213B;
  --muted: #56617A;
  --line: #DCE1EA;
  --steel: #C3CAD6;

  --display: "Montserrat", "Archivo", system-ui, sans-serif;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1200px;
  --gut: clamp(1rem, 4vw, 2rem);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --header-h: 64px;
  --shadow: 0 1px 2px rgba(13, 27, 62, .06), 0 8px 24px -12px rgba(13, 27, 62, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* barra rapida mobile */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); font-weight: 800; font-family: var(--display); letter-spacing: -.01em; }
.hero__title, .page-head__title, .h2 { letter-spacing: -.025em; }
.date-row__date b, .ecard__date b, .mini-dates time b, .plate-v, .ccard__city, .date-row__city, .bb-plate text, .steps__n, .acc__item summary { font-family: var(--display); }
p { margin: 0 0 1em; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--hi); color: var(--ink); padding: .5rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.wrap--text { max-width: 820px; }
.mb { margin-bottom: 1.25rem; }
.mt { margin-top: 2.5rem; }
.muted { color: var(--muted); }

.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- Tipografia ---------- */
.h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-variation-settings: "wdth" 78;
  letter-spacing: -.01em;
}
.h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); font-variation-settings: "wdth" 85; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.prose { max-width: 70ch; }
.prose h2 { font-size: 1.6rem; font-variation-settings: "wdth" 82; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--accent); }
.prose ul ul { margin: .3em 0 .5em; }
.prose blockquote { margin: 1.5em 0; padding: .25em 0 .25em 1.25em; border-left: 4px solid var(--hi); color: var(--muted); }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .7em .9em; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.prose th { background: var(--ink); color: #fff; font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { white-space: nowrap; color: var(--primary); }
@media (max-width: 600px) { .prose table { display: block; overflow-x: auto; } }
.prose iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--r); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.25em;
  border: 2px solid transparent; border-radius: 8px;
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--sm { min-height: 38px; padding: .45em .9em; font-size: .92rem; }
.btn--lg { min-height: 54px; padding: .85em 1.5em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--ink); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #fff; color: var(--ink); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,.45); color: #fff; background: transparent; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-more { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; margin-top: 1.25rem; }
.link-more:hover .ico { transform: translateX(3px); }
.link-more .ico { transition: transform .15s; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.site-header__in { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand__logo { height: 40px; width: auto; }
@media (min-width: 1100px) { .brand__logo { height: 48px; } }
.brand__mark { width: 36px; height: 36px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text b { font-size: 1.25rem; letter-spacing: .02em; font-variation-settings: "wdth" 110; }
.brand__text span { font-size: .78rem; opacity: .8; font-weight: 600; font-variation-settings: "wdth" 90; }
.site-header__actions { display: flex; align-items: center; gap: .5rem; }
.burger { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.burger .ico { width: 24px; height: 24px; }
.burger .ico--close, .nav-open .burger .ico--open { display: none; }
.nav-open .burger .ico--close { display: block; }
.hide-mobile { display: none; }
@media (min-width: 560px) { .hide-mobile { display: inline-flex; } }

/* nav mobile: pannello a tutta altezza */
.nav {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink);
  overflow-y: auto; padding: 1rem var(--gut) 6rem;
  transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
}
.nav-open .nav { transform: none; visibility: visible; }
.nav-open { overflow: hidden; }
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; align-items: center; }
.nav__link { flex: 1; display: block; padding: 1rem 0; color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 700; font-variation-settings: "wdth" 85; }
.nav__link:hover { color: var(--hi); }
.nav__toggle { width: 46px; height: 46px; border: 0; background: transparent; color: #fff; cursor: pointer; border-radius: 8px; }
.nav__toggle .ico { transition: transform .2s; }
.nav__toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav__sub { list-style: none; margin: 0; padding: 0 0 .75rem; width: 100%; display: none; }
.nav__item.is-open .nav__sub { display: block; }
.nav__sub a { display: block; padding: .55rem 0 .55rem 1rem; color: rgba(255,255,255,.85); text-decoration: none; border-left: 2px solid rgba(255,255,255,.15); }
.nav__sub a:hover { color: #fff; border-left-color: var(--hi); }
.nav__extra { display: grid; gap: .75rem; margin-top: 1.5rem; }

@media (min-width: 1100px) {
  :root { --header-h: 76px; }
  .burger, .site-header__actions .btn { display: none; }
  .nav { position: static; transform: none; visibility: visible; background: none; padding: 0; overflow: visible; display: flex; align-items: center; gap: 1.5rem; }
  .nav__list { display: flex; gap: .25rem; }
  .nav__item { border: 0; flex-wrap: nowrap; }
  .nav__link { font-size: 1rem; padding: .6rem .7rem; border-radius: 6px; font-variation-settings: "wdth" 100; }
  .nav__item.is-active > .nav__link { color: var(--hi); }
  .nav__toggle { width: 24px; height: 32px; margin-left: -.5rem; }
  .nav__sub {
    display: block; position: absolute; top: 100%; left: 0; min-width: 250px; padding: .5rem;
    background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
  }
  .nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub, .nav__item.is-open .nav__sub { opacity: 1; visibility: visible; transform: none; }
  .nav__sub a { color: var(--text); border: 0; padding: .55rem .75rem; border-radius: 6px; }
  .nav__sub a:hover { background: var(--paper); color: var(--primary); }
  .nav__extra { display: flex; margin: 0; gap: .5rem; }
  .nav__extra .btn { min-height: 42px; padding: .5em 1em; font-size: .95rem; white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1299px) {
  .nav__extra-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav__list { gap: 0; }
  .nav__link { padding: .6rem .55rem; }
}

/* ---------- Barra rapida mobile ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .55rem 0 .5rem; color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 600; }
.tabbar .ico { width: 22px; height: 22px; }
.tabbar a:active { background: var(--paper); }
@media (min-width: 900px) { .tabbar { display: none; } }
.nav-open .tabbar { display: none; }

/* ---------- Hero home ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero__in { position: relative; z-index: 2; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: 2.5rem; }
.hero__title {
  color: #fff; font-size: clamp(2.3rem, 1.3rem + 5vw, 5.2rem);
  line-height: 1; letter-spacing: -.02em; max-width: 15ch;
  font-variation-settings: "wdth" 66; font-weight: 850;
}
.hero__text { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); max-width: 54ch; color: rgba(255,255,255,.85); margin: 1rem 0 1.75rem; }
.hero--img .hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero--home .hero__in { padding-bottom: 0; }

.barbell { position: relative; z-index: 1; margin: 1.5rem auto -3.2rem; max-width: 1400px; padding: 0 var(--gut); }
.barbell svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 699px) {
  .barbell { margin: 1.75rem 0 .5rem; padding: 0; overflow: hidden; }
  .barbell svg { width: 130%; margin-left: -15%; }
  .finder { margin-top: 0; }
  .hero--home .btn-row .btn { flex: 1 1 100%; }
}
.bb-bar { fill: var(--steel); }
.bb-sleeve { fill: #E3E7EE; }
.bb-collar { fill: #8C96A8; }
.bb-plate rect { stroke: rgba(0,0,0,.15); stroke-width: 1; }
.bb-plate text { fill: #fff; font: 800 22px var(--font); text-anchor: middle; dominant-baseline: middle; font-variation-settings: "wdth" 75; }
.bb-p1 rect { fill: var(--green); }
.bb-p2 rect { fill: var(--hi); }
.bb-p2 text { fill: var(--ink); }
.bb-p3 rect { fill: var(--primary); }
/* l'unico momento animato: i dischi vengono caricati sul bilanciere */
@media (prefers-reduced-motion: no-preference) {
  .bb-plate { animation: load .7s cubic-bezier(.2,.8,.2,1) both; }
  .bb-side--l .bb-plate { --from: -260px; }
  .bb-side--r .bb-plate { --from: 260px; }
  .bb-p3 { animation-delay: .15s; }
  .bb-p2 { animation-delay: .35s; }
  .bb-p1 { animation-delay: .55s; }
  @keyframes load { from { transform: translateX(var(--from)); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Ricerca corso ---------- */
.finder-wrap { position: relative; z-index: 3; }
.finder {
  display: grid; gap: .9rem; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 1.25rem; margin-top: -1rem;
}
.finder__title { font-size: 1.3rem; margin: 0; font-variation-settings: "wdth" 85; }
.finder__cities { grid-column: 1 / -1; margin: 0; font-size: .92rem; color: var(--muted); }
@media (min-width: 800px) {
  .finder { grid-template-columns: auto 1fr 1fr auto; align-items: end; padding: 1.5rem 1.75rem; }
  .finder__title { align-self: center; margin-right: .5rem; }
}

/* ---------- Campi modulo ---------- */
.field { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .85rem; font: inherit; font-weight: 400; color: var(--text);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356617A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 18px; padding-right: 2.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }

/* ---------- Sezioni ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--tight { padding: clamp(1.5rem, 3vw, 2.5rem) 0; }
.blocks > .section--tight:first-child { padding-top: clamp(2rem, 4vw, 3rem); }
.blocks > .section:last-child { padding-bottom: clamp(3rem, 6vw, 5rem); }
.section--ink { background: var(--ink); color: rgba(255,255,255,.88); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .lead { color: rgba(255,255,255,.75); }
.section__head { margin-bottom: 1.75rem; }
.section__head--row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; }
.section__head--row .link-more { margin: 0; }
.is-home .finder-wrap + .section { padding-top: clamp(3rem, 5vw, 4.5rem); }

/* ---------- Date (righe guidate dalla data) ---------- */
.dates { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.date-row { border-bottom: 1px solid var(--line); }
.date-row a { display: grid; grid-template-columns: 64px 1fr auto; gap: .25rem 1rem; align-items: center; padding: 1rem .25rem; color: inherit; text-decoration: none; }
.date-row a:hover { background: var(--card); }
.date-row__date { display: grid; justify-items: center; line-height: 1; color: var(--ink); grid-row: span 2; }
.date-row__date b { font-size: 2.4rem; font-variation-settings: "wdth" 70; font-weight: 850; }
.date-row__date span { font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: 4px; }
.date-row__body { display: grid; min-width: 0; }
.date-row__city { font-weight: 800; font-size: 1.2rem; color: var(--ink); font-variation-settings: "wdth" 85; }
.date-row__title { color: var(--text); }
.date-row__meta { font-size: .9rem; color: var(--muted); }
.date-row__lv { grid-column: 2; display: flex; flex-wrap: wrap; gap: .3rem; }
.date-row__go { display: none; color: var(--primary); }
@media (min-width: 760px) {
  .date-row a { grid-template-columns: 84px 1fr auto 28px; padding: 1.1rem .75rem; }
  .date-row__date { grid-row: auto; }
  .date-row__lv { grid-column: auto; justify-content: flex-end; }
  .date-row__go { display: block; }
  .date-row a:hover .date-row__go { transform: translateX(3px); }
}

/* ---------- Badge livelli e dischi ---------- */
.lvl { display: inline-flex; align-items: center; gap: .35em; padding: .2em .6em .2em .35em; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--paper); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.lvl::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: currentColor; }
.lvl--green::before { background: var(--green); }
.lvl--yellow::before { background: var(--hi); }
.lvl--blue::before { background: var(--primary); }
.lvl--red::before { background: var(--accent); }
.tag { display: inline-flex; align-items: center; gap: .35em; padding: .25em .65em; border-radius: 6px; font-size: .8rem; font-weight: 700; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.tag--light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.plate { display: inline-block; width: .55em; height: 1.05em; border-radius: 3px; vertical-align: -.15em; margin-right: .4em; }
.plate--green { background: var(--green); }
.plate--yellow { background: var(--hi); }
.plate--blue { background: var(--primary); }
.plate--red { background: var(--accent); }

/* ---------- Percorso livelli ---------- */
.levels__list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.levels__item { display: grid; grid-template-columns: 56px 1fr; gap: 1.1rem; align-items: start; padding: 1.25rem 0; border-top: 1px solid rgba(255,255,255,.15); }
.levels__item h3 { font-size: 1.35rem; font-variation-settings: "wdth" 85; margin-bottom: .3rem; }
.levels__item p { margin: 0; }
.plate-v { display: grid; place-items: center; width: 56px; border-radius: 10px; font-weight: 850; font-size: 1.25rem; color: #fff; font-variation-settings: "wdth" 75; }
.plate-v--green { height: 84px; background: var(--green); }
.plate-v--yellow { height: 104px; background: var(--hi); color: var(--ink); }
.plate-v--blue { height: 124px; background: var(--primary); }
.plate-v--red { height: 140px; background: var(--accent); }
@media (min-width: 900px) {
  .levels__list { grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: end; }
  .levels__item { grid-template-columns: 1fr; border-top: 0; padding: 0; }
  .plate-v { width: 64px; }
  .levels__item:nth-child(1) .plate-v { margin-top: 56px; }
  .levels__item:nth-child(2) .plate-v { margin-top: 36px; }
}

/* ---------- Discipline ---------- */
.disc { display: grid; gap: 1rem; }
.disc__item {
  position: relative; display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem 1.5rem 1.25rem 1.9rem;
  background: var(--card); border-radius: var(--r); color: var(--text); text-decoration: none; overflow: hidden; min-height: 210px;
  border: 1px solid var(--line);
}
.disc__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.disc__item--red::before { background: var(--accent); }
.disc__item--blue::before { background: var(--primary); }
.disc__item--yellow::before { background: var(--hi); }
.disc__item h3 { font-size: 1.75rem; font-variation-settings: "wdth" 72; margin: 0; }
.disc__item p { color: var(--muted); margin: 0; flex: 1; }
.disc__next { font-size: .9rem; font-weight: 600; color: var(--ink); display: flex; gap: .4rem; align-items: center; }
.disc__item:hover { border-color: var(--ink); }
@media (min-width: 800px) { .disc { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Link rapidi ---------- */
.quick { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.quick a { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); height: 100%; }
.quick a:hover { border-color: var(--primary); }
.quick span { display: grid; flex: 1; }
.quick b { color: var(--ink); }
.quick small { color: var(--muted); font-size: .9rem; }
.quick__ico { width: 28px; height: 28px; color: var(--primary); }
.quick__go { color: var(--muted); }
@media (min-width: 700px) { .quick { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .quick { grid-template-columns: repeat(4, 1fr); } }

/* ---------- News ---------- */
.posts { display: grid; gap: 1.25rem; }
.post-card { background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card__body { padding: 1.25rem; }
.post-card__meta { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.post-card h3 { font-size: 1.3rem; font-variation-settings: "wdth" 85; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--primary); text-decoration: underline; }
.post-card p:last-child { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(3, 1fr); } }

/* ---------- CTA ---------- */
.cta { display: grid; gap: 1.25rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.cta p { margin: 0; color: var(--muted); max-width: 60ch; }
.cta h2 { margin-bottom: .35rem; }
.cta--dark { background: var(--primary); border: 0; color: #fff; }
.cta--dark h2 { color: #fff; }
.cta--dark p { color: rgba(255,255,255,.85); }
@media (min-width: 800px) { .cta { grid-template-columns: 1fr auto; } }

/* ---------- Testata pagine interne ---------- */
.page-head { background: var(--ink); color: #fff; padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(1.75rem, 4vw, 2.75rem); }
.page-head__title { color: #fff; font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); line-height: .98; font-variation-settings: "wdth" 70; letter-spacing: -.015em; max-width: 20ch; margin: 0; }
.page-head__intro { margin: 1rem 0 0; max-width: 62ch; color: rgba(255,255,255,.8); font-size: 1.1rem; }
.page-head__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.page-head__meta { margin: .75rem 0 0; color: rgba(255,255,255,.7); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .88rem; margin-bottom: 1rem; color: rgba(255,255,255,.65); }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs .ico { width: .9em; height: .9em; opacity: .6; }

/* ---------- Filtri ---------- */
.filters { display: grid; gap: .6rem; margin-top: 1.5rem; }
.chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-top: 1.25rem; }
.filters .chips { margin: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; white-space: nowrap; min-height: 40px; padding: .45rem .95rem; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: #fff; color: #fff; }
.chip.is-on { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Schede corso ---------- */
.cgrid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .cgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cgrid { grid-template-columns: repeat(3, 1fr); } }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.ccard[hidden] { display: none; }
.ccard:hover { border-color: var(--ink); }
.ccard__link { display: flex; flex-direction: column; height: 100%; padding: 1.25rem; color: inherit; text-decoration: none; }
.ccard__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.ccard__city { font-weight: 850; font-size: 1.55rem; color: var(--ink); font-variation-settings: "wdth" 72; line-height: 1.05; }
.ccard__lv { display: flex; flex-wrap: wrap; gap: .3rem; }
.ccard__title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.ccard__sum { color: var(--muted); font-size: .95rem; flex: 1; }
.ccard__next { margin: 0; padding-top: .85rem; border-top: 1px solid var(--line); font-size: .92rem; display: flex; gap: .4rem; align-items: center; color: var(--ink); }
.empty { padding: 1.25rem; background: var(--card); border: 1px dashed var(--steel); border-radius: var(--r); color: var(--muted); }

/* ---------- Dettaglio corso / gara ---------- */
.detail { display: grid; gap: 2rem; padding-top: 2rem; padding-bottom: 4rem; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.detail__form { margin-top: 3rem; padding-top: 2.5rem; border-top: 2px solid var(--ink); }
.detail__img { border-radius: var(--r); margin-bottom: 1.5rem; width: 100%; }
.detail__side { display: grid; gap: 1rem; align-content: start; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.side-box h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .85rem; color: var(--ink); }
.side-box p { margin: 0 0 .5rem; }
.side-links { display: grid; gap: .4rem; }
.side-links a { display: inline-flex; gap: .45rem; align-items: center; font-weight: 600; text-decoration: none; }
.mini-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.mini-dates li { display: grid; grid-template-columns: 52px 1fr; gap: .75rem; align-items: center; }
.mini-dates time { display: grid; justify-items: center; background: var(--paper); border-radius: 8px; padding: .35rem 0; font-size: .75rem; font-weight: 700; color: var(--muted); line-height: 1.1; }
.mini-dates time b { font-size: 1.5rem; color: var(--ink); font-variation-settings: "wdth" 72; }
.mini-dates span { display: grid; font-weight: 700; color: var(--ink); line-height: 1.3; }
.mini-dates small { font-weight: 400; color: var(--muted); font-size: .85rem; }
@media (min-width: 980px) {
  .detail { grid-template-columns: minmax(0, 1fr) 340px; gap: 3.5rem; padding-top: 3rem; }
  .detail__side { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.prices { margin: 0; }
.prices__row { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.prices__row:last-child { border-bottom: 0; }
.prices dt { font-weight: 600; display: grid; }
.prices dt small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.prices dd { margin: 0; font-weight: 800; color: var(--ink); white-space: nowrap; font-size: 1.1rem; }
.wrap--text .prices { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .5rem 1.25rem; }

/* ---------- Gare ---------- */
.events { display: grid; gap: 1rem; }
@media (min-width: 760px) { .events { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .events { grid-template-columns: repeat(3, 1fr); } }
.ecard a { display: grid; grid-template-columns: 76px 1fr; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; text-decoration: none; }
.ecard a:hover { border-color: var(--ink); }
.ecard img { grid-column: 1 / -1; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.ecard__date { display: grid; align-content: center; justify-items: center; color: #fff; line-height: 1; padding: 1rem 0; }
.ecard--red .ecard__date { background: var(--accent); }
.ecard--blue .ecard__date { background: var(--primary); }
.ecard--yellow .ecard__date { background: var(--hi); color: var(--ink); }
.ecard__date b { font-size: 2.2rem; font-variation-settings: "wdth" 70; }
.ecard__date span { font-size: .75rem; font-weight: 700; margin-top: 4px; text-align: center; }
.ecard__body { padding: 1rem 1.1rem; }
.ecard__disc { font-size: .85rem; font-weight: 700; color: var(--muted); }
.ecard h3 { font-size: 1.2rem; margin: .25rem 0 .4rem; font-variation-settings: "wdth" 85; }
.ecard__place { margin: 0; font-size: .9rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; }
.events--past .ecard a { opacity: .75; }
.disc-intro { border-left: 6px solid var(--line); padding-left: 1.25rem; }
.disc-intro h2 { margin-top: 0; }
.disc-intro--red { border-color: var(--accent); }
.disc-intro--blue { border-color: var(--primary); }
.disc-intro--yellow { border-color: var(--hi); }

/* ---------- Tessere, passi, liste ---------- */
.tiles { display: grid; gap: 1rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; display: block; padding: 1.35rem 1.35rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.tile img { border-radius: 8px; margin-bottom: 1rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.tile h3 { font-size: 1.25rem; font-variation-settings: "wdth" 85; margin-bottom: .35rem; padding-right: 1.5rem; }
.tile p { margin: 0; color: var(--muted); }
.tile__go { position: absolute; top: 1.4rem; right: 1.2rem; color: var(--primary); }
a.tile:hover { border-color: var(--ink); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: s; }
.steps__item { position: relative; padding: 1.25rem 1.25rem 1.25rem 4.25rem; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); }
.steps__item h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.steps__item p { margin: 0; color: var(--muted); }
.steps__n { position: absolute; left: 1.1rem; top: 1.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .steps__item { padding: 4rem 1.25rem 1.35rem; } .steps__n { top: 1.25rem; left: 1.25rem; } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.checks li { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; background: var(--card); border-radius: 8px; border: 1px solid var(--line); }
.checks .ico { color: var(--green); margin-top: .2em; }

.acc { display: grid; gap: .6rem; }
.acc__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.acc__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 800; font-size: 1.2rem; color: var(--ink); font-variation-settings: "wdth" 85; }
.acc__item summary::-webkit-details-marker { display: none; }
.acc__item summary .ico { transition: transform .2s; color: var(--primary); }
.acc__item[open] summary .ico { transform: rotate(180deg); }
.acc__body { padding: 0 1.25rem 1.25rem; }

.files { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .5rem; }
.files a { display: flex; gap: .9rem; align-items: center; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); }
.files a:hover { border-color: var(--primary); }
.files span:not(.files__dl) { display: grid; flex: 1; }
.files b { color: var(--ink); }
.files small { color: var(--muted); }
.files__ico { width: 26px; height: 26px; color: var(--accent); }
.files__dl { display: flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--primary); }
.files__cat { font-size: 1.05rem; margin: 1.25rem 0 .6rem; color: var(--muted); }

.notice { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); border-top: 6px solid var(--hi); padding: 1.5rem; }
.notice__date { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--muted); font-weight: 600; }
.figure { margin: 0; }
.figure img { border-radius: var(--r); }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* ---------- Moduli ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.form { display: grid; gap: 1.1rem; }
.form__grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.check input { width: 22px; height: 22px; margin-top: .1em; accent-color: var(--primary); flex: none; }
.form .btn { justify-self: start; }
.form__preview { margin: 0; font-size: .92rem; color: var(--primary); font-weight: 600; }
.alert { display: flex; gap: .75rem; padding: 1rem 1.1rem; border-radius: 8px; margin-bottom: 1.25rem; }
.alert ul { margin: 0; padding-left: 1.1em; }
.alert--ok { background: #E6F5EC; color: #11563A; }
.alert--ok .ico { color: var(--green); width: 24px; height: 24px; }
.alert--error { background: #FDECEE; color: #8E1724; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); margin-top: 0; font-size: .95rem; }
.site-footer__grid { display: grid; gap: 2rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__contact li { display: flex; gap: .6rem; align-items: center; }
.site-footer__logo { height: 56px; width: auto; margin-bottom: 1rem; }
.site-footer__brand .brand { margin-bottom: 1rem; }
.site-footer__brand p { max-width: 46ch; }
.social { display: flex; gap: .5rem; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.site-footer__safe { display: flex; gap: .75rem; align-items: flex-start; padding-top: 1.25rem; padding-bottom: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__safe .ico { color: var(--hi); width: 22px; height: 22px; margin-top: .1rem; }
.site-footer__safe p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.85); }
.site-footer__safe a { text-decoration: underline; }
.site-footer__legal { padding-top: 1rem; padding-bottom: .5rem; border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__legal p + p { border-top: 0; }
.site-footer__legal p { margin: 0; padding: 0 0 .75rem; font-size: .8rem; line-height: 1.55; color: rgba(255,255,255,.6); max-width: 110ch; }
.legal-note p { margin: 0 0 .5rem; } .legal-note p:last-child { margin: 0; }
.legal-note { margin: 2rem 0 0; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 8px; font-size: .88rem; color: var(--muted); max-width: 70ch; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.site-footer__bottom a { color: rgba(255,255,255,.6); }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }

.maint { display: grid; place-items: center; min-height: 100vh; text-align: center; background: var(--ink); color: #fff; }
.maint h1 { color: #fff; font-size: 2.5rem; font-variation-settings: "wdth" 72; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .tabbar, .site-footer, .detail__form, .finder-wrap { display: none !important; } body { background: #fff; } }

/* barra di anteprima dello stile (solo amministratori) */
.style-preview { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 95; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; width: min(94vw, 720px); padding: .7rem 1rem; background: #fff; color: #17213B; border: 2px solid var(--hi); border-radius: 14px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.45); font-size: .92rem; }
.style-preview form { margin: 0; }
@media (min-width: 900px) { .style-preview { bottom: 18px; } }

/* quarta disciplina: allenamento funzionale (disco verde) */
.disc__item--green::before { background: var(--green); }
.ecard--green .ecard__date { background: var(--green); }
.disc-intro--green { border-color: var(--green); }
@media (min-width: 800px) { .disc { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .disc { grid-template-columns: repeat(4, 1fr); } }

/* ===== Conversione: WhatsApp, prezzi, cookie ===== */
[hidden] { display: none !important; }
.btn--wa { background: #1FA855; color: #fff; border-color: #1FA855; }
.btn--wa:hover { background: #158A44; color: #fff; }
.btn--wa .ico, .ae-btn--wa .ico, .rf-btn--wa .ico, .wa-float .ico { width: 20px; height: 20px; }
.ae-btn--wa { background: #1FA855; border-color: #1FA855; color: #fff; gap: .5rem; }
.ae-btn--wa:hover { background: #158A44; border-color: #158A44; color: #fff; }
.rf-btn--wa { background: #1FA855; border-color: #1FA855; color: #fff; display: inline-flex; align-items: center; gap: .5rem; }
.rf-btn--wa:hover { background: #158A44; border-color: #158A44; color: #fff; }
.tabbar { grid-template-columns: repeat(var(--tabs, 5), 1fr); }
.tabbar a.tabbar__wa { color: #158A44; }
.wa-float { display: none; }
@media (min-width: 900px) {
  .wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.2rem; border-radius: 999px; background: #1FA855; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); }
  .wa-float:hover { background: #158A44; color: #fff; }
}
.hero__note { display: flex; gap: .5rem; align-items: flex-start; margin: 1rem 0 0; color: #fff; font-weight: 700; max-width: 52ch; }
.hero__note .ico { color: var(--hi); flex: none; margin-top: .15em; }
.ae-hero__note { margin: 1rem 0 0; font-weight: 700; color: #fff; border-left: 3px solid #1FA855; padding-left: .75rem; max-width: 52ch; }
.rf-hero__note { margin: 1rem 0 0; font-weight: 600; color: var(--ink); border-left: 3px solid var(--green); padding-left: .75rem; max-width: 52ch; }
.steps__note { display: flex; gap: .5rem; align-items: center; margin: 1.25rem 0 0; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.steps__note .ico { color: var(--green); }
.levels__price { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .85rem 0 0; }
.levels__price b { font-size: 1.35rem; color: #fff; }
.levels__price small { color: rgba(255,255,255,.7); }
.ae-stack__price { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem 0 0; }
.ae-stack__price b { font-size: 1.4rem; color: #fff; } .ae-stack__price small { color: var(--ae-muted, #aab); }
.ae-btn--sm { min-height: 40px; padding: .5em 1.1em; font-size: .85rem; }
.rf-level__price { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem 0 0; }
.rf-level__price b { font-size: 1.3rem; font-weight: 600; } .rf-level__price small { color: var(--muted); }
.rf-btn--sm { padding: .55em 1.1em; font-size: .85rem; }
.ccard__price { margin: 0 0 .6rem; color: var(--ink); }
.ccard__price b { font-size: 1.2rem; }
.ccard__price small { color: var(--muted); }
.ccard__next > span { display: inline-flex; gap: .4rem; align-items: center; }
.vat { font-size: .75rem; font-weight: 600; color: var(--muted); margin-left: .35rem; }
.prices__inc { display: flex; gap: .4rem; align-items: flex-start; margin: .85rem 0 0; font-size: .9rem; color: var(--text); }
.prices__inc .ico { color: var(--green); flex: none; margin-top: .2em; }
.side-box--wa { border-color: #1FA855; }
.side-box--wa p { margin: 0 0 .85rem; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.testi__list { display: grid; gap: 1rem; }
@media (min-width: 800px) { .testi__list { grid-template-columns: repeat(3, 1fr); } }
.testi__item { margin: 0; padding: 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 1rem; }
.testi__item blockquote { margin: 0; font-size: 1.05rem; }
.testi__item figcaption { display: grid; color: var(--muted); font-size: .9rem; } .testi__item figcaption b { color: var(--ink); }
.cookie { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 100; display: grid; gap: .75rem; padding: 1rem 1.1rem; background: #fff; color: #17213B; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); max-width: 560px; }
.cookie p { margin: 0; font-size: .92rem; }
.cookie__btns { display: flex; gap: .5rem; justify-content: flex-end; }
@media (min-width: 900px) { .cookie { bottom: 20px; left: 20px; right: auto; } }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.cinfo { display: grid; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cinfo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.cinfo__list li { display: flex; gap: .75rem; align-items: flex-start; }
.cinfo__list .ico { width: 22px; height: 22px; color: var(--primary); flex: none; margin-top: .15em; }
.cinfo__list span { display: grid; }
.cinfo__list b { color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.cinfo__social { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.cinfo__social a { display: inline-flex; gap: .35rem; align-items: center; }
.prices__inc--txt { display: block; }
.course-key { display: grid; gap: .5rem; margin: 0 0 1.25rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--r); }
.course-key p { margin: 0; display: flex; gap: .55rem; align-items: flex-start; }
.course-key p .ico { margin-top: .2em; }
.course-key .ico { color: var(--primary); flex: none; }
.course-key [data-date]:not([hidden]) ~ [data-date] { display: none; }
@media (max-width: 599px) {
  .detail__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail__actions .btn { width: 100%; padding-left: .6rem; padding-right: .6rem; }
  .detail__actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
