/* =========================================================
   TJG · passata UX (Claude, 09/11/2026)
   Solo layout, spaziature e ritmo di lettura.
   Nessun testo cambiato, nessun colore del brand cambiato.
   Caricato per ultimo: togliendo il <link> si torna a prima.
   ========================================================= */

/* ---------- 1. MOBILE: ritmo di lettura ----------
   Richiesta di Riccardo: mai più di 3 paragrafi di fila senza una pausa.
   Dal 4° paragrafo di uno stesso blocco (e poi ogni 3) compare un separatore
   sottile, nello stesso stile della classe .divider del sito.
   Il colore segue il testo, quindi funziona su sezioni chiare e scure. */
@media (max-width:760px){
  :where(section:not(.tight), .sec:not(.tight)) :where(div, article):has(> p:nth-of-type(4)) > p:nth-of-type(3n+4){
    margin-top:30px !important;
  }
  :where(section:not(.tight), .sec:not(.tight)) :where(div, article):has(> p:nth-of-type(4)) > p:nth-of-type(3n+4)::before{
    content:"";
    display:block;
    height:1px;
    margin:0 0 30px;
    background:linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent);
    opacity:.22;
  }

  /* Testi un filo più compatti su telefono: stesse parole, meno righe. */
  .article p{font-size:17px; line-height:1.6}
  .lead{font-size:18px !important; line-height:1.45 !important}
  p.big[style]{font-size:20px !important; line-height:1.3 !important}
  .prose p{line-height:1.6}
}

/* ---------- 2. DESKTOP: meno vuoto tra le sezioni (pagine interne) ----------
   Le pagine interne avevano 140px sopra e sotto ogni sezione: tra una sezione
   e l'altra restavano 280px di bianco. Si scende a 104/112. */
@media (min-width:981px){
  :root:has(.nav-in) .sec{padding-top:104px; padding-bottom:112px}
  :root:has(.nav-in) .sec.tight{padding-top:72px; padding-bottom:76px}
}

/* ---------- 3. DESKTOP: «La ricerca» senza metà pagina vuota ----------
   Le sezioni .article erano una colonna di testo di 680px al centro, con i due
   lati vuoti. Su schermi larghi diventano due colonne: titolo a sinistra
   (resta visibile mentre si legge) e testo a destra. */
@media (min-width:1100px){
  .sec .article{
    max-width:1120px;
    display:grid;
    grid-template-columns:minmax(0,5fr) minmax(0,7fr);
    column-gap:80px;
    align-items:start;
  }
  .sec .article > .sec-n{grid-column:1; grid-row:1; margin-bottom:14px}
  .sec .article > h2{
    grid-column:1; grid-row:2 / span 80;
    position:sticky; top:136px; align-self:start; margin-top:0;
  }
  .sec .article > :not(.sec-n):not(h2){grid-column:2}
  .sec .article > p:first-of-type{margin-top:0}
}

/* ---------- 4. DESKTOP: righe troppo lunghe nella home ----------
   Un paragrafo di #diverso arrivava a ~130 caratteri per riga. */
@media (min-width:981px){
  #diverso p{max-width:70ch}
}

/* ---------- 5. HOME MOBILE: colonne di testo troppo strette ----------
   Su telefono icona/numero/avatar stavano accanto al testo e lo stringevano
   a ~190-230px (8-11 righe per paragrafo). Ora stanno sopra il testo, che
   torna largo quanto la scheda. Le schede scorrevoli diventano un po' più larghe.
   "html body" serve a vincere sulle regole !important del CSS GHL della home,
   che è incorporato nella pagina e viene letto dopo questo file. */
@media (max-width:600px){
  html body .dr, html body .gift, html body .acad{grid-template-columns:1fr !important; row-gap:10px !important}
  html body .dr > .ic, html body .gift > .n, html body .acad > .mono{justify-self:start}
  html body .dream{padding-left:18px !important; padding-right:18px !important}
  html body .dr{padding-left:14px !important; padding-right:14px !important}
  html body .ex4.snap-m{grid-template-columns:repeat(4, 84vw) !important}
  html body .st3.snap-m{grid-template-columns:repeat(3, 84vw) !important}
  html body .pull{font-size:22px !important; line-height:1.3 !important}
  html body .def-big p{font-size:18px !important; line-height:1.45 !important}
}

/* ---------- 6. Immagini: le dimensioni dichiarate non devono fissare l'altezza ----------
   width/height sulle <img> servono solo a riservare lo spazio. Dove il CSS dà solo
   la larghezza (es. width:100% + aspect-ratio:16/10) l'altezza restava quella
   dell'attributo (fino a 1197px) e le schede partner diventavano altissime.
   :where() = specificità zero: ogni regola del sito che fissa un'altezza vince. */
:where(img[width][height]){height:auto}

/* ---------- 7. DESKTOP: titolo che accompagna il testo lungo ----------
   Nelle sezioni a due colonne (titolo a sinistra, testo lungo a destra) il titolo
   resta visibile mentre si legge, invece di lasciare una colonna bianca. */
@media (min-width:981px){
  .split > div:first-child:has(> h2, > h3, > .h2, > .h3):not(:has(img, video, figure)){
    position:sticky; top:136px; align-self:start;
  }
}

/* ---------- 8. Form: consenso privacy dentro il form ----------
   La regola dei campi (.form input{width:100%}) rendeva la casella larga quanto il form
   e spingeva il testo del consenso fuori dal riquadro (Percorsi formativi, Eventi). */
.form label:has(> input[type=checkbox]){
  display:flex !important; gap:12px; align-items:flex-start;
  font-weight:400; line-height:1.45; cursor:pointer;
}
.form input[type=checkbox]{
  width:20px !important; height:20px !important; min-width:20px; flex:0 0 20px;
  margin:2px 0 0 !important; padding:0 !important; accent-color:#4b4ff0;
}
.form label:has(> input[type=checkbox]) > span{flex:1 1 auto; min-width:0}

/* ---------- 9. Mobile: aree di tocco di almeno 44px ----------
   Voci del sottomenu (20px) e pulsante a tre righe (27px) erano troppo piccoli da toccare. */
@media (max-width:760px){
  html body .subnav-in a{display:inline-flex; align-items:center; min-height:44px}
  html body .nav-burger{min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center}
}

/* ---------- 10. Home desktop: spazio tra le sezioni come nelle pagine interne ---------- */
@media (min-width:981px){
  html body .hl_page-preview--content section.sec{padding-top:clamp(72px,7.5vw,108px); padding-bottom:clamp(76px,7.8vw,112px)}
}

/* ---------- 11. Home desktop: colonne corte accanto a colonne lunghe ----------
   «Perché dovresti credere…» accanto al video verticale e la scheda di Luca accanto
   al testo di «formazione»: la colonna corta resta visibile mentre si scorre l'altra,
   invece di lasciare un vuoto sotto. */
@media (min-width:981px){
  html body .why-block > .why-h{position:sticky; top:110px; align-self:start}
  html body .form-grid > .emp{position:sticky; top:110px; align-self:start}
}

/* ---------- 12. Mobile: link «freccia» delle schede più facili da toccare ---------- */
@media (max-width:760px){
  html body .partner a, html body .next a, html body .card a:not(.btn){display:inline-block; padding:10px 0}
}

/* ---------- 13. Annullo i tamponi LAYOUT_RICCARDO_V2/V3 di tjg-fixes.css ----------
   Le sezioni scure della home sembravano «non a tutta larghezza» perché nell'HTML c'erano
   2 </div> in più (introdotti in Fase 6), che chiudevano in anticipo il contenitore GHL.
   Riparato l'HTML (09/11, pass 4), le sezioni tornano a tutta larghezza da sole, come
   nell'originale. Le regole width:100vw servono più e su Windows creano una barra di
   scorrimento orizzontale (100vw include la barra verticale): le neutralizzo. */
html body section.sec.dark, html body section.dark.grain, html body section.dark.cta-sec,
html body .cta-sec.dark, html body footer.foot{
  width:auto !important; max-width:none !important;
  margin-left:0 !important; margin-right:0 !important;
}

/* Form di prenotazione della home: torna la scheda bianca del design originale
   (Cursor l'aveva trasformata in una banda scura per tamponare lo stesso problema). */
html body .c-row:has(#rs-prenota){background:transparent !important}
html body .c-column:has(#rs-prenota){
  background:#fff !important; border-radius:26px !important;
}
html body .c-column:has(#rs-prenota) .fcard-hd h3{color:#0e1220 !important}
html body .c-column:has(#rs-prenota) .fcard-hd > p:not(.fcard-kicker){color:#5e6577 !important}
html body .c-column:has(#rs-prenota) .fcard-kicker{color:#4b4ff0 !important}
@media (min-width:768px){
  html body .c-row:has(#rs-prenota){
    width:1160px !important; max-width:calc(100% - 40px) !important;
    margin:0 auto !important; padding:0 !important;
  }
  html body .c-column:has(#rs-prenota){
    width:45% !important; padding:32px !important; margin:0 !important;
  }
}
@media (max-width:767px){
  html body .c-column:has(#rs-prenota){
    width:auto !important; padding:22px !important; margin:0 20px 28px !important;
  }
}

/* ---------- 14. Link «informativa privacy» nei form riconoscibile come link ----------
   Lighthouse: colore troppo vicino al testo intorno (1.34:1) e nessuna sottolineatura. */
.form label a, html body .c-column:has(#rs-prenota) label a{
  text-decoration:underline; text-underline-offset:2px; text-decoration-thickness:1px;
}

/* TJG_THANKS_MODAL */
.tjg-thanks-overlay{
  position:fixed; inset:0; z-index:10050;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  background:rgba(9,13,26,.62);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  animation:tjgThanksIn .22s ease-out;
}
@keyframes tjgThanksIn{from{opacity:0}to{opacity:1}}
.tjg-thanks-card{
  width:min(100%,420px);
  background:#fff;
  color:#0E1220;
  border-radius:22px;
  padding:28px 24px 22px;
  box-shadow:0 28px 70px -28px rgba(0,0,0,.55);
  text-align:center;
}
.tjg-thanks-card .tjg-thanks-ico{
  width:52px; height:52px; margin:0 auto 14px;
  border-radius:16px;
  display:grid; place-items:center;
  background:linear-gradient(135deg,#4B4FF0,#7C5CFF);
  color:#fff; font:700 22px/1 system-ui,sans-serif;
}
.tjg-thanks-card h3{
  margin:0 0 8px;
  font:650 clamp(22px,3vw,26px)/1.2 var(--f-display,system-ui);
  letter-spacing:-.02em;
}
.tjg-thanks-card p{
  margin:0 0 18px;
  font:400 16px/1.5 var(--f-body,system-ui);
  color:#2A3042;
}
.tjg-thanks-card .btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:12px 22px; border:0; border-radius:999px;
  background:#4B4FF0; color:#fff; font:600 15px/1 var(--f-body,system-ui);
  cursor:pointer;
}
.tjg-thanks-card .btn:hover{filter:brightness(1.05)}
.tjg-thanks-inline{
  text-align:center; padding:24px 16px;
  font:600 18px/1.35 var(--f-display,system-ui);
}
body.tjg-thanks-open{overflow:hidden}

/* ARIA_RICCARDO_2026_11_10
   Feedback call 10/11: troppo appiccicato su mobile.
   Più margine tra paragrafi, titoli e pannelli — senza nuovi elementi. */
@media (max-width:760px){
  /* Paragrafi: aria tra un capoverso e l'altro */
  .prose > p + p,
  .article > p + p,
  .content > p + p,
  .wrap > p + p,
  .dcard > p + p,
  .why-h > p + p,
  .tile > p + p,
  .sec .container > p + p{
    margin-top: 1.35em !important;
  }

  /* Dopo un titolo, prima del primo testo/box */
  .prose > :is(h1,h2,h3,h4,.h1,.h2,.h3) + p,
  .article > :is(h1,h2,h3,h4,.h1,.h2,.h3) + p,
  .wrap > :is(h1,h2,h3,.h1,.h2,.h3) + p,
  .sec :is(.h1,.h2,.h3,h2,h3) + :is(p,.lead,.prose,.grid,.steps3,.nlist,.timeline,.tile,.vs){
    margin-top: 1.1em !important;
  }
  .sec :is(.h1,.h2,.h3,h2) + .grid,
  .sec :is(.h1,.h2,.h3,h2) + .steps3,
  .sec :is(.h1,.h2,.h3,h2) + .past,
  .sec :is(.h1,.h2,.h3,h2) + .next{
    margin-top: 28px !important;
  }

  /* Kicker/eyebrow → titolo */
  .kicker + :is(.h1,.h2,.h3,h1,h2,h3),
  .eyebrow + :is(.h1,.h2,.h3,h1,h2,h3),
  p.kicker + :is(.h1,.h2,h2){
    margin-top: 14px !important;
  }

  /* Liste e step: più gap tra voci/pannelli */
  .nlist, .blist{ gap: 20px !important; }
  .nlist > li + li, .blist > li + li{ margin-top: 6px; }
  .steps3{ gap: 22px !important; }
  .timeline{ gap: 18px !important; }
  .grid.g2, .grid.g3, .now-grid{ gap: 22px !important; }
  .step + .step,
  .tile + .tile{ margin-top: 4px; }

  /* Chip / pallini dopo un blocco */
  .chip-row, .chips{
    margin-top: 22px !important;
    margin-bottom: 10px !important;
  }

  /* Separatore CSS già presente: un filo più generoso */
  :where(section:not(.tight), .sec:not(.tight)) :where(div, article):has(> p:nth-of-type(4)) > p:nth-of-type(3n+4){
    margin-top: 40px !important;
  }
  :where(section:not(.tight), .sec:not(.tight)) :where(div, article):has(> p:nth-of-type(4)) > p:nth-of-type(3n+4)::before{
    margin: 0 0 36px !important;
  }

  /* Line-height un filo più aperto */
  .prose p, .article p, .dcard p{
    line-height: 1.7 !important;
  }

  /* Mid-cta / cut dopo testo */
  .mid-cta, .cut, hr.rule, .divider{
    margin-top: 28px !important;
    margin-bottom: 28px !important;
  }

  /* Timeline / box neri: spazio interno tra punti */
  .timeline .step,
  .step{
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
  .timeline .step + .step{ margin-top: 14px !important; }

  /* Split: aria tra colonne impilate */
  .split > * + *{ margin-top: 28px !important; }
}

/* Desktop: un po' più aria nei testi lunghi (senza gonfiare le sezioni) */
@media (min-width:761px){
  .prose > p + p,
  .article > p + p,
  .dcard > p + p{
    margin-top: 1.15em;
  }
  .steps3{ gap: 28px; }
  .nlist, .blist{ gap: 18px; }
}

/* Contrasto eyebrow/kicker chiari su scuro (feedback «bianco poco luminoso») */
.sec.night .eyebrow,
.night .eyebrow,
.dark .eyebrow,
.sec.night .kicker,
.dark .kicker{
  color: #fff !important;
  opacity: 1 !important;
}
.sec.night .eyebrow,
.night .eyebrow{
  font-weight: 700;
}


/* INTERLINEA_RICCARDO_2026_11_10
   Call 10/11 + screenshot hero: non solo margini tra blocchi.
   «Troppo piccicato» = anche interlinea stretta, specie dove c’è evidenziazione viola
   (le barre mark/b si sovrappongono se line-height è basso). */
@media (max-width:760px){
  /* Hero: aria verticale tra H1 → sottotitolo → chip → paragrafi */
  .hero .h1,
  header.hero .h1{
    line-height: 1.18 !important;
    margin-bottom: 0 !important;
  }
  .hero .hero-sub,
  header.hero .hero-sub{
    line-height: 1.75 !important;
    margin-top: 22px !important;
  }
  .hero .hero-sub + .hero-sub{
    margin-top: 28px !important;
  }
  .hero .h1 + .hero-sub{
    margin-top: 26px !important;
  }
  .hero .chip-row{
    margin-top: 28px !important;
    margin-bottom: 8px !important;
  }
  .hero .chip-row + .hero-sub{
    margin-top: 28px !important;
  }
  .hero .cut{
    margin-top: 32px !important;
    margin-bottom: 32px !important;
  }
  .hero .hero-claim{
    line-height: 1.55 !important;
    margin-top: 28px !important;
  }
  .hero .hero-ctas{
    margin-top: 28px !important;
    gap: 16px !important;
  }

  /* Evidenziazioni viola: più interlinea così le barre non si mangiano */
  .hero .hero-sub b,
  .hero p b,
  .hero mark.hl,
  p b, mark.hl{
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: .12em .08em !important;
    line-height: inherit;
  }

  /* Corpo: interlinea più aperta (oltre ai margin tra <p>) */
  .prose p, .article p, .dcard p, .why-h p,
  .sec p, .container > p, .wrap > p{
    line-height: 1.75 !important;
  }
  .lead, p.lead{
    line-height: 1.55 !important;
  }
  .h2, h2.h2, .h3, h3.h3{
    line-height: 1.28 !important;
  }
}

/* ARIA_IMMAGINI_2026_11_10 */
@media (max-width:760px){
  /* 1) Hero spazi */
  html body .hero .tjg-anchors{margin-bottom:16px}
  html body .hero .pre-pill{
    margin-bottom:20px;
    line-height:1.45;
    color:#fff;
    border-color:rgba(255,255,255,.4);
    font-size:12.5px;
  }
  html body .hero .chip-row{margin:28px 0 8px}
  html body .hero .stripe{margin:28px 0}

  /* 2) Home aria tra paragrafi (classi home) */
  html body :is(.sc3,.tool-panel) > * + *{margin-top:14px}
  html body :is(.ex-c,.exbox,.vs-c,.road,.im-card,.prova-side) > p + p{margin-top:22px}
  html body .chip-row + p{margin-top:22px}
  html body p.big, html body .after-pull, html body #prova p{line-height:1.6}
  html body #diverso li, html body .prose li{line-height:1.6}
  html body .study > p + p{margin-top:18px}

  /* note / bio aspetto */
  html body #team .person .pc p,
  html body #team .person p,
  html body #team .acad p,
  html body .acad p,
  html body #team .bio,
  html body #team p.bio{
    font-size:15px;
    line-height:1.55;
  }
  html body p.proof-note,
  html body #casi .proof-note,
  html body .proof-note{
    border-left:3px solid var(--viola, #7c5cff);
    padding:14px 16px;
    background:rgba(124,92,255,.06);
    border-radius:0 12px 12px 0;
    font-size:15.5px;
    line-height:1.6;
  }
}

/* figure break + schermate piattaforma */
figure.tjg-break{margin:40px 0 32px}
figure.tjg-break img{
  width:100%;
  height:auto;
  border-radius:18px;
  display:block;
}
figure.tjg-break.tjg-screen{
  background:#fff;
  border:1px solid #e5e5ea;
  border-radius:18px;
  padding:8px;
}
figure.tjg-break.tjg-screen img{
  object-fit:contain;
  background:#fff;
  max-height:none;
}
.partner.tjg-logo-card{
  background:#fff;
  padding:28px;
}
.partner.tjg-logo-card img{
  display:block;
  width:auto;
  max-width:100%;
  max-height:120px;
  height:auto;
  margin:0 auto;
  object-fit:contain;
}
