/* ═══════════════════════════════════════════════════════
   BBRE LANDING PAGES — CSS PRINCIPALE v2.1
   Colori: #111 dark, #c9a227 oro, #fff bianco
   ═══════════════════════════════════════════════════════ */

:root {
  --bbre-dark:    #111111;
  --bbre-oro:     #c9a227;
  --bbre-oro-dk:  #a8841e;
  --bbre-grigio:  #444444;
  --bbre-light:   #f5f5f5;
  --bbre-white:   #ffffff;
  --bbre-border:  #e0e0e0;
  --bbre-success: #2e7d32;
  --bbre-error:   #c62828;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.bbre-landing {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bbre-white);
  color: var(--bbre-dark);
  font-size: 16px;
  line-height: 1.6;
}

/* ── HEADER ── */
.bbre-header {
  background: var(--bbre-dark);
  padding: 18px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.bbre-header .bbre-logo {
  color: var(--bbre-oro);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
}
.bbre-header .bbre-logo span { color: var(--bbre-white); }

/* ── HERO ── */
.bbre-hero {
  background: var(--bbre-dark);
  color: var(--bbre-white);
  padding: 70px 20px 60px;
  text-align: center;
}
.bbre-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.bbre-hero h1 em {
  color: var(--bbre-oro);
  font-style: normal;
}
.bbre-hero p {
  font-size: 1.15rem;
  color: #cccccc;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ── BOTTONI ── */
.bbre-btn {
  display: inline-block;
  background: var(--bbre-oro);
  color: var(--bbre-dark);
  font-weight: 800;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .5px;
}
.bbre-btn:hover { background: var(--bbre-oro-dk); transform: translateY(-1px); }
.bbre-btn-outline {
  background: transparent;
  border: 2px solid var(--bbre-oro);
  color: var(--bbre-oro);
}
.bbre-btn-outline:hover { background: var(--bbre-oro); color: var(--bbre-dark); }
.bbre-btn-full { width: 100%; text-align: center; }

/* ── CONTAINER ── */
.bbre-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.bbre-container-sm { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ── SEZIONI ── */
.bbre-section { padding: 60px 20px; }
.bbre-section-light { background: var(--bbre-light); }
.bbre-section-dark { background: var(--bbre-dark); color: var(--bbre-white); }
.bbre-section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
}
.bbre-section h2 .oro { color: var(--bbre-oro); }

/* ── LEAD MAGNET BOX ── */
.bbre-leadmagnet {
  background: var(--bbre-white);
  border: 2px solid var(--bbre-oro);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 580px;
  margin: 40px auto;
  box-shadow: 0 4px 24px rgba(201,162,39,.15);
}
.bbre-leadmagnet .bbre-badge {
  display: inline-block;
  background: var(--bbre-oro);
  color: var(--bbre-dark);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.bbre-leadmagnet h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.bbre-leadmagnet p { color: var(--bbre-grigio); margin-bottom: 24px; }

/* ── FORM ── */
.bbre-form-group { margin-bottom: 16px; }
.bbre-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .9rem;
  color: var(--bbre-grigio);
}
.bbre-form-group input,
.bbre-form-group select,
.bbre-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--bbre-border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border .2s;
  background: var(--bbre-white);
}
.bbre-form-group input:focus,
.bbre-form-group select:focus,
.bbre-form-group textarea:focus {
  outline: none;
  border-color: var(--bbre-oro);
}
.bbre-form-group textarea { height: 100px; resize: vertical; }
.bbre-form-inline { display: flex; gap: 12px; }
.bbre-form-inline .bbre-form-group { flex: 1; }

.bbre-checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.bbre-checkbox-group input[type="checkbox"] { margin-top: 3px; accent-color: var(--bbre-oro); }
.bbre-checkbox-group label { font-size: .85rem; color: var(--bbre-grigio); font-weight: 400; }
.bbre-checkbox-group a { color: var(--bbre-oro); }

/* ── STEP FORM (VALUTA CASA) ── */
.bbre-steps-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.bbre-steps-nav .step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 3px solid var(--bbre-border);
  color: #999;
  font-size: .9rem;
  font-weight: 600;
}
.bbre-steps-nav .step-item.active {
  border-color: var(--bbre-oro);
  color: var(--bbre-dark);
}
.bbre-steps-nav .step-item.done {
  border-color: var(--bbre-success);
  color: var(--bbre-success);
}
.bbre-steps-nav .step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bbre-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
}
.bbre-steps-nav .step-item.active .step-num { background: var(--bbre-oro); color: var(--bbre-dark); }
.bbre-steps-nav .step-item.done .step-num { background: var(--bbre-success); color: #fff; }

.bbre-step-panel { display: none; }
.bbre-step-panel.active { display: block; }

/* ── MOTIVAZIONE CARDS ── */
.bbre-motive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.bbre-motive-card {
  border: 2px solid var(--bbre-border);
  border-radius: 6px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border .2s, background .2s;
}
.bbre-motive-card:hover { border-color: var(--bbre-oro); }
.bbre-motive-card.selected { border-color: var(--bbre-oro); background: #fffbf0; }
.bbre-motive-card .icon { font-size: 2rem; margin-bottom: 8px; }
.bbre-motive-card .label { font-size: .85rem; font-weight: 600; }

/* ── SIDEBAR LIVE ── */
.bbre-valuta-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.bbre-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bbre-dark);
  color: var(--bbre-white);
  border-radius: 8px;
  padding: 28px;
}
.bbre-sidebar h3 { font-size: 1rem; color: var(--bbre-oro); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.bbre-sidebar-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .9rem; }
.bbre-sidebar-row .key { color: #999; }
.bbre-sidebar-row .val { font-weight: 600; color: var(--bbre-white); }
.bbre-sidebar .bbre-sidebar-cta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
}
.bbre-sidebar .bbre-sidebar-cta p { font-size: .85rem; color: #aaa; margin-bottom: 12px; }

/* ── 9 STEP ── */
.bbre-steps-list { counter-reset: steps; list-style: none; }
.bbre-steps-list li {
  counter-increment: steps;
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--bbre-border);
}
.bbre-steps-list li::before {
  content: counter(steps);
  min-width: 40px; height: 40px;
  background: var(--bbre-oro);
  color: var(--bbre-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
}
.bbre-steps-list li strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.bbre-steps-list li p { color: var(--bbre-grigio); font-size: .9rem; }

/* ── METODO BBRE ── */
.bbre-metodo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.bbre-metodo-card {
  background: var(--bbre-white);
  border: 1px solid var(--bbre-border);
  border-top: 4px solid var(--bbre-oro);
  border-radius: 6px;
  padding: 24px;
}
.bbre-metodo-card .icon { font-size: 2rem; margin-bottom: 12px; }
.bbre-metodo-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.bbre-metodo-card p { font-size: .88rem; color: var(--bbre-grigio); }

/* ── FAQ ── */
.bbre-faq { max-width: 720px; margin: 0 auto; }
.bbre-faq-item { border-bottom: 1px solid var(--bbre-border); }
.bbre-faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 18px 0; font-size: 1rem; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.bbre-faq-q .arrow { transition: transform .2s; color: var(--bbre-oro); font-size: 1.2rem; }
.bbre-faq-item.open .bbre-faq-q .arrow { transform: rotate(180deg); }
.bbre-faq-a { display: none; padding: 0 0 16px; color: var(--bbre-grigio); font-size: .95rem; }
.bbre-faq-item.open .bbre-faq-a { display: block; }

/* ── ACQUISTO DIRETTO ── */
.bbre-acquisto {
  background: var(--bbre-dark);
  color: var(--bbre-white);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  margin-top: 40px;
}
.bbre-acquisto h3 { font-size: 1.5rem; margin-bottom: 12px; }
.bbre-acquisto p { color: #ccc; margin-bottom: 24px; }

/* ── GRAZIE PAGE ── */
.bbre-grazie {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.bbre-grazie-box { max-width: 600px; }
.bbre-grazie-box .check-icon {
  font-size: 4rem;
  color: var(--bbre-oro);
  margin-bottom: 24px;
}
.bbre-grazie-box h1 { font-size: 2rem; margin-bottom: 16px; }
.bbre-grazie-box p { color: var(--bbre-grigio); margin-bottom: 24px; }
.bbre-countdown {
  background: var(--bbre-dark);
  color: var(--bbre-white);
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
  font-size: .95rem;
}
.bbre-countdown .timer {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--bbre-oro);
  font-variant-numeric: tabular-nums;
}
.bbre-countdown .timer-label { font-size: .8rem; color: #aaa; margin-top: 4px; }
.bbre-cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ── MESSAGGI ── */
.bbre-msg {
  padding: 14px 18px;
  border-radius: 4px;
  margin-top: 16px;
  font-size: .9rem;
  display: none;
}
.bbre-msg.success { background: #e8f5e9; color: var(--bbre-success); border: 1px solid #a5d6a7; }
.bbre-msg.error { background: #ffebee; color: var(--bbre-error); border: 1px solid #ef9a9a; }

/* ── FOOTER ── */
.bbre-footer {
  background: var(--bbre-dark);
  color: #888;
  text-align: center;
  padding: 30px 20px;
  font-size: .82rem;
  border-top: 1px solid #222;
}
.bbre-footer a { color: var(--bbre-oro); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .bbre-valuta-layout { grid-template-columns: 1fr; }
  .bbre-sidebar { position: static; }
  .bbre-form-inline { flex-direction: column; }
  .bbre-steps-nav .step-item span:not(.step-num) { display: none; }
  .bbre-cta-group { flex-direction: column; align-items: center; }
}

/* ── FIX ICONE FLOTTANTI MOBILE (WhatsApp + iubenda + chatbot) ── */
/* Questo blocco separa verticalmente i widget sovrapposti su mobile  */
@media (max-width: 768px) {

  /* iubenda cookie button — resta in basso a destra */
  #iubenda-cs-banner,
  .iubenda-cs-opt-group,
  .__iubenda_shield {
    z-index: 9990 !important;
  }

  /* BBRE Chatbot — spostato più in alto */
  #bbre-chatbot-bubble,
  .bbre-chatbot-btn,
  [id*="bbre-chat"],
  [class*="bbre-chat"] {
    bottom: 140px !important;
    right: 16px !important;
    z-index: 9995 !important;
  }

  /* WhatsApp button — in mezzo tra chatbot e iubenda */
  /* BBRE WhatsApp Button plugin */
  #bbre-whatsapp-btn,
  .bbre-whatsapp-bubble,
  [id*="bbre-whatsapp"],
  [class*="bbre-whatsapp"] {
    bottom: 76px !important;
    right: 16px !important;
    z-index: 9993 !important;
  }

  /* Fallback per altri plugin WhatsApp comuni */
  .wpcwb-bubble { bottom: 76px !important; right: 16px !important; }
  .wa-widget-send-button { bottom: 76px !important; right: 16px !important; }
  #whatsapp-chatting-wp { bottom: 76px !important; right: 16px !important; }
  .chaty-channel--whatsapp { bottom: 76px !important; }
}

/* ── DOTAZIONI — pill card cliccabili ── */
.bbre-dotazioni-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px;
  margin-top: 10px;
}
/* !important necessario: il tema WP imposta label{display:block} e input{display:block;width:100%} */
label.bbre-dot-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  border: 2px solid var(--bbre-border) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  color: #444 !important;
  background: #fff !important;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
  white-space: nowrap !important;
  width: auto !important;
  margin: 0 !important;
  line-height: 1 !important;
}
label.bbre-dot-item:hover {
  border-color: var(--bbre-oro) !important;
  color: #111 !important;
}
label.bbre-dot-item input[type="checkbox"] {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  accent-color: var(--bbre-oro);
  cursor: pointer !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  vertical-align: middle !important;
}
label.bbre-dot-item span {
  display: inline !important;
  white-space: nowrap !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  color: inherit !important;
}
label.bbre-dot-item:has(input:checked) {
  border-color: var(--bbre-oro) !important;
  background: #fffbe6 !important;
  color: #111 !important;
}
@media (max-width: 480px) {
  .bbre-dotazioni-grid { gap: 8px; }
  label.bbre-dot-item { padding: 9px 14px !important; font-size: .82rem !important; }
}
