/* =========================================================
   M9 SPORT CLUB — design system
   Palette monocromatica (nero / bianco) come il logo M9
   Font: Liberation Sans (fallback Arial, metricamente identico)
   ========================================================= */

:root {
  --black: #000000;
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.22);
  --white: #ffffff;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --muted-2: #6f6f6f;

  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  --font: "Liberation Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
/* overflow-x va sull'HTML, non sul BODY: su Safari iOS, se e' il body
   ad avere un overflow diverso da "visible", gli elementi con
   position:fixed (qui l'header/menu in alto) smettono di restare
   agganciati al viewport durante lo scroll e possono sparire o
   sfarfallare (bug noto, segnalato da Helena il 2026-09-23: "il menu
   quando si scorre non si vede piu' o si vede male" su mobile). */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--white); color: var(--black); }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 130px); }
.section-alt { background: var(--bg-alt); }

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  position: relative;
  padding-left: 34px;
}
.kicker::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 24px; height: 1px;
  background: var(--white);
}

.section-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-transform: uppercase;
}
.section-head { max-width: 760px; margin-bottom: clamp(38px, 6vw, 64px); }

.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text); margin-top: 22px; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 15px 30px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--white); color: var(--black); }
.btn-primary:hover { background: #e2e2e2; }
.btn-ghost { border-color: var(--line-strong); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* ---------- header ---------- */
/* Lo sfondo sfumato (backdrop-filter) NON sta sull'header stesso ma
   su uno pseudo-elemento (::before): un backdrop-filter (o transform,
   filter, ecc.) messo direttamente su .site-header lo trasformerebbe
   nel "contenitore di riferimento" per i figli con position:fixed,
   incluso il menu mobile #nav — che a quel punto smetterebbe di
   ancorarsi a tutto lo schermo e si schiaccerebbe nell'altezza
   dell'header stesso, restando visibile solo a pezzi. E' esattamente
   il bug segnalato da Helena il 2026-09-23 su iPhone/Safari: il menu
   spariva/appariva male appena si scrollava (cioe' appena l'header
   riceveva la classe "scrolled" con il backdrop-filter). Con lo
   sfondo sul ::before, l'header resta "neutro" e il menu fisso
   funziona sempre rispetto allo schermo intero. */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 18px;
  transition: padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: rgba(8, 8, 8, 0);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), -webkit-backdrop-filter .4s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  padding-block: 12px;
}
.site-header.scrolled::before {
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: auto; }
.brand-name { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 1.05rem; }
.brand-name em { font-style: normal; color: var(--muted); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) { font-size: 0.9rem; letter-spacing: 0.03em; color: var(--text); position: relative; transition: color .25s; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--white); transition: width .3s var(--ease);
}
.nav a:not(.btn):hover { color: var(--white); }
.nav a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 11px 24px; font-size: 0.82rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--white); transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: 120px clamp(60px, 10vw, 110px);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 35%, rgba(0,0,0,0.55) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
}
.hero-content { position: relative; }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: #d8d8d8;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.92;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.hero-title span { display: block; }
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  text-stroke: 1.5px var(--white);
}
.hero-sub { max-width: 560px; margin-top: 26px; font-size: clamp(1rem, 2vw, 1.2rem); color: #e2e2e2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue-line { width: 1px; height: 46px; background: linear-gradient(var(--white), transparent); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- intro + stats ---------- */
.intro-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: clamp(24px, 4vw, 40px); }
.section-alt .stat { background: var(--bg-alt); }
.stat-num { display: block; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.stat-label { display: block; margin-top: 10px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* ---------- strutture cards ---------- */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 40px);
  min-height: 230px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); background: var(--surface-2); }
.card-num {
  position: absolute; top: 26px; left: clamp(26px, 3vw, 40px);
  font-size: 0.85rem; letter-spacing: 0.2em; color: var(--muted-2);
}
.card h3 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card-lg { grid-column: span 3; }
.card-feature { grid-column: span 3; background: var(--white); color: var(--black); }
.card-feature .card-num { color: rgba(0,0,0,0.45); }
.card-feature p { color: #333; }
.card-feature:hover { background: #ededed; }

/* ---------- banner aereo ---------- */
.banner { position: relative; min-height: 60vh; display: flex; align-items: center; overflow: hidden; }
.banner-media { position: absolute; inset: 0; z-index: -1; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 100%); }
.banner-content { padding-block: 90px; }
.banner-title { font-size: clamp(2rem, 6vw, 4rem); text-transform: uppercase; line-height: 1.02; letter-spacing: -0.02em; }
.banner-content p { margin-top: 18px; max-width: 480px; color: #e0e0e0; font-size: 1.1rem; }

/* ---------- corsi ---------- */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .4s var(--ease), border-color .4s var(--ease); }
.course:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.course-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.course:hover .course-media img { transform: scale(1.06); }
.course-media--dance,
.course-media--football { position: relative; }
.course-media--dance::after,
.course-media--football::after {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s var(--ease);
}
.course-media--dance::after { background-image: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.35)), url("../img/foto-centro-2.jpg"); filter: grayscale(1) contrast(1.05); }
.course-media--football::after { background-image: linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.35)), url("../img/foto-centro-1.jpg"); }
.course:hover .course-media--dance::after,
.course:hover .course-media--football::after { transform: scale(1.06); }
.course-body { padding: 26px 26px 30px; }
.course-body h3 { font-size: 1.35rem; text-transform: uppercase; margin-bottom: 8px; }
.course-body p { color: var(--muted); font-size: 0.96rem; }

/* ---------- eventi ---------- */
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.event {
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 52px);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg) 100%);
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.event:hover { transform: translateY(-6px); border-color: var(--white); }
.event-tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--black); background: var(--white); padding: 6px 14px; border-radius: 100px; margin-bottom: 22px;
}
.event h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 14px; }
.event p { color: var(--muted); max-width: 46ch; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.04em; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

/* ---------- galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.gallery figure { overflow: hidden; aspect-ratio: 1 / 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25); transition: transform .7s var(--ease), filter .5s; }
.gallery figure:hover img { transform: scale(1.05); filter: grayscale(0); }

/* ---------- contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: stretch; }
.contact-list { margin-top: 34px; display: grid; gap: 26px; }
.contact-list li { border-top: 1px solid var(--line); padding-top: 18px; }
.contact-label { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contact-list a { font-size: 1.15rem; transition: color .25s; }
.contact-list a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.socials { display: flex; gap: 22px; margin-top: 34px; }
.socials a { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); transition: color .25s; }
.socials a:hover { color: var(--white); }
.contact-map { min-height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; }

/* ---------- footer ---------- */
.site-footer { background: var(--black); border-top: 1px solid var(--line); padding-top: clamp(50px, 7vw, 84px); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 50px; }
.footer-col { display: flex; flex-direction: column; }
.footer-col p { font-size: 0.9rem; margin-bottom: 6px; }
.footer-col-right { align-items: center; text-align: center; }
.footer-logo-wrap { height: 84px; display: flex; align-items: center; margin-bottom: 22px; }
.footer-col-right .footer-logo-wrap { justify-content: center; }
.footer-logo { width: 120px; }
.footer-logo-al2 { width: 210px; opacity: 0.9; transition: opacity .25s; }
.footer-logo-al2:hover { opacity: 1; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-block: 26px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { transition: color .25s; }
.footer-legal a:hover { color: var(--white); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- legal pages ---------- */
.legal { padding-block: clamp(120px, 16vw, 180px) clamp(60px, 10vw, 110px); }
.legal h1 { font-size: clamp(2rem, 6vw, 3.4rem); text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 30px; }
.legal h2 { font-size: 1.3rem; text-transform: uppercase; margin: 40px 0 14px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 14px; max-width: 70ch; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.06em; font-weight: 700; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .intro-grid { grid-template-columns: 1fr; }
  .courses { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-col-center { display: none; }
}

@media (max-width: 800px) {
  .nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 8px;
    background: #0c0c0c; border-left: 1px solid var(--line);
    padding: 40px var(--gutter);
    transform: translateX(100%); transition: transform .45s var(--ease);
  }
  .nav.open { transform: translateX(0); }
  .nav a:not(.btn) { font-size: 1.4rem; text-transform: uppercase; padding-block: 8px; }
  .nav-cta { margin-top: 20px; }
  .nav-toggle { display: flex; z-index: 101; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card, .card-lg, .card-feature { grid-column: span 1; }
  .courses { grid-template-columns: 1fr; }
  .events { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure { aspect-ratio: 4 / 3; }
  .scroll-cue { display: none; }
  .brand-name { display: none; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-col-right { align-items: flex-start; text-align: left; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   AGGIORNAMENTI — placeholder, slider, strutture, marquee
   ========================================================= */

/* placeholder foto riutilizzabile */
.media-ph {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.028) 0 12px, transparent 12px 24px),
    var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.media-ph span {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2);
  border: 1px dashed var(--line-strong); padding: 8px 16px; border-radius: 100px;
}

/* slider foto nella sezione "Il Centro" */
.intro-slider {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 3;
}
.slider-track { display: flex; height: 100%; transition: transform .7s var(--ease); }
.slide { min-width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; gap: 8px; justify-content: center;
}
.slider-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.4); transition: background .3s, transform .3s;
}
.slider-dots button.active { background: var(--white); transform: scale(1.3); }

/* strutture in stile "attività", affiancate */
.courses--structures { grid-template-columns: repeat(5, 1fr); gap: 16px; }
.courses--structures .course-body { padding: 22px 22px 26px; }
.courses--structures .course-body h3 { font-size: 1.15rem; }
.courses--structures .course-body p { font-size: 0.9rem; }

/* pulsanti nel banner aereo */
.banner-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* marquee corsi (scorrimento automatico) */
.marquee {
  overflow: hidden; margin-top: clamp(38px, 6vw, 56px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; gap: 20px; width: max-content; animation: marquee 42s linear infinite; padding-inline: var(--gutter); }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { flex: 0 0 300px; width: 300px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 10px)); } }

.center-cta { text-align: center; margin-top: clamp(30px, 5vw, 52px); }

/* eventi con foto */
.event { padding: 0; overflow: hidden; }
.event-media { aspect-ratio: 16 / 9; overflow: hidden; }
.event-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.event:hover .event-media img { transform: scale(1.04); }
.event-body { padding: clamp(30px, 4vw, 50px); }

@media (max-width: 1100px) {
  .courses--structures { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .courses--structures { grid-template-columns: 1fr 1fr; }
  .marquee-item { flex-basis: 260px; width: 260px; }
}
@media (max-width: 480px) {
  .courses--structures { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- calendario / orari ---------- */
.schedule-tabs {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: clamp(28px, 4vw, 40px);
}
.schedule-tab {
  font-family: var(--font);
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 12px 22px;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.schedule-tab:hover { border-color: var(--line-strong); color: var(--text); }
.schedule-tab.active { background: var(--white); color: var(--black); border-color: var(--white); }

.schedule-panel { display: none; }
.schedule-panel.active { display: block; }

.schedule-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px) clamp(22px, 3vw, 34px);
  margin-bottom: 14px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.schedule-row:hover { border-color: var(--line-strong); background: var(--surface-2); }

.schedule-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* larghezze fisse: Corso e Orario restano allineati riga per riga, a prescindere dalla lunghezza del nome.
   flex: 0 0 <px> + min-width:0 impedisce a Flexbox di allargare la colonna oltre la larghezza data
   quando il testo è più lungo (comportamento di default che rompeva l'allineamento). */
.schedule-info--course { flex: 0 0 300px; max-width: 55%; }
.schedule-info--time { flex: 0 0 140px; }
.schedule-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.schedule-value { font-size: 1.15rem; font-weight: 700; }
.schedule-value small { display: block; font-size: 0.72rem; font-weight: 400; color: var(--muted); margin-top: 2px; }

.schedule-cta { margin-left: auto; padding: 12px 24px; font-size: 0.8rem; }

@media (max-width: 720px) {
  .schedule-row { gap: 16px; }
  .schedule-info--course, .schedule-info--time { width: 100%; max-width: 100%; }
  .schedule-cta { margin-left: 0; width: 100%; }
}

/* testo per crawler e screen reader (es. il giorno nei pannelli del calendario) */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
