/* =============================================================
   CENTRO NAUTICO BARDOLINO — Design System
   Palette derivata dal guidone sociale (blu del Garda + onde bianche)
   Type: Fraunces (display) · Hanken Grotesk (testo) · IBM Plex Mono (dati)
   ============================================================= */

/* ---------- TOKENS ---------- */
:root {
  --notte:    #0A2C44;
  --notte-2:  #0E3A57;
  --blu:      #0F5E86;
  --blu-700:  #0B4A6B;
  --ciano:    #1F94CC;
  --ciano-hi: #6FC8EC;
  --schiuma:  #EAF2F5;
  --ottone:   #C2A15A;

  --ink:      #0B1F2B;
  --ink-2:    #33505F;
  --muted:    #5F7683;
  --paper:    #FFFFFF;
  --card:     #F4F8FA;
  --ground:   #E9EFF2;
  --line:     #D2DDE3;
  --line-2:   #E2E9ED;

  --ok:   #2E8B6F;
  --warn: #C8862E;
  --live: #D0463B;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11,31,43,.06), 0 4px 12px -6px rgba(11,31,43,.14);
  --shadow:    0 2px 4px rgba(11,31,43,.05), 0 22px 48px -26px rgba(11,31,43,.30);
  --shadow-lg: 0 30px 70px -30px rgba(10,44,68,.45);

  --container: 1180px;
  --nav-h: 72px;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --blu: #2E93BE; --blu-700: #1F6E90; --ciano: #4FB4E0;
    --ink: #EAF2F5; --ink-2: #B9CDD7; --muted: #7E97A4;
    --paper: #0C2231; --card: #0F2A3B; --ground: #081A26;
    --line: #163247; --line-2: #12283A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 6px 16px -8px rgba(0,0,0,.6);
    --shadow: 0 2px 4px rgba(0,0,0,.4), 0 26px 52px -26px rgba(0,0,0,.7);
    --shadow-lg: 0 34px 80px -30px rgba(0,0,0,.75);
  }
}
:root[data-theme="dark"] {
  --blu: #2E93BE; --blu-700: #1F6E90; --ciano: #4FB4E0;
  --ink: #EAF2F5; --ink-2: #B9CDD7; --muted: #7E97A4;
  --paper: #0C2231; --card: #0F2A3B; --ground: #081A26;
  --line: #163247; --line-2: #12283A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 6px 16px -8px rgba(0,0,0,.6);
  --shadow: 0 2px 4px rgba(0,0,0,.4), 0 26px 52px -26px rgba(0,0,0,.7);
  --shadow-lg: 0 34px 80px -30px rgba(0,0,0,.75);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.62; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--ciano); color: #fff; }
:focus-visible { outline: 2px solid var(--ciano); outline-offset: 3px; border-radius: 4px; }

/* ---------- LAYOUT ---------- */
.container { width: min(var(--container), 90vw); margin-inline: auto; }
.section { padding: clamp(44px, 6vw, 84px) 0; }
.section--tight { padding: clamp(32px, 4vw, 58px) 0; }
.bg-ground { background: var(--ground); }
.bg-card { background: var(--card); }

.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blu); display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--light { color: var(--ciano-hi); }

.h-sec { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.6vw, 50px);
  line-height: 1.05; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.h-sec em { font-style: italic; color: var(--blu); }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 58ch; margin: 18px 0 0; }
.sec-head { max-width: 64ch; margin-bottom: clamp(24px, 3.5vw, 42px); }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 15px; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, border-color .25s; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--blu); color: #fff; box-shadow: 0 10px 24px -12px rgba(15,94,134,.9); }
.btn--primary:hover { background: var(--blu-700); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blu); color: var(--blu); }
.btn--on-dark { background: var(--schiuma); color: var(--notte); }
.btn--on-dark:hover { background: #fff; }
.btn--ghost-dark { background: rgba(255,255,255,.08); color: var(--schiuma); border-color: rgba(234,242,245,.35); }
.btn--ghost-dark:hover { border-color: var(--ciano-hi); color: var(--ciano-hi); }
.btn--sm { padding: 9px 16px; font-size: 13.5px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blu); font-size: 15px; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .25s; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- PILL / STATUS ---------- */
.pill { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
  background: var(--paper); display: inline-flex; align-items: center; gap: 6px; }
.pill--sector { color: var(--blu); border-color: color-mix(in srgb, var(--blu) 35%, var(--line)); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; }
.status--live { color: var(--live); } .status--live .dot { background: var(--live); animation: pulse 1.6s infinite; }
.status--open { color: var(--ok); } .status--open .dot { background: var(--ok); }
.status--soon { color: var(--warn); } .status--soon .dot { background: var(--warn); }
.status--done { color: var(--muted); } .status--done .dot { background: var(--muted); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(208,70,59,.5);} 70%{ box-shadow: 0 0 0 6px rgba(208,70,59,0);} }

/* =============================================================
   HEADER / NAV
   ============================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .35s ease, box-shadow .35s ease, border-color .35s;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
/* trasparente solo quando sopra un hero e non ancora scrollato */
.site-header.has-hero { background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.site-header.has-hero.is-solid { background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); transition: color .35s; }
.site-header.has-hero:not(.is-solid) .brand { color: var(--schiuma); }
.brand .burgee { width: 38px; height: 32px; flex: none; }
/* logo reale (immagine); il segnaposto SVG resta solo come fallback se il file manca */
.logo { position: relative; display: inline-flex; flex: none; }
.logo > .logo-real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.logo .burgee { opacity: 0; }            /* nascosto ma mantiene la dimensione del box */
.logo.failed .burgee { opacity: 1; }     /* mostrato solo se l'immagine non carica */
.site-header.has-hero:not(.is-solid) .brand .burgee { filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt b { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand-txt span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: 14.5px; padding: 9px 13px; border-radius: 999px;
  transition: color .25s, background .25s; }
.nav a:hover { color: var(--blu); background: color-mix(in srgb, var(--blu) 8%, transparent); }
.nav a.is-active { color: var(--blu); }
.site-header.has-hero:not(.is-solid) .nav a { color: rgba(234,242,245,.86); }
.site-header.has-hero:not(.is-solid) .nav a:hover { color: #fff; background: rgba(255,255,255,.12); }
.site-header.has-hero:not(.is-solid) .nav a.is-active { color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--ink-2); border: 1px solid var(--line);
  transition: background .25s, color .25s, border-color .25s; }
.icon-btn:hover { color: var(--blu); border-color: var(--blu); }
.icon-btn svg { width: 18px; height: 18px; }
.site-header.has-hero:not(.is-solid) .icon-btn { background: rgba(255,255,255,.12); color: var(--schiuma); border-color: rgba(255,255,255,.22); }
.burger { display: none; }

@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: grid; }
  .nav-actions .btn { display: none; }
}
@media (max-width: 380px) { .brand-txt span { display: none; } }

/* ---------- MOBILE DRAWER (nuovo) ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; pointer-events: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(6,20,30,.55); opacity: 0; transition: opacity .35s ease; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
  background: linear-gradient(180deg, #0C3149, #081C2C);
  color: var(--schiuma); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .4s cubic-bezier(.5,0,.2,1);
  box-shadow: -30px 0 60px -20px rgba(0,0,0,.6);
  padding: 20px 22px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto;
}
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer.open .drawer__scrim { opacity: 1; }
.drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.drawer__head .brand { color: var(--schiuma); }
.drawer__head .brand .burgee { width: 34px; height: 28px; }
.drawer__head .icon-btn { background: rgba(255,255,255,.1); color: var(--schiuma); border-color: rgba(255,255,255,.2); }
.drawer__nav { display: flex; flex-direction: column; padding: 6px 0; }
.drawer__nav a {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 20px; font-weight: 500; letter-spacing: -.01em; color: var(--schiuma);
  padding: 15px 4px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.drawer__nav a .chev { width: 18px; height: 18px; color: var(--ciano-hi); opacity: .6; transition: transform .2s; }
.drawer__nav a:hover, .drawer__nav a.is-active { color: var(--ciano-hi); }
.drawer__nav a:hover .chev { transform: translateX(3px); opacity: 1; }
.drawer.open .drawer__nav a { animation: drawerIn .5s both; }
.drawer.open .drawer__nav a:nth-child(1){animation-delay:.06s}
.drawer.open .drawer__nav a:nth-child(2){animation-delay:.10s}
.drawer.open .drawer__nav a:nth-child(3){animation-delay:.14s}
.drawer.open .drawer__nav a:nth-child(4){animation-delay:.18s}
.drawer.open .drawer__nav a:nth-child(5){animation-delay:.22s}
.drawer.open .drawer__nav a:nth-child(6){animation-delay:.26s}
@keyframes drawerIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.drawer__foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.drawer__foot .btn { width: 100%; }
.drawer__contact { margin-top: 12px; font-size: 13px; color: #9FBBC8; display: flex; flex-direction: column; gap: 4px; }
.drawer__contact a { color: var(--ciano-hi); }

/* =============================================================
   HERO (con foto)
   ============================================================= */
.hero { position: relative; overflow: hidden; min-height: min(82vh, 720px);
  display: flex; align-items: center; color: var(--schiuma);
  padding: calc(var(--nav-h) + 28px) 0 clamp(36px, 5vh, 60px); background: var(--notte); }
.hero__photo { position: absolute; inset: 0; z-index: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(7,22,34,.55) 0%, rgba(7,22,34,.12) 32%, rgba(7,22,34,.5) 68%, rgba(7,22,34,.94) 100%),
  linear-gradient(96deg, rgba(7,22,34,.78) 0%, rgba(7,22,34,.30) 46%, transparent 72%); }
.hero .container { position: relative; z-index: 2; }
.hero__inner { max-width: 40rem; }
.hero__marks { display: flex; gap: 7px; margin-bottom: 20px; }
.hero__marks svg { width: 28px; height: 11px; color: var(--ciano-hi); }
.hero .eyebrow { color: var(--ciano-hi); }
.hero h1 { font-family: var(--f-display); font-weight: 300; font-size: clamp(38px, 7vw, 82px);
  line-height: .98; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.hero__tagline { font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 3.4vw, 38px); color: var(--ciano-hi); margin: 8px 0 0; letter-spacing: -.01em; }
.hero p.sub { font-size: clamp(16px, 2vw, 20px); color: #D3E2EA; max-width: 44ch; margin: 22px 0 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.hero__credit { position: absolute; right: 12px; bottom: 10px; z-index: 2; font-family: var(--f-mono);
  font-size: 9.5px; letter-spacing: .04em; color: rgba(234,242,245,.45); }

/* ---------- PAGE HERO (pagine interne) ---------- */
.page-hero { position: relative; overflow: hidden; color: var(--schiuma);
  background: radial-gradient(120% 100% at 82% 0%, rgba(31,148,204,.34), transparent 58%), linear-gradient(160deg, #0B2E48, #071C2C);
  padding: calc(var(--nav-h) + 46px) 0 clamp(38px, 5vw, 58px); }
.page-hero__marks { display: flex; gap: 7px; margin-bottom: 16px; }
.page-hero__marks svg { width: 26px; height: 11px; color: var(--ciano-hi); }
.page-hero .breadcrumb { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8FADBB; margin-bottom: 14px; }
.page-hero .breadcrumb a { color: var(--ciano-hi); }
.page-hero h1 { font-family: var(--f-display); font-weight: 300; font-size: clamp(32px, 5.5vw, 60px);
  line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.page-hero h1 em { font-style: italic; color: var(--ciano-hi); }
.page-hero p { color: #C6D8E1; max-width: 56ch; margin: 16px 0 0; font-size: clamp(16px,2vw,18px); }

/* =============================================================
   STATS
   ============================================================= */
.stats { background: var(--notte); color: var(--schiuma); border-block: 1px solid rgba(255,255,255,.08); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: clamp(32px,4.5vw,52px) 0; }
.stat .num { font-family: var(--f-display); font-weight: 300; font-size: clamp(32px, 4.6vw, 52px); line-height: 1; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .num em { font-style: normal; color: var(--ciano-hi); }
.stat .lbl { font-size: 13.5px; color: #A9C3CF; margin-top: 9px; max-width: 24ch; }
@media (max-width: 720px){ .stats .container { grid-template-columns: 1fr 1fr; gap: 28px 20px; } }

/* =============================================================
   DISCIPLINE
   ============================================================= */
.disc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.disc { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 26px 24px 24px; min-height: 250px; display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.disc:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--blu) 30%, var(--line)); }
.disc__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); margin-bottom: 18px; }
.disc__ico svg { width: 24px; height: 24px; }
.disc h3 { font-family: var(--f-display); font-weight: 500; font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
.disc p { font-size: 14.5px; color: var(--muted); margin: 0 0 16px; }
.classes { display: flex; flex-wrap: wrap; gap: 6px; }
.classes span { font-family: var(--f-mono); font-size: 10.5px; padding: 3px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.disc .classes { margin-top: auto; }
.disc__num { position: absolute; top: 20px; right: 22px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 980px){ .disc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .disc-grid { grid-template-columns: 1fr; } .disc { min-height: auto; } }

/* =============================================================
   EVENTI
   ============================================================= */
.events-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.event { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.event:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.event__media { position: relative; aspect-ratio: 16/10; background: linear-gradient(150deg, var(--blu), var(--notte)); overflow: hidden; }
.event__media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.event__date { position: absolute; left: 16px; top: 16px; z-index: 2; background: rgba(255,255,255,.95); color: var(--notte); border-radius: 12px; padding: 8px 12px; text-align: center; line-height: 1; box-shadow: var(--shadow-sm); }
.event__date .d { font-family: var(--f-display); font-weight: 500; font-size: 23px; }
.event__date .m { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--blu); margin-top: 3px; }
.event__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.event__meta { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.event h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; letter-spacing: -.01em; margin: 0 0 8px; line-height: 1.16; }
.event .where { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.event .where svg { width: 14px; height: 14px; color: var(--blu); flex: none; }
.event__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
@media (max-width: 900px){ .events-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px){ .events-grid { grid-template-columns: 1fr; } }

/* ---------- CALENDARIO (lista) ---------- */
.cal { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); }
.cal__row { display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: center; padding: 20px 24px; transition: background .2s; }
.cal__row + .cal__row { border-top: 1px solid var(--line-2); }
.cal__row:hover { background: var(--card); }
.cal__date { text-align: center; line-height: 1; }
.cal__date .d { font-family: var(--f-display); font-weight: 500; font-size: 30px; color: var(--ink); }
.cal__date .m { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--blu); margin-top: 4px; }
.cal__main h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 0 0 8px; letter-spacing: -.01em; }
.cal__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cal__cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 680px){ .cal__row { grid-template-columns: 64px 1fr; } .cal__cta { grid-column: 1 / -1; justify-content: flex-start; } .cal__date .d { font-size: 24px; } }

/* =============================================================
   BACHECA DOCUMENTI
   ============================================================= */
.docboard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); margin-top: 40px; }
.docboard__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); background: var(--card); flex-wrap: wrap; }
.docboard__title { display: flex; align-items: center; gap: 12px; }
.docboard__title .ic { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); display: grid; place-items: center; }
.docboard__title b { font-family: var(--f-display); font-weight: 500; font-size: 19px; }
.docboard__title span { display: block; font-size: 12.5px; color: var(--muted); }
.admin-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.admin-switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .25s; flex: none; }
.admin-switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s; }
.admin-switch input { position: absolute; opacity: 0; }
.admin-switch input:checked + .track { background: var(--blu); }
.admin-switch input:checked + .track .knob { transform: translateX(18px); }
.docboard__layout { display: grid; grid-template-columns: 240px 1fr; }
.docboard__sections { border-right: 1px solid var(--line-2); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sec-tab { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-size: 14.5px; font-weight: 500; transition: background .2s, color .2s; white-space: nowrap; }
.sec-tab .count { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--muted); background: var(--card); padding: 2px 7px; border-radius: 6px; }
.sec-tab:hover { background: var(--card); }
.sec-tab[aria-selected="true"] { background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); }
.sec-tab[aria-selected="true"] .count { background: color-mix(in srgb, var(--blu) 18%, transparent); color: var(--blu); }
.sec-tab .handle { color: var(--muted); cursor: grab; opacity: 0; width: 0; overflow: hidden; transition: opacity .2s; }
.docboard.is-admin .sec-tab .handle { opacity: 1; width: 14px; }
.docboard__panel { padding: 10px 12px 16px; }
.doc-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 12px; transition: background .2s; }
.doc-row:hover { background: var(--card); }
.doc-row + .doc-row { border-top: 1px solid var(--line-2); }
.doc-type { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-family: var(--f-mono); font-size: 10px; font-weight: 600; color: #fff; flex: none; }
.doc-type.pdf { background: #C0483B; } .doc-type.doc { background: #2B6CB0; } .doc-type.xls { background: #2E8B6F; } .doc-type.zip { background: #6B5B95; }
.doc-info b { font-weight: 600; font-size: 15px; display: block; }
.doc-info .meta { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.doc-actions { display: flex; align-items: center; gap: 8px; }
.doc-dl { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--blu); transition: background .2s, transform .2s; flex: none; }
.doc-dl:hover { background: var(--blu); color: #fff; transform: translateY(-1px); }
.doc-admin { display: none; gap: 6px; }
.docboard.is-admin .doc-admin { display: inline-flex; }
.mini-btn { font-size: 12px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: border-color .2s, color .2s; white-space: nowrap; }
.mini-btn:hover { border-color: var(--blu); color: var(--blu); }
.mini-btn.danger:hover { border-color: var(--live); color: var(--live); }
.mini-btn.accent { background: color-mix(in srgb, var(--blu) 12%, transparent); border-color: transparent; color: var(--blu); }
.docboard__addbar { display: none; gap: 10px; padding: 4px 12px 8px; flex-wrap: wrap; }
.docboard.is-admin .docboard__addbar { display: flex; }
.admin-hint { display: none; margin: 10px 12px 0; font-size: 12.5px; color: var(--muted); background: color-mix(in srgb, var(--blu) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--blu) 30%, var(--line)); border-radius: 10px; padding: 10px 13px; }
.docboard.is-admin .admin-hint { display: block; }
@media (max-width: 760px){
  .docboard__layout { grid-template-columns: 1fr; }
  .docboard__sections { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-2); -webkit-overflow-scrolling: touch; }
  .sec-tab { width: auto; }
  .sec-tab .count { margin-left: 8px; }
}

/* =============================================================
   METEO / WEBCAM
   ============================================================= */
.meteo-sec { background: var(--notte); color: var(--schiuma); position: relative; overflow: hidden; }
.meteo-sec::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 80% at 85% 0%, rgba(31,148,204,.35), transparent 55%); pointer-events: none; }
.meteo-sec .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.webcam-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid rgba(111,200,236,.25); aspect-ratio: 16/10; box-shadow: var(--shadow-lg); }
.webcam-frame svg { width: 100%; height: 100%; }
.webcam-frame .act-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.webcam-frame .tag { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 7px; background: rgba(8,26,38,.7); padding: 6px 12px; border-radius: 999px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.webcam-frame .tag .dot { background: var(--live); animation: pulse 1.6s infinite; }
.meteo-sec h2 { color: #fff; } .meteo-sec .lead { color: #C6D8E1; }
.readouts { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 28px; max-width: 440px; }
.readout { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r); padding: 16px 18px; }
.readout .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #8FADBB; }
.readout .v { font-family: var(--f-display); font-weight: 300; font-size: 32px; line-height: 1.1; margin-top: 8px; color: #fff; }
.readout .v small { font-family: var(--f-body); font-size: 13px; color: #9FBBC8; }
@media (max-width: 900px){ .meteo-sec .container { grid-template-columns: 1fr; } }

/* =============================================================
   NEWS
   ============================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 40px; }
.news { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; transition: transform .35s, box-shadow .35s; }
.news:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news__media { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--ciano), var(--blu-700)); overflow: hidden; }
.news__media svg { width: 100%; height: 100%; }
.news__body { padding: 22px 22px 24px; }
.news__body time { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blu); }
.news__body h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; letter-spacing: -.01em; margin: 10px 0 8px; line-height: 1.18; }
.news__body p { font-size: 14.5px; color: var(--muted); margin: 0; }
@media (max-width: 900px){ .news-grid { grid-template-columns: 1fr; } }

/* =============================================================
   STORIA (timeline) · SERVIZI · DIRETTIVO · ORARI · CONTATTI
   ============================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--r-lg); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 820px){ .split { grid-template-columns: 1fr; } }

.timeline { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tl { display: grid; grid-template-columns: 92px 1fr; gap: 22px; padding: 20px 0; border-top: 1px solid var(--line); }
.tl:first-child { border-top: 0; }
.tl .yr { font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--blu); font-variant-numeric: tabular-nums; }
.tl h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.tl p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 520px){ .tl { grid-template-columns: 1fr; gap: 4px; } .tl .yr { font-size: 22px; } }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; }
.member .avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(140deg, var(--ciano), var(--blu-700)); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-size: 22px; margin-bottom: 16px; }
.member .role { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--blu); }
.member h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 4px 0 0; letter-spacing: -.01em; }
.member p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
@media (max-width: 860px){ .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .team-grid { grid-template-columns: 1fr; } }

.feature-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.feature { display: flex; gap: 14px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 20px; }
.feature .fi { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); display: grid; place-items: center; flex: none; }
.feature .fi svg { width: 20px; height: 20px; }
.feature .aff-tile { flex: none; align-self: center; width: 58px; height: 58px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px -10px rgba(11,31,43,.35); display: grid; place-items: center; padding: 7px; }
.feature .aff-tile img { max-width: 100%; max-height: 100%; object-fit: contain; filter: saturate(.9); }
.feature b { display: block; font-size: 15.5px; letter-spacing: -.005em; }
.feature span { color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px){ .feature-list { grid-template-columns: 1fr; } }

.hours { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.hours th, .hours td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.hours th { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hours td.day { font-weight: 600; }
.hours tr:last-child td { border-bottom: 0; }
.hours .closed { color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,4vw,48px); }
@media (max-width: 820px){ .contact-grid { grid-template-columns: 1fr; } }
.contact-card { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.contact-card:last-child { border-bottom: 0; }
.contact-card .ci { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); display: grid; place-items: center; flex: none; }
.contact-card .ci svg { width: 21px; height: 21px; }
.contact-card .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-card .val { font-size: 17px; font-weight: 500; margin-top: 3px; }
.contact-card .val a:hover { color: var(--blu); }

.form { display: grid; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px,3vw,32px); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px){ .form .row2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select { font-family: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, background .2s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blu); background: var(--paper); }
.field textarea { resize: vertical; min-height: 120px; }
.map-embed { border: 0; width: 100%; height: 100%; min-height: 300px; border-radius: var(--r-lg); }

/* =============================================================
   CTA SOCI
   ============================================================= */
.cta__box { position: relative; overflow: hidden; border-radius: var(--r-lg); background: linear-gradient(150deg, #0B2E48, #0A2438); color: var(--schiuma); padding: clamp(32px, 5.5vw, 68px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta__box::before { content: ""; position: absolute; right: -10%; top: -30%; width: 60%; height: 160%; background: radial-gradient(circle, rgba(31,148,204,.4), transparent 60%); }
.cta__box > * { position: relative; }
.cta__box .eyebrow { color: var(--ciano-hi); }
.cta__box h2 { font-family: var(--f-display); font-weight: 300; font-size: clamp(26px,4.2vw,44px); line-height: 1.04; letter-spacing: -.02em; margin: 10px 0 0; color: #fff; text-wrap: balance; }
.cta__box h2 em { font-style: italic; color: var(--ciano-hi); }
.cta__card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r); padding: 22px; }
.cta__card .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 14px; }
.cta__card .row:last-of-type { border: 0; }
.cta__card .row b { color: #fff; }
.cta__card .btn { margin-top: 16px; width: 100%; }
@media (max-width: 820px){ .cta__box { grid-template-columns: 1fr; gap: 26px; } }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer { background: #071824; color: #B7CAD4; padding: clamp(48px,6vw,80px) 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .burgee { width: 44px; height: 36px; margin-bottom: 16px; }
.footer-brand .fname { color: #EAF2F5; font-family: var(--f-display); font-size: 19px; font-weight: 500; }
.footer-brand p { font-size: 14px; max-width: 34ch; color: #92A9B5; margin: 10px 0 0; }
.footer-col h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ciano-hi); margin: 0 0 14px; }
.footer-col a, .footer-col p { display: block; color: #B7CAD4; font-size: 14.5px; padding: 5px 0; margin: 0; }
.footer-col a:hover { color: #fff; }
.affil { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.affil span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; padding: 5px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #C6D8E1; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #7E96A3; }
.footer-bottom a { color: var(--ciano-hi); }
@media (max-width: 900px){ .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px){ .footer-top { grid-template-columns: 1fr; } }

/* =============================================================
   MOTION / REVEAL
   ============================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay: .08s; }
.reveal[data-delay="2"]{ transition-delay: .16s; }
.reveal[data-delay="3"]{ transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.center { text-align: center; }
.mt-cta { margin-top: 40px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* =============================================================
   PAGINA SINGOLO EVENTO
   ============================================================= */
.event-hero { position: relative; overflow: hidden; color: var(--schiuma); padding: calc(var(--nav-h) + 52px) 0 clamp(38px,5vw,60px); background: var(--notte); }
.event-hero__photo { position: absolute; inset: 0; z-index: 0; }
.event-hero__photo svg, .event-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.event-hero__photo::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,20,30,.6) 0%, rgba(6,20,30,.3) 55%, rgba(6,20,30,.12) 100%),
    linear-gradient(180deg, rgba(6,20,30,.5) 0%, rgba(6,20,30,.4) 45%, rgba(6,20,30,.82) 100%); }
.event-hero .container { position: relative; z-index: 2; }
.event-hero .breadcrumb { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9FBBC8; margin-bottom: 16px; }
.event-hero .breadcrumb a { color: var(--ciano-hi); }
.event-hero__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.event-hero h1 { font-family: var(--f-display); font-weight: 300; font-size: clamp(30px,5vw,58px); line-height: 1.02; letter-spacing: -.025em; margin: 0; max-width: 20ch; text-wrap: balance; }
.event-hero .subtitle { font-family: var(--f-display); font-style: italic; font-size: clamp(18px,2.5vw,26px); color: var(--ciano-hi); margin: 10px 0 0; }
.event-hero__facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 24px; }
.event-hero__facts .f { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: #D3E2EA; }
.event-hero__facts .f svg { width: 17px; height: 17px; color: var(--ciano-hi); }

.event-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(28px,4vw,52px); align-items: start; }
@media (max-width: 900px){ .event-layout { grid-template-columns: 1fr; } }
.event-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px){ .event-sidebar { position: static; } }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.side-card h3 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.side-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.side-row:last-of-type { border-bottom: 0; }
.side-row .si { width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--blu) 12%, transparent); color: var(--blu); display: grid; place-items: center; flex: none; }
.side-row .si svg { width: 17px; height: 17px; }
.side-row .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-row .v { font-weight: 600; font-size: 15px; margin-top: 2px; }
.side-card .btn { width: 100%; margin-top: 8px; }

/* documenti allegati (compatti) */
.attach { display: flex; flex-direction: column; }
.attach a { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.attach a:last-child { border-bottom: 0; }
.attach a:hover .an { color: var(--blu); }
.attach .at { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-family: var(--f-mono); font-size: 9px; font-weight: 600; color: #fff; }
.attach .an { font-weight: 600; font-size: 14.5px; }
.attach .as { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* mini-bacheca documenti (colonna destra evento) */
.docmini { display: flex; flex-direction: column; }
.docmini a { display: grid; grid-template-columns: 36px 1fr 34px; gap: 11px; align-items: center; padding: 11px 8px; border-radius: 10px; transition: background .2s; }
.docmini a:hover { background: var(--card); }
.docmini a + a { border-top: 1px solid var(--line-2); }
.docmini .dt { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-family: var(--f-mono); font-size: 9px; font-weight: 600; color: #fff; }
.docmini .dn { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.docmini .dm { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.docmini .dd { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--blu); transition: background .2s, color .2s; }
.docmini a:hover .dd { background: var(--blu); color: #fff; }
.side-card h3 .cnt { float: right; font-family: var(--f-mono); font-size: 10.5px; color: var(--blu); background: color-mix(in srgb, var(--blu) 12%, transparent); padding: 2px 7px; border-radius: 6px; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 720px){ .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .g { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); }
.gallery-grid .g svg, .gallery-grid .g img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid .g:hover svg, .gallery-grid .g:hover img { transform: scale(1.06); }

/* tabella risultati */
.table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table th, .table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.table th { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.table td.pos { font-family: var(--f-display); font-size: 18px; color: var(--blu); width: 60px; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* =============================================================
   ARTICOLO / NEWS
   ============================================================= */
.article { max-width: 760px; margin-inline: auto; }
.article__head { text-align: center; margin-bottom: 34px; }
.article__head .cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blu); }
.article__head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px,4.6vw,52px); line-height: 1.05; letter-spacing: -.02em; margin: 12px 0 0; text-wrap: balance; }
.article__byline { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.article__byline .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(140deg, var(--ciano), var(--blu-700)); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-size: 15px; }
.article__cover { border-radius: var(--r-lg); overflow: hidden; margin: 0 0 40px; aspect-ratio: 16/8; box-shadow: var(--shadow); }
.article__cover svg, .article__cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.3em; }
.prose p { margin: 0; }
.prose h2 { font-family: var(--f-display); font-weight: 500; font-size: 26px; letter-spacing: -.01em; color: var(--ink); margin-top: 1.8em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--blu); padding: 4px 0 4px 22px; margin: 1.6em 0; font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--ink); }
.prose ul { padding-left: 22px; } .prose li { margin: .4em 0; }
.article__foot { max-width: 760px; margin: 44px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.share { display: flex; gap: 8px; }
.share a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: border-color .2s, color .2s; }
.share a:hover { border-color: var(--blu); color: var(--blu); }
.share a svg { width: 17px; height: 17px; }

/* --- Singola news: hero editoriale con copertina --- */
.article-hero { position: relative; overflow: hidden; color: var(--schiuma);
  display: flex; align-items: flex-end; min-height: min(62vh, 580px);
  padding: calc(var(--nav-h) + 44px) 0 clamp(32px, 5vw, 54px); background: var(--notte); }
.article-hero__media { position: absolute; inset: 0; z-index: 0; }
.article-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.article-hero__media svg { width: 100%; height: 100%; }
.article-hero__media::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,20,30,.58) 0%, rgba(6,20,30,.2) 60%, rgba(6,20,30,0) 100%),
    linear-gradient(180deg, rgba(6,20,30,.32) 0%, rgba(6,20,30,.3) 34%, rgba(6,20,30,.72) 72%, rgba(6,20,30,.95) 100%); }
.article-hero .container { position: relative; z-index: 2; }
.article-hero__inner { max-width: 860px; }
.article-hero .breadcrumb { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9FBBC8; margin-bottom: 16px; }
.article-hero .breadcrumb a { color: var(--ciano-hi); }
.a-cat { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ciano-hi);
  display: inline-flex; align-items: center; gap: 10px; }
.a-cat::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.article-hero h1 { font-family: var(--f-display); font-weight: 300; font-size: clamp(32px, 5.6vw, 62px);
  line-height: 1.04; letter-spacing: -.025em; margin: 16px 0 0; text-wrap: balance; max-width: 20ch; }
.a-byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: #C6D8E1; font-size: 14.5px; flex-wrap: wrap; }
.a-byline .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(140deg, var(--ciano), var(--blu-700));
  color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-size: 16px; }
.a-byline .sep { opacity: .5; }

/* leggibilità del testo sugli hero, qualunque sia la foto */
.event-hero .container, .article-hero__inner { text-shadow: 0 1px 2px rgba(6,20,30,.4), 0 2px 26px rgba(6,20,30,.5); }

/* mobile: hero singolo evento/articolo più puliti — via la breadcrumb sopra il titolo */
@media (max-width: 680px) {
  .event-hero .breadcrumb, .article-hero .breadcrumb { display: none; }
  .event-hero { padding-top: calc(var(--nav-h) + 24px); }
  .event-hero__meta { gap: 8px; margin-bottom: 12px; }
  .event-hero__facts { gap: 10px 16px; margin-top: 16px; }
  .article-hero { min-height: min(56vh, 460px); }
}

/* corpo articolo raffinato + capolettera */
.article-body { max-width: 720px; margin-inline: auto; }
.article-body .prose > p:first-of-type::first-letter {
  font-family: var(--f-display); font-weight: 500; font-size: 3.6em; line-height: .74;
  float: left; padding: 8px 12px 0 0; color: var(--blu); }
.article-lead { font-family: var(--f-display); font-style: italic; font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4; color: var(--ink); margin: 0 0 28px; }

/* =========================================================
   NAV DROPDOWN (sottopagine Attività) + SQUADRE
   ========================================================= */
.nav .has-sub { position: relative; display: flex; align-items: center; }
.nav .has-sub > a { display: inline-flex; align-items: center; gap: 5px; }
.nav .has-sub > a .caret { width: 12px; height: 12px; flex: none; opacity: .7; transition: transform .2s; }
.nav .has-sub:hover > a .caret, .nav .has-sub:focus-within > a .caret { transform: rotate(180deg); }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 216px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 7px; margin-top: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s; z-index: 70; }
.nav .sub::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .sub a { display: block; color: var(--ink) !important; background: none !important;
  padding: 10px 13px; border-radius: 9px; font-size: 14px; white-space: nowrap; }
.nav .sub a small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.nav .sub a:hover { background: color-mix(in srgb, var(--blu) 9%, transparent) !important; color: var(--blu) !important; }

/* drawer mobile: sotto-voci di Attività */
.drawer__nav a.drawer__sub {
  font-size: 16px; font-weight: 500; color: rgba(234,242,245,.72);
  padding: 12px 4px 12px 20px; margin-left: 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  border-left: 2px solid rgba(111,200,236,.35); }
.drawer__nav a.drawer__sub:hover { color: var(--ciano-hi); border-left-color: var(--ciano-hi); }
.drawer__nav a.drawer__sub .mk { display: none; }

/* tabelle atleti */
.squads { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; align-items: start; }
.squad__name { font-family: var(--f-display); font-weight: 500; font-size: 21px; margin: 0 0 12px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.squad__name .count { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.roster { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.roster th, .roster td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.roster th { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.roster td.athlete { font-weight: 600; }
.roster th.year, .roster td.year { text-align: right; font-family: var(--f-mono); color: var(--muted); white-space: nowrap; }
.roster th.cat-h, .roster td.cat { text-align: right; white-space: nowrap; }
.roster td.cat span { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--blu) 10%, transparent); color: var(--blu); }
.roster tr:last-child td { border-bottom: 0; }
.roster tbody tr:hover td { background: color-mix(in srgb, var(--blu) 4%, transparent); }

/* allenatori */
.coach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.coach { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; text-align: center; }
.coach__photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; display: block; }
.coach__ph { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--ciano), var(--blu-700)); color: #fff; font-family: var(--f-display); font-size: 36px; }
.coach .role { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--blu); }
.coach h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 5px 0 0; letter-spacing: -.01em; }
@media (max-width: 860px){ .coach-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .coach-grid { grid-template-columns: 1fr; } }

/* =========================================================
   GALLERY AD ALBUM / CARTELLE (link esterni)
   ========================================================= */
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.album { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, var(--blu), var(--blu-700)); box-shadow: var(--shadow); color: #fff;
  transition: transform .3s ease, box-shadow .3s ease; }
.album:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.album__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.album:hover .album__img { transform: scale(1.06); }
.album__grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,20,30,0) 35%, rgba(6,20,30,.45) 68%, rgba(6,20,30,.9)); }
.album__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; z-index: 2; }
.album__date { font-family: var(--f-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ciano-hi); }
.album__title { font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.12; letter-spacing: -.01em; margin: 5px 0 0; text-wrap: balance; }
.album__ext { position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18); display: grid; place-items: center; transition: background .25s; }
.album:hover .album__ext { background: var(--blu); }
.album__ext svg { width: 17px; height: 17px; }
@media (max-width: 900px){ .album-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (max-width: 560px){ .album-grid { grid-template-columns: 1fr; } .album { aspect-ratio: 3 / 2; } }

/* =========================================================
   PULSANTI PERSONALIZZATI — pagina singolo evento
   ========================================================= */
.ev-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 30px; }
.ev-cta--one { grid-template-columns: 1fr; }
.ev-cta__btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: #0A2C44; color: #fff; font-weight: 600; font-size: 15.5px; letter-spacing: -.005em;
  padding: 17px 24px; border-radius: 14px; line-height: 1.2;
  box-shadow: 0 10px 26px -14px rgba(10,44,68,.7);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.ev-cta__btn:hover { background: var(--blu); transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(15,94,134,.6); }
.ev-cta__btn svg { width: 17px; height: 17px; flex: none; transition: transform .2s ease; }
.ev-cta__btn:hover svg { transform: translateX(3px); }
@media (max-width: 560px){ .ev-cta { grid-template-columns: 1fr; } }

/* =========================================================
   PAGINE LEGALI (privacy / cookie)
   ========================================================= */
.legal { max-width: 780px; }
.legal .upd { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0 0 26px; }
.legal h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -.01em; color: var(--ink); margin: 36px 0 10px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--ink-2); font-size: 15.5px; line-height: 1.72; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--blu); text-decoration: underline; text-underline-offset: 2px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .legal-tbl { width: 100%; border-collapse: collapse; margin: 4px 0 18px; }
.legal .legal-tbl td { border-bottom: 1px solid var(--line-2); padding: 10px 12px; font-size: 14px; line-height: 1.55; vertical-align: top; color: var(--ink-2); }
.legal .legal-tbl td.k { font-weight: 600; color: var(--ink); width: 38%; }
.legal .legal-note { background: var(--ground); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; margin: 8px 0 4px; font-size: 14px; color: var(--muted); }
