/*
 * CoreForm Page Kit — stile predefinito delle pagine di contenuto/promo
 *
 * Origine: il design della pagina /promo-pre-immatricolazioni (06/09/2026),
 * estratto dal suo <style> inline e promosso a componente del design system.
 * Prefisso classi: .cfp-*  (CoreForm Page)
 *
 * Caricato da layouts/app.blade.php e layouts/app-coreform.blade.php.
 * Documentazione e scheletro di pagina: docs/DESIGN-KIT-PAGINE.md
 */

:root {
  --cfp-brand: var(--cf-primary, #D1184F);
  --cfp-brand-dark: #b01342;
  --cfp-brand-soft: #ff6d9c;       /* accento su fondo scuro */
  --cfp-brand-pale: #f8b4cb;       /* eyebrow / label su fondo scuro */
  --cfp-brand-rgb: 209, 24, 79;
  --cfp-ink: #0f172a;              /* titoli */
  --cfp-ink-2: #475569;            /* testo corrente */
  --cfp-ink-3: #5b6470;            /* testo secondario */
  --cfp-ink-inv: #cbd5e1;          /* testo su fondo scuro */
  --cfp-ink-inv-2: #94a3b8;
  --cfp-line: #eef0f3;             /* bordi card */
  --cfp-surface-alt: #f8fafc;      /* fondo sezioni alternate */
  --cfp-dark-1: #0f172a;
  --cfp-dark-2: #1e293b;
  --cfp-radius: 16px;
  --cfp-radius-sm: 10px;
}

/* ── Tipografia e utility ─────────────────────────────────────────── */
.cfp-h2 { font-size: 1.9rem; font-weight: 800; color: var(--cfp-ink); line-height: 1.2; margin-bottom: .5rem }
.cfp-lead { font-size: 1.08rem; color: var(--cfp-ink-2); line-height: 1.6 }
.cfp-note { color: var(--cfp-ink-3); font-size: 1.02rem }
.cfp-accent { color: var(--cfp-brand) }

/* ── Bottoni ──────────────────────────────────────────────────────── */
.cfp-btn { font-weight: 700; border-radius: var(--cfp-radius-sm); padding: .8rem 1.6rem; font-size: 1rem; border: none; transition: transform .15s, opacity .15s }
.cfp-btn:hover { transform: translateY(-2px) }
.cfp-btn--primary { background: var(--cfp-brand); color: #fff }
.cfp-btn--primary:hover { background: var(--cfp-brand-dark); color: #fff }
.cfp-btn--wa { background: #25d366; color: #fff }
.cfp-btn--wa:hover { color: #fff; opacity: .9 }

/* ── Sezioni ──────────────────────────────────────────────────────── */
.cfp-section { padding: 2.5rem 0 }
.cfp-section--lg { padding: 3rem 0 }
.cfp-section--tight { padding: 1.5rem 0 2.5rem }
.cfp-section--alt { background: var(--cfp-surface-alt) }

.cfp-intro { padding: 3rem 0 1rem; text-align: center }
.cfp-intro .cfp-lead { max-width: 760px; margin: 1rem auto 0 }

/* ── Hero scuro con box dati ──────────────────────────────────────── */
.cfp-hero { padding: 2rem 0 0 }
.cfp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem }

.cfp-herobox {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--cfp-dark-1) 0%, var(--cfp-dark-2) 100%);
  border-radius: var(--cfp-radius); box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: clamp(1.8rem, 4.5vw, 3.4rem) clamp(1.3rem, 4.5vw, 3.2rem);
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: clamp(1.6rem, 3.5vw, 3rem); align-items: center;
}
.cfp-herobox::after {
  content: ""; position: absolute; top: -45%; right: -10%; width: 55%; padding-top: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cfp-brand-rgb), .3) 0%, rgba(var(--cfp-brand-rgb), 0) 70%);
  pointer-events: none;
}
.cfp-herobox > * { position: relative; z-index: 1 }
.cfp-herobox-main { min-width: 0 }
.cfp-herobox-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--cfp-brand-pale); margin-bottom: .9rem }
.cfp-herobox-title { font-size: clamp(1.6rem, 4.2vw, 2.85rem); font-weight: 800; line-height: 1.14; color: #fff; margin: 0 0 .8rem }
.cfp-herobox-accent { color: var(--cfp-brand-soft) }
.cfp-herobox-sub { font-size: clamp(.98rem, 1.7vw, 1.12rem); line-height: 1.6; color: var(--cfp-ink-inv); margin: 0 0 1.4rem; max-width: 46ch }
.cfp-herobox-chip { display: inline-flex; align-items: center; gap: .6rem; background: var(--cfp-brand); color: #fff; font-size: .96rem; font-weight: 600; border-radius: 999px; padding: .6rem 1.15rem; line-height: 1.35 }
.cfp-herobox-chip strong { font-weight: 800; white-space: nowrap }
.cfp-herobox-foot { grid-column: 1/-1; margin: .4rem 0 0; font-size: .85rem; line-height: 1.5; color: var(--cfp-ink-inv-2); max-width: 70ch }

/* Colonna cifre/valori dentro l'hero */
.cfp-herobox-figures { display: flex; flex-direction: column; gap: .9rem }
.cfp-fig { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 1.1rem 1.3rem }
.cfp-fig--hi { background: rgba(var(--cfp-brand-rgb), .16); border-color: rgba(255,109,156,.45) }
.cfp-fig-name { display: block; font-size: .73rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cfp-ink-inv-2); margin-bottom: .45rem }
.cfp-fig--hi .cfp-fig-name { color: var(--cfp-brand-pale) }
.cfp-fig-val { display: block; font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; line-height: 1; color: #fff; margin-bottom: .35rem }
.cfp-fig--hi .cfp-fig-val { color: var(--cfp-brand-soft) }
.cfp-fig-lab { display: block; font-size: .88rem; line-height: 1.45; color: var(--cfp-ink-inv) }

/* ── Card con icona ───────────────────────────────────────────────── */
.cfp-card { background: #fff; border: 1px solid var(--cfp-line); border-radius: var(--cfp-radius); padding: 2rem 1.6rem; height: 100%; box-shadow: 0 2px 12px rgba(0,0,0,.04); transition: box-shadow .2s, transform .2s }
.cfp-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-3px) }
.cfp-card-icon { width: 54px; height: 54px; border-radius: 14px; background: rgba(var(--cfp-brand-rgb), .1); color: var(--cfp-brand); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem }
.cfp-card-title { font-size: 1.15rem; font-weight: 700; color: var(--cfp-ink); margin-bottom: .5rem }
.cfp-card p { color: var(--cfp-ink-3); margin: 0; font-size: .98rem; line-height: 1.55 }

/* ── Callout (fascia rosa chiara con icona piena) ─────────────────── */
.cfp-callout { display: flex; gap: 1.2rem; align-items: flex-start; background: linear-gradient(135deg, #fff, #fdf2f6); border: 1px solid #f6d9e3; border-radius: var(--cfp-radius); padding: 1.8rem }
.cfp-callout-icon { flex-shrink: 0; width: 54px; height: 54px; border-radius: 14px; background: var(--cfp-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem }

/* ── Step numerati ────────────────────────────────────────────────── */
.cfp-step { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border-radius: 14px; padding: 1.4rem; height: 100%; border: 1px solid var(--cfp-line) }
.cfp-step p { margin: 0; color: var(--cfp-ink-2) }
.cfp-step-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--cfp-brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center }

/* ── Tile elenco (voce con bordo sinistro + badge) ────────────────── */
.cfp-tile { background: #fff; border: 1px solid var(--cfp-line); border-left: 4px solid var(--cfp-brand); border-radius: var(--cfp-radius-sm); padding: .9rem 1.1rem; font-weight: 600; color: var(--cfp-ink); height: 100% }
.cfp-tile-badge { display: inline-block; background: var(--cfp-brand); color: #fff; font-size: .75rem; font-weight: 800; padding: .15rem .5rem; border-radius: 6px; margin-right: .6rem; vertical-align: middle }

/* ── Pannello bianco (mini-CTA laterale) ──────────────────────────── */
.cfp-panel { background: #fff; border: 1px solid var(--cfp-line); border-radius: var(--cfp-radius); padding: 1.8rem; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.04) }

/* ── Sezione CTA scura con form ───────────────────────────────────── */
.cfp-cta-section { padding: 3.5rem 0; background: linear-gradient(135deg, var(--cfp-dark-1), #3a0d1f) }
.cfp-cta-sub { color: rgba(255,255,255,.82); font-size: 1.05rem; max-width: 640px; margin: .5rem auto 0 }
.cfp-contacts { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center }
.cfp-contacts a { color: #fff; text-decoration: none; font-weight: 600 }
.cfp-contacts a:hover { color: #f6a; text-decoration: underline }

/* Form lead dentro la sezione scura (card bianca leggibile) */
.cfp-cta-section .hero-lead-form { width: 100%; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28); padding: 1.6rem 1.7rem }
.cfp-cta-section .hero-lead-form__head { text-align: left }
.cfp-cta-section .hero-lead-form__title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--cfp-dark-2); margin: 0 0 .5rem }
.cfp-cta-section .hero-lead-form__subtitle { font-size: .9rem; color: #64748b; margin: 0 0 1.1rem; line-height: 1.4 }
.cfp-cta-section .hlf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.cfp-cta-section .hlf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem }
.cfp-cta-section .hlf-field { margin-bottom: .75rem; display: flex; flex-direction: column }
.cfp-cta-section .hlf-field label { font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: .3rem }
.cfp-cta-section .hlf-field input, .cfp-cta-section .hlf-field select { width: 100%; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: .92rem; color: var(--cfp-dark-2); background: #fff; transition: border-color .2s, box-shadow .2s }
.cfp-cta-section .hlf-field input:focus, .cfp-cta-section .hlf-field select:focus { outline: none; border-color: var(--cfp-brand); box-shadow: 0 0 0 3px rgba(var(--cfp-brand-rgb), .12) }
.cfp-cta-section .hlf-field input.is-invalid, .cfp-cta-section .hlf-field select.is-invalid { border-color: #dc2626 }
.cfp-cta-section .hlf-error { color: #dc2626; font-size: .76rem; margin-top: .25rem }
.cfp-cta-section .hlf-consent { margin: .35rem 0 1rem }
.cfp-cta-section .hlf-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .78rem; color: var(--cfp-ink-2); line-height: 1.35; margin-bottom: .55rem; cursor: pointer }
.cfp-cta-section .hlf-check input { margin-top: .15rem; flex-shrink: 0; accent-color: var(--cfp-brand); width: 16px; height: 16px }
.cfp-cta-section .hlf-check a { color: var(--cfp-brand); text-decoration: underline }
.cfp-cta-section .hlf-footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap }
.cfp-cta-section .hlf-submit { background: var(--cfp-brand); color: #fff; border: none; border-radius: 8px; padding: .8rem 1.4rem; font-size: .95rem; font-weight: 700; cursor: pointer; transition: background .2s, transform .15s }
.cfp-cta-section .hlf-submit:hover { background: var(--cfp-brand-dark); transform: translateY(-1px) }
.cfp-cta-section .hlf-call { font-size: .78rem; color: #64748b; text-decoration: none; line-height: 1.3 }
.cfp-cta-section .hlf-call strong { color: var(--cfp-brand); font-size: 1.05rem; white-space: nowrap }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .cfp-herobox { grid-template-columns: 1fr }
  .cfp-herobox-sub { max-width: none }
}
@media (max-width: 768px) {
  .cfp-h2 { font-size: 1.5rem }
  .cfp-hero { padding: 1rem 0 0 }
}
@media (max-width: 575.98px) {
  .cfp-herobox { text-align: center }
  .cfp-herobox-chip { display: flex; text-align: center; width: 100%; justify-content: center }
  .cfp-herobox-foot { max-width: none }
  .cfp-fig { text-align: left }
  .cfp-cta-section .hlf-row { grid-template-columns: 1fr; gap: 0 }
  .cfp-cta-section .hero-lead-form { padding: 1.3rem 1.2rem }
}
