/* ========== MOBILE CSS ========== */

/* Forza comportamento mobile su Safari */
@supports (-webkit-touch-callout: none) {
  html, body {
    -webkit-text-size-adjust: 100%;
    height: 100%;
    overflow-x: hidden;
  }
}
/* Helper visibilità: mobile di default; desktop inverte */
.mobile-only  { display: block; }
.desktop-only { display: none;  }

/* Rispetta sempre l’attributo hidden */
[hidden]{ display:none !important; }

/* Offset per ancore sotto la navbar sticky */
:root { --navH: 64px; }
html  { scroll-padding-top: calc(var(--navH) + 8px); }
/* Safe-area per iPhone con notch */
:root { --safe-top: env(safe-area-inset-top, 0px); }
:root { --safe-bottom: env(safe-area-inset-bottom, 0px); }

/* ========== FIX larghezza mobile ========== */
/* (prima queste regole erano in min-width, quindi non si applicavano su mobile) */
html, body { 
  width:100%; 
  max-width:none; 
  margin:0; 
  padding:0; 
  overflow-x:hidden; }
section, .section, .container { 
  width:100%; 
  max-width:100%; }
img, video { 
  max-width:100%; 
  height:auto; 
  display:block; }

  /* nascondi la nav desktop in mobile */
.main-nav { display:none !important; }
  

/* ========== NAV MOBILE (hamburger) ========== */
.mobile-nav{
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(0,0,0,.9);
  color:#fff;
  padding:.5rem .75rem;
  position: relative; /* per posizionare il dropdown */
}
.mobile-nav-header{
  display:flex; align-items:center; justify-content:space-between;
}

/* Bottone hamburger (animazione in X) */
.hamburger{
  width:40px; height:32px; position:relative;
  border:2px solid #ffc44d; border-radius:8px;
  background:transparent; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.hamburger span{
  position:absolute; left:8px; right:8px; height:2px; background:#fff;
  transition:transform .25s ease, opacity .2s ease, top .25s ease;
}
.hamburger span:nth-child(1){ top:9px;  }
.hamburger span:nth-child(2){ top:15px; }
.hamburger span:nth-child(3){ top:21px; }
.mobile-nav.is-open .hamburger span:nth-child(1){ top:15px; transform:rotate(45deg); }
.mobile-nav.is-open .hamburger span:nth-child(2){ opacity:0; }
.mobile-nav.is-open .hamburger span:nth-child(3){ top:15px; transform:rotate(-45deg); }

/* Select valuta (mobile) */
#currency-switcher-mobile{
  background:#fff; color:#000; border-radius:6px; padding:.25rem .4rem;
}

/* Dropdown menu a discesa con slide */
.mobile-menu{
  position:absolute; left:0; right:0; top:100%;
  background:rgba(0,0,0,.96);
  list-style:none; margin:0; padding:.5rem 0;
  display:flex; flex-direction:column; gap:.25rem;
  transform: translateY(-8px); opacity:0; pointer-events:none;
  transition: transform .28s ease, opacity .28s ease;
}
.mobile-nav.is-open .mobile-menu{
  transform: translateY(0); opacity:1; pointer-events:auto;
}
.mobile-menu a{
  color:#fff; text-decoration:none; display:block; padding:.65rem 1rem;
}
.mobile-menu a:hover{ background:rgba(255,255,255,.08); }

/* Overlay pagina quando il menu è aperto */
.mobile-overlay{
  position:fixed; inset:0; z-index:9999;
  background:rgba(0,0,0,.35); backdrop-filter: blur(2px);
}

/* ========== HERO full-screen su mobile ========== */
#hero{
  position: relative;
  min-height: calc(100vh - var(--navH, 64px)); /* fallback per Safari/Android vecchi */
  min-height: -webkit-fill-available;          /* altro fallback Safari */
  min-height: calc(100dvh - var(--navH, 64px)); /* preferito nei browser moderni */
  display:flex;
  align-items:center; 
  justify-content:center;
  margin:0;
  padding-bottom: max(1rem, var(--safe-bottom)); /* evita sovrapposizione con home bar */
}
#hero .bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;            
}
#hero > div{ 
  position:relative; 
  width:100%; 
  min-height:100%; }
  
#hero .hero-content{ 
  position:relative; 
  z-index:1; 
  text-align:center;
  padding-top: 30rem;
}
#hero .hero-content h1{ 
  line-height: 3.5rem;
}
#hero .hero-content p{ 
  margin-top: 10rem;
  line-height: 1.5rem;
}
#hero .cta{
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
/* Applica gli stessi stili dei bottoni anche ai link .cta */
button.cta,
a.cta {
  display: inline-block;
  background: #fc0303;
  color: #ffffff;
  font-weight: bold;
  font-family: var(--main-font);
  font-size: var(--main-size);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  text-decoration: none; /* rimuove sottolineatura nei link */
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease;
}
button.cta:hover,
a.cta:hover {
  background: #ff0000;
  color: #000;
}
button.cta:active,
a.cta:active {
  background: #e00000;
}

/* === MOBILE ABOUT OVERRIDES (≤768px) === */

  /* sezione più aderente ai bordi e pattern più fitto */
#about{
  padding: 1rem 1.8rem;
  margin-bottom: 0rem;
}
/* Applica offset agli arrivi via #ancora */
#about { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

  /* headline/intro più leggibile e ampia */
.about-title{
  margin-bottom: .75rem; 
}
#about p.intro{
  padding: 0 .25rem;
  font-size: 4rem;
  line-height: 0.8;
}

  /* layout: immagine blocco, testo a tutta larghezza */
.about-row{
  display: block;
  padding: 0;              /* ← toglie i 7rem laterali */
  margin-bottom: 1.25rem;
}
.about-img{
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto 1rem;
}
.about-text{
  width: 100%;
  text-align: left;
  padding: 1rem;              /* meno “scatola”, più respiro */ 
  font-size: clamp(16px, 4.3vw, 18px);
  line-height: 1.6;
}

  /* mission: niente colonne, testo full-bleed */
.our-mission{
  display: block;
  padding: 0;              /* ← toglie i 7rem laterali */
  margin-top: .5rem;
}
.our-mission-text{
  max-width: none;
  text-align: left;
  padding: 0;
  font-size: clamp(16px, 4.3vw, 18px);
  line-height: 1.6;
}
.mission-logo{
  display: block;
  max-width: 220px;
  margin: 1rem auto 0;
}
.carousel-strip img {
  margin-top: 2rem;
  margin-bottom: 0 !important;
  display: block;
  max-height: 330px;
}
#about .carousel-strip{
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

/* 2) allinea la pista al comportamento di learning (niente padding orizzontale) */
#about .carousel-track,
#about .carousel-track-large{
  padding: 12px 0;
}
/* elenco “What makes us different”: una colonna, bordo a filo */
.about-text-different{
  max-width: 100%;
  padding: 0 .25rem;
}
.two-column-list{
  columns: 1;
  margin-left: 1rem;
  column-gap: 0;
  margin-bottom: 0;
}
  /* MOBILE (≤768px): righe orizzontali con snap */
#about .team-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  justify-content: flex-start !important;
  padding-left: 0;      /* ← AGGIUNGI */
  padding-right: 0;
}
#about .team-row::-webkit-scrollbar {
  display: none;
}
#about .team-member {
  width: 100%;
  flex: 0 0 100%;              /* Ogni card occupa esattamente 100% della viewport */
  scroll-snap-align: start;    /* Fa sì che lo scroll si "ancori" all'inizio di ogni card */
  box-sizing: border-box;  
}
#about .team-member img {
  height: auto;
  width: 100%;
  display: block;
}
/* puntini sotto alle card */
#team-dots.cards-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0.8rem 0 0;
}
#team-dots.cards-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #d0d0d0;
}
#team-dots.cards-dots button[aria-current="true"] {
  background: #333;
}

/* MOBILE (≤768px): how to join */
#how {
  padding: 1.5rem 1.5rem; /* meno spazio generale */
}
/* Applica offset agli arrivi via #ancora */
#how { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

#how .about-title{
  margin-bottom: 0rem;
  text-align: center;
}
.how-step h3 {
  margin-top: 1rem;
  margin-bottom: 0rem;
}
.how-step p {
  font-size:var(--main-size);
  line-height: 1.4;
  margin-bottom: 0;
}
.how-icon {
  width: 280px;
  margin-bottom: 0.5rem;
}
.how-steps-icons {
  gap: 1rem;
  padding: 1rem 0;
}
.how-step:not(:last-child)::after{
  display: none !important; 
}

/* MOBILE (≤768px): learning */
#learning {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Applica offset agli arrivi via #ancora */
#learning { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

#learning .carousel-strip {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
#learning .carousel-strip img {
  margin-bottom: 0 !important;
  display: block;
  max-height: 330px;
}
/* MOBILE (≤768px): pricing */
#pricing {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Applica offset agli arrivi via #ancora */
#pricing { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

#pricing .about-title {
  margin-top: 2rem;
}
.tier-1-window,
.tier-2-window,
.tier-3-window{
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  justify-content: flex-start ;
  padding-top: 1rem;
  padding-bottom: 0.25rem;
  background-color: transparent;
}

.tier-1-window::-webkit-scrollbar,
.tier-2-window::-webkit-scrollbar,
.tier-3-window::-webkit-scrollbar{
  display: none;
}
.tier-1-window .flip-card,
.tier-2-window .flip-card,
.tier-3-window .flip-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  margin-right: 1rem;
  max-height: 80vh;
  margin-bottom: 0;
}
/* Migliora layout mobile per la seconda window (tier-2):
   - Altezza coerente a viewport
   - Contenuto del retro scrollabile e centrato
   - Tipografia più compatta e word-wrap sicuro */
.tier-2-window .flip-card {
  height: 78vh;
  max-height: 78vh;
}
.tier-2-window .flip-card-inner { height: 100%; }
.tier-2-window .flip-card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem;
  /* Override della variabile globale con dimensione esplicita più compatta */
  font-size: clamp(12px, 3.2vw, 14px);
}
.tier-2-window .flip-card-back .course-description {
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-size: clamp(14px, 5.2vw, 16px);
}
.tier-2-window .flip-card-back p {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Rimuovi margini extra per l'ultimo elemento */
.tier-1-window .flip-card:last-child,
.tier-2-window .flip-card:last-child,
.tier-3-window .flip-card:last-child {
  margin-right: 0;
}
  /* Dots */
#pricing .pricing-dots {
display: flex;
justify-content: center;
gap: 8px;
padding: 0.1rem 0 0;
}
#pricing .pricing-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #ccc;
}
#pricing .pricing-dots button[aria-current="true"] {
  background: #333;
}
/* MOBILE (≤768px): reviews */
#reviews {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Applica offset agli arrivi via #ancora */
#reviews { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

/* Nascondi frecce in mobile */
.reviews-arrow {
  display: none !important;
}
  /* Layout 1 card per volta */
#reviewsTrack {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
}
#reviewsTrack .card {
  flex: 0 0 100%;
  max-width: 100%;
  scroll-snap-align: center;
}
  /* stile Card recensioni */
section#reviews .cards.reviews .card {
  flex: 0 0 100%;      /* una card per volta */
  max-width: 100%;     
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;    /* sfondo leggibile */
  border: 2px solid #000; 
  border-radius: 8px;
  overflow: hidden;    /* bordi tondi anche sull'immagine */
}
/* Immagine */
section#reviews .cards.reviews .card img {
  width: 100%;
  height: auto;
  max-height: 300px;   /* evita immagini troppo alte su mobile */
  object-fit: cover;
}

/* Testo sotto immagine */
section#reviews .cards.reviews .card > div {
  padding: 1rem;
  text-align: center;
}
section#reviews .cards.reviews blockquote {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}
section#reviews .cards.reviews cite {
  font-size: 0.9rem;
  font-style: normal;
  color: #333;
}
/* Stile puntini */
.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.reviews-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
}
.reviews-dots button.active {
  background: #333;
}
/* MOBILE (≤768px): FAQ */
#faq {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Applica offset agli arrivi via #ancora */
#faq { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }

/* MOBILE (≤768px): contact */
#contact {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Applica offset agli arrivi via #ancora */
#contact { scroll-margin-top: calc(var(--navH) + var(--safe-top)); }
