/* ==========================================================================
   Componenti di base (C01, C04, C10, C11, C15, C16, C24, C33, C34, C37, CTA finale, banner promo).
   I componenti delle feature (corsi, board, form, home…) stanno in parts/*.css (uno per feature).
   ========================================================================== */

/* C01 — Hero standard: blocco scuro arrotondato come il .page-header del tema, con il breadcrumb dentro */
.hero-std { position: relative; background-color: var(--primary-color); background-image: url('../img/dark-section-bg-image.png'); background-size: cover; background-position: top center; color: #fff; margin: 15px 15px 0; border-radius: 20px; overflow: hidden; }
.hero-std__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 50px; align-items: center; padding: 150px 15px 90px; position: relative; z-index: 1; }
.hero-std--compact .hero-std__inner { grid-template-columns: 1fr; padding: 150px 15px 80px; }
.hero-std--compact .hero-std__content { max-width: 900px; }
@media (max-width: 991px) { .hero-std { margin: 0; border-radius: 0; } .hero-std__inner, .hero-std--compact .hero-std__inner { grid-template-columns: 1fr; padding: 110px 15px 50px; } .hero-std__media { order: -1; } }
.hero-std__kicker { position: relative; display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; color: var(--primary-color); background: #fff; border-radius: 100px; padding: 11px 18px 11px 40px; margin-bottom: 18px; }
.hero-std__kicker::before { content: ''; position: absolute; width: 14px; height: 14px; top: 50%; left: 16px; transform: translateY(-50%); background: currentColor; -webkit-mask: url('../img/icon-asterisk.svg') center / contain no-repeat; mask: url('../img/icon-asterisk.svg') center / contain no-repeat; }
.hero-std__title { color: #fff; font-size: 60px; line-height: 1.1em; margin-bottom: 18px; }
@media (max-width: 991px) { .hero-std__title { font-size: 40px; } }
@media (max-width: 575px) { .hero-std__title { font-size: 32px; } }
.hero-std__sub { font-size: 18px; color: rgba(255,255,255,.85); max-width: 60ch; }
.hero-std__actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 26px; }
.hero-std__actions .btn-link-phone { color: #fff; }

/* Con la foto: sfondo a tutta larghezza, testo a sinistra sopra un velo scuro (come in home, ma più basso) */
.hero-std--photo .hero-std__inner { grid-template-columns: 1fr; padding: 170px 15px 110px; }
.hero-std--photo .hero-std__content { max-width: 760px; }
.hero-std--photo.hero-std--compact .hero-std__inner { padding: 160px 15px 100px; }
@media (max-width: 991px) { .hero-std--photo .hero-std__inner, .hero-std--photo.hero-std--compact .hero-std__inner { padding: 120px 15px 70px; } }
.hero-std__bg { position: absolute; inset: 0; overflow: hidden; }
.hero-std__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-std__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(2, 22, 35, .92) 0%, rgba(2, 22, 35, .80) 45%, rgba(2, 22, 35, .45) 100%); }
@media (max-width: 767px) { .hero-std__bg::after { background: linear-gradient(180deg, rgba(2, 22, 35, .78) 0%, rgba(2, 22, 35, .92) 100%); } }

/* Breadcrumb dentro l'hero */
.breadcrumb-inline { margin-bottom: 22px; }
.breadcrumb-inline ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: rgba(255,255,255,.8); }
.breadcrumb-inline li + li::before { content: '/'; margin-right: 8px; color: rgba(255,255,255,.55); }
.breadcrumb-inline a { color: #fff; text-decoration: none; }
.breadcrumb-inline a:hover { text-decoration: underline; }
.breadcrumb-inline [aria-current] span { color: var(--accent-light); font-weight: 600; }

/* Hero corso (C03) e hero home: stessa geometria del blocco scuro del tema */
.hero-course { margin: 15px 15px 0; border-radius: 20px; background-image: url('../img/dark-section-bg-image.png'); background-size: cover; padding-top: 140px !important; }
@media (max-width: 991px) { .hero-course { margin: 0; border-radius: 0; padding-top: 100px !important; } }
.is-home .hero.hero-home { margin: 15px 15px 0; border-radius: 20px; padding-top: 200px; }
@media (max-width: 991px) { .is-home .hero.hero-home { margin: 0; border-radius: 0; padding-top: 120px; } }

/* C04 — Risposta rapida */
.answer-first { border-left: 5px solid var(--accent-color); background: var(--bg-color); padding: 22px 26px; border-radius: 0 20px 20px 0; margin: 0 0 32px; }
.answer-first__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-color); margin-bottom: 6px; }
.answer-first__body { font-size: 18px; }
.answer-first__body p:last-child { margin-bottom: 0; }

/* C10 — Cosa consegniamo */
.deliverables { margin: 40px 0; padding: 24px 28px; border: 1px solid var(--divider-color); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.deliverables__title { font-size: 22px; margin-top: 0 !important; }
.deliverables__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.deliverables__list li { padding-left: 30px; position: relative; }
.deliverables__list li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-light); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230A2A43' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* C11 — Normativa di riferimento */
.legal-refs { margin: 40px 0; padding: 22px 26px; background: var(--bg-color); border-radius: var(--radius-lg); font-size: 15px; }
.legal-refs__title { font-size: 18px; margin-top: 0 !important; }
.legal-refs__list { padding-left: 1.2em; margin: 0; }
.legal-refs__list li { margin-bottom: 8px; }
.legal-refs__note { color: var(--text-muted); }
.legal-refs__all { margin: 12px 0 0; }

/* C12 — Attenzione / novità normativa */
.notice { display: flex; gap: 14px; padding: 18px 20px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-left-width: 5px; border-radius: var(--radius); margin: 24px 0; }
.notice__icon { flex-shrink: 0; width: 26px; height: 26px; }
.notice p:last-child { margin: 0; }
.notice--info { background: #eaf4fb; border-color: var(--accent-color); }

/* C15 — FAQ */
.faq { margin: 48px 0 24px; }
.faq__title { margin-bottom: 16px; }
.faq__item { border-bottom: 1px solid var(--divider-color); }
.faq__q { margin: 0; font-size: 18px; }
.faq__btn { width: 100%; text-align: left; background: none; border: 0; padding: 16px 4px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font: inherit; font-family: var(--accent-font); font-weight: 500; color: var(--primary-color); min-height: 48px; }
.faq__btn:hover { color: var(--accent-color); }
.faq__btn .chev { flex-shrink: 0; width: 10px; height: 10px; }
.faq__a { padding: 0 4px 18px; color: var(--text-color); }
.faq__a p:last-child { margin-bottom: 0; }

/* C16 — Ultimo aggiornamento */
.updated-line { font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--divider-color); padding-top: 14px; margin-top: 32px; }

/* C24 — Correlati */
.related { padding: clamp(44px, 6vw, 76px) 0 clamp(52px, 7vw, 88px); }
.related__title { margin-bottom: 26px; }
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.related + .related { padding-top: 0; }
.related__card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-height: 92px; padding: 20px 22px; background: #fff; border: 1px solid var(--divider-color); border-radius: var(--radius-lg); text-decoration: none; color: var(--text-color); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; position: relative; border-top: 4px solid var(--area, var(--accent-light)); }
.related__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text-color); }
.related__kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--area, var(--accent-color)); }
.related__label { font-family: var(--accent-font); font-weight: 500; font-size: 18px; color: var(--primary-color); }
.related__desc { font-size: 14px; color: var(--text-muted); }
.related__label { flex: 1 1 0; min-width: 0; }
.related__kicker, .related__desc { flex: 1 1 100%; }
.related__arrow { flex: 0 0 auto; margin-left: auto; color: var(--accent-color); font-weight: 700; font-size: 20px; line-height: 1; }
.children-grid { margin: 40px 0; }

/* C33 — Barra CTA sticky mobile */
.cta-mobile { display: none; }
@media (max-width: 767px) {
  .cta-mobile { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; box-shadow: 0 -2px 12px rgba(10,42,67,.18); }
  .cta-mobile a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 700; text-decoration: none; font-size: 16px; }
  .cta-mobile__call { background: var(--primary-color); color: #fff; }
  .cta-mobile__cta { background: var(--cta-color); color: #fff; }
  body { padding-bottom: 56px; }
}

/* C34 — Banner cookie */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200; max-width: 720px; margin: 0 auto; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(10,42,67,.25); padding: 18px 20px; border: 1px solid var(--divider-color); }
@media (max-width: 767px) { .consent { bottom: 64px; } }
.consent__inner { display: flex; flex-direction: column; gap: 12px; }
.consent__text { margin: 0; font-size: 15px; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.consent-modal { position: fixed; inset: 0; z-index: 1300; background: rgba(10,42,67,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.consent-modal__panel { background: #fff; border-radius: var(--radius-lg); max-width: 560px; width: 100%; padding: 28px; max-height: 90vh; overflow-y: auto; }
.consent-modal__row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--divider-color); font-size: 15px; }
.consent-modal__row input { margin-top: 5px; width: 18px; height: 18px; flex-shrink: 0; }
.consent-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

/* C37 — Stato vuoto */
.empty-state { padding: 28px; border: 1px dashed var(--divider-color); border-radius: var(--radius-lg); background: var(--bg-color); text-align: center; }
.empty-state__title { font-family: var(--accent-font); font-size: 20px; color: var(--primary-color); margin-bottom: 6px; }
.empty-state__text { color: var(--text-muted); max-width: 60ch; margin: 0 auto 14px; }
.empty-state__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* CTA finale (stile .cta-box del tema: blocco scuro arrotondato) */
.cta-final { position: relative; isolation: isolate; overflow: hidden; background-color: #04162a; background-image: linear-gradient(135deg, rgba(25, 68, 223, .30) 0%, rgba(2, 22, 35, 0) 58%), linear-gradient(315deg, rgba(47, 128, 184, .20) 0%, rgba(2, 22, 35, 0) 52%); color: #fff; padding: 90px 0; margin: 0 15px 15px; border-radius: 20px; }
@media (max-width: 991px) { .cta-final { margin: 0; border-radius: 0; padding: 60px 0; } }
.cta-final__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 48px; align-items: center; }
@media (max-width: 991px) { .cta-final__inner { grid-template-columns: 1fr; } }
.cta-final__title { color: #fff; font-size: 44px; line-height: 1.1em; margin-bottom: 14px; text-wrap: balance; }
@media (max-width: 767px) { .cta-final__title { font-size: 30px; } }
.cta-final__text { color: rgba(255,255,255,.85); font-size: 18px; margin: 0; }
.cta-final__actions { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.cta-final__phones { display: flex; flex-direction: column; gap: 4px; font-size: 16px; color: rgba(255,255,255,.8); line-height: 1.5; }
.cta-final__phones a { color: #fff; font-weight: 600; text-decoration: none; }
.cta-final__phones a:hover { text-decoration: underline; }

/* Banner / popup promozionale */
.promo-banner { position: fixed; z-index: 1150; }
.promo-banner--corner { right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); }
@media (max-width: 767px) { .promo-banner--corner { bottom: 64px; } }
.promo-banner--top { top: 0; left: 0; right: 0; }
.promo-banner--bottom { bottom: 0; left: 0; right: 0; }
@media (max-width: 767px) { .promo-banner--bottom { bottom: 56px; } }
.promo-banner--popup { inset: 0; background: rgba(10,42,67,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.promo-banner__inner { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(10,42,67,.25); padding: 20px 48px 20px 20px; display: flex; gap: 16px; align-items: center; }
.promo-banner--top .promo-banner__inner, .promo-banner--bottom .promo-banner__inner { border-radius: 0; background: var(--primary-color); color: #fff; justify-content: center; }
.promo-banner--top .promo-banner__title, .promo-banner--bottom .promo-banner__title, .promo-banner--top .promo-banner__text, .promo-banner--bottom .promo-banner__text { color: #fff; }
.promo-banner--popup .promo-banner__inner { max-width: 560px; flex-direction: column; text-align: center; padding: 32px; }
.promo-banner__img { width: 120px; height: auto; border-radius: var(--radius); flex-shrink: 0; }
.promo-banner--popup .promo-banner__img { width: 100%; }
.promo-banner__title { font-family: var(--accent-font); font-size: 18px; color: var(--primary-color); margin: 0 0 4px; }
.promo-banner__text { font-size: 15px; margin: 0 0 10px; }
.promo-banner__close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; background: none; border: 0; font-size: 28px; line-height: 1; color: inherit; }

/* Pagina 404 */
.page-404 { padding: clamp(40px, 6vw, 80px) 15px; max-width: 760px; }
.page-404__search { display: flex; gap: 10px; margin: 20px 0; }
.page-404__search input { flex: 1; padding: 12px 14px; border: 2px solid var(--divider-color); border-radius: var(--radius); font-size: 16px; }
.page-404__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.page-404__links a { display: inline-block; padding: 8px 14px; background: var(--bg-color); border-radius: 100px; text-decoration: none; font-weight: 600; }

/* Banner CTA: due aloni nei colori del brand che si muovono piano sotto il testo.
   Si fermano se il sistema chiede meno animazioni; il pattern topografico resta, per legare col footer. */
.cta-final::before, .cta-final::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(85px); opacity: .42; pointer-events: none; }
.cta-final::before { width: 46vw; max-width: 720px; aspect-ratio: 1; top: -28%; left: -8%; background: radial-gradient(circle, rgba(25, 68, 223, .85) 0%, rgba(25, 68, 223, 0) 70%); }
.cta-final::after { width: 38vw; max-width: 560px; aspect-ratio: 1; bottom: -34%; right: -6%; background: radial-gradient(circle, rgba(47, 128, 184, .65) 0%, rgba(47, 128, 184, 0) 70%); }
.cta-final__inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .cta-final::before { animation: cta-drift-a 26s ease-in-out infinite alternate; }
  .cta-final::after { animation: cta-drift-b 32s ease-in-out infinite alternate; }
}
@keyframes cta-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(9%, 14%, 0) scale(1.14); }
}
@keyframes cta-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to { transform: translate3d(-11%, -10%, 0) scale(.94); }
}
/* su schermi piccoli gli aloni restano fermi: il blur costa e il banner è già a tutta larghezza */
@media (max-width: 767px) {
  .cta-final::before, .cta-final::after { animation: none; filter: blur(60px); opacity: .35; }
  .cta-final::before { width: 90vw; top: -20%; }
  .cta-final::after { width: 70vw; bottom: -22%; }
}
