/* ================================================================
   MASTER ACADEMY - css/style.css
   Bianco + blu. Stile moderno, pulito, fluido (Microsoft / Apple).
   Font: Sora (titoli) + Manrope (corpo).
================================================================ */

/* ----------------------------------------------------------------
   1. TOKEN DI DESIGN
---------------------------------------------------------------- */
:root {
  --bg:         #FFFFFF;
  --bg-soft:    #F4F7FE;   /* azzurro nebbia per sezioni alternate */
  --bg-deep:    #0A1733;   /* blu notte per sezioni scure */
  --ink:        #0E1B33;   /* testo principale, blu inchiostro */
  --ink-soft:   #54607A;   /* testo secondario */
  --line:       #E2E9F5;   /* bordi sottili */

  --blue:       #1666F0;   /* accento primario */
  --blue-deep:  #0B4ED1;   /* hover / pressione */
  --blue-bright:#3E8BFF;   /* dettagli luminosi */
  --blue-tint:  #EAF1FF;   /* sfondo tenue dell'accento */

  --white:      #FFFFFF;

  --font-display: "Sora", "Helvetica Neue", sans-serif;
  --font-body:    "Manrope", "Helvetica Neue", sans-serif;

  --radius-sm:  12px;
  --radius:     18px;
  --radius-lg:  26px;
  --radius-pill:999px;

  --shadow-sm:  0 6px 18px -10px rgba(14, 27, 51, 0.25);
  --shadow:     0 18px 44px -22px rgba(14, 27, 51, 0.30);
  --shadow-blue:0 20px 50px -20px rgba(22, 102, 240, 0.45);

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);

  --container:  1200px;
  --nav-h:      72px;
  --section-pad:clamp(4rem, 8vw, 7rem);
}

/* ----------------------------------------------------------------
   2. RESET E BASE
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* clip (non hidden): evita lo scroll orizzontale SENZA rompere
     la hero sticky in stile Apple */
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }

p { max-width: 64ch; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

section { padding-block: var(--section-pad); scroll-margin-top: var(--nav-h); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Sezioni a sfondo alternato */
#percorsi, #perche, #sedi { background-color: var(--bg-soft); }

/* ----------------------------------------------------------------
   3. ELEMENTI RICORRENTI
---------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.9rem;
}

.eyebrow-light { color: var(--blue-bright); }

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.section-sub {
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* Vetro (liquid glass) - usato con parsimonia */
.glass {
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background-color: rgba(255, 255, 255, 0.96); }
}

/* ----------------------------------------------------------------
   4. BOTTONI
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease,
              color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--blue);
  color: var(--white);
  /* tocco liquid glass: riflesso interno in alto */
  box-shadow: var(--shadow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background-color: var(--blue-deep); transform: translateY(-2px); }
}

/* Bottone secondario in vero liquid glass */
.btn-ghost {
  background-color: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
}

.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.95rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------
   5. INTRO ANIMATA (timbro)
---------------------------------------------------------------- */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;          /* non blocca i click durante l'intro */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tendina blu: copre lo schermo al caricamento, poi esce verso destra
   scoprendo la hero bianca quadrettata (reveal da sinistra a destra) */
.intro-wipe {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%);
  transform: translateX(0);
  will-change: transform;
}

/* Stadio del timbro, sopra la tendina */
.intro-stage {
  position: relative;
  z-index: 2;
  width: min(72vw, 300px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Il timbro e' il logo vero */
.intro-stamp {
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(-90%) scale(1.25) rotate(-8deg);
  transform-origin: 50% 50%;
  border-radius: 50%;
}

.intro-ink {
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 102, 240, 0.45) 0%, rgba(22, 102, 240, 0) 68%);
  opacity: 0;
  transform: scale(0.2);
}

#skip-intro {
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}

#skip-intro:hover { background-color: rgba(255, 255, 255, 0.24); }
#skip-intro:active { transform: scale(0.96); }

/* Il contenuto e' sempre presente: la hero viene "scoperta" dalla
   tendina blu, non da una dissolvenza */
#main-content { opacity: 1; }

@media (scripting: none) {
  #intro-overlay { display: none; }
}

/* ----------------------------------------------------------------
   6. NAVBAR
---------------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 350ms var(--ease-in-out), box-shadow 350ms var(--ease-in-out),
              backdrop-filter 350ms var(--ease-in-out), border-color 350ms var(--ease-in-out);
  border-bottom: 1px solid transparent;
}

#navbar.is-scrolled {
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(14, 27, 51, 0.4);
}

.nav-inner {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 10px -4px rgba(14, 27, 51, 0.3);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  position: relative;
  padding-block: 0.4rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover::after { transform: scaleX(1); }
}

#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ink);
  transition: transform 250ms var(--ease-out), opacity 200ms ease;
}

#menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
#menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms;
}

#mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }

#mobile-menu ul { list-style: none; display: grid; gap: 1.5rem; text-align: center; }

#mobile-menu a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ink);
}

/* ----------------------------------------------------------------
   7. HERO
---------------------------------------------------------------- */
/* Hero "appiccicata": resta sotto mentre le sezioni le scorrono sopra,
   come nei siti Apple (rivela la pagina senza taglio netto) */
#hero {
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
  isolation: isolate;
  overflow: hidden;
}

/* Le altre sezioni passano SOPRA la hero, con sfondo opaco
   (altrimenti la hero sticky traspare dietro) */
main > section:not(#hero) {
  position: relative;
  z-index: 1;
  background-color: var(--bg);
}

/* La prima sezione scopre la hero con un bordo arrotondato morbido */
#percorsi {
  border-radius: 36px 36px 0 0;
  margin-top: -36px;
  box-shadow: 0 -26px 70px -34px rgba(14, 27, 51, 0.22);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 80% -10%, #eaf1ff 0%, rgba(234, 241, 255, 0) 60%),
    radial-gradient(70% 60% at 0% 110%, #eef3ff 0%, rgba(238, 243, 255, 0) 55%),
    var(--bg);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

/* Le due sfumature blu si muovono di continuo, in modo morbido */
.hero-glow-1 {
  width: 500px; height: 500px;
  top: -120px; right: -70px;
  background: radial-gradient(circle, rgba(40, 120, 255, 0.85) 0%, rgba(62, 139, 255, 0.4) 42%, transparent 72%);
  animation: glow-move-1 7s ease-in-out infinite;
}

.hero-glow-2 {
  width: 480px; height: 480px;
  bottom: -130px; left: -90px;
  background: radial-gradient(circle, rgba(22, 102, 240, 0.78) 0%, rgba(22, 102, 240, 0.34) 42%, transparent 72%);
  animation: glow-move-2 7s ease-in-out infinite;
  animation-delay: -3.5s;   /* sfasato di mezzo ciclo: si muovono ALTERNATI */
}

/* Ogni sfumatura entra verso il centro e torna, poi resta ferma
   mentre l'altra fa la sua corsa (movimento ampio e ben visibile) */
@keyframes glow-move-1 {
  0%   { transform: translate(0, 0) scale(1); }
  20%  { transform: translate(-260px, 210px) scale(1.4); }
  40%  { transform: translate(0, 0) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes glow-move-2 {
  0%   { transform: translate(0, 0) scale(1); }
  20%  { transform: translate(240px, -210px) scale(1.4); }
  40%  { transform: translate(0, 0) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 102, 240, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 102, 240, 0.10) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 35%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 35%, #000 0%, transparent 75%);
}

/* Liquid glass su tutta la hero: pannello traslucido che lascia
   intravedere le sfumature blu in movimento dietro */
.hero-content {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(1.2rem, 2.4vw, 1.7rem) clamp(1.5rem, 3.5vw, 2.4rem);
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-content { background-color: rgba(255, 255, 255, 0.93); }
}

#hero-title {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  font-weight: 800;
}

.hero-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-line-inner { display: block; }

#hero-title em {
  font-style: normal;
  color: var(--blue);
}

#hero-subtitle {
  margin-top: 0.9rem;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 64ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.3rem;
}

/* Dentro il pannello vetro della hero: sotto-pannello leggero,
   niente doppio blur */
.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.4rem);
  margin-top: 1.1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line);
  box-shadow: none;
}

.trust-item { display: flex; flex-direction: column; gap: 0.1rem; }

.trust-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trust-label { font-size: 0.85rem; color: var(--ink-soft); }

.trust-divider { width: 1px; height: 34px; background-color: var(--line); }

/* Sigillo Microsoft Partner sotto i numeri */
.hero-partner {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hero-partner img {
  width: 140px;
  height: auto;
  display: block;
}

/* Invito a scorrere: lembo della sezione sottostante che si intravede
   dal basso e ondeggia dolcemente verso l'alto, in loop (solo movimento) */
.scroll-invite {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
}

.scroll-invite-bar {
  width: min(100% - 2.5rem, var(--container));
  height: 64px;
  background-color: var(--bg-soft);
  border-top: 2px solid rgba(22, 102, 240, 0.3);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -18px 44px -22px rgba(22, 102, 240, 0.4);
  transform: translateY(40px);
  animation: scroll-invite-bob 2.6s ease-in-out infinite;
}

@keyframes scroll-invite-bob {
  0%, 100% { transform: translateY(40px); }
  50%      { transform: translateY(20px); }
}

/* ----------------------------------------------------------------
   8. PERCORSI GUIDATI
---------------------------------------------------------------- */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.path-card {
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .path-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-blue); }
}

.path-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--blue-tint);
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.path-icon svg { width: 26px; height: 26px; }

.path-card p { color: var(--ink-soft); font-size: 0.98rem; }

.path-link {
  margin-top: auto;
  padding-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--blue);
}

.path-link svg { width: 18px; height: 18px; transition: transform 220ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .path-card:hover .path-link svg { transform: translateX(4px); }
}

/* ----------------------------------------------------------------
   9. CATEGORIE
---------------------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.cat-card {
  position: relative;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  overflow: hidden;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
  .cat-card:hover::before { transform: scaleX(1); }
}

.cat-index {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--line);
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--blue-tint), #dbe8ff);
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.cat-icon svg { width: 27px; height: 27px; }

.cat-card p { color: var(--ink-soft); font-size: 0.97rem; }

.cat-link {
  margin-top: auto;
  padding-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--blue);
}

.cat-link svg { width: 18px; height: 18px; transition: transform 220ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .cat-card:hover .cat-link svg { transform: translateX(4px); }
}

.cat-note {
  max-width: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  text-align: center;
  margin-top: 2.2rem;
  padding: 0.9rem 1.4rem;
  background-color: var(--blue-tint);
  border-radius: var(--radius);
  color: var(--blue-deep);
  font-size: 0.95rem;
  font-weight: 500;
}

.cat-note svg { flex-shrink: 0; }

/* ----------------------------------------------------------------
   10. ACCREDITAMENTI
---------------------------------------------------------------- */
.accred-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
}

.accred-item {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .accred-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
}

.accred-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  margin-bottom: 0.9rem;
}

.accred-logo img {
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

/* Altezze ottiche bilanciate: i loghi compatti (Microsoft, Adobe)
   sono ingranditi per pareggiare visivamente gli altri */
.accred-item:nth-child(1) .accred-logo img { height: 60px; }  /* MIUR */
.accred-item:nth-child(2) .accred-logo img { height: 74px; }  /* Microsoft */
.accred-item:nth-child(3) .accred-logo img { height: 68px; }  /* Adobe */
.accred-item:nth-child(4) .accred-logo img { height: 58px; }  /* EIPASS */
.accred-item:nth-child(5) .accred-logo img { height: 66px; }  /* British */

.accred-item h3 { font-size: 1.02rem; }
.accred-item p { font-size: 0.86rem; color: var(--ink-soft); max-width: 22ch; }

/* ----------------------------------------------------------------
   11. PERCHÉ SCEGLIERCI (sequenza scroll-driven)
---------------------------------------------------------------- */
.perche-seq {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 8vw, 6.5rem);
}

/* Stato iniziale del reveal Apple-style (GSAP anima verso visibile) */
.perche-reveal { opacity: 0; transform: translateY(40px); }

.perche-block-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Blocco alternato: media a sinistra, testo a destra */
.perche-block-alt .perche-text { order: 2; }
.perche-block-alt .perche-media { order: 1; }

.perche-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--blue);
  background-color: var(--blue-tint);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.9rem;
}

.perche-text h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.6rem; }
.perche-text p { color: var(--ink-soft); font-size: 1.05rem; }

.perche-text-center { text-align: center; max-width: 620px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.perche-text-center .perche-kicker { margin-inline: auto; }

/* Riquadro segnaposto per i contenuti futuri */
.perche-media.is-empty {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(135deg, rgba(22,102,240,0.03) 0 14px, transparent 14px 28px),
    var(--bg-soft);
  border: 1.5px dashed rgba(22, 102, 240, 0.25);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* --- BLOCCO 2: Certificati che valgono (completo) --------------- */
.perche-certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.perche-cert {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .perche-cert:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
}

.perche-cert-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--blue-tint), #dbe8ff);
  color: var(--blue);
  margin-bottom: 1rem;
}
.perche-cert-icon svg { width: 26px; height: 26px; }

.perche-cert-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--blue-deep);
  background-color: var(--blue-tint);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.9rem;
}

.perche-cert h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.perche-cert p { color: var(--ink-soft); font-size: 0.95rem; }

/* --- BLOCCO 1: Timeline "20 anni di esperienza" ------------------
   Stessa "corrente" animata del Blocco 3 (pagamento a rate): qui
   percorre le tappe della storia aziendale invece dei passi d'acquisto,
   volutamente identica nello stile per coerenza visiva tra i blocchi. */
.timeline-steps {
  position: relative;
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: stretch;
}

.timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.timeline-svg-grey { stroke: var(--line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.timeline-svg-blue {
  stroke: var(--blue);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(22, 102, 240, 0.7));
}
.timeline-svg-dot { fill: var(--blue-bright); filter: drop-shadow(0 0 8px rgba(62, 139, 255, 0.9)); opacity: 0; }

.timeline-step {
  position: relative;
  z-index: 1;
  flex: 1;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 400ms ease, box-shadow 400ms ease, transform 400ms var(--ease-out);
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.7rem;
  transition: color 400ms ease;
}

.timeline-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--bg-soft);
  color: var(--ink-soft);
  transition: background-color 400ms ease, color 400ms ease, box-shadow 400ms ease, transform 400ms var(--ease-out);
}
.timeline-badge svg { width: 22px; height: 22px; }

.timeline-step h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.timeline-step p { font-size: 0.92rem; color: var(--ink-soft); margin-inline: auto; }

/* Stato "acceso" dallo scorrere della corrente */
.timeline-step.lit {
  border-color: var(--blue);
  box-shadow: 0 14px 40px -18px rgba(22, 102, 240, 0.55);
  transform: translateY(-4px);
}

.timeline-step.lit .timeline-year { color: var(--blue-deep); }

.timeline-step.lit .timeline-badge {
  background-color: var(--blue);
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(22, 102, 240, 0.15);
  transform: scale(1.08);
}

/* --- BLOCCO 3: Pagamento a rate --------------------------------- */
.rate-steps {
  position: relative;
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: stretch;
}

.rate-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.rate-svg-grey { stroke: var(--line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rate-svg-blue {
  stroke: var(--blue);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(22, 102, 240, 0.7));
}
.rate-svg-dot { fill: var(--blue-bright); filter: drop-shadow(0 0 8px rgba(62, 139, 255, 0.9)); opacity: 0; }

.rate-step {
  position: relative;
  z-index: 1;
  flex: 1;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 400ms ease, box-shadow 400ms ease, transform 400ms var(--ease-out);
}

.rate-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--bg-soft);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  transition: background-color 400ms ease, color 400ms ease, box-shadow 400ms ease, transform 400ms var(--ease-out);
}

.rate-step h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; }
.rate-step p { font-size: 0.92rem; color: var(--ink-soft); margin-inline: auto; }

/* Stato "acceso" dallo scorrere della corrente */
.rate-step.lit {
  border-color: var(--blue);
  box-shadow: 0 14px 40px -18px rgba(22, 102, 240, 0.55);
  transform: translateY(-4px);
}

.rate-step.lit .rate-badge {
  background-color: var(--blue);
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(22, 102, 240, 0.15);
  transform: scale(1.08);
}

/* --- BLOCCO 4: Docenti professionisti --------------------------- */
.perche-docenti-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.docenti-orbit {
  position: relative;
  width: 100%;
  height: clamp(300px, 36vw, 400px);
}

.docenti-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--white);
  box-shadow: 0 12px 28px -14px rgba(14, 27, 51, 0.45);
  will-change: transform;
}

.docenti-avatar svg { width: 100%; height: 100%; display: block; }

/* Sfondi circolari coordinati: palette fredda e armonica, alternata
   in modo ordinato tra gli avatar (il colore pilota lo sfondo via
   currentColor dentro i disegni SVG) */
.docenti-avatar.bg-a { color: #2E6FE8; }   /* blu */
.docenti-avatar.bg-b { color: #1F3A5F; }   /* blu notte */
.docenti-avatar.bg-c { color: #5A8FB5; }   /* grigio-azzurro */
.docenti-avatar.bg-d { color: #4DB8A8; }   /* teal */

/* ----------------------------------------------------------------
   12. PROVA SOCIALE
---------------------------------------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.stat { display: flex; flex-direction: column; gap: 0.2rem; }

.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--blue);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 0.95rem; color: var(--ink-soft); }

/* Nastro recensioni a scorrimento continuo */
.reviews-marquee {
  margin-top: 1rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.reviews-track {
  display: flex;
  width: max-content;
  animation: reviews-scroll 60s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .reviews-marquee:hover .reviews-track { animation-play-state: paused; }
}

.reviews-group { display: flex; gap: 1.4rem; padding-right: 1.4rem; }

@keyframes reviews-scroll { to { transform: translateX(-50%); } }

.review-card {
  width: 360px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.review-stars { display: flex; gap: 3px; color: #F5B301; }
.review-stars svg { width: 18px; height: 18px; fill: currentColor; }

.review-card blockquote p { font-size: 1rem; color: var(--ink); }

.review-card figcaption {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
}

.review-card figcaption span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------
   13. SEDI
---------------------------------------------------------------- */
.sedi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
}

/* Trattamento grafico (no foto): card bianca, icona pin, nome città + area.
   Stesso linguaggio visivo di .perche-cert / .faculty-card. */
.sede-card {
  position: relative;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.3rem;
  text-align: center;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .sede-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
}

.sede-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--blue-tint), #dbe8ff);
  color: var(--blue);
}
.sede-icon svg { width: 26px; height: 26px; }

.sede-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.sede-card p { font-size: 0.85rem; color: var(--ink-soft); }
.sede-address { margin-top: 0.35rem; font-size: 0.8rem; color: var(--ink-soft); }

/* ----------------------------------------------------------------
   14. FORM CONTATTI
---------------------------------------------------------------- */
#contatti {
  position: relative;
  isolation: isolate;
  color: var(--white);
  overflow: hidden;
}

.contatti-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 80% at 85% 0%, #15327a 0%, rgba(21, 50, 122, 0) 60%),
    radial-gradient(60% 70% at 0% 100%, rgba(16, 60, 160, 0.5) 0%, rgba(16, 60, 160, 0) 55%),
    linear-gradient(160deg, #0d2350 0%, var(--bg-deep) 100%);
}

.contatti-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.contatti-copy h2 { color: var(--white); }
.contatti-copy p { color: rgba(255, 255, 255, 0.78); margin-top: 0.9rem; }

.contatti-list {
  list-style: none;
  margin-top: 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.contatti-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.contatti-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 50%;
  background-color: rgba(62, 139, 255, 0.25);
  color: var(--blue-bright);
}

/* Form in vetro su fondo scuro */
.contatti-form {
  --line: rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: grid;
  gap: 1rem;
}

.field { display: grid; gap: 0.4rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.contatti-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.optional { font-weight: 400; color: rgba(255, 255, 255, 0.55); }

.contatti-form input,
.contatti-form select,
.contatti-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.contatti-form input::placeholder,
.contatti-form textarea::placeholder { color: rgba(255, 255, 255, 0.45); }

.contatti-form select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
}

.contatti-form select option { color: var(--ink); }

.contatti-form input:focus,
.contatti-form select:focus,
.contatti-form textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  background-color: rgba(255, 255, 255, 0.12);
}

.contatti-form textarea { resize: vertical; min-height: 80px; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.78) !important;
  line-height: 1.4;
}

.field-check input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--blue-bright);
  cursor: pointer;
}

.field-check a { color: var(--blue-bright); text-decoration: underline; }

.form-reassure {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 auto;
}

/* Honeypot anti-spam: nascosto agli umani */
.hp-field { position: absolute; left: -9999px; }

/* ----------------------------------------------------------------
   15. FOOTER
---------------------------------------------------------------- */
#footer {
  background-color: var(--bg-deep);
  color: rgba(255, 255, 255, 0.72);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo { color: var(--white); margin-bottom: 1rem; }
.footer-logo .nav-logo-text { color: var(--white); }

.footer-brand p { font-size: 0.95rem; max-width: 38ch; }

/* Icone social */
.footer-social {
  list-style: none;
  display: flex;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 200ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}

.footer-social svg { width: 19px; height: 19px; }

@media (hover: hover) and (pointer: fine) {
  .footer-social a:hover {
    background-color: var(--blue);
    color: var(--white);
    transform: translateY(-3px);
  }
}

.footer-social a:active { transform: translateY(-1px) scale(0.95); }

.footer-col h3 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: grid; gap: 0.65rem; }

.footer-col a, .footer-col li { font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); transition: color 200ms ease; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.4rem;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a { color: rgba(255, 255, 255, 0.5); transition: color 200ms ease; }
.footer-bottom a:hover { color: var(--white); }

/* ----------------------------------------------------------------
   16. CTA FISSA MOBILE
---------------------------------------------------------------- */
#cta-mobile {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 48;
  display: none;
  /* Nascosto: scende della propria altezza + un margine fisso, cosi'
     resta fuori dallo schermo senza lasciare un lembo visibile
     (una percentuale legata alla sua altezza non basta: a quella
     dimensione il bordo arrotondato sporgeva di 1-2px in basso) */
  transform: translate(-50%, calc(100% + 2rem));
  transition: transform 350ms var(--ease-out);
  box-shadow: var(--shadow-blue);
}

#cta-mobile.is-visible { transform: translate(-50%, 0); }
#cta-mobile:active { transform: translate(-50%, 0) scale(0.97); }

/* ----------------------------------------------------------------
   16.B FRECCIA GUIDA + EVIDENZIAZIONE PERCORSI
---------------------------------------------------------------- */
/* Striscia/linea guida: SVG sovrapposto a tutta la pagina, la linea
   si disegna dal riquadro cliccato fino alla sezione di destinazione */
#guide-line {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 45;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
}

#guide-line.is-active { opacity: 1; }

#guide-line-path {
  stroke: var(--blue);
  stroke-width: 5;
  filter: drop-shadow(0 4px 12px rgba(22, 102, 240, 0.4));
}

#guide-line-dot {
  fill: var(--blue);
  filter: drop-shadow(0 2px 8px rgba(22, 102, 240, 0.55));
}

/* Pulsazione del riquadro di destinazione */
.is-highlighted {
  animation: target-pulse 0.85s ease-out 3;
  border-radius: var(--radius-lg);
}

@keyframes target-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 102, 240, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(22, 102, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 102, 240, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #guide-line { display: none; }
  .is-highlighted { animation: none; }
}

/* ----------------------------------------------------------------
   17. REVEAL AL SCROLL (stato iniziale; GSAP anima verso visibile)
---------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); }

/* ----------------------------------------------------------------
   18. RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cat-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .accred-grid { grid-template-columns: repeat(3, 1fr); }
  .sedi-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .perche-certs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-inner > .btn-primary { display: none; }
  #menu-toggle { display: flex; }

  .paths-grid, .cat-grid, .feature-grid { grid-template-columns: 1fr; }

  .contatti-inner { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }

  #cta-mobile { display: inline-flex; }

  /* HERO piu' bassa su mobile: cosi' l'invito a scorrere (e il suo
     movimento verso l'alto) rientra nello schermo invece di finire
     sotto il fondo della sezione, fuori vista */
  #hero { padding-top: calc(var(--nav-h) + 0.75rem); padding-bottom: 1.5rem; }
  .hero-content { padding-block: 1rem; }
  #hero-eyebrow { margin-bottom: 0.5rem; }
  #hero-title { font-size: clamp(1.9rem, 7.5vw, 2.6rem); }
  #hero-subtitle { margin-top: 0.6rem; line-height: 1.5; }
  .hero-actions { margin-top: 0.9rem; gap: 0.7rem; }
  .hero-trust { width: 100%; justify-content: space-between; gap: 0.6rem; margin-top: 0.8rem; padding: 0.65rem 1rem; }
  .hero-partner { margin-top: 0.7rem; padding-top: 0.6rem; }
  .hero-partner img { width: 110px; }

  /* Sezione "Perché": tutto in colonna */
  .perche-block-inner,
  .perche-docenti-inner { grid-template-columns: 1fr; }
  .perche-block-alt .perche-text { order: 1; }
  .perche-block-alt .perche-media { order: 2; }
  .perche-certs { grid-template-columns: 1fr; }

  /* I tre step del pagamento si impilano; la linea diventa verticale */
  .rate-steps { flex-direction: column; gap: 1.6rem; }

  /* Stesso comportamento per le tappe della timeline */
  .timeline-steps { flex-direction: column; gap: 1.6rem; }

  .docenti-orbit { height: clamp(280px, 70vw, 340px); }
}

@media (max-width: 560px) {
  .accred-grid { grid-template-columns: repeat(2, 1fr); }
  .sedi-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-trust { flex-wrap: wrap; row-gap: 0.4rem; }
  .trust-divider { display: none; }
  .trust-item { flex-basis: calc(50% - 0.3rem); }
}

/* ----------------------------------------------------------------
   19. RIDUZIONE DEL MOVIMENTO
---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  #main-content { opacity: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  /* niente sfumature in movimento */
  .hero-glow { animation: none !important; }
  /* il nastro recensioni diventa sfogliabile col dito */
  .reviews-track { animation: none !important; }
  .reviews-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  /* sezione Perché: blocchi subito visibili, niente movimenti continui */
  .perche-reveal { opacity: 1 !important; transform: none !important; }
  .scroll-hint-dot { animation: none !important; opacity: 1 !important; }
  .scroll-invite-bar { animation: none !important; }
  .rate-step.lit { transform: none; }
  .timeline-step.lit { transform: none; }
}

/* ================================================================
   20. PAGINA CATEGORIA (modello riutilizzabile per le 6 categorie)
================================================================ */
.cat-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.4rem, 6vw, 4.5rem));
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  background:
    radial-gradient(70% 80% at 85% -20%, #eaf1ff 0, rgba(234, 241, 255, 0) 60%),
    radial-gradient(60% 70% at -5% 120%, #eef3ff 0, rgba(238, 243, 255, 0) 55%),
    var(--bg);
  overflow: hidden;
}

.cat-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 1.1rem;
  transition: gap 200ms var(--ease-out);
}
.cat-back svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) { .cat-back:hover { gap: 0.7rem; } }

.cat-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 0.8rem;
  max-width: 20ch;
}

.cat-intro {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 62ch;
}
.cat-intro strong { color: var(--ink); font-weight: 600; }

/* Griglia corsi, divisa in blocchi (es. "Per il personale ATA" /
   "Per i docenti"): stesso stile di card, testata propria per blocco */
.courses { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }

.courses-block + .courses-block { margin-top: clamp(3.5rem, 7vw, 5.5rem); }

.courses-block-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.courses-block-title { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }

.courses-block-count {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.course-card {
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
}

.course-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--blue-deep);
  background-color: var(--blue-tint);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}
.course-badge svg { width: 15px; height: 15px; }
.course-badge.is-cert { color: #0E5F57; background-color: rgba(77, 184, 168, 0.16); }

.course-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

.course-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}
.course-meta svg { width: 16px; height: 16px; }

.course-desc { color: var(--ink-soft); font-size: 0.97rem; flex: 1; }

.course-foot {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.course-price { display: flex; flex-direction: column; line-height: 1.1; }
.course-price .old { font-size: 0.8rem; color: var(--ink-soft); text-decoration: line-through; }
.course-price .now { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.course-price .req { font-weight: 600; color: var(--ink-soft); font-size: 1rem; }

.course-foot .btn { white-space: nowrap; }

/* Bottone contorno blu (per "Contatta l'azienda" sulle card bianche) */
.btn-line {
  background-color: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
@media (hover: hover) and (pointer: fine) {
  .btn-line:hover { background-color: var(--blue); color: var(--white); transform: translateY(-2px); }
}

@media (max-width: 1024px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .courses-grid { grid-template-columns: 1fr; }
  .course-foot { flex-direction: column; align-items: stretch; gap: 1rem; }
  .course-foot .btn { width: 100%; }
  .course-price { flex-direction: row; align-items: baseline; gap: 0.5rem; }
  .courses-block-head { flex-direction: column; align-items: flex-start; gap: 0.2rem; }

  /* Con le card impilate in colonna il gap tra i due blocchi (7vw, qui
     ridotto al minimo clampato) risultava troppo vicino al minimo: i
     blocchi sembravano attaccati. Spazio fisso e maggiore solo qui. */
  .courses-block + .courses-block { margin-top: 4.5rem; }
}

/* ================================================================
   21. PAGINA UNIVERSITÀ (layout diverso: card-facoltà, non corso)
================================================================ */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.faculty-card {
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .faculty-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
}

.faculty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--blue-tint), #dbe8ff);
  color: var(--blue);
  margin-bottom: 1rem;
}
.faculty-icon svg { width: 27px; height: 27px; }

.faculty-card h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }

.faculty-degrees {
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--blue-deep);
  background-color: var(--blue-tint);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.9rem;
}

.faculty-desc { color: var(--ink-soft); font-size: 0.95rem; flex: 1; margin-bottom: 1.4rem; }

.faculty-card .btn { width: 100%; }

/* Blocco vantaggi trasversali */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.benefit-item {
  background-color: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.benefit-icon svg { width: 24px; height: 24px; }

.benefit-item h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.benefit-item p { font-size: 0.88rem; color: var(--ink-soft); }

@media (max-width: 1024px) {
  .faculty-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .faculty-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   22. PAGINA LEGALE (PRIVACY / COOKIE)
---------------------------------------------------------------- */
.legal-page { padding-block: clamp(2rem, 5vw, 3rem) clamp(4rem, 8vw, 6rem); }

/* Avviso "bozza di lavoro, non ancora validata da un legale" */
.legal-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  max-width: 74ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: 1.1rem 1.3rem;
  background-color: #FFF6E5;
  border: 1px solid #F3D48E;
  border-radius: var(--radius);
  color: #8A5A00;
  font-size: 0.95rem;
  line-height: 1.55;
}
.legal-notice svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 0.1rem; }
.legal-notice strong { color: #6E4700; }

.legal-owner {
  max-width: 74ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: 1.4rem 1.6rem;
  background-color: var(--bg-soft);
  border-radius: var(--radius);
}
.legal-owner p { margin: 0; color: var(--ink); font-size: 0.98rem; }
.legal-owner a { color: var(--blue); font-weight: 600; }

.legal-block { max-width: 74ch; }
.legal-block + .legal-block { margin-top: clamp(1.8rem, 4vw, 2.4rem); }
.legal-block h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.legal-block p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; margin-bottom: 0.5rem; }
.legal-block ul { padding-left: 1.3rem; margin-block: 0.5rem; display: grid; gap: 0.4rem; }
.legal-block li { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.legal-block a { color: var(--blue); font-weight: 600; }
.legal-block .legal-todo { color: #B5790A; font-style: italic; }

.legal-updated { margin-top: clamp(2.5rem, 5vw, 3.5rem); color: var(--ink-soft); font-size: 0.9rem; font-style: italic; }
