/* Design tokens e colori condivisi */
:root {
  --blue: #0057b8;
  --blue-deep: #00468f;
  --red: #e30613;
  --red-deep: #bc040f;
  --ink: #1b1f2a;
  --paper: #fff;
  --cream: #faf8f3;
  --line: #e7e2d7;
  --muted: #6c6a63;
  --gold: #b5933f;
  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Hanken Grotesk", sans-serif;
  --f-jp: "Shippori Mincho", serif;
}
/* Reset base e stile globale */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}


body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.wrap {
  width: min(1180px, 92vw);
  margin-inline: auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
}

/* Header e navigazione */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand img {
  height: 50px;
  width: auto;
}
.menu {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}
.menu a {
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}
.menu a:hover,
.menu a.active {
  color: var(--red);
}
.menu a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--red);
}
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 0.55rem 1.05rem;
  border-radius: 3px;
  transition: background 0.25s;
}
.nav-cta:hover {
  background: var(--blue-deep);
}
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  width: 26px;
  height: 2px;
  background: var(--blue);
}

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  background-image: url("media/homepage.jpg") !important;
}
.hero .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 20, 40, 0.68) 0%,
    rgba(11, 20, 40, 0.64) 40%,
    rgba(11, 20, 40, 0.88) 100%
  );
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 4rem;
}
.hero .eyebrow {
  color: #f4cbd0;
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-top: 0.6rem;
  max-width: 20ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.hero h1 em {
  font-style: italic;
  color: #ff8a90;
}
.hero .lead {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: none;
  color: #eef1f7;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: 3px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.25s,
    background 0.25s,
    color 0.25s;
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-deep);
  transform: translateY(-2px);
}
.btn-light {
  background: #fff;
  color: var(--blue);
}
.btn-light:hover {
  transform: translateY(-2px);
}
.btn-line {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-line:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}
.hero .btn-line {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.hero .btn-line:hover {
  background: #fff;
  color: var(--blue);
}

/* Hero principale della home */
.trust {
  background: var(--blue);
  color: #fff;
}
.trust .wrap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 1.7rem 0;
  align-items: start;
}
.trust .item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.trust .item b {
  font-family: var(--f-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
  display: block;
  min-height: 1.3em;
}
.trust .item span {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aecbf0;
  margin-top: 0.3rem;
  display: block;
}

/* Spaziatura e intestazioni di sezione */
section {
  padding: 5rem 0;
}
.section-head {
  max-width: none;
  margin-bottom: 2.8rem;
}
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-top: 0.7rem;
  color: var(--blue);
}
.section-head p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.alt {
  background: var(--cream);
}

/* Card corsi e blocchi contenuto */
.courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
.courses.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
  margin-inline: auto;
}
.course {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.course:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -28px rgba(0, 87, 184, 0.4);
}
.course .ph {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
}
.course .body {
  padding: 1.6rem 1.5rem;
}
.course .age {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.course h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0.35rem 0 0.5rem;
  color: var(--blue);
}
.course p {
  color: var(--muted);
  font-size: 0.94rem;
}
.course .when {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.86rem;
}
.course .when b {
  font-weight: 700;
  color: var(--ink);
}

/* Galleria immagini */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.gallery .g {
  aspect-ratio: 1;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}

/* Layout a due colonne / presentazione */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.2rem;
  align-items: center;
}
.split .photo {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.5);
}
.split h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.08;
  color: var(--blue);
}
.split p {
  color: #3c3f49;
  margin-top: 1.1rem;
}

/* Sezione biografia maestro */
.bio {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.bio .photo {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.5);
}
.cred {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  gap: 0.7rem;
}
.cred li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.97rem;
}
.cred li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 0.5rem;
}
.cred b {
  color: var(--blue);
  font-family: var(--f-display);
}

/* Certificazioni e attestati */
.certs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.cert {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.cert:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.4);
}
.cert img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  background: #f4f1ea;
}
.cert .cap {
  padding: 0.7rem 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.cert .cap b {
  display: block;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 0.92rem;
  margin-bottom: 0.1rem;
}

/* Sedi e contatti rapidi */
.sedi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}
.sede {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.7rem;
}
.sede .tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.sede h4 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0.35rem 0;
  color: var(--blue);
}
.sede p {
  color: var(--muted);
  font-size: 0.93rem;
}
.sede .hours {
  margin-top: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}

/* Layout contatti e form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.2rem;
}
.contact-card h4 {
  font-family: var(--f-display);
  color: var(--blue);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}
.contact-card a {
  color: var(--red);
  font-weight: 600;
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  background: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
}
form .btn-primary {
  width: 100%;
  justify-content: center;
}
.form-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 8px;
}

/* Hero delle pagine interne */
.page-hero {
  background: var(--blue);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero .wrap {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0;
}
.page-hero .eyebrow {
  color: #f4cbd0;
}
.page-hero h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-top: 0.5rem;
  line-height: 1.05;
}
.page-hero p {
  color: #c3cfe6;
  margin-top: 0.8rem;
  max-width: none;
}

/* Footer e link utili */
footer {
  font-size: .92rem;
  background: var(--blue-deep);
  color: #9fb0d4;
  padding: 4rem 0 2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.8rem;
}
footer h5 {
  font-family: var(--f-display);
  color: #fff;
  font-size: inherit;
  margin-bottom: 1rem;
  font-weight: 600;
}
footer a {
  color: #9fb0d4;
  display: block;
  margin-bottom: 0.5rem;
  font-size: inherit;
  transition: color 0.2s;
}
footer a:hover {
  color: #fff;
}
.foot-brand p {
  margin-top: 0.8rem;
  font-size: inherit;
  max-width: 34ch;
}
.partners {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}
.partners a {
  font-size: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.06em;
  color: #c3cfe6;
  margin: 0;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.partners a:hover {
  background: #fff;
  color: var(--blue-deep);
  border-color: #fff;
}
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.4rem;
  font-size: inherit;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Moduli economici, pagamenti e avvisi */
.iban {
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.iban .lab {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #aecbf0;
}
.iban .num {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  word-break: break-word;
}
.iban .who {
  font-size: 0.85rem;
  color: #dbe5f5;
}
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}
.price-card h3 {
  font-family: var(--f-display);
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 600;
}
.price-card .req {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-top: 0.2rem;
}
.prow {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
}
.prow .d {
  font-size: 0.95rem;
}
.prow .a {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pnote {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line);
  line-height: 1.5;
}
.infobox {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.6rem 1.8rem;
  margin-top: 1.4rem;
}
.infobox h4 {
  font-family: var(--f-display);
  color: var(--blue);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.steps {
  list-style: none;
  counter-reset: s;
  display: grid;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.steps li {
  counter-increment: s;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.95rem;
}
.steps li > span {
  flex: 1;
  min-width: 0;
  padding-top: 0.05rem;
}
.steps li::before {
  content: counter(s);
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.warnbox {
  background: #fff5f5;
  border: 1px solid #f3d0d2;
  border-radius: 8px;
  padding: 1.3rem 1.6rem;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: #7a4a4c;
}
.warnbox b {
  color: var(--red-deep);
}
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s,
    transform 0.7s;
}

/* Banner avvisi, notizie e filtri */
.news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.ncard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.ncard:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px -28px rgba(0, 87, 184, 0.4);
}
a.ncard {
  display: flex;
  text-decoration: none;
  color: inherit;
}
.ncard .ph {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}
.ncard .body {
  padding: 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ncard .tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
}
.ncard .date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}
.ncard .top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.ncard h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--blue);
  line-height: 1.2;
}
.ncard p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}
.news-detail {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.news-detail h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--blue);
  margin-bottom: 1.2rem;
}
.news-detail h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.news-detail p {
  color: var(--text);
  margin-bottom: 1rem;
}
.location-block {
  background-color: #f9f9f9;
  padding: 1.2rem;
  border-radius: 8px;
  border-left: 4px solid var(--line);
}
.location-block h3 {
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filters button {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 1.1rem;
  border-radius: 40px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
}
.filters button:hover {
  border-color: var(--blue);
}
.filters button.on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* Griglia foto */
.grid-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.grid-photos .gp {
  aspect-ratio: 4/3;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  transition: transform 0.3s;
}
.grid-photos .gp:hover {
  transform: scale(1.02);
}
.legacy-gallery {
  display: none;
}
.gallery-archive {
  background: var(--cream);
}
.event-sections {
  display: grid;
  gap: 2rem;
}
.event-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
}
.event-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.event-heading h3 {
  margin-top: 0.35rem;
  color: var(--blue);
  font-family: var(--f-display);
  font-size: 1.55rem;
  line-height: 1.15;
}
.drive-link {
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.drive-link:hover {
  color: var(--red-deep);
}
.event-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.photo-slot {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 1px dashed #c9c1b2;
  border-radius: 4px;
  color: var(--muted);
  background: #f4f1ea;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Adattamento responsive */
@media (max-width: 900px) {
  .courses {
    grid-template-columns: 1fr;
  }
  .price-grid {
    grid-template-columns: 1fr;
  }
  .news {
    grid-template-columns: 1fr;
  }
  .grid-photos {
    grid-template-columns: repeat(2, 1fr);
  }
  .event-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust .wrap {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem 1rem;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .certs {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .bio,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sedi {
    grid-template-columns: 1fr;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .menu {
    position: fixed;
    inset: 78px 0 auto 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.35s;
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.2);
  }
  .menu.open {
    transform: none;
  }
  .menu li {
    width: 100%;
  }
  .menu a {
    display: block;
    padding: 1rem 6vw;
  }
  .menu .nav-cta {
    margin: 0.5rem 6vw;
    text-align: center;
  }
  .burger {
    display: flex;
  }
}

@media (max-width: 600px) {
  section {
    padding: 4rem 0;
  }
  .hero {
    min-height: 68vh;
  }
  .hero .wrap {
    padding: 2.8rem 0 3rem;
  }
  .page-hero .wrap {
    padding: 2.8rem 0;
  }
  .nav {
    height: 70px;
  }
  .menu {
    inset: 70px 0 auto 0;
  }
  .trust .wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .courses.two {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .gallery,
  .certs,
  .grid-photos,
  .news,
  .courses,
  .price-grid,
  .contact-grid,
  .split,
  .bio,
  .sedi,
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions,
  .partners,
  .filters {
    gap: 0.5rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .nav-cta {
    display: inline-flex;
  }
  .iban {
    padding: 1.2rem 1.3rem;
    gap: 0.6rem;
  }
  .iban .num {
    font-size: 1.05rem;
  }
  .price-card,
  .contact-card,
  .sede,
  .infobox,
  .warnbox {
    padding: 1.3rem;
  }
  .ncard .body {
    padding: 1.1rem 1.2rem;
  }
  .foot-bottom {
    flex-direction: column;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 1.05rem;
  }
  .wrap {
    width: min(1240px, 90vw);
  }
  .hero {
    min-height: 82vh;
  }
  .page-hero .wrap {
    padding: 4rem 0;
  }
  .section-head p {
    font-size: 1.12rem;
  }
  .menu a {
    font-size: 0.98rem;
  }
  .hero .lead {
    font-size: clamp(1.12rem, 1.7vw, 1.42rem);
  }
  .trust .wrap {
    gap: 1.2rem;
  }
}

/* Spazio per la sezione Karate Shotokan nel menu desktop. */
@media (min-width: 901px) and (max-width: 1100px) {
  .menu { gap: .85rem; }
  .menu a { font-size: .85rem; }
  .brand img { height: 44px; }
}

/* Banner comune per tutte le pagine interne. */
.page-hero { padding: 0; }
.page-hero p { color: #fff; }
.page-back-row { margin-bottom: 1rem; }
.page-back { color: #fff; font-size: 1.1rem; text-decoration: underline; text-underline-offset: .25em; }
.page-back:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
/* Altezza condivisa dei banner con categoria, titolo e descrizione. */
@media (min-width: 901px) { .page-hero .wrap { min-height: 370px; } }

/* Foto della homepage attenuata per favorire la lettura. */
.hero .bg { filter: saturate(.65); }
figcaption { text-align: center; }

/* Spazio condiviso per titoli e avviso sedi. */
.transfer-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; align-items: start; }
.transfer-columns .news-detail { min-width: 0; }
.album-pending { color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .transfer-columns { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Copia IBAN accessibile, allineata al numero. */
.iban-copy-row { display: flex; align-items: center; gap: .6rem; }
.iban-copy-row .num { min-width: 0; overflow-wrap: anywhere; }
.iban-copy-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 8px; color: inherit; background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; cursor: pointer; }
.iban-copy-icon:hover { background: rgba(255,255,255,.12); }
.iban-copy-icon:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.transfer-columns .news-detail > h2 { min-height: 2.4em; display: flex; align-items: flex-start; }
@media (max-width: 900px) { .transfer-columns .news-detail > h2 { min-height: 0; } }
@media (min-width: 901px) { .transfer-columns .news-detail > h3 { min-height: 3.6em; } }

/* Informativa e attivazione volontaria delle mappe. */
.privacy-copy { line-height: 1.8; }
.privacy-copy h2 { font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--blue); margin: 2.5rem 0 1rem; }
.privacy-copy h3 { margin: 1.5rem 0 .75rem; }
.privacy-copy p + p { margin-top: 1rem; }
.privacy-copy a, .form-privacy a { text-decoration: underline; text-underline-offset: .2em; }
.form-privacy { font-size: .9rem; line-height: 1.6; margin: 1rem 0; }


/* Archivio fotografico degli esami: tre anteprime per evento. */
.gallery-years { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin-bottom: 2.5rem; }
.gallery-years a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--blue-deep); text-decoration: underline; text-underline-offset: .2em; padding: .35rem; }
.gallery-year { scroll-margin-top: 100px; font-family: var(--f-display); color: var(--blue); font-size: 2rem; margin-top: 1.5rem; }
.gallery-photo { display: block; background: var(--cream); }
.gallery-photo img { display: block; width: 100%; height: 240px; object-fit: contain; }
.gallery-photo:focus-visible, .gallery-years a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.event-heading .drive-link { white-space: normal; text-decoration: underline; text-underline-offset: .2em; }
/* Intestazione e collegamenti restano leggibili anche con touch e zoom. */
.gallery-archive .event-heading > div { min-width: 0; }
.gallery-archive .drive-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px) {
  .gallery-archive .event-heading { align-items: start; flex-direction: column; gap: .5rem; }
  .gallery-archive .event-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-photo img { height: 180px; }
}
@media (max-width: 600px) {
  .gallery-archive .event-section { padding: 1rem; }
  .gallery-archive .event-photos { grid-template-columns: 1fr; gap: 1rem; }
  .gallery-photo img { height: auto; max-height: none; }
  .gallery-years { gap: .25rem .6rem; margin-bottom: 1.75rem; }
  .gallery-archive .event-heading h3 { font-size: 1.4rem; }
  .gallery-archive .drive-link { font-size: 1rem; }
}
