/* ============================================================
   style.css – Trova Tariffe Fibra
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@800&family=Raleway:ital,wght@1,800&display=swap');

:root {
  --ft-green-deep:   #1a3d2b;
  --ft-green-mid:    #2d6647;
  --ft-green-light:  #e8f0eb;
  --ft-green-accent: #3d8b5e;
  --ft-orange:       #d4622a;
  --ft-orange-hover: #b8501f;
  --ft-yellow-warn:  #f5a623;
  --ft-text-dark:    #111c17;
  --ft-text-muted:   #5a7062;
  --ft-white:        #ffffff;
  --ft-border:       rgba(26,61,43,0.1);
  --ft-bg:           #eef3ee;
  --ft-radius:       14px;
}

/* ── RESET SCOPED ─────────────────────────────────────────── */
.ft-hero *,
.ft-results-layout *,
#ft-risultati-wrapper * {
  box-sizing: border-box;
}

/* ── HERO ─────────────────────────────────────────────────── */
.ft-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 60px 0 40px;
  font-family: 'DM Sans', sans-serif;
}

/* ── HERO LEFT ────────────────────────────────────────────── */
.ft-hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ft-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45,102,71,0.1);
  color: var(--ft-green-mid);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  width: fit-content;
  border: 1px solid rgba(45,102,71,0.2);
}
.ft-badge-dot {
  width: 6px; height: 6px;
  background: var(--ft-orange);
  border-radius: 50%;
  animation: ft-pulse 2s infinite;
}
@keyframes ft-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.ft-hero-title {
  font-family: 'DM Sans', sans-serif !important;
  font-size: clamp(2rem, 3.5vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  color: var(--ft-green-deep) !important;
  letter-spacing: -0.8px !important;
  margin: 0 !important;
}
.ft-hero-title em {
  font-family: 'Raleway', sans-serif;
  font-style: italic;
  font-weight: 800;
  color: var(--ft-orange);
}

.ft-hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ft-text-muted);
  line-height: 1.65;
  margin: 0;
}

.ft-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}
.ft-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ft-stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ft-green-deep);
  line-height: 1;
}
.ft-stat-label {
  font-size: 0.75rem;
  color: var(--ft-text-muted);
}
.ft-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--ft-border);
}

.ft-trust {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--ft-text-muted);
  margin: 0;
}
.ft-trust svg { color: var(--ft-green-accent); flex-shrink: 0; }

/* ── FILTER CARD ──────────────────────────────────────────── */
.ft-filter-card {
  background: var(--ft-white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 40px rgba(26,61,43,0.1), 0 1px 3px rgba(26,61,43,0.06);
  border: 1px solid var(--ft-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ft-filter-card .ft-cta-btn, .ft-divider {
    margin-top: 24px !important;
}
.ft-filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ft-filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--ft-text-muted);
  margin: 0;
}
.ft-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

.ft-divider {
  height: 1px;
  background: var(--ft-border);
}

.ft-op-logo {
  max-width: 110px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 4px;
}

/* ── CHIP (radio e checkbox) ──────────────────────────────── */
.ft-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ft-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--ft-border);
  background: transparent;
  color: var(--ft-text-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.ft-chip input { display: none; }
.ft-chip:hover {
  border-color: var(--ft-green-accent);
  color: var(--ft-green-mid);
  background: rgba(45,102,71,0.05);
}
.ft-chip:has(input:checked),
.ft-chip.active {
  background: var(--ft-green-deep);
  border-color: var(--ft-green-deep);
  color: var(--ft-white);
}

/* ── CTA BUTTON ───────────────────────────────────────────── */
.ft-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  background: var(--ft-orange);
  color: var(--ft-white);
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(212,98,42,0.35);
  letter-spacing: 0.1px;
}
.ft-cta-btn:hover {
  background: var(--ft-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(212,98,42,0.45);
}
.ft-cta-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.ft-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ft-spin 0.7s linear infinite;
}
@keyframes ft-spin { to { transform: rotate(360deg); } }

/* ── RESULTS LAYOUT ───────────────────────────────────────── */
.ft-results-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 40px;
  font-family: 'DM Sans', sans-serif;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.ft-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ft-sidebar-card {
  background: var(--ft-white);
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-border);
  overflow: hidden;
}

.ft-sidebar-header {
  padding: 13px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ft-text-muted);
  border-bottom: 1px solid var(--ft-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ft-reset-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ft-orange);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.ft-sidebar-body {
  padding: 12px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── SIDEBAR BOTTONI A RIGA (opzione B) ───────────────────── */

/* Nasconde input radio/checkbox — la logica è gestita da JS */
.ft-sidebar input[type="radio"],
.ft-sidebar input[type="checkbox"] { display: none; }

/* Bottone riga — usato per operatori, ordina per, prezzo max */
.ft-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: var(--ft-green-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ft-text-dark);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
  text-align: left;
}
.ft-filter-btn:hover {
  background: rgba(45,102,71,0.14);
  color: var(--ft-green-mid);
}
.ft-filter-btn.active {
  background: var(--ft-green-deep);
  border-color: var(--ft-green-deep);
  color: var(--ft-white);
}

/* Lato sinistro: spunta animata + testo */
.ft-filter-btn-left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ft-filter-btn-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #b0c8b8;
  background: var(--ft-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.ft-filter-btn.active .ft-filter-btn-check {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.45);
}
.ft-filter-btn.active .ft-filter-btn-check::after {
  content: '';
  width: 8px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* Badge contatore */
.ft-filter-count {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(45,102,71,0.12);
  color: var(--ft-green-mid);
  padding: 1px 7px;
  border-radius: 100px;
  transition: all 0.16s;
  flex-shrink: 0;
}
.ft-filter-btn.active .ft-filter-count {
  background: rgba(255,255,255,0.2);
  color: var(--ft-white);
}

/* Dot per i bottoni radio (ordina per, prezzo max) */
.ft-filter-btn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #b0c8b8;
  flex-shrink: 0;
  transition: all 0.16s;
}
.ft-filter-btn.active .ft-filter-btn-dot {
  background: var(--ft-white);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}

.ft-bonus-grid {
  padding: 12px 18px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ft-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 100px;
  border: 1.5px solid var(--ft-border);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ft-text-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.ft-bonus-pill:hover {
  border-color: var(--ft-green-accent);
  color: var(--ft-green-mid);
}
.ft-bonus-pill.active {
  background: var(--ft-green-deep);
  border-color: var(--ft-green-deep);
  color: var(--ft-white);
}

/* ── SORT BAR ─────────────────────────────────────────────── */
.ft-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ft-result-count {
  font-size: 0.9rem;
  color: var(--ft-text-muted);
  margin: 0;
}
.ft-result-count strong { color: var(--ft-text-dark); font-weight: 600; }

/* ── OFFER CARD ───────────────────────────────────────────── */
.ft-offer-card {
  background: var(--ft-white);
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-border);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: ft-fadeUp 0.35s ease both;
}
.ft-offer-card:hover {
  box-shadow: 0 8px 32px rgba(26,61,43,0.1);
  transform: translateY(-2px);
}
@keyframes ft-fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Promo bar in cima alla card */
.ft-promo-bar {
  background: linear-gradient(90deg, var(--ft-green-deep), var(--ft-green-mid));
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ft-white);
}

.ft-card-body {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 160px 130px 1fr 170px;
  gap: 20px;
  align-items: center;
}

/* Colonna operatore */
.ft-col-operator { display: flex; flex-direction: column; gap: 5px; }

.ft-best-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ft-orange);
  color: var(--ft-white);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  width: fit-content;
}

.ft-op-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
/* Colori per operatore */
.ft-op-fastweb   { color: #f5a800; }
.ft-op-tim       { color: #003087; }
.ft-op-vodafone  { color: #e60000; }
.ft-op-windtre   { color: #e8431a; }
.ft-op-sky       { color: #0072c6; }
.ft-op-iliad     { color: #e20074; }

.ft-offer-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ft-text-dark);
}

.ft-bonus-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.ft-bonus-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 100px;
  background: #fdf3ee;
  border: 1px solid #f5d4c0;
  font-size: 0.7rem;
  font-weight: 500;
  color: #9a3d12;
}

/* Colonna prezzo */
.ft-col-price { display: flex; flex-direction: column; gap: 4px; }
.ft-price-main { display: flex; flex-direction: column; gap: 1px; }
.ft-price-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ft-orange);
  line-height: 1;
}
.ft-price-period {
  font-size: 0.75rem;
  color: var(--ft-text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.ft-price-note   { font-size: 0.74rem; color: var(--ft-text-muted); line-height: 1.4; }
.ft-price-note.ft-free { color: var(--ft-green-accent); font-weight: 500; }

/* Colonna dettagli */
.ft-col-details { display: flex; flex-direction: column; gap: 7px; }
.ft-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--ft-text-dark);
}
.ft-detail-row svg { color: var(--ft-green-accent); flex-shrink: 0; margin-top: 2px; }
.ft-detail-row strong { font-weight: 600; }
.ft-detail-note { color: var(--ft-text-muted); font-size: 0.78rem; }

/* Colonna azioni */
.ft-col-actions { display: flex; flex-direction: column; gap: 10px; }

.ft-rating { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ft-star        { font-size: 0.95rem; }
.ft-star.full   { color: var(--ft-yellow-warn); }
.ft-star.half   { color: var(--ft-yellow-warn); opacity: 0.5; }
.ft-star.empty  { color: #ddd; }
.ft-rating-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ft-text-dark);
  margin-left: 4px;
}

.ft-rating-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ft-rating-label {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--ft-green-light);
  color: var(--ft-green-mid);
}
/* Colori etichetta per score */
.ft-rating-label--iliad    { background: #e8f5e9; color: #2e7d32; }
.ft-rating-label--fastweb  { background: #e8f5e9; color: #2e7d32; }
.ft-rating-label--vodafone { background: #e8f5e9; color: #2e7d32; }
.ft-rating-label--tim      { background: #fff8e1; color: #f57f17; }
.ft-rating-label--windtre  { background: #fff8e1; color: #f57f17; }

.ft-rating-count {
  font-size: 0.7rem;
  color: var(--ft-text-muted);
}

.ft-btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 12px 18px;
  background: var(--ft-orange);
  color: var(--ft-white);
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  box-shadow: 0 3px 14px rgba(212,98,42,0.28);
}
.ft-btn-cta:hover {
  background: var(--ft-orange-hover);
  color: var(--ft-white);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Warning sanzioni → tooltip discreto sull'icona ⓘ */
.ft-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: 5px;
  color: #a0b8a8;
  cursor: pointer;
  vertical-align: middle;
  top: -1px;
  transition: color 0.15s;
}
.ft-info-icon:hover { color: var(--ft-text-muted); }

.ft-info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.73rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  width: 240px;
  white-space: normal;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 10;
}
.ft-info-icon::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2a2a2a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 10;
}
.ft-info-icon:hover::after,
.ft-info-icon:hover::before { opacity: 1; }

/* Nota promo in fondo alla card */
.ft-promo-note {
  padding: 8px 24px;
  background: #f0f7f3;
  border-top: 1px solid var(--ft-border);
  font-size: 0.76rem;
  color: var(--ft-green-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Nessun risultato */
.ft-no-results {
  padding: 32px;
  text-align: center;
  color: var(--ft-text-muted);
  font-size: 0.95rem;
  background: var(--ft-white);
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-border);
}

/* ============================================================
   MOBILE — stili aggiuntivi specifici
   ============================================================ */

/* Badge rete (4G / 5G) nella colonna operatore */
.ft-rete-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  width: fit-content;
  margin-top: 4px;
}
.ft-rete-5g, .ft-rete-5gultra { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.ft-rete-4g, .ft-rete-4g4g    { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* Colori logo operatori MVNO */
.ft-op-ho         { color: #e91e8c; }
.ft-op-verymobile { color: #e91e63; }
.ft-op-kenamobile { color: #e65100; }
.ft-op-iliad      { color: #e20074; }
@media (max-width: 960px) {
  .ft-hero { grid-template-columns: 1fr; gap: 40px; }
  .ft-results-layout { grid-template-columns: 1fr; }
  .ft-sidebar { position: static; }
  .ft-card-body { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ft-col-actions { grid-column: span 2; }
}

@media (max-width: 600px) {
  .ft-card-body { grid-template-columns: 1fr; }
  .ft-col-actions { grid-column: 1; }
  .ft-hero { padding: 32px 0 24px; }
}

/* ============================================================
   LUCE E GAS — stili specifici wizard
   ============================================================ */

:root {
  --ft-amber:       #e8960c;
  --ft-amber-dark:  #b8740a;
  --ft-amber-light: #fdf3e0;
  --ft-amber-mid:   #c97d0e;
}

/* Hero variante lucegas */
.ft-hero--lucegas { background: #fdf8ee; }
.ft-hero--lucegas::before {
  background: radial-gradient(circle, rgba(232,150,12,0.1) 0%, transparent 70%);
}

.ft-badge--lucegas {
  background: rgba(232,150,12,0.1);
  color: var(--ft-amber-mid);
  border-color: rgba(232,150,12,0.25);
}

.ft-hero-title--lucegas { color: #3d2800; }
.ft-hero-title--lucegas em { color: var(--ft-orange); }

.ft-stat-value--lucegas { color: #3d2800; }

/* Box promessa */
.ft-promise-box {
  background: #fff;
  border: 1.5px solid rgba(232,150,12,0.2);
  border-left: 4px solid var(--ft-amber);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ft-promise-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.ft-promise-text { font-size: 0.84rem; line-height: 1.55; color: var(--ft-text-dark); }
.ft-promise-text strong { color: var(--ft-amber-dark); }

/* Icona decorativa */
.ft-deco-lucegas {
  position: absolute;
  bottom: -10px; right: -10px;
  opacity: 0.06;
  pointer-events: none;
}

/* ── Wizard card ── */
.ft-wizard-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(232,150,12,0.15);
  box-shadow: 0 4px 40px rgba(232,150,12,0.1), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

/* ── Progress bar ── */
.ft-progress-header {
  padding: 18px 24px 0;
}
.ft-progress-steps {
  display: flex;
  align-items: flex-start;
}
.ft-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  position: relative;
}
.ft-progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px; left: 50%;
  width: 100%; height: 2px;
  background: #e5e7eb;
  z-index: 0;
  transition: background 0.25s;
}
.ft-progress-step--done::after  { background: var(--ft-amber) !important; }
.ft-progress-step--active::after { background: var(--ft-amber) !important; }

.ft-progress-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: var(--ft-text-muted);
  position: relative; z-index: 1;
  transition: all 0.2s;
}
.ft-progress-step--done .ft-progress-dot {
  background: var(--ft-amber);
  border-color: var(--ft-amber);
  color: #fff;
}
.ft-progress-step--active .ft-progress-dot {
  border-color: var(--ft-amber);
  color: var(--ft-amber);
  font-weight: 800;
}
.ft-progress-label {
  font-size: 0.63rem;
  font-weight: 500;
  color: var(--ft-text-muted);
  white-space: nowrap;
}
.ft-progress-step--active .ft-progress-label { color: var(--ft-amber-dark); font-weight: 600; }
.ft-progress-step--done .ft-progress-label   { color: var(--ft-amber); }

/* ── Wizard steps ── */
.ft-wizard-step { display: none; padding: 22px 24px 26px; }
.ft-wizard-step--active { display: block; }

.ft-step-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ft-text-muted);
  margin-bottom: 12px;
}

/* ── Tile servizio ── */
.ft-service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft-service-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 18px 12px;
  border: 2px solid rgba(0,0,0,0.08); border-radius: 12px;
  background: #fafafa; cursor: pointer; transition: all 0.18s;
  font-family: 'DM Sans', sans-serif;
}
.ft-service-btn:hover { border-color: var(--ft-amber); background: var(--ft-amber-light); }
.ft-service-btn--active { border-color: var(--ft-amber-dark); background: #fef8ec; box-shadow: inset 0 0 0 1px rgba(184,116,10,0.15); }
.ft-service-icon { font-size: 1.6rem; }
.ft-service-name { font-size: 0.86rem; font-weight: 600; color: var(--ft-text-dark); text-align: center; }
.ft-service-sub  { font-size: 0.7rem; color: var(--ft-text-muted); text-align: center; }

/* ── Slider ── */
.ft-slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.ft-slider-top  { display: flex; justify-content: space-between; align-items: center; }
.ft-slider-bottom { display: flex; justify-content: space-between; }
.ft-slider-label { font-size: 0.78rem; color: var(--ft-text-muted); }
.ft-slider-hint  { font-size: 0.68rem; color: var(--ft-text-muted); }
.ft-slider-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--ft-amber-dark);
}
.ft-slider-track {
  width: 100%; height: 6px; border-radius: 3px;
  appearance: none; cursor: pointer; outline: none;
  background: linear-gradient(to right, var(--ft-amber) 30%, #e5e7eb 30%);
}
.ft-slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ft-amber); cursor: pointer;
  box-shadow: 0 2px 6px rgba(232,150,12,0.4);
}
.ft-slider-track::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ft-amber); cursor: pointer; border: none;
  box-shadow: 0 2px 6px rgba(232,150,12,0.4);
}

/* ── Fascia oraria ── */
.ft-fascia-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.ft-fascia-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px; border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.08); background: #fafafa;
  cursor: pointer; transition: all 0.18s;
  font-family: 'DM Sans', sans-serif; gap: 3px;
}
.ft-fascia-btn:hover { border-color: var(--ft-amber); background: var(--ft-amber-light); }
.ft-fascia-btn--active { border-color: var(--ft-amber-dark); background: #fef8ec; box-shadow: inset 0 0 0 1px rgba(184,116,10,0.15); }
.ft-fascia-icon { font-size: 1.2rem; }
.ft-fascia-name { font-size: 0.76rem; font-weight: 600; color: var(--ft-text-dark); text-align: center; }
.ft-fascia-sub  { font-size: 0.63rem; color: var(--ft-text-muted); text-align: center; }

/* ── Chip lucegas ── */
.ft-chip--lucegas input[type="radio"],
.ft-chip--lucegas input[type="checkbox"] { display: none; }
.ft-chip--lucegas.active {
  background: var(--ft-amber) !important;
  border-color: var(--ft-amber) !important;
  color: #fff !important;
}

/* ── Navigazione wizard ── */
.ft-wizard-nav { display: flex; gap: 10px; margin-top: 18px; }
.ft-btn-back {
  padding: 11px 18px; border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.1); background: transparent;
  font-family: 'DM Sans', sans-serif; font-size: 0.84rem;
  font-weight: 500; color: var(--ft-text-muted); cursor: pointer;
  transition: all 0.16s;
}
.ft-btn-back:hover { border-color: var(--ft-amber); color: var(--ft-amber-dark); }

.ft-btn-next {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 20px; border-radius: 10px; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
}
.ft-btn-lucegas {
  background: var(--ft-amber);
  color: #fff;
  box-shadow: 0 3px 14px rgba(232,150,12,0.35);
}
.ft-btn-lucegas:hover { background: var(--ft-amber-dark); transform: translateY(-1px); }

/* ── Input testo ── */
.ft-input-group { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.ft-text-input {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.1); background: #fafafa;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  color: var(--ft-text-dark); outline: none; transition: border-color 0.16s;
}
.ft-text-input:focus { border-color: var(--ft-amber); background: #fff; }
.ft-text-input::placeholder { color: #aaa; }

/* ── Privacy ── */
.ft-privacy-row {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 0.78rem; color: var(--ft-text-muted); line-height: 1.5; cursor: pointer;
}
.ft-privacy-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--ft-amber);
  flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.ft-privacy-row a { color: var(--ft-amber-dark); }
.ft-privacy-error {
  background: #f0eaea; color: #a33;
  padding: 8px 12px; border-radius: 6px;
  font-size: 0.8rem; margin-top: 4px;
}

/* ── Submit ── */
.ft-btn-submit {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 24px; border-radius: 12px; border: none;
  background: var(--ft-orange); color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 0.96rem; font-weight: 600;
  cursor: pointer; margin-top: 16px;
  box-shadow: 0 4px 20px rgba(212,98,42,0.35);
  transition: all 0.18s;
}
.ft-btn-submit:hover { background: var(--ft-orange-hover); transform: translateY(-1px); }

/* ── Recap ── */
.ft-recap-box {
  background: var(--ft-amber-light);
  border: 1px solid rgba(232,150,12,0.2);
  border-radius: 10px; padding: 14px 16px;
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 5px;
}
.ft-recap-title {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--ft-amber-mid); margin-bottom: 4px;
}
.ft-recap-row { display: flex; gap: 8px; font-size: 0.8rem; color: #7a5010; }
.ft-recap-key { font-weight: 600; min-width: 100px; }

/* ── Overlay attesa ── */
.ft-overlay-attesa {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.ft-overlay-msg {
  background: #fff; padding: 2rem 3rem;
  border-radius: 12px; box-shadow: 0 0 24px rgba(0,0,0,0.2);
  font-size: 1.1rem; color: #333; text-align: center;
  max-width: 440px; line-height: 1.5;
}
.ft-overlay-msg--ok  { color: #2e7d32; font-weight: 600; }
.ft-overlay-msg--err { color: #c62828; font-weight: 600; }

/* ============================================================
   MODEM ICON
   ============================================================ */
.ft-modem-icon {
  display: block;
  width: fit-content;
}

.ft-modem-led {
  animation: ft-led-pulse 2.4s ease-in-out infinite;
}
.ft-modem-led--1 { animation-delay: 0s; }
.ft-modem-led--2 { animation-delay: 0.6s; }
.ft-modem-led--3 { animation-delay: 1.2s; }

@keyframes ft-led-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ============================================================
   NEWS TICKER
   ============================================================ */
.ft-ticker-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0;
  font-family: 'DM Sans', sans-serif;
  height: 36px;
}

/* Quando il ticker precede l'hero, riduce il padding-top */
.ft-ticker-wrap + .ft-hero {
  padding-top: 20px;
}

.ft-ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #f3f4f6;
  border-right: 1px solid #d1d5db;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  height: 100%;
  flex-shrink: 0;
}
.ft-ticker-label svg { flex-shrink: 0; color: #9ca3af; }

.ft-ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ft-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ft-ticker-scroll 28s linear infinite;
}
.ft-ticker-wrap--static .ft-ticker-track { animation: none; }
.ft-ticker-track:hover { animation-play-state: paused; }

@keyframes ft-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ft-ticker-item {
  display: inline-block;
  padding: 0 18px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color 0.15s;
}
.ft-ticker-item:hover { color: var(--ft-orange); text-decoration: underline; }

.ft-ticker-sep {
  color: #9ca3af;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .ft-ticker-wrap { height: 32px; border-radius: 6px; }
  .ft-ticker-label { padding: 0 10px; font-size: 0.62rem; }
  .ft-ticker-item { font-size: 0.75rem; padding: 0 12px; }
}

/* ── Risparmio stimato (step 2b) ── */
.ft-risp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}
.ft-risp-label { font-weight: 600; }

.ft-risp-attuale {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #555;
  margin-bottom: 14px;
  line-height: 1.5;
}
.ft-risp-attuale-val {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.ft-risp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e8f0fe;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(13,71,161,.07);
}
.ft-risp-medal { font-size: 22px; flex-shrink: 0; }
.ft-risp-body  { flex: 1; }
.ft-risp-operatore { font-size: 15px; font-weight: 700; color: #1a1a2e; }
.ft-risp-offerta   { font-size: 12px; color: #888; margin-top: 2px; }
.ft-risp-right     { text-align: right; flex-shrink: 0; }
.ft-risp-costo     { font-size: 18px; font-weight: 800; color: #1565c0; }
.ft-risp-costo small { font-size: 12px; font-weight: 400; color: #888; }
.ft-risp-saving    { display: block; font-size: 11px; font-weight: 700; color: #2e7d32; margin-top: 3px; }
.ft-risp-parity    { display: block; font-size: 11px; color: #888; margin-top: 3px; }

.ft-risparmio-note {
  font-size: 11px;
  color: #aaa;
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Step 4: Stima costo mensile ── */
.ft-stima-box {
  background: linear-gradient(135deg, #e8f0fe, #f0f7ff);
  border: 1px solid #c5d8fb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 4px 0;
}
.ft-stima-label {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 10px;
}
.ft-stima-importo {
  font-size: 32px;
  font-weight: 800;
  color: #1565c0;
  letter-spacing: -.5px;
}
.ft-stima-nota {
  font-size: 11px;
  color: #aaa;
  margin-top: 10px;
  line-height: 1.5;
}
.ft-stima-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   Luce/Gas wizard v2 – nuovi componenti
   ============================================================ */

/* Toggle mensile/bimestrale */
.ft-toggle-group { display: flex; gap: 8px; margin-bottom: 4px; }
.ft-toggle-btn {
    flex: 1; padding: 8px 12px; border: 2px solid #e5e7eb;
    border-radius: 8px; background: #fff; color: #555;
    font-size: 0.9rem; cursor: pointer; transition: all .15s;
}
.ft-toggle-btn--active,
.ft-toggle-btn:hover { border-color: #e8960c; background: #fff8ee; color: #e8960c; font-weight: 600; }

/* Grid 3 colonne (tipo abitazione) */
.ft-service-grid--3col { grid-template-columns: repeat(3, 1fr); }

/* Fascia large (step 3) */
.ft-fascia-grid--2col { grid-template-columns: 1fr 1fr; gap: 12px; }
.ft-fascia-btn--large { padding: 20px 12px; text-align: left; height: auto; }
.ft-fascia-btn--large .ft-fascia-sub {
    font-size: 0.8rem; color: #777; line-height: 1.4;
    white-space: normal; margin-top: 6px;
}

/* Stima annuale (step 4) */
.ft-stima-box--annuale { padding: 16px 20px; }
.ft-stima-row { display: flex; gap: 24px; }
.ft-stima-col { flex: 1; }
.ft-stima-col--risparmio { border-left: 2px solid #e5e7eb; padding-left: 24px; }
.ft-stima-importo--annuale { color: #333; font-size: 1.4rem; font-weight: 700; }
.ft-stima-importo--risparmio { color: #16a34a; font-size: 1.3rem; font-weight: 700; }

/* Offerte loading + spinner */
.ft-offerte-loading {
    display: flex; align-items: center; gap: 10px;
    color: #888; padding: 24px 0; justify-content: center;
}
.ft-spinner { animation: lg-spin 1s linear infinite; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* Card offerte (step 5) */
.ft-offerte-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.ft-offerta-card { border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; background: #fff; position: relative; }
.ft-offerta-card--top { border-color: #e8960c; background: #fff8ee; }
.ft-offerta-badge {
    display: inline-block; background: #e8960c; color: #fff;
    font-size: 0.75rem; font-weight: 700; border-radius: 20px;
    padding: 2px 10px; margin-bottom: 8px;
}
.ft-offerta-operatore { font-size: 1rem; font-weight: 700; color: #222; }
.ft-offerta-nome { font-size: 0.85rem; color: #555; margin-bottom: 10px; }
.ft-offerta-costo-wrap { margin-bottom: 6px; }
.ft-offerta-costo { font-size: 1.6rem; font-weight: 800; color: #e8960c; line-height: 1; }
.ft-offerta-costo span { font-size: 0.9rem; font-weight: 400; color: #555; }
.ft-offerta-costo-sub { font-size: 0.75rem; color: #999; }
.ft-offerta-risparmio {
    font-size: 0.85rem; color: #16a34a; background: #f0fdf4;
    border-radius: 6px; padding: 4px 10px; display: inline-block; margin-bottom: 10px;
}
.ft-offerta-risparmio--neutro { color: #555; background: #f5f5f5; }
.ft-btn-offerta {
    display: block; width: 100%; text-align: center; text-decoration: none;
    padding: 10px; border-radius: 8px; font-size: 0.9rem; cursor: pointer; border: none;
}
.ft-offerte-footer {
    text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0;
}
.ft-offerte-footer-text { font-size: 0.85rem; color: #666; margin-bottom: 8px; }
.ft-offerte-empty { text-align: center; color: #888; padding: 16px 0; font-size: 0.9rem; }
.ft-btn-secondary {
    background: transparent; border: 2px solid #e8960c; color: #e8960c;
    border-radius: 8px; padding: 10px 20px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600; transition: all .15s;
}
.ft-btn-secondary:hover { background: #fff8ee; }

@media (max-width: 500px) {
    .ft-service-grid--3col  { grid-template-columns: 1fr 1fr; }
    .ft-fascia-grid--2col   { grid-template-columns: 1fr; }
    .ft-stima-row           { flex-direction: column; }
    .ft-stima-col--risparmio { border-left: none; padding-left: 0; border-top: 2px solid #e5e7eb; padding-top: 12px; }
}

/* Offerta: header con badge modello */
.ft-offerta-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.ft-offerta-modello {
    font-size: 0.72rem; font-weight: 600; border-radius: 20px;
    padding: 3px 8px; white-space: nowrap; flex-shrink: 0; margin-left: 8px;
}
.ft-offerta-modello--fisso  { background: #eff6ff; color: #1d4ed8; }
.ft-offerta-modello--indice { background: #fefce8; color: #b45309; }

/* Nota oneri step 4 */
.ft-stima-nota--oneri { font-size: 0.8rem; line-height: 1.4; }
