/*
 * styles.css — Landing /compara-p/ (landing.laureati.net/compara-p/)
 *
 * CSS autonomo: NON dipende da /styles.css o /styles.min.css del sito principale.
 * Include reset minimo, body font (Poppins caricato da <head> via Google Fonts),
 * tutti gli stili del form multi-step, hero, progress bar, autocomplete città.
 *
 * Palette:
 *   Primario:  #c4d83a  (lime/giallo)
 *   Scuro:     #0f172a  (navy)
 *   Success:   #10b981  (verde)
 *   Testo:     #111827 / #1e293b
 *   Muted:     #64748b
 *   Border:    #d1d5db / #e5e7eb
 *   BG:        #f8fafc
 *
 * Font: Google Fonts — Poppins 400/500/600/700 (link nel <head> di index.php).
 */

/* ============================================================
   Reset minimo (nessun styles.min.css principale incluso)
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
}

a {
  color: #c4d83a;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: #c4d83a;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(196, 216, 58, 0.35);
}
.btn-primary:hover {
  background: #b5ca28;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 216, 58, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   Hero
   ============================================================ */
.test3-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 2.5rem 0 2rem;
  color: #f9fafb;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.test3-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(196, 216, 58, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.test3-hero .container {
  position: relative;
  z-index: 1;
}
.test3-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c4d83a;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.9rem;
  background: rgba(196, 216, 58, 0.12);
  border-radius: 999px;
  border: 1px solid rgba(196, 216, 58, 0.25);
}
.test3-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 750;
  margin: 0 0 1rem;
  line-height: 1.15;
}
.test3-hero .highlight {
  color: #c4d83a;
}
.test3-hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin: 0 auto 1.5rem;
  max-width: 42rem;
  line-height: 1.6;
}
.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.75rem 0 1.5rem;
}
.hero-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  font-size: 0.9rem;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-benefit-icon {
  width: 20px;
  height: 20px;
  color: #c4d83a;
  flex-shrink: 0;
}
.hero-trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.75;
}
.hero-trust-logos img {
  height: 35px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  transition: opacity 0.2s;
}
.hero-trust-logos img:hover {
  opacity: 1;
}

/* ============================================================
   Form section
   ============================================================ */
.test3-form-section {
  padding: 3rem 0 4rem;
  background: #f8fafc;
  flex: 1;
}
.test3-form-wrap {
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 0;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.form-social-proof {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 1.5rem 2rem;
  text-align: center;
  color: #f9fafb;
}
.form-social-proof-stat {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
}
.form-social-proof-stat strong {
  color: #c4d83a;
  font-weight: 700;
  font-size: 1.1rem;
}
.form-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(196, 216, 58, 0.15);
  border-radius: 999px;
  font-size: 0.8rem;
  color: #c4d83a;
  font-weight: 600;
  border: 1px solid rgba(196, 216, 58, 0.3);
}
.trust-badge svg {
  width: 14px;
  height: 14px;
}

/* ============================================================
   Form journey (percorso narrativo sopra il form)
   ============================================================ */
.form-journey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 700px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1.5rem;
  background: #f1f5f9;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}
.form-journey-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.form-journey-step.is-active { opacity: 1; }
.form-journey-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.form-journey-step.is-active .form-journey-num {
  background: #c4d83a;
  color: #0f172a;
  border-color: #c4d83a;
}
.form-journey-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  transition: color 0.2s;
}
.form-journey-step.is-active .form-journey-label { color: #0f172a; }
.form-journey-arrow {
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .form-journey { gap: 0.4rem; padding: 0.75rem 1rem; }
  .form-journey-label { font-size: 0.72rem; }
  .form-journey-num { width: 22px; height: 22px; font-size: 0.68rem; }
}

/* ============================================================
   Progress bar
   ============================================================ */
.form-progress-bar {
  background: #e5e7eb;
  height: 22px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.form-progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #c4d83a 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  position: absolute;
  left: 0;
  top: 0;
}
.form-progress-text {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
  transition: all 0.3s ease;
}

/* ============================================================
   Form steps
   ============================================================ */
.form-step {
  display: none;
  animation: fadeSlideIn 0.35s ease-out;
}
.form-step.is-visible {
  display: block;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-nav-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: center;
}
.form-nav-buttons .btn {
  flex: 1;
  max-width: 280px;
}
.form-nav-buttons .btn-back[style*="visibility: hidden"] {
  display: none;
}
.form-nav-buttons .btn-back {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.form-nav-buttons .btn-back:hover {
  background: #e2e8f0;
}
.form-nav-buttons .btn-submit-final {
  white-space: nowrap;
  font-size: 0.95rem;
}
.form-step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  text-align: center;
}
.form-step-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 2rem;
  text-align: center;
  line-height: 1.5;
}
.test3-form-inner {
  padding: 2.5rem 2rem 2rem;
}
.test3-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.form-section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Form fields
   ============================================================ */
.test3-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0;
}
.test3-form .field > span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
}
.test3-form .field select,
.test3-form .field input[type="text"],
.test3-form .field input[type="email"],
.test3-form .field input[type="tel"] {
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: 0.85rem 1rem;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
}
.test3-form .field select:focus,
.test3-form .field input:focus {
  outline: none;
  border-color: #c4d83a;
  box-shadow: 0 0 0 3px rgba(196, 216, 58, 0.15);
}
.test3-form .corso-field-locked select {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  opacity: 0.7;
}
.test3-form .corso-field-locked > span {
  color: #94a3b8;
}
.test3-form .field-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}
.test3-form .field-valid {
  border-color: #10b981 !important;
}
.test3-form .field-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  width: 100%;
}
.test3-form .field-row-2col .field {
  margin-bottom: 0;
  min-width: 0;
}
.test3-form .checkbox-field {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.test3-form .checkbox-field input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.test3-form .checkbox-field span {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.4;
  color: #475569;
}
.test3-form .checkbox-field a {
  color: #475569;
}

/* ============================================================
   Range / Budget slider
   ============================================================ */
.test3-form .range-wrap {
  display: grid;
  gap: 0.6rem;
}
.test3-form .range {
  width: 100%;
  height: 6px;
  accent-color: #c4d83a;
}
.test3-form .range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.test3-form .range-value {
  font-size: 1.5rem;
  font-weight: 750;
  color: #c4d83a;
}
.form-hint-light {
  font-size: 0.8rem;
  color: #64748b;
}

/* ============================================================
   Submit / reassurance
   ============================================================ */
.form-submit-wrap {
  margin-top: 2rem;
  text-align: center;
}
.form-submit-wrap .btn {
  min-width: 280px;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.form-submit-reassurance {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.form-submit-reassurance svg {
  width: 16px;
  height: 16px;
  color: #10b981;
}

/* ============================================================
   Error banner
   ============================================================ */
.universita-form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ============================================================
   Sticky CTA mobile
   ============================================================ */
.sticky-cta-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #ffffff;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 2px solid #c4d83a;
  display: none;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-cta-mobile.is-visible {
  transform: translateY(0);
}
.sticky-cta-mobile .btn {
  width: 100%;
  padding: 1rem;
  font-weight: 650;
}

/* ============================================================
   City autocomplete dropdown
   ============================================================ */
.city-suggest {
  position: fixed;
  z-index: 100040;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0.9rem;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
  padding: 0.35rem;
  display: none;
  max-height: min(320px, 40vh);
  overflow: auto;
}
.city-suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.7rem;
  border-radius: 0.7rem;
  cursor: pointer;
  font: inherit;
  color: #0f172a;
}
.city-suggest-item:hover,
.city-suggest-item[aria-selected="true"] {
  background: #f1f5f9;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .sticky-cta-mobile {
    display: none !important;
  }
  .test3-hero {
    padding: 2rem 0 1.5rem;
  }
  .hero-benefits {
    display: none;
  }
  .hero-trust-logos {
    margin-top: 1.25rem;
    gap: 1rem;
    padding: 0 1rem;
  }
  .hero-trust-logos span {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }
  .form-progress-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 26px;
    background: #e5e7eb;
  }
  .form-progress-text {
    font-size: 0.7rem;
  }
  .form-social-proof {
    padding: 1rem 1.25rem;
  }
  .form-social-proof-stat {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  .form-social-proof-stat strong {
    font-size: 1rem;
  }
  .form-trust-badges {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .trust-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }
  .trust-badge svg {
    width: 12px;
    height: 12px;
  }
  .form-step-title {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
  }
  .form-step-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  .form-nav-buttons {
    margin-top: 1.75rem;
    gap: 0.5rem;
  }
  .form-nav-buttons .btn {
    min-height: 48px;
    font-size: 0.95rem;
    padding: 0.875rem 1.25rem;
  }
  .test3-form .range {
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    -webkit-appearance: none;
  }
  .test3-form .range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c4d83a;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(196, 216, 58, 0.4);
    border: 3px solid #ffffff;
  }
  .test3-form .range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c4d83a;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(196, 216, 58, 0.4);
    border: 3px solid #ffffff;
  }
  .test3-form-inner {
    padding: 2rem 1.25rem 1.75rem;
  }
  .test3-form .field-row-2col {
    grid-template-columns: 1fr;
  }
  .sticky-cta-mobile {
    display: block;
  }
  .form-submit-wrap .btn {
    width: 100%;
    min-width: 0;
  }
}
@media (min-width: 641px) {
  .sticky-cta-mobile {
    display: none !important;
  }
}

/* === HEADER E FOOTER MINIMAL (stile landing /confronta-universita-online/) === */

/* Header minimal — dark navy, fedele a .site-header del sito principale */
.site-header.site-header-universita {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  color: #e5e7eb;
  padding: 0.8rem 0;
}
.header-inner.header-inner-universita {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateX(-2px);
}
.logo-img.logo-img-universita {
  display: block;
  height: 5.5rem;
  width: auto;
  margin-inline: auto;
}

/* ============================================================
   Sezioni condivise: titoli e container
   ============================================================ */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  text-align: center;
  margin: 0 0 2.5rem;
}

/* ============================================================
   Come Funziona
   ============================================================ */
.come-funziona-section {
  background: #f8fafc;
  padding: 5rem 0;
}
.come-funziona-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.come-funziona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.come-funziona-step {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}
.step-num {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #c4d83a;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.6rem;
}
.step-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-section {
  background: #ffffff;
  padding: 5rem 0;
}
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.faq-list {
  border-top: 1px solid #e5e7eb;
}
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  transition: color 0.15s;
}
.faq-question:hover { color: #c4d83a; }
.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.15s;
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  color: #c4d83a;
}
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0;
}
.faq-answer.is-open {
  max-height: 400px;
  padding-bottom: 1.25rem;
}
.faq-answer p {
  margin: 0;
  font-size: 0.97rem;
  color: #475569;
  line-height: 1.7;
}

/* Responsive ------------------------------------------------ */
@media (max-width: 767px) {
  .come-funziona-section,
  .faq-section { padding: 2.5rem 0; }
  .come-funziona-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .section-title { font-size: 1.5rem; }
  .step-num { font-size: 2.25rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .come-funziona-grid { gap: 1.25rem; }
}

/* Footer minimal — dark navy, fedele a .site-footer del sito principale */
.site-footer.site-footer--minimal {
  background: #020617;
  color: #e5e7eb;
  padding: 2rem 0 1.5rem;
}
.site-footer--minimal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}
.site-footer--minimal-logo {
  display: block;
  height: auto;
  max-height: 36px;
  width: auto;
}
.site-footer--minimal-copy {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
}
.site-footer--minimal-copy a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer--minimal-copy a:hover {
  color: #e5e7eb;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .site-header.site-header-universita { padding: 0.5rem 0; }
  .logo-img.logo-img-universita { height: 3.5rem; }
  .site-footer.site-footer--minimal { padding: 1.5rem 0 1rem; }
  .site-footer--minimal-copy { font-size: 0.75rem; }
}
