/* ==========  William's Sport Club – modern theme  ========== */
:root {
  --bg: #0b0b0d;
  --bg-2: #131317;
  --bg-3: #1b1b21;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,.08);
  --red: #e10600;
  --red-2: #ff3b30;
  --gold: #f5b700;
  /* varianti usate in sfumature e trasparenze (il pannello Aspetto le ricalcola) */
  --red-rgb: 225, 6, 0;
  --red-dark: #8b0000;
  --red-deep: #2a0b0b;
  --gold-rgb: 245, 183, 0;
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Bebas Neue', Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
/* photo protection (with script.js): no drag, no selection, no long-press "save image" on mobile */
img, video, figure, .hero-bg, .lightbox { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.05; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.accent { color: var(--red); }
.small { font-size: .85rem; color: var(--muted); }

/* progress bar */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transform-origin: 0 50%; transform: scaleX(0); z-index: 200;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--red);
  display: inline-flex; align-items: center; gap: .5em;
  padding: .95em 1.7em; border-radius: 999px;
  background: var(--b); color: #fff; font-weight: 700; letter-spacing: .02em;
  border: 2px solid var(--b);
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #fff; transform: translateY(101%); transition: transform .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--b); color: var(--bg); }
.btn:hover::before { transform: none; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { box-shadow: none; }
.btn-light { --b: #fff; color: var(--red); }
.btn-light::before { background: var(--bg); }
.btn-light:hover { color: #fff; }
.btn-sm { padding: .55em 1.2em; font-size: .9rem; }

.link-arrow { font-weight: 700; color: var(--red-2); display: inline-flex; gap: .4em; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; font-weight: 700;
  color: var(--red-2); margin-bottom: .8em;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, calc((100% - 1180px) / 2));
  transition: padding .4s;
}
/* The blurred bar lives on a pseudo-element: a backdrop-filter on .nav itself would
   make it the containing block of the fixed mobile menu, shrinking the menu to the bar. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(11,11,13,.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .4s;
}
.nav.scrolled { padding-block: 10px; }
.nav.scrolled::before { opacity: 1; }
.logo { display: flex; align-items: center; gap: .65em; }
.logo-mark {
  width: auto; height: 46px; flex: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45));
  transform-origin: 30% 85%; transition: transform .4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-text { font: 400 1.5rem/0.9 var(--display); letter-spacing: .04em; }
.logo-text small { display: block; font: 600 .62rem/1.4 var(--font); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.menu { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: .95rem; }
.menu a:not(.btn) { position: relative; color: #d4d4d8; transition: color .3s; }
.menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.menu a:not(.btn):hover, .menu a.active { color: #fff; }
.menu a:not(.btn):hover::after, .menu a.active::after { transform: scaleX(1); transform-origin: left; }

.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; z-index: 2; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: #fff; border-radius: 2px; transition: .35s var(--ease); }
.burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: 120px max(16px, calc((100% - 1180px) / 2)) 200px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -10%; background-size: cover; background-position: center;
  filter: grayscale(.35) contrast(1.1); animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
/* home: sfondo del vecchio sito (samurai e sole), a destra; il testo resta su fondo scuro a sinistra */
/* niente zoom animato e ancorato in alto: l'immagine è quasi quadrata e "cover" taglierebbe la testa */
.hero-bg--samurai { inset: 0; background-position: right top; filter: saturate(.9); animation: none; }
.hero-bg--samurai + .hero-overlay {
  background:
    linear-gradient(90deg, rgba(11,11,13,.95) 0%, rgba(11,11,13,.9) 45%, rgba(11,11,13,.5) 70%, rgba(11,11,13,.2) 100%),
    linear-gradient(180deg, rgba(11,11,13,.35) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}
@media (max-width: 760px) {
  .hero-bg--samurai + .hero-overlay {
    background: linear-gradient(180deg, rgba(11,11,13,.7) 0%, rgba(11,11,13,.85) 55%, var(--bg) 100%);
  }
}
@keyframes kenburns { from { transform: scale(1) translate(0,0); } to { transform: scale(1.15) translate(-2%, -2%); } }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(var(--red-rgb), .35), transparent 55%),
    linear-gradient(180deg, rgba(11,11,13,.55) 0%, rgba(11,11,13,.75) 60%, var(--bg) 100%);
}
.hero-content { position: relative; max-width: 760px; }
.hero-title { font: 400 clamp(3.6rem, 11vw, 8.5rem)/.88 var(--display); letter-spacing: .01em; margin-bottom: .3em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #d4d4d8; max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero-stats {
  position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%);
  width: min(1180px, 100% - 32px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(10px);
}
.hero-stats > * { background: rgba(19,19,23,.7); padding: 18px 22px; display: block; text-decoration: none; color: inherit; }
a.stat, .hero-stats > a { position: relative; transition: background .3s; }
.hero-stats > a::after { content: "→"; position: absolute; right: 18px; top: 18px; color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.hero-stats > a:hover { background: rgba(var(--red-rgb), .18); }
.hero-stats > a:hover::after { color: #fff; transform: translateX(4px); }
.hero-stats strong { font: 400 2.6rem/1 var(--display); color: var(--red-2); display: block; }
.hero-stats span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 8px; width: 24px; height: 36px; border: 2px solid rgba(255,255,255,.4);
  border-radius: 14px; transform: translateX(-50%); display: none;
}
.scroll-hint span { position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; background: #fff; border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- MARQUEE ---------- */
.marquee { background: var(--red); overflow: hidden; padding: 16px 0; transform: rotate(-1.5deg); margin: -10px -20px 0; position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 30s linear infinite; font: 400 2rem/1 var(--display); letter-spacing: .05em; white-space: nowrap; }
.marquee-track i { font-style: normal; color: rgba(0,0,0,.4); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head.left { text-align: left; margin-bottom: 32px; }
.title { font: 400 clamp(2.8rem, 7vw, 5rem)/.95 var(--display); letter-spacing: .01em; }

/* reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- NEWS ---------- */
.news { padding-top: 90px; }
.news-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow);
}
.news-img { position: relative; overflow: hidden; min-height: 320px; }
.news-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.news-card:hover .news-img img { transform: scale(1.06); }
.badge {
  position: absolute; top: 18px; left: 18px; background: var(--red); padding: .35em .9em; border-radius: 999px;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(var(--red-rgb), .6); } 50% { box-shadow: 0 0 0 12px rgba(var(--red-rgb), 0); } }
.news-body { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.news-body h2 { font: 400 clamp(2.4rem, 5vw, 3.6rem)/.95 var(--display); }
.lead { font-size: 1.15rem; color: #d4d4d8; }
.news-strip { margin-top: 20px; }
.pill {
  background: linear-gradient(90deg, rgba(var(--red-rgb), .15), transparent); border: 1px solid rgba(var(--red-rgb), .3);
  border-radius: 999px; padding: 14px 24px; font-size: .95rem; color: #e4e4e7;
}
.pill b { background: var(--red); padding: .15em .6em; border-radius: 6px; margin-right: .6em; font-size: .8rem; }
.news-strip { display: grid; gap: 10px; }
.news-strip:empty, .news-strip:not(:has(.pill)) { display: none; }
.pill a { color: inherit; text-decoration: underline; text-decoration-color: rgba(var(--red-rgb), .6); text-underline-offset: 3px; }
.pill a:hover { color: #fff; text-decoration-color: var(--red); }

/* ---------- CARDS ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; overflow: hidden; transform-style: preserve-3d;
  transition: border-color .4s, background .4s, transform .25s ease-out, opacity .9s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--red-rgb), .22), transparent 45%);
}
.card:hover { border-color: rgba(var(--red-rgb), .5); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-num { font: 400 4rem/1 var(--display); color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.18); position: absolute; top: 16px; right: 20px; }
.card-icon { font-size: 2.6rem; margin-bottom: 20px; transition: transform .5s var(--ease); display: inline-block; }
.card:hover .card-icon { transform: scale(1.2) rotate(-8deg); }
.card h3 { font: 400 1.9rem/1 var(--display); letter-spacing: .02em; }
.card p { color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .35); padding: .35em .8em; border-radius: 999px; }

/* ---------- KENPO ---------- */
.kenpo { background: var(--bg-2); }
.kenpo::before {
  content: "拳法"; position: absolute; right: -2vw; top: 40px; font-size: 22vw; line-height: 1; font-weight: 800;
  color: rgba(255,255,255,.025); pointer-events: none;
}
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-img { position: relative; }
.split-img img { border-radius: calc(var(--radius) + 6px); width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow); }
.split-img::after {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 2px solid var(--red); border-radius: calc(var(--radius) + 6px); z-index: -1;
}
.floating-badge {
  position: absolute; right: -18px; bottom: 40px; background: var(--red); border-radius: 50%;
  width: 110px; height: 110px; display: grid; place-content: center; text-align: center;
  box-shadow: 0 20px 40px -10px rgba(var(--red-rgb), .6); animation: float 4s ease-in-out infinite;
}
.floating-badge strong { font: 400 2.8rem/0.9 var(--display); }
.floating-badge span { font-size: .75rem; text-transform: uppercase; letter-spacing: .2em; }
@keyframes float { 50% { transform: translateY(-14px) rotate(4deg); } }
.split-text p { color: #c4c4cc; }
/* etichetta del grado accanto al titolo: dice a chi si riferisce il 7° Dan */
.grade-tag { display: inline-flex; align-items: center; gap: .4em; margin: -6px 0 18px; padding: .45em 1em; border-radius: 999px; border: 1px solid rgba(var(--red-rgb), .45); background: rgba(var(--red-rgb), .1); font-size: .9rem; font-weight: 600; color: var(--fg); text-decoration: none; transition: background .3s, border-color .3s; }
.grade-tag b { color: var(--red-2); }
.grade-tag span { transition: transform .3s var(--ease); }
.grade-tag:hover { background: rgba(var(--red-rgb), .22); border-color: var(--red); }
.grade-tag:hover span { transform: translateX(4px); }
.masters { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.masters li {
  background: var(--bg-3); border-left: 3px solid var(--red); padding: 12px 16px; border-radius: 10px;
  transition: transform .3s var(--ease), background .3s;
}
.masters li:hover { transform: translateX(6px); background: #24242b; }
.masters b { display: block; font-size: .95rem; }
.masters span { font-size: .8rem; color: var(--gold); }

/* ---------- ORARI ---------- */
.tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.tab {
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: .7em 1.6em; font: 700 .95rem var(--font); cursor: pointer; transition: .3s var(--ease);
}
.tab:hover { color: #fff; }
.tab.active { background: var(--red); color: #fff; border-color: var(--red); }
.schedule { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.slot {
  display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 20px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 24px;
  animation: slotIn .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms);
  transition: border-color .3s, transform .3s var(--ease);
}
.slot:hover { border-color: rgba(var(--red-rgb), .5); transform: scale(1.015); }
@keyframes slotIn { from { opacity: 0; transform: translateX(-24px); } }
.slot time { font: 400 1.6rem/1 var(--display); color: var(--red-2); letter-spacing: .03em; }
.slot h4 { margin: 0; font-size: 1.05rem; }
.slot .who { font-size: .75rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; text-align: right; }
.note { text-align: center; color: var(--muted); margin-top: 24px; font-size: .9rem; }

/* ---------- EVENTI ---------- */
.eventi { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.timeline { list-style: none; padding: 0; margin: 0 0 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.timeline li {
  background: var(--bg-3); border-radius: 14px; padding: 22px; border-top: 3px solid var(--red);
  transition: transform .4s var(--ease), box-shadow .4s, opacity .9s var(--ease);
}
.timeline li:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.timeline time { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--red-2); }
.timeline h3 { font: 400 1.6rem/1 var(--display); margin: 8px 0 6px; letter-spacing: .02em; }
.timeline p { color: var(--muted); font-size: .9rem; margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 12px; }
.gallery figure { margin: 0; overflow: hidden; border-radius: 14px; cursor: zoom-in; position: relative; background: var(--bg-3); }
.gallery figure::after {
  content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 300;
  background: rgba(var(--red-rgb), .45); opacity: 0; transition: opacity .4s;
}
.gallery figure:hover::after { opacity: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery figure:hover img { transform: scale(1.08); }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.92); backdrop-filter: blur(6px);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .35s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; transform: scale(.92); transition: transform .45s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%;
  font-size: 2rem; cursor: pointer; transition: background .3s;
}
.lightbox button:hover { background: var(--red); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- ISCRIZIONI ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 28px; position: relative; overflow: hidden; }
.step-n {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px;
  background: var(--red); font: 400 1.9rem/1 var(--display);
}
.step h3 { font: 400 1.8rem/1 var(--display); letter-spacing: .02em; }
.step p { color: var(--muted); font-size: .95rem; }
.iban {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--bg-3); border: 1px dashed rgba(255,255,255,.2); border-radius: 12px; padding: 14px 16px;
  transition: border-color .3s, background .3s;
}
.iban:hover { border-color: var(--red); background: #222228; }
.iban small { display: block; font-size: .72rem; color: var(--muted); }
.iban code { font-size: .92rem; font-weight: 700; letter-spacing: .04em; word-break: break-all; color: #fff; }
.copy-hint { display: block; font-size: .7rem; color: var(--red-2); margin-top: 4px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

/* ---------- SAFEGUARDING ---------- */
.safeguard { padding-block: 40px 100px; }
.safeguard-inner {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); border-radius: calc(var(--radius) + 10px);
  padding: clamp(32px, 6vw, 64px); position: relative; overflow: hidden;
}
.safeguard-inner::after {
  content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; right: -120px; top: -160px;
  background: rgba(255,255,255,.08); animation: float 8s ease-in-out infinite;
}
.safeguard-inner > * { position: relative; z-index: 1; }
.shield { font-size: 5rem; animation: float 5s ease-in-out infinite; }
.safeguard h2 { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--display); }
.safeguard .eyebrow { color: rgba(255,255,255,.75); }
.safeguard p { color: rgba(255,255,255,.88); max-width: 720px; }

/* ---------- CONTATTI ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: stretch; }
.contact-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.contact-list li > span { font-size: 1.5rem; }
.contact-list b { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 2px; }
.contact-list a { display: block; font-weight: 600; transition: color .3s; }
.contact-list a:hover { color: var(--red-2); }
.affiliations { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
/* loghi delle affiliazioni: stesso riquadro per tutti, immagine contenuta */
.affiliations a { width: 104px; height: 104px; padding: 10px; background: #fff; border-radius: 14px; display: grid; place-items: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.affiliations a:hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 12px 26px -10px rgba(var(--red-rgb), .7); }
.affiliations img { max-width: 84px; max-height: 84px; width: auto; height: auto; object-fit: contain; }   /* 104 - 2×10 di margine interno */
.map { border-radius: calc(var(--radius) + 6px); overflow: hidden; min-height: 420px; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer p { margin: 0; color: var(--muted); font-size: .9rem; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%;
  background: var(--red); display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; z-index: 90;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: .4s var(--ease);
  box-shadow: 0 10px 30px -8px rgba(var(--red-rgb), .7);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 100px); background: #fff; color: var(--bg);
  padding: 12px 22px; border-radius: 999px; font-weight: 700; z-index: 400; transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .menu {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: rgba(11,11,13,.97); backdrop-filter: blur(10px); font-size: 1.4rem;
    clip-path: circle(0 at calc(100% - 38px) 38px); transition: clip-path .6s var(--ease);
  }
  .menu.open { clip-path: circle(150% at calc(100% - 38px) 38px); }
  .news-card, .split, .contact { grid-template-columns: 1fr; }
  .split-img::after { inset: 14px -10px -14px 10px; }
  .floating-badge { right: 0; }
  .hero { padding-bottom: 60px; align-items: end; }
  .hero-stats { position: relative; left: auto; bottom: auto; transform: none; width: 100%; grid-template-columns: repeat(2, 1fr); margin-top: 40px; grid-column: 1; }
  .safeguard-inner { grid-template-columns: 1fr; gap: 16px; }
  .slot { grid-template-columns: 1fr; gap: 6px; }
  .slot .who { text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .masters { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .g-wide { grid-column: span 2; }
  .pill { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line > span, .page-hero h1 .line > span { transform: none; }
}

/* =====================================================================
   MULTI-PAGE: dropdown menu, page hero, content blocks
   ===================================================================== */
a.card { display: block; color: inherit; }
.timeline li > a { display: block; height: 100%; }
.menu .current { color: #fff; }
.menu > a.current:not(.btn)::after { transform: scaleX(1); }
.dd { position: relative; }
.dd-toggle {
  background: none; border: 0; color: #d4d4d8; font: inherit; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: .35em; transition: color .3s;
}
.dd-toggle::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease); }
.dd:hover .dd-toggle, .dd-toggle.current { color: #fff; }
.dd:hover .dd-toggle::after { transform: rotate(225deg) translateY(-2px); }
.dd-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; min-width: 250px;
  background: rgba(19,19,23,.97); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; display: grid; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: .3s var(--ease);
}
.dd-menu::before { content: ""; position: absolute; inset: -16px 0 auto; height: 16px; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dd-menu a { padding: 10px 14px; border-radius: 9px; font-size: .9rem; color: #d4d4d8; transition: background .25s, color .25s, padding .25s; }
.dd-menu a:hover, .dd-menu a.current { background: rgba(var(--red-rgb), .15); color: #fff; padding-left: 20px; }
.dd-menu a small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }

/* page hero */
.page-hero {
  position: relative; min-height: 62vh; display: grid; align-items: end; overflow: hidden;
  padding: 150px 0 70px;
}
.page-hero .hero-bg { animation-duration: 26s; }
.page-hero.no-img { min-height: 48vh; background: radial-gradient(ellipse at 85% 0%, rgba(var(--red-rgb), .45), transparent 60%), var(--bg); }
.page-hero h1 { font: 400 clamp(3.2rem, 9vw, 7rem)/.9 var(--display); margin: 0 0 .15em; }
.page-hero h1 .line { display: block; overflow: hidden; }
.page-hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) .1s forwards; }
.page-hero .sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #d4d4d8; max-width: 640px; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5em; font-size: .8rem; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.crumbs a:hover { color: #fff; }
.crumbs span::before { content: "/"; margin-right: .5em; opacity: .5; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { background: rgba(255,255,255,.08); border: 1px solid var(--line); backdrop-filter: blur(8px); padding: .45em 1em; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.chip b { color: var(--red-2); }

/* content layout */
.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.prose { color: #c4c4cc; font-size: 1.05rem; }
.prose h2 { font: 400 clamp(2.2rem, 5vw, 3.2rem)/1 var(--display); color: #fff; margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 400 1.8rem/1 var(--display); color: #fff; margin-top: 1.4em; letter-spacing: .02em; }
.prose strong { color: #fff; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--red); }
.prose .quote { font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.05 var(--display); color: var(--red-2); margin: 1em 0; letter-spacing: .02em; }
.prose a:not(.btn) { color: var(--red-2); font-weight: 600; }
.aside { position: sticky; top: 100px; display: grid; gap: 16px; }
.info-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.info-card h3 { font: 400 1.7rem/1 var(--display); letter-spacing: .02em; }
.info-card .row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.info-card .row:first-of-type { border-top: 0; }
.info-card .row b { color: var(--red-2); font-weight: 700; white-space: nowrap; }
.info-card.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); border: 0; }
.info-card.red p { color: rgba(255,255,255,.88); }
.info-card .btn { margin-top: 6px; }

.block { margin-top: clamp(56px, 8vw, 96px); }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.block-head h2 { font: 400 clamp(2.2rem, 5vw, 3.4rem)/1 var(--display); margin: 0; }
.block-head .count { color: var(--muted); font-size: .9rem; }

/* masonry gallery */
.gallery.masonry { display: block; columns: 4 220px; column-gap: 12px; }
.gallery.masonry figure { break-inside: avoid; margin-bottom: 12px; display: block; }
.gallery.masonry img { height: auto; }
.gallery.masonry figure:hover img { transform: scale(1.05); }

/* videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.yt, .video-grid video {
  position: relative; aspect-ratio: 16/9; width: 100%; border: 0; border-radius: 14px; overflow: hidden;
  background: #000 center/cover no-repeat; cursor: pointer; display: block;
}
.video-grid video { cursor: auto; object-fit: contain; }
.yt::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6)); transition: background .3s; }
.yt::after {
  content: "▶"; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
  border-radius: 14px; background: var(--red); color: #fff; font-size: 1.3rem; display: grid; place-items: center;
  transition: transform .35s var(--ease);
}
.yt:hover::after { transform: translate(-50%, -50%) scale(1.15); }
.yt:hover::before { background: rgba(var(--red-rgb), .2); }
.yt.playing::before, .yt.playing::after { display: none; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* docs */
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.doc {
  display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; transition: transform .35s var(--ease), border-color .35s;
}
.doc:hover { transform: translateY(-6px); border-color: rgba(var(--red-rgb), .5); }
.doc-icon { width: 48px; height: 58px; border-radius: 6px 16px 6px 6px; background: var(--red); display: grid; place-items: end center; padding-bottom: 8px; font: 800 .7rem var(--font); letter-spacing: .08em; }
.doc h3 { font: 400 1.6rem/1 var(--display); letter-spacing: .02em; margin: 6px 0 0; }
.doc p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.doc .link-arrow { margin-top: 6px; }

/* event cards (index) */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.event-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .4s, opacity .9s var(--ease); }
.event-card:hover { transform: translateY(-8px); border-color: rgba(var(--red-rgb), .5); }
.event-card .cover { aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--bg-3); }
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.event-card:hover .cover img { transform: scale(1.08); }
.event-card .cover time { position: absolute; left: 14px; top: 14px; background: var(--red); padding: .3em .8em; border-radius: 999px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.event-card .body { padding: 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-card h3 { font: 400 1.8rem/1 var(--display); letter-spacing: .02em; margin: 0; }
.event-card p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.event-card .stats { display: flex; gap: 14px; font-size: .78rem; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }

/* prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(56px, 8vw, 96px); }
.pager a { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; transition: border-color .3s, transform .3s var(--ease); }
.pager a:hover { border-color: var(--red); transform: translateY(-4px); }
.pager small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.pager b { font: 400 1.6rem/1.1 var(--display); letter-spacing: .02em; }
.pager .next { text-align: right; grid-column: 2; }

/* masters with photos */
.master-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.master { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; transition: transform .4s var(--ease), border-color .4s, opacity .9s var(--ease); }
.master:hover { transform: translateY(-6px); border-color: rgba(var(--red-rgb), .5); }
.master .ph { aspect-ratio: 3/4; background: linear-gradient(180deg, var(--bg-3), var(--red-deep)); display: grid; place-items: end center; overflow: hidden; }
.master .ph img { height: 92%; width: auto; object-fit: contain; transition: transform .6s var(--ease); }
.master:hover .ph img { transform: scale(1.06); }
.master .tx { padding: 16px; }
.master b { display: block; font-size: 1rem; }
.master span { color: var(--gold); font-size: .8rem; font-weight: 700; }
.master em { display: block; font-style: normal; color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* QR + form */
.qr { background: #fff; border-radius: 14px; padding: 10px; width: 150px; }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.form input, .form textarea, .form select {
  font: inherit; color: var(--fg); background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  text-transform: none; letter-spacing: 0; transition: border-color .3s, box-shadow .3s;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(var(--red-rgb), .2); }
.form textarea { min-height: 140px; resize: vertical; }
.form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }

/* footer (multi-column) */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.footer h4 { font: 400 1.3rem/1 var(--display); letter-spacing: .06em; margin: 0 0 14px; color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); font-size: .9rem; transition: color .25s; }
.footer ul a:hover { color: #fff; }
.footer { padding-bottom: 96px; }   /* spazio per il pulsante "torna su" */
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
/* firma GPA MS: logo originale su etichetta bianca (sul fondo scuro il nero del marchio non si vedrebbe) */
.credit { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.credit img { display: block; height: 22px; width: auto; box-sizing: content-box; padding: 6px 10px; background: #fff; border-radius: 8px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.credit:hover { color: var(--fg); }
.credit:hover img { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(var(--red-rgb), .7); }
.footer .about { color: var(--muted); font-size: .9rem; margin-top: 14px; max-width: 300px; }

.cta-band { background: linear-gradient(135deg, var(--red), var(--red-dark)); border-radius: calc(var(--radius) + 10px); padding: clamp(32px, 6vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.cta-band h2 { font: 400 clamp(2.2rem, 5vw, 3.4rem)/1 var(--display); margin: 0; }
.cta-band p { margin: 6px 0 0; color: rgba(255,255,255,.85); }
.cta-band::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -80px; bottom: -160px; background: rgba(255,255,255,.08); }
.cta-band > * { position: relative; z-index: 1; }

/* ---------- Kenpo sub-site ---------- */
a.tab { display: inline-block; }
.belt {
  display: inline-block; width: 46px; height: 12px; border-radius: 3px; vertical-align: middle; position: relative;
  background: linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px rgba(255,255,255,.3);
}
.belt::after { content: ""; position: absolute; left: 50%; top: -3px; width: 10px; height: 18px; margin-left: -5px; border-radius: 3px; background: var(--c2); box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 0 0 3px var(--bg-2); }
.belt-strip { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-bottom: 40px; }
.belt-strip .belt { width: 90px; height: 20px; animation: float 4s ease-in-out infinite; }
.belt-strip .belt:nth-child(2n) { animation-delay: -2s; }
.belt-strip .belt::after { height: 28px; top: -4px; width: 16px; margin-left: -8px; }
.belt-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; }
.belt-legend i { display: inline-block; width: 22px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.info-card .row span .belt { margin-right: 10px; }

.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.student { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .3s, transform .4s var(--ease), opacity .9s var(--ease); }
.student:hover { border-color: rgba(var(--red-rgb), .5); transform: translateY(-4px); }
.student-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--red), var(--red-dark)); display: grid; place-items: center; border: 2px solid var(--red); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.avatar .initial { font: 400 1.9rem var(--display); }
.student h3 { font: 400 1.7rem/1 var(--display); margin: 0 0 4px; letter-spacing: .03em; }
.student-head p { margin: 0; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.belt-tl { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.belt-tl li { display: flex; align-items: center; gap: 12px; padding: 6px 0 6px 14px; font-size: .85rem; color: var(--muted); position: relative; }
.belt-tl li::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); border: 2px solid var(--line); transform: translateY(-50%); }
.belt-tl li:first-child { color: #fff; font-weight: 600; }
.belt-tl li:first-child::before { background: var(--red); border-color: var(--red); }

.jp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.jp-name { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px; text-align: center; display: grid; gap: 6px; transition: transform .35s var(--ease), border-color .35s, background .35s, opacity .9s var(--ease); }
a.jp-name:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--red); background: #1f1012; }
.jp-name .kana { font-size: 1.3rem; white-space: nowrap; color: var(--red-2); font-family: "Yu Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif; }
.jp-name b { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.steps.five { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.steps.five .step { padding: 24px 22px; }
.steps.five .step h3 { font-size: 1.5rem; }
.kata-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.kata { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .35s, opacity .9s var(--ease), transform .9s var(--ease); }
.kata:hover { border-color: rgba(var(--red-rgb), .5); }
.kata .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; gap: 2px; }
.kata .gallery figure { border-radius: 0; background: #fff; }
.kata .gallery img { object-fit: contain; }
.kata-tx { padding: 20px; }
.kata-tx h3 { font: 400 1.7rem/1 var(--display); letter-spacing: .02em; }
.gallery figure.named figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; font-size: .78rem; font-weight: 700;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); letter-spacing: .04em; z-index: 1; pointer-events: none;
}

/* transparent PNGs (dictionary tables, technique sheets…) have dark text:
   give them a white sheet so they stay readable on the dark theme and in the lightbox */
.gallery img[src$=".png"], .lightbox img[src$=".png"] { background: #fff; }
.gallery figure:has(img[src$=".png"]) { background: #fff; }
.gallery.masonry img[src$=".png"] { padding: 6px; }

/* vocabulary: one tile per topic, the other sheets open in the lightbox */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery.topic-gallery { display: block; }
.gallery.topic-gallery figure { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); }
.gallery.topic-gallery figure:not(:first-child) { display: none; }
.gallery.topic-gallery img { object-fit: cover; object-position: top; }
.topic-cap {
  position: absolute; inset: auto 0 0 0; z-index: 1; padding: 34px 16px 14px; pointer-events: none;
  background: linear-gradient(transparent, rgba(11,11,13,.92) 55%); display: grid; gap: 2px;
}
.topic-cap b { font: 400 1.7rem/1 var(--display); letter-spacing: .03em; }
.topic-cap span { font-size: .78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }

/* home: five disciplines in one row on wide screens */
@media (min-width: 1101px) { .cards.five { grid-template-columns: repeat(5, 1fr); } .cards.five .card { padding: 28px 20px; } }

/* diplomas of the masters */
.gallery.diplomas { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: auto; gap: 16px; }
.gallery.diplomas figure { background: #fff; aspect-ratio: 1588 / 1123; }
.gallery.diplomas img { object-fit: contain; }
.diploma-link { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--red-2); transition: transform .3s var(--ease); }
.diploma-link:hover { transform: translateX(4px); }

@media (max-width: 1180px) and (min-width: 861px) {
  .menu { gap: 18px; font-size: .88rem; }
  .menu .btn-sm { padding: .5em 1em; }
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu { justify-content: flex-start; overflow-y: auto; padding: 96px 24px 40px; gap: 18px; font-size: 1.25rem; }
  /* mobile: sub-menus become an accordion (tap the group to open it); no hover effects, nothing moves */
  .dd { width: 100%; text-align: center; }
  .dd-toggle { font-size: 1.25rem; color: #fff; gap: .5em; }
  .dd-toggle::after { display: inline-block; transform: rotate(45deg) translateY(-3px); }
  .dd:hover .dd-toggle::after { transform: rotate(45deg) translateY(-3px); }
  .dd.open .dd-toggle::after, .dd.open:hover .dd-toggle::after { transform: rotate(225deg) translateY(-1px); }
  .dd-menu, .dd:hover .dd-menu, .dd:focus-within .dd-menu {
    position: static; display: none; opacity: 1; visibility: visible; transform: none; transition: none;
    background: none; border: 0; box-shadow: none; padding: 8px 0 2px; min-width: 0; backdrop-filter: none;
  }
  .dd.open .dd-menu { display: grid; }
  .dd-menu::before { display: none; }
  .dd-menu a, .dd-menu a:hover, .dd-menu a.current { font-size: .95rem; padding: 7px 6px; color: var(--muted); background: none; transition: none; }
  .dd-menu a.current { color: #fff; }
  .dd-menu a small { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .form .two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .gallery.masonry { columns: 2; }
}

/* titoli sempre maiuscoli: Bebas Neue lo è già, così il look resta uguale anche con gli altri caratteri del pannello Aspetto */
.logo-text, .hero-title, .marquee-track, .title, .news-body h2, .card h3, .timeline h3, .step h3, .safeguard h2,
.page-hero h1, .prose h2, .prose h3, .prose .quote, .info-card h3, .block-head h2, .doc h3, .event-card h3,
.pager b, .footer h4, .cta-band h2, .student h3, .kata-tx h3, .topic-cap b { text-transform: uppercase; }
