/* Compagnia Arcieri Livornesi "Dino Sani" ASD: tema 2026 */

/* ---------- Fonts (self-hosted, niente richieste a Google) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(../fonts/barlow-condensed-800.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/barlow-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-600.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --bordeaux: #7b1e2e;
  --bordeaux-dark: #5a1421;
  --bordeaux-tint: #f6eef0;
  --gold: #e3a92b;
  --gold-soft: #f3d9a0;
  --ink: #1b1717;
  --ink-soft: #4a4444;
  --muted: #6e6666;
  --paper: #faf7f3;
  --white: #fff;
  --line: #e7e0d8;
  --night: #1d1214;

  --r-lg: 16px;   /* media e superfici */
  --r-sm: 10px;   /* miniature e campi */
  --r-pill: 999px; /* pulsanti e etichette */

  --shadow: 0 12px 32px -14px rgba(40, 10, 15, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Molle (apple-design): smorzamento 1 / risposta 0.4s, e 0.8 / 0.35s solo dopo un gesto con slancio */
  --spring: linear(0, 0.05, 0.158, 0.286, 0.413, 0.527, 0.626, 0.707, 0.774, 0.826, 0.868, 0.9, 0.925, 0.943, 0.958, 0.969, 0.977, 0.983, 0.987, 0.991, 0.993, 0.995, 0.996, 0.997, 0.998, 0.999, 1);
  --spring-ui: .72s;   /* risposta dell'interfaccia */
  --spring-soft: 1.08s; /* comparse di contenuto */
  --spring-bounce: linear(0, 0.047, 0.158, 0.295, 0.436, 0.568, 0.682, 0.776, 0.851, 0.907, 0.948, 0.976, 0.995, 1.006, 1.012, 1.015, 1.015, 1.014, 1.012, 1.01, 1.008, 1.006, 1.004, 1.003, 1.002, 1.001, 1);
  --spring-bounce-t: .6s;
  --max: 1200px;
  --gutter: 20px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 999; width: auto; height: auto; clip: auto;
  background: var(--white); color: var(--bordeaux); padding: 12px 18px; border-radius: var(--r-sm); box-shadow: var(--shadow);
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; font-size: .875rem; color: var(--gold-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, var(--gold) 0 28%, var(--bordeaux) 29% 56%, var(--white) 57%);
}
.section-title { font-size: clamp(2.1rem, 5vw, 3.4rem); text-transform: uppercase; letter-spacing: -.005em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { margin: 10px 0 0; color: var(--ink-soft); max-width: 560px; }
.section { padding: 96px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  text-transform: uppercase; letter-spacing: .06em;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .1s ease-out;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--bordeaux); color: var(--white); }
.btn-primary:hover { background: var(--bordeaux-dark); box-shadow: var(--shadow); }
.btn-light { background: var(--white); color: var(--bordeaux); }
.btn-light:hover { background: var(--paper); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-outline { border-color: var(--bordeaux); color: var(--bordeaux); }
.btn-outline:hover { background: var(--bordeaux); color: var(--white); }
.link-arrow {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--bordeaux); display: inline-flex; gap: 8px; align-items: center; min-height: 44px;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.cat-tag {
  display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em; padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--bordeaux-tint); color: var(--bordeaux); line-height: 1.4;
}
.cat-tag--gold { background: var(--gold); color: var(--ink); }
.cat-tag--neutral { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.meta { font-size: .875rem; color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { background: var(--bordeaux-dark); color: rgba(255,255,255,.86); font-size: .875rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; }
.topbar a:hover { color: var(--white); }
.topbar-info { display: flex; gap: 22px; align-items: center; }
.topbar-info > * { display: inline-flex; gap: 6px; align-items: center; }
.topbar svg { width: 15px; height: 15px; flex: none; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.socials { display: flex; gap: 4px; }
.socials a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; transition: background .2s; }
.socials a:hover { background: rgba(255,255,255,.12); }
.reserved { margin-left: 8px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); display: inline-flex; gap: 6px; align-items: center; min-height: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
}
/* Il vetro sta su uno pseudo-elemento: un backdrop-filter sull'header
   diventerebbe il riferimento del menu mobile "fixed" e lo farebbe sbordare. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img, .brand .custom-logo { width: 58px; height: 58px; object-fit: contain; }
.brand-text { line-height: 1; }
.brand-text strong { display: block; font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; color: var(--bordeaux); letter-spacing: .01em; }
.brand-text span { display: block; margin-top: 4px; font-family: var(--font-display); font-size: .92rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.main-nav { display: flex; align-items: center; }
.main-nav .menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.main-nav li { position: relative; }
.main-nav .menu > li > a {
  display: flex; align-items: center; gap: 4px; min-height: 44px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 14px; border-radius: var(--r-sm); color: var(--ink);
  transition: background .2s, color .2s;
}
.main-nav .menu > li > a:hover,
.main-nav .menu > .current-menu-item > a,
.main-nav .menu > .current-menu-ancestor > a { color: var(--bordeaux); background: var(--bordeaux-tint); }
.main-nav .menu-item-has-children > a::after {
  content: ""; width: 12px; height: 12px; opacity: .6;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%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 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.main-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--white); border-radius: var(--r-sm); box-shadow: var(--shadow); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.96); transform-origin: 24px 0;
  transition: opacity .14s ease-in, transform .14s ease-in, visibility 0s .14s;
}
.main-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .2s ease-out, transform .5s var(--spring), visibility 0s;
}
.main-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: .95rem; font-weight: 500; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu .current-menu-item > a { background: var(--paper); color: var(--bordeaux); }
.nav-cta { margin-left: 14px; padding: 10px 20px; font-size: 1rem; }
.menu-toggle { display: none; background: none; border: 0; width: 48px; height: 48px; cursor: pointer; color: var(--bordeaux); border-radius: var(--r-sm); }
.menu-toggle svg { width: 30px; height: 30px; margin: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: end; background: var(--night); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-media img.hero-default { object-position: center 55%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(40,8,14,.9) 0%, rgba(60,12,22,.58) 52%, rgba(0,0,0,.05) 100%),
    linear-gradient(0deg, rgba(20,5,8,.6) 0%, transparent 45%);
}
.hero .container { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 150px; }
.hero-content { max-width: 680px; }
.hero h1 { font-size: clamp(3.2rem, 8.5vw, 6.5rem); text-transform: uppercase; margin: 18px 0 20px; font-weight: 800; letter-spacing: -.01em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lead { font-size: 1.25rem; max-width: 540px; color: rgba(255,255,255,.9); margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
/* Portatili e schermi bassi: il pulsante principale resta sopra la piega */
@media (max-height: 860px) and (min-width: 641px) {
  .hero { min-height: min(calc(100svh - 124px), 760px); }
  .hero .container { padding-top: 48px; padding-bottom: 108px; }
  .hero h1 { font-size: clamp(3rem, 9.5vh, 6.5rem); margin: 14px 0 16px; }
  .hero-lead { font-size: 1.06rem; margin-bottom: 22px; }
}
/* Anelli del bersaglio: unico motivo decorativo, ripreso solo nella fascia corsi */
.rings {
  position: absolute; z-index: 1; pointer-events: none; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 46px, rgba(255,255,255,.08) 47px 48px);
}
.hero .rings { right: -140px; top: 50%; width: 620px; height: 620px; transform: translateY(-50%); }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 5; margin-top: -84px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; margin: 0; }
.stat { padding: 32px; border-right: 1px solid var(--line); margin: 0; }
.stat:last-child { border-right: 0; }
.stat dt { font-family: var(--font-display); font-size: 3.3rem; font-weight: 800; color: var(--bordeaux); line-height: 1; letter-spacing: -.01em; }
.stat dd { margin: 8px 0 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- News (home) ---------- */
.news-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
.news-featured { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 520px; display: flex; align-items: end; color: var(--white); box-shadow: var(--shadow); background: var(--night); }
.news-featured img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-featured:hover img { transform: scale(1.04); }
.news-featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(25,6,10,.94) 0%, rgba(25,6,10,.25) 55%, transparent 100%); }
.news-featured .body { position: relative; z-index: 2; padding: 40px; }
.news-featured h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 12px 0; text-transform: uppercase; }
.news-featured p { color: rgba(255,255,255,.86); margin: 0 0 8px; max-width: 560px; }
.news-featured .meta { color: rgba(255,255,255,.72); }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
  display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center;
  background: var(--white); border-radius: var(--r-lg); padding: 12px; border: 1px solid var(--line);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s;
}
.news-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: transparent; }
.news-item img, .news-item .ph { width: 132px; height: 96px; object-fit: cover; border-radius: var(--r-sm); }
.news-item h3 { font-size: 1.3rem; line-height: 1.12; margin: 6px 0 4px; transition: color .2s; }
.news-item:hover h3 { color: var(--bordeaux); }
.ph { background: var(--bordeaux-tint) url(../img/logo.png) center/40% no-repeat; }

/* ---------- Corsi ---------- */
.course { background: var(--bordeaux); color: var(--white); position: relative; overflow: hidden; isolation: isolate; }
.course .rings { left: -200px; bottom: -260px; width: 640px; height: 640px; }
.course .container {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  min-height: clamp(600px, 80vh, 780px); padding-top: 96px; padding-bottom: 96px;
}
.course-copy { max-width: 540px; }
.course .lead { font-size: 1.19rem; color: rgba(255,255,255,.9); margin: 24px 0 32px; }
.course-steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; }
.course-steps li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.16); }
.course-steps li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.course-steps .num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--gold); line-height: 1; letter-spacing: .02em; }
.course-steps strong { font-family: var(--font-display); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em; display: block; }
.course-steps span { color: rgba(255,255,255,.8); }
/* La foto: nessuna cornice, arriva al bordo dello schermo e sfuma nel bordeaux verso il testo */
.course-media { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; z-index: 1; overflow: hidden; }
.course-media img { width: 100%; height: 100%; object-fit: cover; object-position: 42% center; }
.course-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bordeaux) 0%, rgba(123,30,46,.6) 20%, rgba(123,30,46,0) 52%),
    linear-gradient(0deg, rgba(90,20,33,.5) 0%, transparent 38%);
}
.course-badge {
  position: absolute; z-index: 2; right: 40px; bottom: 40px; background: var(--white); color: var(--ink);
  border-radius: var(--r-lg); padding: 16px 24px; box-shadow: var(--shadow); display: flex; gap: 16px; align-items: center;
}
.course-badge strong { font-family: var(--font-display); font-size: 2.75rem; color: var(--bordeaux); line-height: 1; }
.course-badge span { font-size: .875rem; line-height: 1.3; color: var(--ink-soft); }

/* Grana leggera sulle superfici scure: il dettaglio tattile della carta stampata */
.course::before, .cta-band::before, .hero-media::after, .article-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 180px; opacity: .1; mix-blend-mode: overlay;
}
.course::before { z-index: 3; }
.cta-band::before { z-index: 1; }
.hero-media::after { z-index: 1; }
.article-hero::before { z-index: 0; }

/* ---------- Discipline ---------- */
.disc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
.disc { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3/4.2; color: var(--white); display: flex; align-items: end; background: var(--night); }
.disc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.disc:hover img { transform: scale(1.05); }
.disc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(90,20,33,.95) 0%, rgba(90,20,33,.25) 55%, transparent 100%); }
.disc .body { position: relative; z-index: 2; padding: 24px; }
.disc h3 { font-size: 1.75rem; text-transform: uppercase; }
.disc p { font-size: .875rem; margin: 6px 0 0; color: rgba(255,255,255,.88); line-height: 1.4; }

/* ---------- Storia ---------- */
.history { background: var(--white); }
.history .container { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
.history-intro p { color: var(--ink-soft); font-size: 1.125rem; }
.history-intro blockquote {
  margin: 28px 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--gold);
  font-size: 1.2rem; color: var(--ink); font-style: italic; line-height: 1.5;
}
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 40px; padding: 0 0 26px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 80px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--bordeaux); }
.timeline li.is-gold::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px #fbefd2; }
.timeline .year { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--bordeaux); line-height: 1.1; text-align: right; }
.timeline h3 { font-size: 1.3rem; text-transform: uppercase; }
.timeline p { margin: 4px 0 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Campo + calendario ---------- */
.field-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; }
.field-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 460px; color: var(--white); display: flex; align-items: end; background: var(--night); }
.field-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.field-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,8,10,.92), transparent 70%); }
.field-card .body { position: relative; z-index: 2; padding: 40px; display: flex; justify-content: space-between; align-items: end; gap: 24px; width: 100%; flex-wrap: wrap; }
.field-card h3 { font-size: 2.5rem; text-transform: uppercase; }
.field-card p { margin: 6px 0 0; color: rgba(255,255,255,.88); }
.cal-card { background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; }
.cal-card h3 { font-size: 2rem; text-transform: uppercase; margin-bottom: 8px; }
.cal-card > p { color: var(--ink-soft); margin: 0 0 18px; }
.cal-list { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.cal-list a { display: grid; grid-template-columns: 52px 1fr 20px; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.cal-list a:hover strong { color: var(--bordeaux); }
.cal-icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--paper); border-radius: var(--r-sm); color: var(--bordeaux); }
.cal-icon svg { width: 24px; height: 24px; }
.cal-list strong { display: block; line-height: 1.3; transition: color .2s; }
.cal-list span { font-size: .875rem; color: var(--muted); }
.cal-list .go { width: 18px; height: 18px; color: var(--bordeaux); }

/* ---------- FITARCO feed ---------- */
.feed { padding: 0 0 96px; }
.feed-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.feed-box h2 { font-size: 1.9rem; text-transform: uppercase; color: var(--bordeaux); }
.feed-box h2 + p { margin: 8px 0 0; font-size: .875rem; color: var(--muted); }
.feed-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feed-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-list a { font-weight: 600; line-height: 1.35; display: block; }
.feed-list a:hover { color: var(--bordeaux); }
.feed-list span { font-size: .8125rem; color: var(--muted); }

/* ---------- CTA band ---------- */

/* ---------- Chiusura: apre il footer, stesso fondo, a tutta larghezza (niente riquadro "banner") ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--white); padding: 120px 0 104px; }
.cta-band .rings { right: -200px; top: 50%; width: 680px; height: 680px; transform: translateY(-50%); background: repeating-radial-gradient(circle, transparent 0 46px, rgba(255,255,255,.06) 47px 48px); }
.cta-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.cta-text h2 { font-size: clamp(2.8rem, 6vw, 5.2rem); text-transform: uppercase; line-height: .95; letter-spacing: -.01em; }
.cta-text h2 em { font-style: normal; color: var(--gold); }
.cta-text p { margin: 20px 0 0; font-size: 1.15rem; color: rgba(255,255,255,.78); max-width: 520px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.cta-band + .site-footer .container { border-top: 1px solid rgba(255,255,255,.1); padding-top: 64px; }
.site-footer { padding-top: 72px; }
.cta-band + .site-footer { padding-top: 0; }
.footer-feds { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer-feds a { color: rgba(255,255,255,.7); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.footer-feds a:hover { color: var(--gold); }
@media (max-width: 960px) {
  .cta-band { padding: 88px 0 72px; }
  .cta-inner { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
}

/* Apertura articolo: le ombre di foto e titolo sfumano libere, gli anelli restano contenuti */
header.article-hero { overflow: visible; }
.article-hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: rgba(255,255,255,.74); padding: 72px 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .brand-text strong { color: var(--white); }
.site-footer .brand-text span { color: rgba(255,255,255,.55); }
.site-footer h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .95rem; color: var(--white); margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 40px; }
.site-footer a:hover { color: var(--gold); }
.footer-about p { margin: 18px 0; max-width: 320px; }
.site-footer .socials { gap: 8px; }
.site-footer .socials a { width: 44px; height: 44px; background: rgba(255,255,255,.08); }
.site-footer .socials a:hover { background: var(--bordeaux); color: var(--white); }
.site-footer .socials svg { width: 18px; height: 18px; }
.contact-line { display: flex; gap: 10px; align-items: start; }
.contact-line svg { width: 18px; height: 18px; flex: none; margin-top: 5px; color: var(--gold); }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: rgba(255,255,255,.55); }
.footer-bottom ul { display: flex; gap: 16px; }

/* ---------- Pagine interne: stesso linguaggio della landing ---------- */
.page-hero {
  position: relative; color: var(--white); overflow: hidden; background: var(--night);
  min-height: clamp(380px, 58vh, 600px); display: flex; align-items: end;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(40,8,14,.9) 0%, rgba(60,12,22,.62) 55%, rgba(0,0,0,.12) 100%),
    linear-gradient(0deg, rgba(20,5,8,.7) 0%, transparent 55%);
}
.page-hero .hero-media img { object-position: center 35%; }
.page-hero .rings { right: -160px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); }
.page-hero .container { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 96px; }
/* Dove qualcosa sale sopra la foto (filtri, fatti chiave, 404) serve più spazio in fondo */
.page-hero.is-compact .container, .page-hero.is-overlap .container { padding-bottom: 140px; }
.page-hero.is-archive .container { padding-bottom: 104px; }
.page-hero-content { max-width: 880px; }
.page-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 800; text-transform: uppercase; line-height: .98; letter-spacing: -.01em; margin: 16px 0 0; }
.page-hero.is-article { min-height: clamp(460px, 72vh, 740px); }
.page-hero.is-article h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1.02; }
.page-hero.is-compact { min-height: clamp(320px, 46vh, 480px); }
.page-hero .eyebrow a { color: inherit; }
.page-hero .eyebrow a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.page-hero-desc { margin: 18px 0 0; font-size: 1.2rem; max-width: 600px; color: rgba(255,255,255,.9); }
.page-hero-meta { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: rgba(255,255,255,.82); font-size: .95rem; }

/* Foglio bianco che sale sopra la foto, come la fascia dei numeri in homepage */
.sheet-wrap { position: relative; z-index: 5; margin-top: -96px; padding-bottom: 96px; }
.sheet { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(28px, 5vw, 64px); }
.sheet--page { max-width: 940px; margin: 0 auto; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.article-aside { position: sticky; top: 104px; }
.admin-bar .article-aside { top: 136px; }
.aside-box { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 24px; }
.aside-row { display: grid; gap: 10px; justify-items: start; }
.aside-label { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 16px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; transition: border-color .2s, color .2s; }
.chips a:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share a, .copy-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font: 600 .875rem var(--font-body); cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .1s ease-out;
}
.share a:active, .copy-link:active { transform: scale(.96); }
.share svg { width: 18px; height: 18px; }
.share a:hover, .copy-link:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.copy-link.is-done { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--white); }
.back svg { transition: transform .2s var(--ease); }
.back:hover svg { transform: translateX(-4px); }

.prose { max-width: 720px; margin: 0 auto; font-size: 1.125rem; }
.prose > :first-child { margin-top: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { color: #2c2626; }
.prose > p:first-child { font-size: 1.25rem; line-height: 1.55; color: var(--ink); }
.prose h2 { font-size: 2rem; text-transform: uppercase; margin-top: 1.6em; color: var(--bordeaux); }
.prose h3 { font-size: 1.5rem; margin-top: 1.4em; }
.prose a { color: var(--bordeaux); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--bordeaux-dark); }
.prose img, .prose figure img { border-radius: var(--r-sm); }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { font-size: .875rem; color: var(--muted); margin-top: 8px; text-align: center; }
.prose blockquote { margin-left: 0; padding-left: 24px; border-left: 4px solid var(--gold); font-style: italic; font-size: 1.2rem; }
.prose hr, .prose .wp-block-separator { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--bordeaux); }
.prose iframe { width: 100%; border: 0; border-radius: var(--r-sm); }
.prose .alignwide, .prose .alignfull { max-width: none; width: 100%; }
.prose .wp-block-gallery { gap: 10px; }
.prose .wp-block-button__link { background: var(--bordeaux); border-radius: var(--r-pill); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.prose .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.prose .wp-block-file__button { background: var(--bordeaux); color: var(--white); border-radius: var(--r-pill); padding: 8px 16px; text-decoration: none; font-weight: 600; }
.prose .wp-block-rss { list-style: none; padding: 0; }
.prose .wp-block-rss li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.prose input, .prose textarea, .prose select { font: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.prose input:focus, .prose textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--bordeaux); }
.prose label { font-weight: 600; display: block; margin-bottom: 6px; }
.prose button[type="submit"], .prose input[type="submit"] { width: auto; background: var(--bordeaux); color: var(--white); border: 0; border-radius: var(--r-pill); padding: 12px 26px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; cursor: pointer; }
/* Pagine lunghe (es. Storia): capitoli numerati, protagonisti, numeri in evidenza, foto larghe */
.prose .is-lead, .prose > p.is-lead:first-child { font-size: 1.35rem; line-height: 1.5; color: var(--ink); font-weight: 500; }
.sheet--page .prose { counter-reset: chapter; }
.sheet--page .prose h2 { counter-increment: chapter; position: relative; padding-top: 32px; margin-top: 2.2em; }
.sheet--page .prose h2::before {
  content: counter(chapter, decimal-leading-zero); position: absolute; top: 0; left: 0;
  font-size: .95rem; letter-spacing: .16em; color: var(--gold); font-weight: 800;
}
.prose h3 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; text-transform: uppercase; color: var(--ink); margin-top: 1.8em; }
.prose h3::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0 28%, var(--bordeaux) 29% 56%, var(--white) 57%);
  box-shadow: 0 0 0 1px var(--line);
}
.prose h3 + p { margin-top: .6em; }
.storia-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.8em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.storia-stats > div { padding: 24px 16px 24px 0; }
.storia-stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.storia-stats dt { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--bordeaux); letter-spacing: -.01em; }
.storia-stats dd { margin: 8px 0 0; font-size: .95rem; line-height: 1.4; color: var(--ink-soft); }
.prose .wp-block-image.alignwide img { width: 100%; border-radius: var(--r-sm); }
@media (min-width: 1000px) {
  .sheet--page .prose .alignwide { margin-left: -46px; margin-right: -46px; width: auto; max-width: none; }
}
@media (max-width: 640px) {
  .storia-stats { grid-template-columns: 1fr; }
  .storia-stats > div, .storia-stats > div + div { padding: 16px 0; border-left: 0; }
  .storia-stats > div + div { border-top: 1px solid var(--line); }
  .storia-stats dt { font-size: 2.6rem; }
}

/* Allineamenti e didascalie del vecchio editor (articoli già pubblicati) */
.alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose::after { content: ""; display: table; clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption img { margin-bottom: 0; }
.wp-caption-text, .gallery-caption { font-size: .875rem; color: var(--muted); margin-top: 8px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery-item { margin: 0; }
.sticky, .bypostauthor { /* nessuno stile dedicato, classi gestite da WordPress */ }
@media (max-width: 640px) { .alignleft, .alignright { float: none; max-width: 100%; margin: 1em 0; } }

/* Apertura articolo: foto in alto a sinistra, titolo in basso a destra */
.article-hero {
  position: relative; overflow: hidden; color: var(--white); padding-top: 56px;
  background: linear-gradient(180deg, var(--bordeaux-dark) 0, var(--bordeaux) calc(100% - 150px), var(--paper) calc(100% - 150px));
}
.article-hero .rings { right: -200px; top: 190px; width: 640px; height: 640px; transform: translateY(-50%); }
.article-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 64px; }
.article-photo {
  grid-column: 1 / 9; grid-row: 1; align-self: start; justify-self: start;
  margin: 0; width: fit-content; max-width: 100%; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.55); background: var(--night);
}
/* La foto si vede intera nelle sue proporzioni, con un'altezza massima uguale per tutti:
   le orizzontali riempiono la colonna, le verticali restano alte quanto il limite e piu' strette. */
.article-photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: clamp(320px, 58vh, 560px); }
.article-photo .ph { display: block; width: min(100%, 560px); aspect-ratio: 4 / 3; }
.article-title-card {
  grid-column: 7 / 13; grid-row: 1 / 3; align-self: end; position: relative; z-index: 3;
  background: var(--white); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: clamp(28px, 3.4vw, 44px);
}
.article-title-card::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.article-title-card h1 { font-size: clamp(1.9rem, 2.9vw, 2.9rem); font-weight: 800; text-transform: uppercase; line-height: 1.02; letter-spacing: -.005em; margin: 14px 0 18px; }
.eyebrow--dark { color: var(--bordeaux); }
.eyebrow--dark a { color: inherit; }
.eyebrow--dark a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-date { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .95rem; }
.article-date svg { width: 18px; height: 18px; color: var(--bordeaux); }
.sheet-wrap.sheet-wrap--article { margin-top: 48px; }

.js .article-hero .rings { animation: cal-ripple 1.8s var(--ease) .1s both; }

@media (max-width: 1100px) {
  .article-photo { grid-column: 1 / 10; }
  .article-title-card { grid-column: 6 / 13; }
}
@media (max-width: 960px) {
  .article-hero { padding-top: 24px; background: linear-gradient(180deg, var(--bordeaux-dark) 0, var(--bordeaux) 52%, var(--paper) 52%); }
  .article-hero-grid { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .article-photo { grid-column: 1; grid-row: 1; justify-self: center; }
  .article-photo img { max-height: 56vh; }
  .article-title-card { grid-column: 1; grid-row: 2; margin: -56px 14px 0; }
  .article-hero .rings { width: 420px; height: 420px; right: -200px; top: 30%; }
  .sheet-wrap.sheet-wrap--article { margin-top: 32px; }
}
/* Pagina corsi: fatti chiave sopra la foto, testo + carta per iscriversi */
.facts { position: relative; z-index: 5; margin-top: -84px; }
.facts-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.facts-grid li { padding: 32px; border-right: 1px solid var(--line); }
.facts-grid li:last-child { border-right: 0; }
.facts-grid strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 2.6vw, 2.5rem); line-height: 1; text-transform: uppercase; color: var(--bordeaux); }
.facts-grid span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: .95rem; line-height: 1.4; }
.course-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; }
.course-page-text .section-title { margin-bottom: 24px; }
.course-page-text .prose { margin: 0; max-width: 640px; }
.join-card {
  position: sticky; top: 104px; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, var(--bordeaux-dark), var(--bordeaux)); color: var(--white);
  border-radius: var(--r-lg); padding: 40px 32px; box-shadow: var(--shadow);
}
.admin-bar .join-card { top: 136px; }
.join-card .rings { right: -160px; bottom: -200px; width: 380px; height: 380px; z-index: -1; }
.join-card h2 { font-size: 2rem; text-transform: uppercase; margin: 14px 0 20px; }
.join-steps { margin: 0 0 28px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.join-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; color: rgba(255,255,255,.88); }
.join-steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 800; color: var(--gold); font-size: 1.15rem; line-height: 1.5; }
.join-card .btn { width: 100%; }
.join-mail { display: block; margin-top: 14px; text-align: center; font-size: .9rem; color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.join-mail:hover { color: var(--white); }
.course-where { padding-top: 0; }
@media (max-width: 960px) {
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid li { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px; }
  .facts-grid li:last-child { border-bottom: 0; }
  .course-page-grid { grid-template-columns: 1fr; gap: 40px; }
  .join-card { position: static; }
}
@media (max-width: 640px) {
  .facts { margin-top: -72px; }
}

/* ---------- Pagine a capitoli (impaginazione da rivista) ---------- */
.chapter-intro { background: var(--white); padding: 104px 0 96px; }
.chapter-intro-text { max-width: 980px; }
.chapter-intro-text p { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.38; color: var(--ink); font-weight: 500; margin: 0; text-wrap: pretty; }
.chapter-intro-text p + p { margin-top: .8em; }
.chapter-intro-text > p:first-child::first-letter, .page-plain-text > p:first-child::first-letter {
  float: left; font-family: var(--font-display); font-weight: 800; color: var(--bordeaux);
  font-size: 3.6em; line-height: .78; margin: .06em .1em 0 0;
}

.chapter { position: relative; padding: 112px 0; }
.chapter--paper { background: var(--paper); }
.chapter--white { background: var(--white); }
.chapter:has(.chapter-figure) { padding-bottom: 0; }
.chapter-grid { display: grid; grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
.chapter-head { position: sticky; top: 112px; }
.admin-bar .chapter-head { top: 144px; }
.chapter-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(4.5rem, 8vw, 7.5rem); line-height: .8; color: var(--gold); letter-spacing: -.02em; margin-bottom: 18px; }
.chapter-head h2 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); text-transform: uppercase; line-height: 1; letter-spacing: -.005em; }
.chapter-head h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--bordeaux); margin-top: 24px; }
.chapter-body.prose { max-width: 680px; margin: 0; font-size: 1.15rem; }
.chapter-body.prose > p:first-child { font-size: 1.3rem; line-height: 1.55; color: var(--ink); }

/* Capitolo con 3+ sottotitoli: titolo sopra, schede sotto */
.chapter--wide .chapter-grid { grid-template-columns: 1fr; gap: 48px; }
.chapter--wide .chapter-head { position: static; display: flex; align-items: flex-end; gap: 28px; }
.chapter--wide .chapter-num { margin: 0; }
.chapter--wide .chapter-head h2::after { display: none; }
.chapter--wide .chapter-body.prose { max-width: none; }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.prose .people-grid { margin-top: 0; }
.person-card { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 40px; border: 1px solid var(--line); }
.chapter--white .person-card { background: var(--paper); }
.chapter--paper .person-card { background: var(--white); }
.person-card::after {
  content: ""; position: absolute; right: -90px; bottom: -90px; width: 240px; height: 240px; z-index: -1; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 18px, rgba(123,30,46,.07) 19px 20px);
}
.person-card h3 { margin: 0 0 14px; font-size: 1.8rem; }
.person-card p { font-size: 1.02rem; }
/* La prima scheda (il nome più importante) occupa tutta la riga, in bordeaux */
.person-card:first-child { grid-column: 1 / -1; background: linear-gradient(130deg, var(--bordeaux-dark), var(--bordeaux)); border-color: transparent; color: var(--white); padding: 56px; }
.person-card:first-child h3 { color: var(--white); font-size: clamp(2rem, 3.4vw, 2.8rem); }
.person-card:first-child p { color: rgba(255,255,255,.9); font-size: 1.15rem; max-width: 820px; }
.person-card:first-child::after { width: 420px; height: 420px; right: -120px; bottom: -160px; background: repeating-radial-gradient(circle, transparent 0 26px, rgba(255,255,255,.08) 27px 28px); }

/* Immagini del capitolo: fasce a tutto schermo */
.chapter-figure { position: relative; overflow: hidden; margin-top: 104px; height: clamp(320px, 72vh, 760px); background: var(--night); }
.chapter-figure figure { margin: 0; height: 100%; }
.chapter-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chapter-figure figcaption {
  position: absolute; left: max(20px, calc((100vw - var(--max)) / 2 + 20px)); bottom: 28px; margin: 0;
  color: var(--white); background: rgba(27,23,23,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 8px 16px; border-radius: var(--r-pill); font-size: .875rem; text-align: left;
}
.chapter-figure + .chapter-figure { margin-top: 0; }

/* Pagine senza capitoli: testo direttamente sulla pagina, niente carta */
.page-plain { background: var(--white); padding: 96px 0; }
.page-plain-text { max-width: 760px; margin: 0 auto; font-size: 1.15rem; }
.page-plain-text > p:first-child { font-size: 1.3rem; line-height: 1.55; color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .js .chapter-figure img { scale: 1.15; translate: 0 calc((var(--sp, .5) - .5) * -10%); }
}
@media (max-width: 960px) {
  .chapter { padding: 80px 0; }
  .chapter-grid { grid-template-columns: 1fr; gap: 28px; }
  .chapter-head { position: static; }
  .people-grid { grid-template-columns: 1fr; }
  .person-card, .person-card:first-child { padding: 28px; }
  .chapter-figure { margin-top: 72px; height: clamp(260px, 60vw, 480px); }
  .chapter-intro { padding: 72px 0 64px; }
  .page-plain { padding: 64px 0; }
}

/* ---------- La nostra storia (pagina su misura) ---------- */
.story { --medal-gold: var(--gold); --medal-silver: #b9bec5; --medal-bronze: #b97a45; }
.story-kicker { display: inline-block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .85rem; color: var(--gold); margin-bottom: 14px; }

/* Apertura: l'anno gigante e la frase */
.story-open { background: var(--white); padding: 112px 0; overflow: hidden; }
.story-open-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.story-year { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(7rem, 17vw, 15rem); line-height: .78; letter-spacing: -.04em; color: var(--bordeaux); }
.story-lead { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.32; font-weight: 500; color: var(--ink); margin: 0 0 24px; text-wrap: pretty; }
.story-lead::first-letter { float: left; font-family: var(--font-display); font-weight: 800; font-size: 3.4em; line-height: .78; margin: .07em .1em 0 0; color: var(--gold); }
.story-open-text > p:not(.story-lead) { font-size: 1.15rem; color: var(--ink-soft); max-width: 560px; }

/* Dino Sani: il testo e il suo 547 */
.story-sani { background: var(--paper); padding: 112px 0; }
.story-sani-grid { display: grid; grid-template-columns: 6fr 5fr; gap: 72px; align-items: center; }
.story-sani h2, .story-field h2, .story-medals h2, .story-people h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); text-transform: uppercase; line-height: .95; letter-spacing: -.01em; margin-bottom: 28px; }
.story-sani-text p { font-size: 1.15rem; color: #2c2626; }
.story-score { position: relative; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 48px 40px; overflow: hidden; isolation: isolate; }
.story-score::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; z-index: -1; background: repeating-radial-gradient(circle, transparent 0 22px, rgba(123,30,46,.07) 23px 24px); }
.story-score-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 11vw, 9.5rem); line-height: .82; color: var(--bordeaux); letter-spacing: -.03em; }
.story-score-label { display: block; margin-top: 14px; font-size: 1.05rem; color: var(--ink-soft); max-width: 340px; }
.story-score-medals { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.story-score-medals > span:last-child { font-size: .9rem; color: var(--muted); }

/* Medaglie: una pallina per medaglia */
.medal-row { display: flex; flex-wrap: wrap; gap: 6px; }
.medal { width: 16px; height: 16px; border-radius: 50%; display: block; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.35); }
.medal--gold { background: var(--medal-gold); }
.medal--silver { background: var(--medal-silver); }
.medal--bronze { background: var(--medal-bronze); }

/* Il campo: la foto dell'inaugurazione a tutto schermo */
.story-field { position: relative; min-height: clamp(560px, 92vh, 860px); display: flex; align-items: end; overflow: hidden; background: var(--night); color: var(--white); }
.story-field-media { position: absolute; inset: 0; }
.story-field-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
/* Il soggetto della foto (al centro) resta libero: testo e sfumatura stanno a destra, sopra la folla */
.story-field::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(30,8,12,.9) 0%, rgba(30,8,12,.55) 32%, rgba(0,0,0,0) 62%), linear-gradient(0deg, rgba(20,5,8,.5), transparent 45%); }
.story-field .container { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 88px; }
.story-field-card { max-width: 500px; margin-left: auto; }
.story-field-card .story-field-year { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(4.5rem, 9vw, 7.5rem); line-height: .8; color: var(--gold); }
.story-field-card p { font-size: 1.2rem; color: rgba(255,255,255,.92); }
.story-field-card .story-caption { font-size: .875rem; color: rgba(255,255,255,.7); margin-top: 24px; }

/* Il medagliere: fascia bordeaux */
.story-medals { position: relative; overflow: hidden; isolation: isolate; background: var(--bordeaux); color: var(--white); padding: 120px 0; }
.story-medals::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 180px; opacity: .1; mix-blend-mode: overlay; }
.story-medals .rings { right: -220px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%); }
.story-medals .container { position: relative; z-index: 2; }
.story-medals-head { max-width: 680px; }
.story-medals-head p { font-size: 1.15rem; color: rgba(255,255,255,.88); }
.story-big-numbers { display: grid; grid-template-columns: repeat(3, 1fr); margin: 64px 0; border-top: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.story-big-numbers > div { padding: 32px 24px 32px 0; }
.story-big-numbers > div + div { padding-left: 32px; border-left: 1px solid rgba(255,255,255,.2); }
.story-big-numbers dt { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 8vw, 6.8rem); line-height: .85; letter-spacing: -.02em; }
.story-big-numbers dd { margin: 10px 0 0; color: rgba(255,255,255,.82); font-size: 1rem; }
.story-stars { list-style: none; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story-stars li { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; column-gap: 18px; align-items: center; }
.star { grid-row: 1 / 3; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: rgba(255,255,255,.95); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.35), 0 10px 24px -10px rgba(0,0,0,.5); }
.star--bronze { background: var(--medal-bronze); }
.star--silver { background: var(--medal-silver); color: var(--ink); }
.star--gold { background: var(--medal-gold); color: var(--ink); }
.story-stars strong { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; }
.story-stars li > span:last-child { color: rgba(255,255,255,.82); font-size: .95rem; line-height: 1.35; }
.story-periods { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.story-period { background: rgba(0,0,0,.14); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg); padding: 32px; }
.story-period-years { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .04em; margin-bottom: 16px; }
.story-period p { margin: 16px 0 0; color: rgba(255,255,255,.88); }

/* I protagonisti: bacheca */
.story-people { background: var(--paper); padding: 120px 0; }
.people-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.person { position: relative; overflow: hidden; isolation: isolate; background: var(--white); border-radius: var(--r-lg); padding: 40px; border: 1px solid var(--line); }
.person::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 240px; height: 240px; z-index: -1; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 18px, rgba(123,30,46,.07) 19px 20px); }
.person h3 { font-size: 1.9rem; text-transform: uppercase; margin: 0 0 12px; }
.person p { margin: 0; color: #2c2626; }
.person-stat { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.person-stat strong { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: .85; color: var(--bordeaux); }
.person-stat span { font-size: .9rem; color: var(--muted); max-width: 200px; line-height: 1.3; }
.person--hero { grid-column: 1 / -1; display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; padding: 56px; background: linear-gradient(130deg, var(--bordeaux-dark), var(--bordeaux)); color: var(--white); border-color: transparent; }
.person--hero::after { width: 460px; height: 460px; right: -140px; bottom: -180px; background: repeating-radial-gradient(circle, transparent 0 26px, rgba(255,255,255,.08) 27px 28px); }
.person--hero .person-stat { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 0; border: 0; }
.person--hero .person-stat strong { font-size: clamp(7rem, 12vw, 10rem); color: var(--gold); }
.person--hero .person-stat span { color: rgba(255,255,255,.8); font-size: 1rem; max-width: 220px; }
.person--hero h3 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); color: var(--white); }
.person--hero p { color: rgba(255,255,255,.9); font-size: 1.1rem; }
.person--hero .person-role { color: var(--gold-soft); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; margin-bottom: 16px; }

/* Chiusura: il campo dall'alto con la frase */
.story-close { position: relative; min-height: clamp(480px, 80vh, 760px); display: flex; align-items: center; overflow: hidden; background: var(--night); color: var(--white); }
.story-close img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-close::after { content: ""; position: absolute; inset: 0; background: rgba(30,8,12,.62); }
.story-close .container { position: relative; z-index: 2; }
.story-quote { margin: 0 auto; max-width: 920px; text-align: center; }
.story-quote p { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 4.8vw, 4.2rem); line-height: 1.02; margin: 0; text-wrap: balance; }
.story-quote p::before { content: ""; display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--gold); margin: 0 auto 32px; }
.story-quote cite { display: block; margin-top: 24px; font-style: normal; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .16em; font-size: .9rem; color: var(--gold-soft); }

@media (prefers-reduced-motion: no-preference) {
  .js .story-field-media img, .js .story-close img { scale: 1.12; translate: 0 calc((var(--sp, .5) - .5) * -8%); }
  .js .story-year { translate: calc((var(--sp, .5) - .5) * -60px) 0; }
}
@media (max-width: 960px) {
  .story-open, .story-sani, .story-people { padding: 80px 0; }
  .story-medals { padding: 88px 0; }
  .story-open-grid, .story-sani-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-big-numbers { grid-template-columns: 1fr; }
  .story-big-numbers > div, .story-big-numbers > div + div { padding: 24px 0; border-left: 0; }
  .story-big-numbers > div + div { border-top: 1px solid rgba(255,255,255,.2); }
  .story-stars { grid-template-columns: 1fr; gap: 20px; margin-bottom: 48px; }
  .story-periods { grid-template-columns: 1fr; }
  .people-board { grid-template-columns: 1fr; }
  .person, .person--hero { padding: 28px; }
  .person--hero { grid-template-columns: 1fr; gap: 20px; }
  .person--hero .person-stat strong { font-size: 6rem; }
  .story-field .container { padding-bottom: 56px; }
  .story-field::after { background: linear-gradient(0deg, rgba(30,8,12,.92) 0%, rgba(30,8,12,.6) 45%, rgba(0,0,0,0) 75%); }
  .story-field-card { margin-left: 0; }
  .story-score { padding: 32px 24px; }
}

/* ---------- Pagine fisse su misura (Safeguarding, Almanacco, Dicono di noi, Contatti, Calendario) ---------- */
.kicker { display: inline-block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .85rem; color: var(--gold); margin-bottom: 14px; }
.fixed-section { padding: 112px 0; }
.fixed-section--white { background: var(--white); }
.fixed-section--paper { background: var(--paper); }
.facts + .fixed-section { padding-top: 96px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.fixed-title { font-size: clamp(2.4rem, 4.6vw, 4rem); text-transform: uppercase; line-height: .96; letter-spacing: -.01em; }
.fixed-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--bordeaux); margin-top: 24px; }
.fixed-lead { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; color: var(--ink); font-weight: 500; margin-top: 0; }
.split-body > p:not(.fixed-lead) { font-size: 1.12rem; color: #2c2626; }

/* Documenti da scaricare */
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.doc-card {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 72px 1fr; gap: 24px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px;
  transition: transform var(--spring-ui) var(--spring), box-shadow .4s var(--spring), border-color .2s;
}
.doc-card::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 220px; height: 220px; z-index: -1; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 16px, rgba(123,30,46,.07) 17px 18px); }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.doc-card:active { scale: .985; transition: scale .1s ease-out; }
.doc-icon { width: 72px; height: 88px; border-radius: 8px; background: var(--bordeaux); color: var(--white); display: grid; place-items: end center; padding-bottom: 12px; font-family: var(--font-display); font-weight: 800; letter-spacing: .1em; position: relative; }
.doc-icon::before { content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: linear-gradient(225deg, var(--paper) 50%, var(--bordeaux-dark) 50%); border-radius: 0 8px 0 4px; }
.doc-text strong { display: block; font-family: var(--font-display); font-size: 1.7rem; text-transform: uppercase; line-height: 1.05; margin-bottom: 8px; }
.doc-text span { color: var(--ink-soft); }
.doc-go { grid-column: 2; display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--bordeaux); }
.doc-go svg { width: 18px; height: 18px; transition: transform .3s var(--spring); }
.doc-card:hover .doc-go svg { transform: translateX(4px); }

/* Persona da contattare */
.contact-person {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1fr auto; gap: 16px 48px; align-items: center;
  background: linear-gradient(130deg, var(--bordeaux-dark), var(--bordeaux)); color: var(--white); border-radius: var(--r-lg); padding: 56px;
}
.contact-person .rings { right: -180px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); z-index: -1; }
.contact-person h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); text-transform: uppercase; max-width: 620px; }
.contact-person-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; color: var(--gold); margin: 16px 0 8px; }
.contact-person p { color: rgba(255,255,255,.88); }
.contact-person-mail { grid-column: 2; text-align: center; color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }

/* Almanacco: libreria */
.shelf-feature { display: grid; grid-template-columns: 360px 1fr; gap: 72px; align-items: center; margin-bottom: 96px; }
.book { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--night); box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 24px 40px -22px rgba(40,10,15,.6); transition: transform var(--spring-ui) var(--spring), box-shadow .4s var(--spring); aspect-ratio: 603 / 846; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; z-index: 2; background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.12) 60%, transparent); }
.book img { width: 100%; height: 100%; object-fit: cover; }
.book:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 34px 50px -24px rgba(40,10,15,.65); }
.book:active { scale: .98; transition: scale .1s ease-out; }
.book--big { transform: rotate(-2deg); }
.book--big:hover { transform: rotate(0) translateY(-6px); }
.shelf-year { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 11vw, 9rem); line-height: .82; color: var(--bordeaux); letter-spacing: -.03em; margin-bottom: 20px; }
.shelf-feature-text p { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 28px; }
.shelf-label { font-size: 1.6rem; text-transform: uppercase; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.shelf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 40px; max-width: 980px; }
.book-year { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 28px 12px 10px; background: linear-gradient(0deg, rgba(20,8,10,.85), transparent); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-align: center; }

/* Dicono di noi: rassegna per anno */
.press-year { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.press-year:first-child { border-top: 0; padding-top: 0; }
.press-year-num { position: sticky; top: 112px; align-self: start; font-family: var(--font-display); font-weight: 800; font-size: clamp(3.5rem, 7vw, 5.5rem); line-height: .85; color: var(--gold); letter-spacing: -.02em; }
.press-list { list-style: none; margin: 0; padding: 0; }
.press-item { display: grid; grid-template-columns: 1fr 24px; gap: 4px 24px; padding: 20px 20px; margin: 0 -20px; border-radius: var(--r-sm); transition: background .25s ease-out; }
.press-item:hover { background: var(--paper); }
.press-meta { grid-column: 1; font-size: .875rem; color: var(--muted); }
.press-meta strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; color: var(--bordeaux); margin-right: 8px; }
.press-title { grid-column: 1; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.15; text-transform: uppercase; color: var(--ink); }
.press-go { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 20px; height: 20px; color: var(--bordeaux); transition: transform .3s var(--spring); }
.press-item:hover .press-go { transform: translateX(4px); }
.press-list li + li .press-item { border-top: 1px solid var(--line); border-radius: 0; }
.press-list li + li .press-item:hover { border-radius: var(--r-sm); }

/* Contatti */
/* Contatti: carta dei recapiti accanto al modulo */
.contact-section { padding: 96px 0; background: var(--paper); }
.contact-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: start; }
.contact-panel {
  position: sticky; top: 112px; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 28px;
  padding: 48px; border-radius: var(--r-lg); color: var(--white); background: linear-gradient(150deg, var(--bordeaux-dark), var(--bordeaux)); box-shadow: var(--shadow);
}
.contact-panel .rings { right: -220px; bottom: -220px; width: 520px; height: 520px; z-index: -1; opacity: .5; }
.contact-panel .kicker { color: var(--gold); }
.contact-panel h2 { font-size: clamp(2.2rem, 3.6vw, 3rem); text-transform: uppercase; line-height: 1; margin: -16px 0 0; }
.contact-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.contact-rows a { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 12px; margin: 0 -12px; border-radius: var(--r-sm); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; transition: background .2s; }
.contact-rows a:hover { background: rgba(255,255,255,.08); }
.contact-rows small, .contact-social small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 2px; }
.contact-ico { width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(255,255,255,.1); color: var(--gold); }
.contact-ico svg { width: 22px; height: 22px; }
.contact-social .socials a { width: 44px; height: 44px; background: rgba(255,255,255,.1); color: var(--white); }
.contact-social .socials a:hover { background: var(--white); color: var(--bordeaux); }
.contact-social .socials svg { width: 20px; height: 20px; }
.contact-panel .btn { align-self: flex-start; }
.contact-form { background: var(--white); border-radius: var(--r-lg); padding: 48px; box-shadow: var(--shadow); }
.contact-form h2 { font-size: clamp(2rem, 3vw, 2.6rem); text-transform: uppercase; line-height: 1; margin: 8px 0 12px; }
.contact-form-lead { color: var(--ink-soft); margin: 0 0 24px; }

/* Modulo WPForms con lo stile del sito (le variabili del plugin si sovrascrivono qui) */
.contact-form .wpforms-container {
  --wpforms-label-color: var(--ink) !important; --wpforms-label-sublabel-color: var(--muted) !important;
  --wpforms-field-border-radius: 10px !important; --wpforms-field-border-color: var(--line) !important; --wpforms-field-background-color: var(--paper) !important;
  --wpforms-field-text-color: var(--ink) !important; --wpforms-field-size-input-height: 48px !important; --wpforms-label-size-font-size: 15px !important;
  --wpforms-button-border-radius: 999px !important; --wpforms-button-background-color: var(--bordeaux) !important; --wpforms-button-text-color: #fff !important;
  --wpforms-button-border-color: var(--bordeaux) !important; --wpforms-button-size-height: 48px !important; --wpforms-button-size-padding-h: 28px !important;
  margin: 0 !important;
}
.contact-form .wpforms-container input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .contact-form .wpforms-container textarea, .contact-form .wpforms-container select {
  width: 100% !important; max-width: none !important; background: var(--paper) !important; border: 1px solid var(--line) !important; border-radius: 10px !important; font: 400 1rem/1.4 var(--font-body) !important; color: var(--ink) !important;
}
.contact-form .wpforms-container input:focus, .contact-form .wpforms-container textarea:focus { outline: none !important; border-color: var(--bordeaux) !important; background: var(--white) !important; box-shadow: 0 0 0 3px rgba(227,169,43,.45) !important; }
.contact-form .wpforms-field-label, .contact-form .wpforms-field legend { font-family: var(--font-body) !important; font-weight: 600 !important; }
.contact-form .wpforms-field-row { max-width: none !important; display: flex; gap: 16px; }
.contact-form .wpforms-field-row::before, .contact-form .wpforms-field-row::after { display: none !important; } /* il clearfix di WPForms farebbe da spazio vuoto */
.contact-form .wpforms-field-row-block { flex: 1 1 0; min-width: 0; padding: 0 !important; width: auto !important; }
.contact-form .wpforms-field { padding: 0 0 20px !important; }
.contact-form .wpforms-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.contact-form .wpforms-field-label, .contact-form .wpforms-field legend { display: block; margin: 0 0 8px !important; padding: 0; font-size: 15px !important; color: var(--ink) !important; }
.contact-form .wpforms-field-sublabel { display: block; margin-top: 6px; font-size: 13px !important; color: var(--muted) !important; }
.contact-form .wpforms-required-label { color: var(--bordeaux) !important; }
.contact-form .wpforms-container input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) { min-height: 48px; padding: 0 14px !important; }
.contact-form .wpforms-container textarea { min-height: 150px; padding: 12px 14px !important; resize: vertical; }
.contact-form .wpforms-submit-container { padding: 4px 0 0 !important; }
.contact-form .wpforms-submit {
  background: var(--bordeaux) !important; border: 0 !important; color: #fff !important; border-radius: 999px !important; padding: 0 28px !important; min-height: 48px;
  font-family: var(--font-display) !important; font-weight: 700 !important; font-size: 1rem !important; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s;
}
.contact-form .wpforms-submit:hover, .contact-form .wpforms-submit:focus { background: var(--bordeaux-dark) !important; }
.story-close--short { min-height: clamp(380px, 60vh, 560px); }
.story-close--short .story-quote p { margin-bottom: 28px; }

/* Calendario */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.quick-links a { display: grid; grid-template-columns: 52px 1fr 20px; gap: 16px; align-items: center; padding: 28px 32px; transition: background .25s ease-out; }
.quick-links a + a { border-left: 1px solid var(--line); }
.quick-links a:hover { background: var(--paper); }
.quick-links strong { display: block; font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase; }
.quick-links span span { font-size: .9rem; color: var(--muted); }
.quick-links .go { width: 18px; height: 18px; color: var(--bordeaux); }
.calendar-frame { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.calendar-frame-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px 32px; border-bottom: 1px solid var(--line); }
.calendar-frame-head h2 { font-size: 1.8rem; text-transform: uppercase; }
.calendar-frame iframe { display: block; width: 100%; height: min(1100px, 85vh); border: 0; }

@media (max-width: 960px) {
  .fixed-section { padding: 80px 0; }
  .split, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .contact-section { padding: 64px 0; }
  .contact-panel { position: relative; top: auto; padding: 32px; }
  .doc-grid { grid-template-columns: 1fr; }
  .contact-person { grid-template-columns: 1fr; padding: 32px; }
  .contact-person-mail { grid-column: 1; }
  .shelf-feature { grid-template-columns: 1fr; gap: 40px; margin-bottom: 64px; }
  .shelf-feature .book--big { max-width: 300px; }
  .press-year { grid-template-columns: 1fr; gap: 16px; }
  .press-year-num { position: static; }
  .contact-form { padding: 32px 24px; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-links a + a { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .doc-card { grid-template-columns: 1fr; padding: 28px; }
  .doc-go { grid-column: 1; }
  .shelf-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .calendar-frame-head { padding: 20px; }
}

/* Card fotografiche delle notizie */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story-card {
  position: relative; isolation: isolate; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4 / 4.6; display: flex; align-items: end; color: var(--white); background: var(--night);
  box-shadow: 0 10px 26px -18px rgba(40,10,15,.45);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.story-card img, .story-card .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform var(--spring-soft) var(--spring); }
.story-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(25,6,10,.94) 0%, rgba(25,6,10,.35) 52%, rgba(25,6,10,.05) 100%); }
.story-card .body { padding: 24px; }
.story-card h2 { font-size: 1.45rem; line-height: 1.06; text-transform: uppercase; margin: 10px 0 8px; }
.story-card p { color: rgba(255,255,255,.88); margin: 0 0 10px; max-width: 640px; }
.story-card .meta { color: rgba(255,255,255,.75); }
.story-card:hover { box-shadow: var(--shadow); }
.story-card:hover img { transform: scale(1.05); }
.story-card.is-large { grid-column: 1 / -1; aspect-ratio: auto; min-height: 540px; }
.story-card.is-large .body { padding: 44px; }
.story-card.is-large h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 860px; }

/* Archivio: barra dei filtri che sale sopra la foto */
.archive-wrap { position: relative; z-index: 5; margin-top: -30px; padding-bottom: 96px; }
.filter-bar { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 10px; margin-bottom: 40px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.cat-filter a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 18px; border-radius: var(--r-sm);
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .05em;
  transition: background .2s, color .2s;
}
.cat-filter a:hover { background: var(--paper); color: var(--bordeaux); }
.cat-filter .is-active a { background: var(--bordeaux); color: var(--white); }
/* Ricerca atleta: a destra delle discipline, con i suggerimenti mentre si scrive */
.filter-bar { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-filter { min-width: 0; }
.athlete-search { position: relative; flex: 0 1 300px; }
.athlete-search > svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--bordeaux); pointer-events: none; }
.athlete-search input[type="search"] {
  width: 100%; min-height: 44px; padding: 6px 18px 6px 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--paper);
  font: 500 1rem/1.2 var(--font-body); color: var(--ink); transition: border-color .2s, background .2s;
}
.athlete-search input[type="search"]::placeholder { color: var(--muted); }
.athlete-search input[type="search"]:hover { border-color: var(--bordeaux); }
.athlete-search input[type="search"]:focus { outline: none; border-color: var(--bordeaux); background: var(--white); box-shadow: 0 0 0 3px rgba(227,169,43,.45); }
.athlete-list {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
}
.athlete-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.athlete-list li span { color: var(--muted); font-weight: 400; font-size: .875rem; white-space: nowrap; }
.athlete-list li:hover, .athlete-list li[aria-selected="true"] { background: var(--bordeaux-tint); color: var(--bordeaux); }
.athlete-list .is-empty { cursor: default; color: var(--muted); font-weight: 400; }
.athlete-list li[hidden], .athlete-list[hidden] { display: none; }
.cat-trigger { display: none; }
.pagination { margin-top: 48px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-weight: 600; }
.pagination .page-numbers.current { background: var(--bordeaux); color: var(--white); border-color: var(--bordeaux); }
.pagination a.page-numbers:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.empty-state { text-align: center; color: var(--ink-soft); }
.empty-state h2 { font-size: 2rem; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.empty-actions { margin-top: 28px; }
.search-form { display: flex; gap: 8px; max-width: 480px; margin: 24px auto 0; }
.search-form input[type="search"] { flex: 1; font: inherit; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); min-height: 48px; }
.related { padding-top: 0; }

/* Commenti (se attivi) */
.comments { max-width: 720px; margin: 48px auto 0; padding: 0; }
.comments h2 { font-size: 1.6rem; text-transform: uppercase; margin-bottom: 16px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }

/* Discipline: tutta la card porta alla categoria, la descrizione sale al passaggio */
.disc h3 a:focus-visible { outline: none; }
.disc:has(a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.disc { overflow: hidden; }
@media (hover: hover) and (min-width: 641px) {
  /* La descrizione è già al suo posto ma spinta sotto il bordo: al passaggio il blocco sale */
  .disc .body { transform: translateY(var(--ph, 0px)); transition: transform var(--spring-ui) var(--spring); }
  .disc .body > p { opacity: 0; transition: opacity .25s ease-out; }
  .disc:hover .body, .disc:focus-within .body { transform: none; }
  .disc:hover .body > p, .disc:focus-within .body > p { opacity: 1; transition-delay: .06s; }
}
/* Risposta alla pressione, subito (§1, §10) */
.story-card, .news-featured, .news-item, .disc, .field-card { transition-property: transform, box-shadow, scale, border-color; }
.story-card:active, .news-featured:active, .news-item:active, .disc:active { scale: .985; transition: scale .1s ease-out; }

/* Header sempre della stessa altezza: quando si scorre prende solo un'ombra leggera */
.site-header { transition: box-shadow .4s var(--spring); }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(40,10,15,.35); }


/* ---------- Animazioni (mai contenuti nascosti senza JS) ---------- */
@keyframes cal-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes cal-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cal-zoom-out { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes cal-ripple { from { opacity: 0; transform: translateY(-50%) scale(.35); } to { opacity: 1; transform: translateY(-50%) scale(1); } }

.intro-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.intro-title .line > span { display: block; }
.js .intro-title .line > span { animation: cal-rise var(--spring-soft) var(--spring) both; animation-delay: calc(.15s + var(--i, 0) * .12s); }
.js .intro { animation: cal-fade-up var(--spring-soft) var(--spring) both; animation-delay: calc(.12s + var(--d, 0) * .1s); }
/* La foto d'apertura entra con una dissolvenza: niente ingrandimenti, così resta nitida */
.js .hero .hero-media img, .js .page-hero:not(.is-article) .hero-media img { animation: cal-fade .9s ease-out both; }
.js .hero .rings, .js .page-hero .rings, .js .cta-band .rings { animation: cal-ripple 1.8s var(--ease) .25s both; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease-out, transform var(--spring-soft) var(--spring), box-shadow .4s var(--spring), scale .1s ease-out; transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.in.is-settled { transition-delay: 0s; }
.story-card.in:hover, .story-card:not(.reveal):hover { transform: translateY(-4px); transition: transform var(--spring-ui) var(--spring), box-shadow .4s var(--spring), scale .1s ease-out; }

/* Linea del tempo: si accende scorrendo */
.timeline::after { content: ""; position: absolute; left: 86px; top: 8px; width: 2px; height: calc(var(--p, 0) * (100% - 16px)); background: var(--bordeaux); }
.js .timeline li { opacity: .35; transition: opacity .5s var(--ease); }
.js .timeline li::before { transform: scale(.6); transition: transform var(--spring-bounce-t) var(--spring-bounce), background .3s; }
.js .timeline li.is-on { opacity: 1; }
.js .timeline li.is-on::before { transform: none; }

/* ---------- Animazioni legate allo scorrimento ----------
   --hp: quanto è stata scorsa l'apertura (0-1); --sp: posizione dell'elemento nel viewport (0-1).
   Si usano le proprietà translate / scale / opacity separate da transform,
   così si sommano alle animazioni di comparsa e di hover senza annullarle. */
@media (prefers-reduced-motion: no-preference) {
  /* Aperture: la foto scende più lenta (profondità), il testo sale e sfuma, gli anelli si allargano */
  .js .hero-content, .js .page-hero-content { translate: 0 calc(var(--hp, 0) * -70px); opacity: calc(1 - var(--hp, 0) * 1.3); }
  .js .hero .rings, .js .page-hero .rings, .js .article-hero .rings { scale: calc(1 + var(--hp, 0) * .35); }
  .js .article-photo { translate: 0 calc(var(--hp, 0) * 50px); }
  .js .article-title-card { translate: 0 calc(var(--hp, 0) * -24px); }

  /* Foto dentro le cornici: scorrono leggermente (la cornice resta ferma) */
  .js .news-featured img, .js .story-card img, .js .disc img, .js .field-card img {
    scale: 1.14; translate: 0 calc((var(--sp, .5) - .5) * -9%);
  }

  /* Titoli di sezione che entrano di lato mentre si scorre */
  .js .section-title { translate: calc((1 - min(var(--sp, 1) * 2.6, 1)) * -56px) 0; }
  .js .course .section-title { translate: calc((1 - min(var(--sp, 1) * 2.6, 1)) * 56px) 0; }

  /* Discipline: colonne pari e dispari a velocità diverse */
  .js .disc:nth-child(odd) { translate: 0 calc((var(--sp, .5) - .5) * 36px); }
  .js .disc:nth-child(even) { translate: 0 calc((var(--sp, .5) - .5) * -36px); }

  /* Corsi: foto e badge in direzioni opposte, anelli che ruotano piano */
  .js .course-media img { scale: 1.14; translate: 0 calc((var(--sp, .5) - .5) * -9%); }
  .js .course-badge { translate: 0 calc((var(--sp, .5) - .5) * -36px); }
  .js .course .rings { scale: calc(.85 + var(--sp, .5) * .35); }
  .js .cta-band .rings { scale: calc(.8 + var(--sp, .5) * .5); }

  /* Barra di lettura degli articoli */
  .read-progress {
    position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--gold), #f3c45a); transform-origin: 0 50%; scale: var(--rp, 0) 1;
  }
  .admin-bar .read-progress { top: 32px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .js .disc:nth-child(odd), .js .disc:nth-child(even) { translate: none; }
  .js .section-title { translate: calc((1 - min(var(--sp, 1) * 2.6, 1)) * -28px) 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* Niente spostamenti, scale o parallasse: restano dissolvenze brevi che aiutano a capire */
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity .3s ease-out; }
  .js .intro, .js .intro-title .line > span { animation: cal-fade .4s ease-out both; animation-delay: 0s; }
  .js .hero-media img, .js .rings { animation: none; }
  .js .timeline li { transition: opacity .3s ease-out; }
  .js .timeline li::before { transform: none; transition: background .3s; }
  .story-card:hover, .story-card.in:hover, .story-card:hover img, .disc:hover img, .news-featured:hover img, .news-item:hover { transform: none; }
  .story-card:active, .news-featured:active, .news-item:active, .disc:active { scale: 1; }
  .btn:active { transform: none; }
  .disc .body { transform: none; }
  .disc .body > p { opacity: 1; }
  .main-nav .sub-menu { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 960px) {
  html .main-nav { transition: opacity .2s ease-out, visibility 0s .2s; transform: none; opacity: 0; }
  html .main-nav.is-open { opacity: 1; transition: opacity .2s ease-out, visibility 0s; }
}
@keyframes cal-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-transparency: reduce) {
  .site-header::before { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .site-header::before { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-header { box-shadow: 0 1px 0 var(--ink); }
  .eyebrow, .hero-lead, .page-hero-desc, .story-card .meta { color: var(--white); }
  .meta, .aside-label, .cal-list span { color: var(--ink-soft); }
}



/* ---------- Pagine applicazione (Area riservata WP Customer Area, plugin) ---------- */
/* L'interfaccia del plugin resta sua: qui solo colori, campi e pulsanti coerenti con il sito */
.app-wrap .app-content { padding: clamp(24px, 4vw, 48px); min-height: 320px; }
.app-content { font-size: 1rem; }
.app-content a:not(.btn) { color: var(--bordeaux); }
.app-content h2, .app-content h3, .app-content h4 { text-transform: uppercase; letter-spacing: .01em; }
.app-content .btn { min-height: 40px; padding: 8px 18px; font-size: .95rem; letter-spacing: .04em; }
.app-content .btn-default, .app-content .btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.app-content .btn-default:hover, .app-content .btn-secondary:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.app-content input[type="text"], .app-content input[type="email"], .app-content input[type="password"], .app-content input[type="url"], .app-content input[type="tel"], .app-content input[type="number"], .app-content input[type="search"], .app-content select, .app-content textarea {
  font: inherit; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; background: var(--white); max-width: 100%;
}
.app-content input:focus, .app-content select:focus, .app-content textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--bordeaux); }
.app-content table { width: 100%; border-collapse: collapse; }
.app-content th, .app-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.app-content img { display: inline-block; }

/* WP Customer Area dispone contenuto e barra laterale come tabella: sotto i 1100px le mettiamo in colonna */
@media (max-width: 1100px) {
  .app-content .cuar-page-content.table-layout { display: block; }
  .app-content .cuar-page-content.table-layout > .tray, .app-content .cuar-page-content-main { display: block; width: auto !important; }
  .app-content .cuar-page-sidebar { margin-top: 32px; }
}
.app-content .tray-scroller, .app-content .scroller-content { max-width: 100%; }

/* I sottomenu delle ultime voci si aprono verso sinistra: non escono mai dallo schermo */
.main-nav .menu > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; transform-origin: calc(100% - 24px) 0; }


/* ---------- Robustezza con i plugin che riscrivono le immagini ----------
   Le card non avvolgono più le foto in un link: il link sta sul titolo e si estende a tutta la card.
   Così un plugin (lightbox, ottimizzazione) che mette un link o un <picture> attorno alle foto
   non crea link dentro link e non rompe l'impaginazione. */
.has-link { position: relative; }
.card-link { color: inherit; text-decoration: none; }
/* La card intera è cliccabile: un livello sopra foto e testo (il link per tastiera e screen reader resta il titolo) */
.card-cover { position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.book .card-link::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.field-card .body { z-index: 5; pointer-events: none; }
.field-card .btn { pointer-events: auto; }
.card-link:focus-visible { outline: none; }
.has-link:has(.card-link:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.news-item:hover .card-link, .story-card:hover .card-link { color: inherit; }
:is(.news-featured, .news-item, .story-card, .disc, .field-card, .course-media, .book, .hero-media, .story-field-media, .story-close, .article-photo, .chapter-figure, .brand, .doc-card) :is(picture, a.ml-widget-lightbox, a.ml-featured-lightbox, .ml-lightbox-wrapper, .jetpack-lazy-image-wrapper) { display: contents; }
.story-card img, .story-card .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.field-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Foto a tutta superficie: ancorate al riquadro, così riempiono anche se un plugin le avvolge o ne cambia l'altezza */
:is(.course-media, .hero-media, .story-field-media, .field-card, .news-featured, .disc, .story-close, .story-card) img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; }

/* ---------- Revisione "niente banner" ---------- */
/* Safeguarding: il Responsabile come sezione aperta, non come riquadro */
.contact-person { background: none; color: var(--ink); border-radius: 0; padding: 48px 0 0; border-top: 1px solid var(--line); overflow: visible; }
.contact-person .rings { display: none; }
.contact-person p { color: var(--ink-soft); }
.contact-person-name { color: var(--bordeaux); }
.contact-person .btn-light { background: var(--bordeaux); color: var(--white); }
.contact-person .btn-light:hover { background: var(--bordeaux-dark); }
.contact-person-mail { color: var(--muted); }
/* Notizie FITARCO: sezione aperta con filetti, non un widget */
.feed-box { background: none; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding: 32px 0 0; }
/* Corsi: "8h" come didascalia sulla foto, non come adesivo */
.course-badge { background: rgba(27,23,23,.55); color: var(--white); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); box-shadow: none; border: 1px solid rgba(255,255,255,.18); }
.course-badge strong { color: var(--gold); }
.course-badge span { color: rgba(255,255,255,.85); }
@media (prefers-reduced-transparency: reduce) { .course-badge { background: var(--night); backdrop-filter: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .disc-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}
/* Header: le voci non vanno mai a capo; il pulsante in alto solo se c'è spazio,
   il menu a tendina parte prima dei portatili stretti (il menu reale ha 6 voci) */
.site-header .container, .topbar .container { max-width: 1440px; }
.sub-toggle { display: none; }
.brand-text strong, .brand-text span, .main-nav .menu > li > a { white-space: nowrap; }
@media (max-width: 1399px) { .nav-cta { display: none; } }
@media (max-width: 1300px) { .main-nav .menu > li > a { padding: 8px 10px; font-size: 1rem; } }
@media (max-width: 1180px) {
  .menu-toggle { display: grid; }
  .main-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: var(--nav-top, 124px);
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 12px var(--gutter) 32px; overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; transform: translateX(100%);
    transition: transform var(--spring-ui) var(--spring), visibility 0s var(--spring-ui);
    touch-action: pan-y;
  }
  .main-nav.is-open { transform: none; visibility: visible; transition: transform var(--spring-ui) var(--spring), visibility 0s; }
  .main-nav.is-dragging { transition: none; }
  .main-nav .menu { flex-direction: column; }
  .main-nav .menu > li > a { font-size: 1.4rem; padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav .menu > li > a:hover { background: none; }
  .main-nav .menu-item-has-children > a::after { display: none; }
  /* Sottomenu a fisarmonica: la freccia a destra apre le sottovoci */
  .main-nav .menu > .menu-item-has-children { display: grid; grid-template-columns: 1fr 56px; align-items: stretch; }
  .sub-toggle { display: grid; place-items: center; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--bordeaux); cursor: pointer; padding: 0; }
  .sub-toggle svg { width: 22px; height: 22px; transition: transform var(--spring-ui) var(--spring); }
  .is-sub-open > .sub-toggle svg { transform: rotate(180deg); }
  .main-nav .sub-menu { grid-column: 1 / -1; display: none; position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0 10px 12px; min-width: 0; }
  .main-nav .is-sub-open > .sub-menu { display: block; }
  .main-nav .sub-menu a { font-size: 1.05rem; padding: 12px 10px; }
  .nav-cta { display: inline-flex; margin: 24px 0 0; }
}
@media (max-width: 960px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .news-grid, .course .container, .history .container, .field-grid { grid-template-columns: 1fr; }
  .course .container { min-height: 0; padding-top: 32px; padding-bottom: 72px; }
  .course-copy { max-width: none; }
  .course-media { position: relative; width: 100%; height: clamp(260px, 62vw, 460px); }
  .course-media::after { background: linear-gradient(0deg, var(--bordeaux) 0%, rgba(123,30,46,.4) 30%, rgba(123,30,46,0) 60%); }
  .course-badge { right: 16px; bottom: 24px; }
  .history .container { gap: 40px; }
  .feed-box { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  .topbar-info .addr { display: none; }
  .reserved span { display: none; }
  .site-header .container { min-height: 72px; }
  .brand img, .brand .custom-logo { width: 46px; height: 46px; }
  .brand-text strong { font-size: 1.15rem; }
  .brand-text span { font-size: .75rem; letter-spacing: .1em; }
  .hero .container { padding-top: 80px; padding-bottom: 130px; }
  .hero-lead { font-size: 1.125rem; }
  .stat { padding: 20px 18px; }
  .stat dt { font-size: 2.5rem; }
  .section { padding: 72px 0; }
  .news-featured { min-height: 420px; }
  .news-featured .body { padding: 24px; }
  .news-item { grid-template-columns: 96px 1fr; gap: 14px; }
  .news-item img, .news-item .ph { width: 96px; height: 80px; }
  .news-item h3 { font-size: 1.12rem; }
  .disc-grid { grid-template-columns: 1fr 1fr; }
  .disc:last-child { grid-column: span 2; aspect-ratio: 16/9; }
  .timeline::before { left: 66px; }
  .timeline li { grid-template-columns: 52px 1fr; gap: 34px; }
  .timeline li::before { left: 60px; }
  .timeline .year { font-size: 1.35rem; }
  .feed-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-card .body, .feed-box, .cal-card { padding: 24px; }
  .field-card h3 { font-size: 2rem; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { aspect-ratio: 4 / 4.2; }
  .story-card.is-large { min-height: 440px; }
  .story-card.is-large .body { padding: 24px; }
  .page-hero .container { padding-top: 64px; padding-bottom: 108px; }
  .page-hero-desc { font-size: 1.06rem; }
  .sheet-wrap { margin-top: -72px; padding-bottom: 72px; }
  .archive-wrap { margin-top: -30px; padding-bottom: 72px; }
  .filter-bar { padding: 8px; flex-direction: column; align-items: stretch; gap: 8px; }
  .cat-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .athlete-search { flex: none; }
  /* Con JavaScript: tendina delle discipline e ricerca sulla stessa riga */
  .js .filter-bar { flex-direction: row; }
  .js .athlete-search { flex: 1 1 auto; min-width: 0; }
  .js .cat-trigger {
    display: flex; flex: 0 0 44%; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px 0 14px;
    border: 0; border-radius: var(--r-sm); background: var(--bordeaux); color: var(--white); cursor: pointer;
    font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em;
  }
  .js .cat-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .js .cat-trigger svg { width: 18px; height: 18px; flex: none; transition: transform var(--spring-ui) var(--spring); }
  .js .cat-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
  .js .cat-trigger:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
  .js .cat-filter { display: none; }
  .js .filter-bar.is-cats-open .cat-filter {
    display: flex; flex-direction: column; gap: 2px; position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0;
    padding: 6px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: visible;
    animation: cal-drop .22s var(--ease) both;
  }
  .js .filter-bar.is-cats-open .cat-filter a { display: flex; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; white-space: normal; }
  .js .filter-bar.is-cats-open .cat-filter .is-active a { background: var(--bordeaux-tint); color: var(--bordeaux); }
  .cat-filter a { white-space: nowrap; padding: 6px 14px; }
  .timeline::after { left: 66px; }
  .prose { font-size: 1.0625rem; }
}

@keyframes cal-drop { from { opacity: 0; transform: translateY(-6px); } }

/* =========================================================================
 * Area riservata dei soci (page-area-soci.php)
 * ====================================================================== */
.area-wrap { position: relative; z-index: 5; margin-top: -30px; padding-bottom: 96px; }
.area-nav { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; margin-bottom: 32px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.area-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.area-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px; border-radius: var(--r-sm); font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; transition: background .2s, color .2s; }
.area-nav a:hover { background: var(--paper); color: var(--bordeaux); }
.area-nav .is-active a { background: var(--bordeaux); color: var(--white); }
.area-nav .area-logout { color: var(--muted); }
.area-nav .area-logout svg { width: 16px; height: 16px; }

.area-card { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 36px; }
.area-card h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); text-transform: uppercase; line-height: 1.05; margin: 0 0 8px; }
.area-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.area-card-head h2 { margin: 0; }
.area-muted { color: var(--muted); }
.area-empty { max-width: 720px; }
.area-empty .btn { margin-top: 12px; }
.area-empty-inline { padding: 24px; border-radius: var(--r-sm); background: var(--paper); color: var(--ink-soft); }

/* Avviso "Completa il tuo profilo" */
.area-notice { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 24px; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); border-left: 5px solid var(--gold); }
.area-notice p { flex: 1; margin: 0; color: var(--ink-soft); }
.area-notice strong { display: block; font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; color: var(--ink); }
.area-notice .btn { flex: none; }
@media (max-width: 640px) { .area-notice { flex-wrap: wrap; } .area-notice .btn { width: 100%; justify-content: center; } }

/* Bacheca */
.area-dash { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: start; }
.area-side { display: grid; gap: 24px; }
.area-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.area-links a { display: grid; grid-template-columns: 44px 1fr 20px; gap: 14px; align-items: center; padding: 12px; margin: 0 -12px; border-radius: var(--r-sm); transition: background .2s; }
.area-links a:hover { background: var(--paper); }
.area-links strong { display: block; font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.area-links small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.area-links .go { width: 18px; height: 18px; color: var(--bordeaux); }
.area-ico { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--bordeaux-tint); color: var(--bordeaux); }
.area-ico svg { width: 20px; height: 20px; }
.area-ico--big { width: 56px; height: 56px; margin-bottom: 20px; }
.area-ico--big svg { width: 26px; height: 26px; }
.area-me { margin: 0 0 18px; }
.area-me strong { display: block; font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; }
.area-me span { color: var(--muted); overflow-wrap: anywhere; }
.area-profile-card .btn-ghost { border-color: var(--line); color: var(--bordeaux); }
.area-profile-card .btn-ghost:hover { background: var(--paper); border-color: var(--bordeaux); }

/* Eventi: card verticali divise per mese */
.area-block { margin-bottom: 32px; }
.area-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 8px 0 18px; }
.area-block-head h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); text-transform: uppercase; margin: 0; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ev-grid--row { grid-template-columns: repeat(3, 1fr); }
.ev-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px; border-radius: var(--r-lg);
  background: var(--white); box-shadow: var(--shadow); border-top: 5px solid var(--c); min-width: 0;
}
.ev-card[hidden] { display: none; }
.ev-type { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ev-type::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ev-date { display: flex; align-items: center; gap: 12px; }
.ev-date strong { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: .9; color: var(--ink); }
.ev-date > span { display: flex; flex-direction: column; line-height: 1.2; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-size: .9rem; }
.ev-date .ev-dow { color: var(--ink); }
.ev-title { font-size: 1.35rem; line-height: 1.12; text-transform: uppercase; margin: 0; overflow-wrap: anywhere; }
.ev-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--ink-soft); font-size: .93rem; }
.ev-meta li, .ev-meta a { display: flex; align-items: flex-start; gap: 8px; }
.ev-meta a { color: var(--bordeaux); }
.ev-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-meta svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c); }
.ev-desc { padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ev-desc p { margin: 0; }
.ev-card.is-open .ev-desc { display: block; }
.ev-more { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--bordeaux); font: 600 .9rem var(--font-body); cursor: pointer; }
.ev-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-month { margin-top: 40px; }
.ev-month[hidden] { display: none; }
.ev-month-title { font-size: clamp(2rem, 3.4vw, 2.8rem); text-transform: uppercase; line-height: 1; margin: 0 0 18px; }
.ev-month-title span { color: var(--muted); font-weight: 600; }
.ev-none { margin-top: 32px; }
.cal-head { padding-bottom: 20px; }
.cal-head .area-tabs { margin-top: -12px; }
.cal-head .cal-toolbar { margin-bottom: 0; }
.ev-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-filter button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.ev-filter button span { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ev-filter button:hover { border-color: var(--bordeaux); }
.ev-filter button.is-active { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--white); }
.ev-filter button.is-active span { box-shadow: 0 0 0 2px var(--white); }
.ev-filter button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.area-calendar > .area-card + .area-card { margin-top: 24px; }
.area-calendar > .calendar-frame { margin-top: 24px; background: var(--white); }
.area-links--grid { grid-template-columns: repeat(2, 1fr); gap: 4px 24px; }
.area-dash { grid-template-columns: 2fr 1fr; }

.cal-demo-note { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: var(--r-sm); background: #fff5dd; color: #7a5a10; font-size: .88rem; font-weight: 600; }
.area-block-head .cal-demo-note { margin: 0 auto 0 16px; }

/* Calendario */
.area-tabs { display: flex; gap: 6px; margin: -8px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.area-tabs a { padding: 12px 16px; margin-bottom: -1px; border-bottom: 3px solid transparent; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; color: var(--muted); }
.area-tabs a:hover { color: var(--bordeaux); }
.area-tabs a.is-active { color: var(--ink); border-bottom-color: var(--bordeaux); }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cal-views { display: inline-flex; padding: 4px; border-radius: var(--r-sm); background: var(--paper); }
.cal-views a { padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.cal-views a.is-active { background: var(--white); color: var(--bordeaux); box-shadow: 0 2px 6px -2px rgba(40,10,15,.2); }
.month-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.month-head h3 { font-size: 1.5rem; text-transform: uppercase; margin: 0; }
.month-nav { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--paper); color: var(--bordeaux); }
.month-nav:hover { background: var(--bordeaux-tint); }
.month-nav svg { width: 20px; height: 20px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-dow { padding: 6px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; }
.month-day { min-height: 104px; padding: 6px; border-radius: 8px; background: var(--paper); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-day.is-out { background: transparent; opacity: .45; }
.month-day.is-today { box-shadow: inset 0 0 0 2px var(--bordeaux); }
.month-num { font-weight: 600; font-size: .9rem; }
.is-today .month-num { color: var(--bordeaux); }
.month-ev { display: block; padding: 2px 6px; border-radius: 4px; background: var(--c); color: var(--white); font-size: .75rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-ev[hidden] { display: none; }
.calendar-frame--area { box-shadow: none; border: 1px solid var(--line); }
.calendar-frame--area iframe { height: 72vh; }

/* Documenti */
.area-docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.area-doc-card { display: block; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.area-doc-card:hover { transform: translateY(-4px); }
.area-doc-card p { color: var(--ink-soft); margin: 0 0 16px; }
.area-doc { max-width: 900px; }
.area-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--bordeaux); font-weight: 600; }
.area-back svg { width: 16px; height: 16px; }
.area-prose { max-width: none; margin-top: 24px; }
.area-prose .wp-block-file { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin: 0 0 10px; border-radius: var(--r-sm); background: var(--paper); }
.area-prose .wp-block-file a:not(.wp-block-file__button) { font-weight: 600; color: var(--ink); }
.area-prose .wp-block-file__button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--bordeaux); color: var(--white) !important; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; text-decoration: none; }

/* Documenti: card con anteprima */
.area-doc { max-width: none; }
.area-doc-head { margin-bottom: 24px; }
.area-doc-head h2 { margin-bottom: 4px; }
.area-doc-head .area-muted { margin: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.doc-file { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); --t: var(--bordeaux); }
.doc-file[data-ext="doc"], .doc-file[data-ext="docx"], .doc-file[data-ext="odt"], .doc-file[data-ext="rtf"] { --t: #2f5d8a; }
.doc-file[data-ext="xls"], .doc-file[data-ext="xlsx"], .doc-file[data-ext="ods"], .doc-file[data-ext="csv"] { --t: #3d7a4f; }
.doc-file[data-ext="ppt"], .doc-file[data-ext="pptx"] { --t: #c25a1c; }
.doc-file[data-ext="zip"] { --t: #6e6666; }
.doc-file[data-ext="gdrive"] { --t: #2f5d8a; }
.doc-file[data-ext="jpg"], .doc-file[data-ext="jpeg"], .doc-file[data-ext="png"] { --t: #6b4a8a; }
.doc-file:hover { transform: translateY(-4px); }
.doc-preview { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.doc-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doc-badge {
  display: grid; place-items: center; width: 84px; height: 104px; border-radius: 8px 22px 8px 8px; background: var(--t); color: var(--white);
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: .06em; box-shadow: 0 10px 24px -12px rgba(0,0,0,.45);
}
.doc-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.doc-body h3 { font-size: 1.12rem; line-height: 1.2; text-transform: uppercase; margin: 0; overflow-wrap: anywhere; }
.doc-body .card-link { color: var(--ink); }
.doc-meta { margin: 0; color: var(--muted); font-size: .85rem; }
.doc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.doc-open { display: inline-flex; align-items: center; gap: 6px; color: var(--t); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .92rem; }
.doc-open svg { width: 16px; height: 16px; transition: transform .2s; }
.doc-file:hover .doc-open svg { transform: translateX(3px); }
.doc-download { position: relative; z-index: 5; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-weight: 600; font-size: .85rem; transition: border-color .2s, color .2s; }
.doc-download:hover { border-color: var(--t); color: var(--t); }
.area-doc > .area-prose { margin: 0 0 24px; }

/* Utente: come diventare socio */
.area-join { margin-bottom: 24px; }
.area-join h2 { margin: 6px 0 20px; }
.join-steps { list-style: none; counter-reset: step; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.join-steps li { counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px; border-radius: var(--r-sm); background: var(--paper); }
.join-steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bordeaux); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; }
.join-steps strong { display: block; font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; line-height: 1.1; color: var(--ink); }
.join-steps span { display: block; color: var(--ink-soft); font-size: .95rem; }
.join-steps .link-arrow { margin-top: auto; overflow-wrap: anywhere; }

/* Elenchi delle persone (Tecnici e Direttivo) */
.area-people .area-card-head { align-items: center; flex-wrap: wrap; }
.area-people .area-card-head .area-muted { margin: 4px 0 0; }
.people-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.people-search { position: relative; flex: 0 1 320px; }
.people-search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--bordeaux); pointer-events: none; }
.people-search input { width: 100%; min-height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); font: 400 1rem var(--font-body); color: var(--ink); }
.people-search input:focus { outline: none; border-color: var(--bordeaux); background: var(--white); box-shadow: 0 0 0 3px rgba(227,169,43,.45); }
.people-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.people-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.people-table th { position: sticky; top: 0; padding: 12px 16px; background: var(--paper); text-align: left; font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.people-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.people-table tbody tr:last-child td { border-bottom: 0; }
.people-table tbody tr:hover { background: color-mix(in srgb, var(--paper) 60%, white); }
.people-table tr[hidden] { display: none; }
.people-table a { color: var(--bordeaux); overflow-wrap: anywhere; }
.people-role { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--paper); color: var(--ink-soft); }
.people-role[data-level="3"] { background: var(--bordeaux-tint); color: var(--bordeaux); }
.people-role[data-level="4"] { background: #e6eef6; color: #2f5d8a; }
.people-role[data-level="5"], .people-role[data-level="9"] { background: #efe8f5; color: #6b4a8a; }
.people-role[data-level="2"] { background: #fbeee4; color: #a8501a; }

/* Profilo */
.area-profile { max-width: 820px; }
.area-alert { padding: 14px 16px; border-radius: var(--r-sm); margin: 12px 0 0; font-weight: 600; }
.area-alert--ok { background: #eaf4ec; color: #245a33; }
.area-alert--err { background: var(--bordeaux-tint); color: var(--bordeaux); }
/* Ogni gruppo: titolo con la linea sotto (non interrotta), poi i campi, con le stesse distanze */
.area-form fieldset { border: 0; padding: 0; margin: 32px 0 0; min-width: 0; }
.area-form fieldset:first-of-type { margin-top: 24px; }
.area-form legend { float: left; width: 100%; padding: 0 0 10px; margin: 0 0 4px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.area-form legend + * { clear: both; }
.area-form fieldset > .area-muted { margin: 14px 0 0; font-size: .95rem; }
.area-form label { display: block; margin-top: 14px; font-weight: 600; font-size: .95rem; }
.area-form input { display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font: 400 1rem var(--font-body); color: var(--ink); }
.area-form input:focus { outline: none; border-color: var(--bordeaux); background: var(--white); box-shadow: 0 0 0 3px rgba(227,169,43,.45); }
.area-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.area-row--info p { margin: 16px 0 0; font-weight: 600; line-height: 1.3; }
.area-row--info small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.area-confirm { background: var(--paper); border-radius: var(--r-sm); padding: 4px 18px 16px !important; margin-top: 24px !important; }
.area-confirm .area-muted { margin: 6px 0 0 !important; font-size: .9rem !important; }
.area-confirm input { background: var(--white); }
.area-form .btn { margin-top: 24px; border: 0; cursor: pointer; }

@media (max-width: 960px) {
  .area-dash, .area-docs { grid-template-columns: 1fr; }
  .area-card { padding: 24px; }
  .area-nav { flex-wrap: wrap; padding: 8px; }
  /* Le quattro sezioni e "Esci" (solo icona) sulla stessa riga */
  .area-nav { flex-wrap: nowrap; gap: 4px; }
  .area-nav ul { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .area-nav ul::-webkit-scrollbar { display: none; }
  .area-nav li { flex: 1 0 auto; }
  .area-nav li a { width: 100%; justify-content: center; padding: 6px 9px; font-size: .82rem; letter-spacing: .02em; }
  .area-nav .area-logout { flex: none; width: 40px; padding: 0; justify-content: center; font-size: 0; }
  .area-nav .area-logout svg { width: 18px; height: 18px; }
  /* Intestazione dei prossimi appuntamenti: titolo sopra, avviso e link sotto */
  .area-block-head { flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .area-block-head h2 { flex: 1 0 100%; }
  .area-block-head .cal-demo-note { margin: 0; }
  .area-block-head .link-arrow { margin-left: auto; white-space: nowrap; }
  .area-row { grid-template-columns: 1fr; }
  .join-steps { grid-template-columns: 1fr; }
  .people-search { flex: 1 1 100%; }
  .people-filter { width: 100%; }
  /* Da telefono la tabella diventa una lista di schede */
  .people-table-wrap { border: 0; overflow: visible; }
  .people-table thead { display: none; }
  .people-table, .people-table tbody, .people-table tr, .people-table td { display: block; width: 100%; }
  .people-table tr { padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
  .people-table td { padding: 2px 0; border: 0; }
  .people-table td[data-label="Iscritto dal"]::before { content: "Iscritto dal "; color: var(--muted); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .doc-body { padding: 12px 12px 14px; }
  .doc-body h3 { font-size: .98rem; }
  .doc-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
  .doc-badge { width: 64px; height: 80px; font-size: 1rem; }
  .month-day { min-height: 56px; padding: 4px; }
  .month-ev { width: 8px; height: 8px; padding: 0; border-radius: 50%; font-size: 0; display: inline-block; }
  .ev-grid, .ev-grid--row { grid-template-columns: 1fr; gap: 14px; }
  .ev-month { margin-top: 32px; }
  .ev-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
  .cal-head { overflow: hidden; }
  .cal-head .cal-toolbar > * { min-width: 0; }
  .ev-filter button { flex: none; }
  .cal-head .cal-toolbar { flex-direction: column; align-items: stretch; }
  .cal-views { align-self: flex-start; }
  .area-links--grid { grid-template-columns: 1fr; }
}
