/* ==========================================================================
   1. VARIABILI E RESET
   ========================================================================== */
:root {
  --green-brand: #78be20;
  --green-dark: #2e5902;
  --wa-green: #25D366;
  --wa-green-hover: #1ebc57;
  --bg-light: #f9fafb;
  --bg-chat-user: #e7f8e8;
  --bg-chat-bot: #ffffff;
  --text-main: #333333;
  --text-muted: #555555;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* Spazio per la sticky CTA mobile */
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  color: var(--green-dark);
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   2. LAYOUT & TIPOGRAFIA
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 2rem 0;
}

.eyebrow {
  display: inline-block;
  background: #f0fdf4;
  color: var(--green-dark);
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.eyebrow--light {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background-color: var(--bg-light);
}

.section__heading {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section__heading h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==========================================================================
   3. COMPONENTI (Pulsanti, Topbar)
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  text-align: center;
  border-radius: 30px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background-color: var(--wa-green);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn--primary:hover {
  background-color: var(--wa-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

.btn--large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 2px 0 2px;
}

.topbar__cta {
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.topbar__cta:hover {
  background-color: var(--wa-green-hover) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   4. HERO CHAT (Simulazione WhatsApp)
   ========================================================================== */
.hero-chat {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  padding: 3rem 0;
}

.hero__card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.chat-box {
  max-width: 600px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #efeae2; /* Colore sfondo tipico chat */
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
}

.chat-message.user {
  align-self: flex-end;
  background-color: var(--bg-chat-user);
  border-radius: 16px 16px 0 16px;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-message.bot {
  align-self: flex-start;
  background-color: var(--bg-chat-bot);
  border-radius: 16px 16px 16px 0;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-cta {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.chat-cta h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.chat-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.chat-trust {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-weight: 600;
}

/* ==========================================================================
   5. SCHEDE PRODOTTO & ALTRE CARDS
   ========================================================================== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product--featured {
  border: 2px solid var(--green-brand);
}

.product__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--green-brand);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-bottom-left-radius: var(--radius-lg);
}

.product__top {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-grow: 1;
}

.product__thumb {
  width: 50px;
  height: 50px;
  background: #f0fdf4;
  color: var(--green-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.product__bottom {
  background: var(--bg-light);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
}

.product__bottom strong {
  font-size: 1.2rem;
  color: var(--green-dark);
}

.product__bottom a {
  font-weight: 700;
  color: var(--green-brand);
  text-decoration: none;
  font-size: 0.9rem;
}

/* Timeline & Cards Generiche */
.card {
  background: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.card__icon {
  width: 40px;
  height: 40px;
  background: var(--green-dark);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 1rem;
}

.timeline {
  max-width: 700px;
  margin: 0 auto;
}

.timeline__item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.timeline__step {
  width: 36px;
  height: 36px;
  background: var(--green-brand);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  z-index: 2;
}

/* ==========================================================================
   6. FAQ & TRUST BADGES
   ========================================================================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.faq details {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--green-dark);
  list-style: none; /* Rimuove freccia base */
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq p {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   7. FOOTER & CTA FINALI
   ========================================================================== */
.cta {
  background: var(--green-dark);
  color: #ffffff;
  padding: 4rem 0;
}

.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta__note {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
}

.footer {
  background: #f9fafb;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1rem;
}

.footer__disclaimer {
  text-align: center;
  color: #888;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

/* ==========================================================================
   8. MOBILE (Responsive)
   ========================================================================== */
.sticky-cta {
  display: none; /* Nascosta su desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 12px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 999;
  text-align: center;
}

.sticky-cta .btn {
  width: 100%;
  padding: 14px;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 80px;
  }
  
  .sticky-cta {
    display: block;
  }

  .cta__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-chat {
    padding: 2rem 0;
  }

  .chat-cta h1 {
    font-size: 1.6rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer__inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    align-items: center;
  }

  .footer__links a {
    display: block;
    margin: 10px 0 0;
  }
}


/* CONTAINER PRINCIPALE (CARD QUIZ) */
.wa-quiz-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px 20px;
  max-width: 480px;
  margin: 20px auto;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.08);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  text-align: left;
  box-sizing: border-box;
}

.wa-quiz-header {
  text-align: center;
  margin-bottom: 20px;
}

.quiz-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-block;
}

.wa-quiz-title {
  font-size: 1.3rem;
  color: #0f172a;
  margin: 10px 0 6px 0;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.wa-quiz-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* BLOCCO SINGOLA DOMANDA */
.quiz-step {
  margin-bottom: 20px;
}

.quiz-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* NUMBER BADGE (1, 2, 3) */
.quiz-label-num {
  background: #f1f5f9;
  color: #0f172a;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quiz-options--inline {
  flex-direction: row;
}

.quiz-options--inline .quiz-step-btn {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  font-size: 0.85rem;
}

/* STILE BASE DEI BOTTONI DEL QUIZ */
.quiz-step-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.quiz-step-btn:hover {
  border-color: #86efac;
  background-color: #f0fdf4;
}

.quiz-step-btn:active {
  transform: scale(0.98);
}

/* STILE BOTTONE SELEZIONATO (GESTITO ANCHE VIA JS) */
.quiz-step-btn.is-active {
  background-color: #f0fdf4 !important;
  border-color: #25d366 !important;
  color: #14532d !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 1px #25d366, 0 4px 10px rgba(37, 211, 102, 0.12) !important;
}

/* BOTTONE FINALE WHATSAPP */
.quiz-cta-container {
  margin-top: 24px;
}

.btn-wa-quiz {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: #ffffff;
  text-align: center;
  padding: 16px 20px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.btn-wa-quiz:hover {
  background: #20bd5a;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
}

.btn-wa-quiz.disabled {
  opacity: 0.5;
  pointer-events: none;
  background: #94a3b8;
  box-shadow: none;
}

.quiz-trust-note {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
  font-weight: 600;
}

/* SEZIONE PUNTI DI FORZA (Sub-Hero) */
.features-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 15px auto 25px auto;
  padding: 0 10px;
  box-sizing: border-box;
}

.feature-mini-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.feature-mini-icon {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 4px;
}

.feature-mini-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.feature-mini-desc {
  font-size: 0.68rem;
  color: #64748b;
  margin: 0;
  line-height: 1.2;
}

/* SEZIONE RECENSIONI FLASH */
.reviews-flash-section {
  max-width: 480px;
  margin: 0 auto 25px auto;
  padding: 0 10px;
}

.flash-review-card {
  background: #ffffff;
  border-left: 3px solid #25d366;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  background-color: #f0fdf4;
}

.flash-review-stars {
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.flash-review-text {
  font-size: 0.8rem;
  color: #334155;
  font-style: italic;
  margin: 0 0 4px 0;
  line-height: 1.35;
}

.flash-review-author {
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
  margin: 0;
}

/* SEZIONE FAQ ACCORDION */
.faq-compact-section {
  max-width: 480px;
  margin: 0 auto 30px auto;
  padding: 0 10px;
}

.faq-compact-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 12px;
}

.faq-compact-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-compact-item details summary {
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-compact-item details summary::-webkit-details-marker {
  display: none;
}

.faq-compact-item details summary::after {
  content: "＋";
  font-size: 0.85rem;
  color: #64748b;
}

.faq-compact-item details[open] summary::after {
  content: "－";
}

.faq-compact-answer {
  padding: 0 12px 10px 12px;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.35;
  margin: 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

/* BARRA STICKY MOBILE CON COMPARSA ALLO SCROLL */
.sticky-wa-bar {
  display: none; /* Nascosta di default su desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 15px;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.12);
  z-index: 999;
  box-sizing: border-box;
  
  /* Transizione fluida per comparsa/scomparsa */
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: all 0.3s ease-in-out;
}

/* CLASSE APPLICATA VIA JS ALLO SCROLL */
.sticky-wa-bar.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sticky-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 12px;
  border-radius: 25px;
  text-align: center;
}

@media (max-width: 768px) {
  .sticky-wa-bar {
    display: block; /* Attiva il blocco solo su mobile */
  }
}