/* HURTADO LAB - fogli di stile. Scritti partendo dal telefono. */

/* Font caricati dal nostro hosting */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url("../font/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("../font/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../font/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../font/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --prugna: #7A2350;
  --prugna-scuro: #5A1838;
  --sole: #F4B400;
  --testo: #2B1F27;
  --testo-2: #5B4A54;
  --bianco: #FFFFFF;
  --grigio: #F7F4F6;
  --bordo: #E7DFE4;
  --chiaro-su-prugna: #F3E7EE;
  --errore: #A61B1B;
  --raggio: 14px;
  --titoli: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --testi: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bianco); color: var(--testo); font-family: var(--testi); font-size: 1.0625rem; line-height: 1.55; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--titoli); color: var(--prugna); line-height: 1.15; }
h1 { font-size: clamp(2.15rem, 8.6vw, 3.6rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--prugna); text-underline-offset: 2px; }
a:hover { color: var(--prugna-scuro); }
strong { font-weight: 600; }

:focus-visible { outline: 3px solid var(--prugna); outline-offset: 2px; border-radius: 4px; }
.scuro :focus-visible { outline-color: var(--sole); }

.icona { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nascosto { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.salta { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--prugna); color: #fff; border-radius: 0 0 12px 12px; }
.salta:focus { top: 0; color: #fff; }
.sentinella { position: absolute; top: 100vh; left: 0; width: 1px; height: 1px; pointer-events: none; }

.contenitore { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.contenitore--stretto { max-width: 800px; }
.sezione { padding: 56px 0; position: relative; }
.sezione--grigia { background: var(--grigio); }
.sezione--testa { padding-bottom: 32px; }
.introduzione { margin-top: 12px; color: var(--testo-2); max-width: 44em; font-size: 1.125rem; }

/* Pulsanti: alti almeno 48 px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border: 2px solid transparent; border-radius: 12px; font-family: var(--testi); font-size: 1.0625rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primario { background: var(--prugna); color: #fff; }
.btn--primario:hover { background: var(--prugna-scuro); color: #fff; }
.btn--secondario { background: #fff; color: var(--prugna); border-color: var(--prugna); }
.btn--secondario:hover { background: var(--grigio); color: var(--prugna-scuro); border-color: var(--prugna-scuro); }
.btn--sole { background: var(--sole); color: var(--prugna-scuro); }
.btn--sole:hover { background: #FFC933; color: var(--prugna-scuro); }
.btn--largo { width: 100%; }
.btn--testata { min-height: 48px; padding: 8px 13px; font-size: .9375rem; white-space: nowrap; }
.btn[disabled] { opacity: .65; cursor: default; }

/* Intestazione */
.testata { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--bordo); }
.testata__riga { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding-top: 6px; padding-bottom: 6px; }
.testata__logo { display: block; flex: 0 1 auto; }
.testata__logo img { height: 36px; width: auto; }

/* Loghi istituzionali: stessa altezza per tutti */
.istituzioni { background: #fff; border-bottom: 1px solid var(--bordo); }
.istituzioni .contenitore { padding-top: 8px; padding-bottom: 8px; }
.loghi-istituzioni { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.loghi-istituzioni img { height: 52px; width: auto; }

/* Barra degli enti */
.enti { background: #fff; border-bottom: 1px solid var(--bordo); }
.enti__riga { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; padding-bottom: 10px; }
.enti__dicitura { color: var(--testo-2); font-size: 1rem; }
.enti__loghi { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.enti__loghi a { display: flex; align-items: center; min-height: 56px; }

/* Stessa area visiva per loghi di proporzioni diverse */
.logo-ente { width: auto; }
.logo-ente--eitd { height: 34px; }
.logo-ente--ipam { height: 56px; }
.logo-ente--fcn { height: 48px; }

/* Hero */
.hero { padding: 32px 0 40px; }
.hero__griglia { display: grid; gap: 28px; }
.etichetta { display: inline-block; margin-bottom: 14px; color: var(--prugna); font-size: 1rem; font-weight: 600; }
.hero__evidenza { margin-top: 12px; font-family: var(--titoli); font-size: clamp(1.35rem, 5vw, 1.75rem); font-weight: 700; color: var(--prugna-scuro); line-height: 1.2; }
.hero__evidenza::after { content: ""; display: block; width: 72px; height: 5px; margin-top: 12px; border-radius: 3px; background: var(--sole); }
.hero__intro { margin-top: 16px; font-size: 1.125rem; }
.badge-lista { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge-lista li { padding: 6px 12px; border-radius: 12px; background: var(--sole); color: var(--prugna-scuro); font-size: 1rem; font-weight: 600; }
.azioni { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.avviso { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--bordo); border-left: 5px solid var(--sole); border-radius: 12px; background: var(--grigio); }
.avviso .icona { color: var(--prugna); margin-top: 1px; }
.hero__visuale { position: relative; height: 170px; overflow: hidden; border-radius: 16px; background: var(--grigio); }
.hero__visuale img { width: 100%; height: 100%; object-fit: cover; }
.hero__sole { position: absolute; width: 140px; height: 140px; left: 50%; top: 50%; margin: -70px 0 0 -70px; }

/* Vantaggi */
.tondo { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--sole); color: var(--prugna-scuro); }
.vantaggi { display: grid; gap: 14px; margin-top: 28px; }
.vantaggi li { padding: 20px; background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); }
.vantaggi h3 { margin-top: 12px; }
.vantaggi p { margin-top: 6px; color: var(--testo-2); }

/* Tabella di confronto: su telefono ogni riga diventa una scheda */
.confronto { display: block; width: 100%; margin-top: 28px; border-collapse: collapse; }
.confronto thead { display: none; }
.confronto tbody, .confronto tr, .confronto th, .confronto td { display: block; }
.confronto tr { margin-top: 12px; padding: 16px 18px; background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); }
.confronto tbody th { font-family: var(--titoli); font-size: 1.2rem; font-weight: 700; color: var(--prugna); text-align: left; }
.confronto td { margin-top: 10px; }
.confronto td::before { content: attr(data-voce); display: block; color: var(--testo-2); font-size: 1rem; }
.confronto td.confronto__iefp { font-weight: 600; }

/* I tre anni */
.anni { display: grid; gap: 14px; margin-top: 28px; }
.anni li { position: relative; padding: 20px; border: 1px solid var(--bordo); border-top: 5px solid var(--prugna); border-radius: var(--raggio); }
.anni__numero, .passi__numero { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--prugna); color: #fff; font-family: var(--titoli); font-size: 1.3rem; font-weight: 800; }
.anni h3 { margin-top: 12px; }
.anni p { margin-top: 6px; color: var(--testo-2); }
.riquadri { display: grid; gap: 14px; margin-top: 14px; }
.riquadro { display: flex; gap: 14px; padding: 20px; background: var(--grigio); border-radius: var(--raggio); }
.riquadro p { margin-top: 6px; color: var(--testo-2); }

/* I corsi */
.area { padding: 36px 0; }
.area--grigia { background: var(--grigio); }
.area__titolo { font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; }
.corso { display: grid; gap: 18px; padding: 20px; background: #fff; border: 1px solid var(--bordo); border-radius: 16px; }
.corso + .corso { margin-top: 16px; }
.spunte li { position: relative; padding-left: 30px; margin-top: 8px; }
.spunte li::before { content: ""; position: absolute; left: 3px; top: .34em; width: 15px; height: 8px; border-left: 3px solid var(--prugna); border-bottom: 3px solid var(--prugna); border-radius: 1px; transform: rotate(-45deg); }
.corso__info .spunte { margin-top: 12px; }
.corso__dove { margin-top: 14px; color: var(--testo-2); }
.corso__dove strong { color: var(--testo); }
.corso__iscrizione { display: flex; flex-direction: column; gap: 12px; }
.corso__scelta { font-weight: 600; }
.sede { display: grid; gap: 8px; padding: 16px; background: var(--grigio); border: 1px solid var(--bordo); border-radius: 12px; }
.sede .logo-ente { margin-bottom: 4px; justify-self: start; }
.sede__luogo span, .sede__codice span { display: block; color: var(--testo-2); font-size: 1rem; }
.sede__luogo { font-weight: 600; }
.sede__codice strong { display: block; font-size: 1.3rem; font-weight: 600; letter-spacing: .04em; color: var(--prugna-scuro); }
.btn--copia { min-height: 48px; background: #fff; color: var(--prugna); border-color: var(--prugna); }
.btn--copia:hover { background: var(--prugna); color: #fff; }
.btn--copia .icona { width: 20px; height: 20px; }

/* Aiuto all'iscrizione */
.sezione--prugna { background: var(--prugna); color: #fff; overflow: hidden; }
.sezione--prugna h2, .sezione--prugna h3 { color: #fff; }
.decoro-sole { position: absolute; width: 420px; height: 420px; right: -170px; top: -170px; opacity: .14; pointer-events: none; }
.aiuto { position: relative; display: grid; gap: 26px; }
.aiuto h2 + p { margin-top: 14px; font-size: 1.125rem; }
.aiuto__sportello { margin-top: 18px; padding-left: 14px; border-left: 5px solid var(--sole); }
.aiuto__scheda { padding: 22px; background: var(--prugna-scuro); border-radius: 16px; }
.aiuto__scheda .spunte li::before { border-color: var(--sole); }
.aiuto__scheda .btn { width: 100%; margin-top: 20px; }
.scuro a:not(.btn) { color: #fff; }
.scuro a:not(.btn):hover { color: var(--sole); }

/* Come ci si iscrive */
.passi { display: grid; gap: 22px; margin-top: 28px; }
.passi li { display: flex; gap: 14px; }
.passi p { margin-top: 6px; color: var(--testo-2); }
.passi__azione { margin-top: 26px; }

/* Enti */
.schede-enti { display: grid; gap: 14px; margin-top: 28px; }
.schede-enti li { display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); }
.schede-enti .logo-ente { margin-bottom: 14px; align-self: flex-start; }
.schede-enti .logo-ente--eitd { height: 42px; }
.schede-enti .logo-ente--ipam { height: 70px; }
.schede-enti .logo-ente--fcn { height: 60px; }
.schede-enti p { margin-top: 8px; color: var(--testo-2); }
.schede-enti a { display: inline-flex; align-items: center; min-height: 48px; margin-top: auto; padding-top: 8px; font-weight: 600; }

/* Domande */
.faq { margin-top: 24px; border-top: 1px solid var(--bordo); }
.faq details { border-bottom: 1px solid var(--bordo); }
.faq summary { position: relative; display: flex; align-items: center; min-height: 60px; padding: 12px 40px 12px 0; font-family: var(--titoli); font-size: 1.2rem; font-weight: 700; color: var(--prugna); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--prugna); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: none; }
.faq details p { padding: 0 0 18px; color: var(--testo-2); }

/* Contatti */
.contatti { margin-top: 24px; padding: 24px 20px; background: #fff; border: 1px solid var(--bordo); border-radius: 16px; display: grid; gap: 12px; }
.contatti__etichetta { color: var(--testo-2); font-size: 1rem; }
.contatti__numero { margin-top: -10px; font-family: var(--titoli); font-size: clamp(1.5rem, 6.4vw, 2rem); font-weight: 800; color: var(--prugna); }
.contatti__nota { color: var(--testo-2); font-size: 1rem; }

/* Footer */
.piede { background: var(--prugna); color: var(--chiaro-su-prugna); padding: 44px 0 110px; font-size: 1rem; }
.piede p { margin-top: 18px; max-width: 52em; }
.piede__logo { height: 78px; width: auto; }
.piede__indirizzi { margin-top: 18px; }
.piede__indirizzi li { margin-top: 6px; }
.finanziamento { margin-top: 24px; padding: 14px 16px; background: #fff; border-radius: 12px; }
.piede__link { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.piede__link li { display: flex; align-items: center; min-height: 48px; }
.link-bottone { min-height: 48px; padding: 0; border: 0; background: none; color: #fff; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-bottone:hover { color: var(--sole); }

/* Barra fissa su mobile */
.barra-mobile { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 8px; padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--bordo); }
.barra-mobile.visibile { display: flex; }
.barra-mobile .btn { flex: 1 1 0; padding-left: 8px; padding-right: 8px; }

/* Banner cookie: striscia in basso, mai a tutto schermo */
.banner-cookie { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; max-width: 560px; margin: 0 auto; padding: 14px 44px 14px 16px; background: #fff; border: 1px solid #B9A9B3; border-radius: 14px; box-shadow: 0 6px 24px rgba(43, 31, 39, .22); font-size: 1rem; line-height: 1.4; }
.banner-cookie__azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.banner-cookie__azioni .btn { min-height: 48px; padding: 8px; background: var(--prugna); color: #fff; }
.banner-cookie__azioni .btn:hover { background: var(--prugna-scuro); }
.banner-cookie__chiudi { position: absolute; top: 2px; right: 2px; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--testo-2); cursor: pointer; }
.banner-cookie__chiudi .linea { position: relative; width: 18px; height: 18px; }
.banner-cookie__chiudi .linea::before, .banner-cookie__chiudi .linea::after { content: ""; position: absolute; left: 8px; top: 0; width: 2px; height: 18px; background: currentColor; }
.banner-cookie__chiudi .linea::before { transform: rotate(45deg); }
.banner-cookie__chiudi .linea::after { transform: rotate(-45deg); }

/* Pagine accessorie */
.testata-semplice { padding: 12px 0; border-bottom: 1px solid var(--bordo); }
.testata-semplice img { height: 44px; width: auto; }
.documento { padding: 36px 0 56px; }
.documento h2 { font-size: 1.5rem; margin-top: 30px; }
.documento p, .documento ul { margin-top: 10px; }
.documento ul { list-style: disc; padding-left: 22px; }
.documento table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 1rem; }
.documento th, .documento td { padding: 8px; border: 1px solid var(--bordo); text-align: left; vertical-align: top; }
.scorrimento { overflow-x: auto; }
.bozza { margin-top: 16px; padding: 12px 16px; background: var(--sole); color: var(--prugna-scuro); border-radius: 12px; font-weight: 600; }
.centro { min-height: 60vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; }
.piede--semplice { padding-bottom: 44px; }

/* Da tablet in su */
@media (min-width: 600px) {
  .loghi-istituzioni { justify-content: center; gap: 44px; }
  .loghi-istituzioni img { height: 66px; }
  .enti__riga { flex-direction: row; align-items: center; gap: 28px; }
  .enti__loghi { gap: 40px; justify-content: flex-start; }
  .azioni { flex-direction: row; flex-wrap: wrap; }
  .vantaggi { grid-template-columns: 1fr 1fr; }
  .piede__link { flex-direction: row; flex-wrap: wrap; gap: 4px 26px; }

  /* La tabella torna a essere una tabella vera */
  .confronto { display: table; background: #fff; border: 1px solid var(--bordo); }
  .confronto thead { display: table-header-group; }
  .confronto tbody { display: table-row-group; }
  .confronto tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .confronto th, .confronto td { display: table-cell; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--bordo); text-align: left; vertical-align: top; }
  .confronto thead th { font-family: var(--titoli); font-size: 1.15rem; font-weight: 700; color: var(--prugna); }
  .confronto thead th.confronto__iefp { background: var(--prugna); color: #fff; }
  .confronto td.confronto__iefp { background: var(--grigio); }
  .confronto td::before { content: none; }
}

@media (min-width: 720px) {
  html { scroll-padding-top: 92px; }
  .testata__riga { min-height: 78px; }
  .testata__logo img { height: 62px; }
  .btn--testata { padding: 8px 20px; font-size: 1.0625rem; }
}

@media (min-width: 900px) {
  .sezione { padding: 80px 0; }
  .sezione--testa { padding-bottom: 40px; }
  .area { padding: 52px 0; }
  .hero { padding: 56px 0 64px; }
  .hero__griglia { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 56px; }
  .hero__visuale { height: 460px; }
  .hero__sole { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .vantaggi { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .anni { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .riquadri { grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
  .corso { grid-template-columns: 1fr 400px; gap: 40px; padding: 28px; }
  .aiuto { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
  .passi { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .schede-enti { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .contatti { padding: 28px; }
  .piede { padding-bottom: 44px; }
  .barra-mobile.visibile { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
