/* ============================================================
   FUNIL MEDSENIOR — Tema claro com a paleta oficial MedSenior
   Verde escuro #1E5B38 + verde claro #8CC63F, fundos claros.
   Tipografia maior e botoes grandes para o publico 44+.
   Mesmas classes do funil Somar (app.js compartilha a estrutura).
   ============================================================ */

:root {
  --verde-escuro: #1E5B38;
  --verde: #2E7D4A;
  --verde-claro: #8CC63F;
  --verde-claro-2: #A5D45E;
  --laranja: #E67E22;
  --bg: #F2F7EE;
  --bg-2: #E8F1E2;
  --card: #FFFFFF;
  --border: rgba(30, 91, 56, .18);
  --text: #1B2B21;
  --text-soft: #3D5245;
  --muted: #5A6B5F;
  --danger: #C0392B;
  --danger-bg: #FDEDEB;
  --shadow: 0 18px 48px rgba(27, 43, 33, .12);
  --shadow-soft: 0 8px 22px rgba(27, 43, 33, .10);
  --radius: 24px;
  --radius-sm: 16px;
  --container: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 17px; /* base maior para leitura confortavel 44+ */
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(140, 198, 63, .16), transparent 30%),
    radial-gradient(circle at top right, rgba(30, 91, 56, .10), transparent 26%),
    linear-gradient(180deg, #FAFDF7 0%, var(--bg) 40%, var(--bg-2) 100%);
  overflow-x: hidden;
  position: relative;
  transition: background .35s ease;
}

/* Alternancia de fundo entre perguntas: pares ficam BRANCOS */
body.step-bg-alt {
  background:
    radial-gradient(circle at top left, rgba(140, 198, 63, .08), transparent 30%),
    linear-gradient(180deg, #FFFFFF 0%, #FAFCF8 60%, #F4F8F0 100%);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.bg-orb {
  position: fixed; border-radius: 999px; filter: blur(90px); opacity: .18; pointer-events: none; z-index: 0;
}
.orb-1 { width: 380px; height: 380px; background: var(--verde-claro); top: -140px; left: -120px; }
.orb-2 { width: 300px; height: 300px; background: var(--verde-escuro); right: -100px; top: 140px; opacity: .10; }
body.step-bg-alt .bg-orb { opacity: .08; }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; opacity: .05; pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 91, 56, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 91, 56, .5) 1px, transparent 1px);
  background-size: 44px 44px;
}

.topbar, .page, .site-footer { position: relative; z-index: 1; }

/* ===== Topo ===== */
.topbar {
  width: min(calc(100% - 26px), var(--container));
  margin: 16px auto 0;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.brand-wrap, .footer-brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { max-width: 220px; width: 100%; height: auto; display: block; }
.footer-logo { max-width: 130px; width: 100%; height: auto; display: block; }
.topbar-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-cta { padding: 13px 22px; font-size: .95rem; white-space: nowrap; }

.page { width: min(calc(100% - 26px), var(--container)); margin: 26px auto 46px; }

/* ===== Botoes (grandes, alto contraste) ===== */
.primary-btn, .secondary-btn, .ghost-btn {
  border: none; border-radius: 16px; padding: 17px 24px; transition: .22s ease; font-weight: 700; min-height: 54px;
}
.primary-btn {
  background: linear-gradient(135deg, var(--verde-escuro), var(--verde));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(30, 91, 56, .28);
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(30, 91, 56, .34); }
.secondary-btn {
  background: #EFF5EC; color: var(--verde-escuro); border: 1.5px solid var(--border);
}
.secondary-btn:hover, .ghost-btn:hover { background: #E3EEDD; }
.ghost-btn { background: transparent; color: var(--text-soft); border: 1.5px solid var(--border); }
.primary-btn.full, .secondary-btn.full, .ghost-btn.full { width: 100%; display: inline-flex; justify-content: center; align-items: center; }

/* ===== Hero ===== */
.hero-compact {
  padding: 34px 32px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-main { max-width: 780px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .9rem; font-weight: 700; margin-bottom: 16px;
  background: rgba(140, 198, 63, .16); border: 1px solid rgba(140, 198, 63, .45);
  color: var(--verde-escuro); border-radius: 999px;
}

.hero-main h1, .step-title, .result-card h2, .cookie-modal-card h3, .thanks-card h2 {
  font-family: 'Playfair Display', serif;
  color: var(--verde-escuro);
}
.hero-main h1 {
  margin: 0; font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.1;
}
.hero-main h1 em { color: var(--verde-claro); font-style: normal; }

.hero-text {
  margin: 16px 0 18px; color: var(--text-soft); line-height: 1.75; font-size: 1.08rem;
}

.hero-mini-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.hero-mini-row span {
  display: inline-flex; padding: 10px 14px; border-radius: 999px;
  background: #EFF5EC; border: 1px solid var(--border);
  color: var(--verde-escuro); font-size: .95rem; font-weight: 600;
}

.hero-cta { align-self: flex-start; min-width: 280px; font-size: 1.1rem; }

.ans-note {
  display: block; margin-top: 14px; color: var(--muted); font-size: .85rem;
}

/* ===== Brinde em destaque ===== */
.gift-callout-highlight {
  position: relative;
  margin: 4px 0 18px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(230, 126, 34, .14), rgba(140, 198, 63, .14));
  border: 2px solid rgba(230, 126, 34, .55);
  box-shadow: 0 12px 28px rgba(230, 126, 34, .16);
  overflow: hidden;
  animation: giftPulse 2.6s ease-in-out infinite;
}
.gift-callout-highlight .gift-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--laranja); color: #ffffff;
  font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(230, 126, 34, .35);
}
.gift-callout-highlight strong {
  display: block; color: var(--text); font-size: 1.1rem; line-height: 1.32; margin-bottom: 6px;
}
.gift-callout-highlight .gift-callout-desc {
  display: block; color: var(--text-soft); font-size: .98rem; line-height: 1.55;
}
.gift-callout-highlight .gift-callout-desc em { font-style: normal; font-weight: 700; color: var(--verde-escuro); }

@keyframes giftPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(230, 126, 34, .16); }
  50%      { box-shadow: 0 12px 34px rgba(230, 126, 34, .32), 0 0 0 4px rgba(230, 126, 34, .10); }
}

.gift-btn {
  border: none; border-radius: 16px; padding: 17px 24px; min-height: 54px;
  transition: .22s ease; font-weight: 800;
  background: linear-gradient(135deg, var(--laranja), #F39C4D);
  color: #ffffff; text-align: center; text-decoration: none;
  box-shadow: 0 12px 28px rgba(230, 126, 34, .28);
}
.gift-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(230, 126, 34, .34); }
.gift-btn.full { width: 100%; display: inline-flex; justify-content: center; align-items: center; }

/* ===== Funil ===== */
.funnel-shell, .result-shell, .thanks-shell { max-width: 860px; margin: 0 auto; }

.progress-block {
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-soft);
}
.progress-track { height: 12px; border-radius: 999px; background: #E3EEDD; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--verde-claro), var(--verde-escuro));
  border-radius: inherit; transition: width .32s ease;
}

.funnel-card, .result-card, .thanks-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Card fica com borda verde mais forte nos passos pares (fundo branco) */
.funnel-card.step-alt {
  border-color: rgba(140, 198, 63, .55);
  box-shadow: 0 22px 54px rgba(27, 43, 33, .14);
}

.question-meta {
  color: var(--verde); text-transform: uppercase; letter-spacing: .08em;
  font-size: .8rem; font-weight: 800; margin-bottom: 12px;
}

.step-title { font-size: clamp(1.9rem, 3.2vw, 2.5rem); line-height: 1.14; margin: 0 0 10px; }
.step-subtitle { color: var(--text-soft); line-height: 1.7; margin-bottom: 24px; font-size: 1.05rem; }

.option-grid { display: grid; gap: 14px; }
.option-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.option-card {
  width: 100%; text-align: left; padding: 20px; border-radius: 20px;
  background: #F7FAF4; border: 2px solid var(--border);
  color: var(--text); position: relative; transition: .2s ease;
}
.option-card:hover { transform: translateY(-2px); background: #EFF5EC; border-color: rgba(140, 198, 63, .6); }
.option-card.selected {
  background: rgba(140, 198, 63, .16);
  border-color: var(--verde-claro);
  box-shadow: inset 0 0 0 1px rgba(140, 198, 63, .35);
}
.option-title { font-weight: 800; display: block; margin-bottom: 6px; font-size: 1.08rem; color: var(--verde-escuro); }
.option-desc { color: var(--text-soft); font-size: .98rem; line-height: 1.55; }

.field-block { display: grid; gap: 18px; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.field { display: grid; gap: 8px; }
.field label { color: var(--text); font-weight: 700; font-size: 1rem; }
.field input, .field textarea, .field select {
  width: 100%; border: 2px solid var(--border); background: #FBFDF9; color: var(--text);
  border-radius: 14px; padding: 16px; outline: none; transition: .2s ease; font-size: 1.05rem;
}
.field input::placeholder, .field textarea::placeholder { color: #94A69A; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--verde-claro); box-shadow: 0 0 0 4px rgba(140, 198, 63, .18);
}
.field-help { font-size: .9rem; color: var(--muted); }

.field select option, .field select optgroup {
  background-color: #ffffff; color: var(--text); font-weight: 500;
}

.helper-box, .notice-box {
  padding: 16px 18px; border-radius: 16px;
  background: rgba(230, 126, 34, .10); border: 1.5px solid rgba(230, 126, 34, .35);
  color: #7A4A1A;
}
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: inherit; line-height: 1.58; }
.check-list li::before { content: '✓'; color: var(--verde); font-weight: 800; }

.age-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.age-chip {
  padding: 14px; border-radius: 16px; background: #F7FAF4; border: 2px solid var(--border);
}
.age-chip strong { display: block; margin-bottom: 8px; font-size: .98rem; color: var(--verde-escuro); }
.age-chip input {
  width: 100%; padding: 15px; border-radius: 12px; border: 2px solid var(--border);
  background: #ffffff; color: var(--text); font-size: 1.1rem; text-align: center;
}
.age-note { margin-bottom: 18px; color: var(--verde); font-size: .98rem; font-weight: 600; }

/* ===== Elegibilidade MedSenior (regra dos 44 anos) ===== */
.elig-warning {
  margin-top: 18px; padding: 18px;
  border-radius: 16px;
  background: rgba(230, 126, 34, .12);
  border: 2px solid rgba(230, 126, 34, .5);
  color: #7A4A1A;
  line-height: 1.6;
}
.elig-warning strong { display: block; color: #9A5B1E; margin-bottom: 6px; font-size: 1.05rem; }
.elig-warning .primary-btn { margin-top: 12px; }

.elig-block {
  margin-top: 18px; padding: 20px;
  border-radius: 16px;
  background: var(--danger-bg);
  border: 2px solid rgba(192, 57, 43, .45);
  color: #7B2D22;
  line-height: 1.6;
}
.elig-block strong { display: block; color: var(--danger); margin-bottom: 8px; font-size: 1.1rem; }
.elig-block .elig-actions { display: grid; gap: 10px; margin-top: 14px; }
.elig-block a.primary-btn { text-decoration: none; text-align: center; }

.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.nav-row .primary-btn, .nav-row .secondary-btn { min-width: 150px; }

.error-text { color: var(--danger); font-size: .98rem; margin-top: 14px; font-weight: 600; }

/* ===== Consentimento LGPD ===== */
.consent-box {
  margin-top: 6px; padding: 16px; border-radius: 16px;
  background: rgba(140, 198, 63, .10);
  border: 2px solid rgba(140, 198, 63, .5);
  transition: .2s ease;
}
.consent-label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 0; }
.consent-label input[type="checkbox"] {
  width: 24px; height: 24px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
  accent-color: var(--verde-escuro);
}
.consent-label span { line-height: 1.5; }
.consent-label a { color: var(--verde-escuro); font-weight: 700; }
.consent-hint {
  display: block; margin-top: 10px; color: var(--verde); font-weight: 800; font-size: .95rem;
}
.consent-box.has-error {
  border-color: rgba(192, 57, 43, .7);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, .12);
  background: var(--danger-bg);
}
.consent-box.has-error .consent-hint { color: var(--danger); }

/* ===== Resultado ===== */
.result-icon {
  width: 66px; height: 66px; display: grid; place-items: center; border-radius: 20px;
  background: rgba(140, 198, 63, .2); color: var(--verde-escuro); font-size: 2rem; margin-bottom: 12px; font-weight: 800;
}
.result-text, .summary-item span { color: var(--text-soft); line-height: 1.68; }
.summary-panel { display: grid; gap: 12px; margin: 22px 0; }
.summary-item {
  border-radius: 16px; padding: 14px 16px; background: #F7FAF4; border: 1px solid var(--border);
}
.summary-item strong { display: block; margin-bottom: 4px; color: var(--verde-escuro); }
.result-actions { display: grid; gap: 12px; }
.notice-box { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.notice-box strong { color: #9A5B1E; }

/* ===== Obrigado ===== */
.thanks-card { text-align: center; }
.thanks-confetti { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.thanks-card h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12; margin: 4px 0 10px; }
.thanks-card .lead-text { color: var(--text-soft); line-height: 1.7; margin: 0 0 18px; font-size: 1.05rem; }
.thanks-steps { display: grid; gap: 12px; margin: 18px 0 22px; text-align: left; }
.thanks-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 16px; background: #F7FAF4; border: 1px solid var(--border);
}
.thanks-step .num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px;
  background: linear-gradient(135deg, var(--verde-claro), var(--verde-escuro));
  color: #ffffff; font-weight: 800; display: grid; place-items: center; font-size: .95rem;
}
.thanks-step strong { display: block; margin-bottom: 2px; color: var(--verde-escuro); }
.thanks-step span { color: var(--text-soft); font-size: .96rem; line-height: 1.55; }

.gift-fallback {
  position: relative; margin: 8px 0 18px; padding: 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(230, 126, 34, .14), rgba(140, 198, 63, .12));
  border: 2px solid rgba(230, 126, 34, .5);
  box-shadow: 0 12px 28px rgba(230, 126, 34, .16);
  text-align: left; animation: giftPulse 2.6s ease-in-out infinite;
}
.gift-fallback strong { display: block; margin-bottom: 4px; font-size: 1.08rem; color: var(--text); }
.gift-fallback span { display: block; color: var(--text-soft); line-height: 1.55; font-size: .98rem; margin-bottom: 12px; }
.gift-fallback em { font-style: normal; font-weight: 700; color: var(--verde-escuro); }

.thanks-secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ===== Cookies ===== */
.cookie-banner { position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 60; }
.cookie-content {
  max-width: var(--container); margin: 0 auto; padding: 18px 20px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.cookie-content p { color: var(--text-soft); line-height: 1.6; margin: 6px 0 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-modal, .loading-overlay {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 70;
  background: rgba(27, 43, 33, .45); padding: 20px;
}
.cookie-modal-card, .loading-card {
  width: min(100%, 560px); padding: 28px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.cookie-modal-card p { color: var(--text-soft); line-height: 1.65; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-of-type { margin-bottom: 18px; }
.toggle-fixed { color: var(--muted); font-size: .92rem; }
.loading-card { text-align: center; display: grid; gap: 10px; }
.loader {
  width: 44px; height: 44px; border-radius: 999px;
  border: 4px solid #E3EEDD; border-top-color: var(--verde-escuro);
  margin: 0 auto; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Rodape ===== */
.site-footer {
  width: min(calc(100% - 26px), var(--container)); margin: 0 auto 24px; padding: 22px 0 32px;
  display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap;
  color: var(--text-soft);
}
.site-footer p { margin: 2px 0 0; font-size: .92rem; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--verde-escuro); font-size: .95rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Painel legal ===== */
.legal-preview-panel { width: min(calc(100% - 26px), 940px); margin: 0 auto 46px; }
.legal-preview-card {
  border-radius: var(--radius); padding: 28px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.legal-back-btn { margin-bottom: 20px; }
.legal-doc-logo { max-width: 210px; width: 100%; height: auto; display: block; margin-bottom: 18px; }
.legal-doc-content h1 {
  font-family: 'Playfair Display', serif; color: var(--verde-escuro);
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; margin: 0 0 20px;
}
.legal-doc-content h2 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--verde-escuro); }
.legal-doc-content p, .legal-doc-content li { color: var(--text-soft); line-height: 1.75; font-size: 1rem; }
.legal-doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ===== Mobile ===== */
@media (max-width: 1000px) {
  .hero-main { max-width: 100%; }
}
@media (max-width: 780px) {
  body { font-size: 16px; }
  .page { margin-top: 16px; }
  .topbar { margin-top: 10px; padding: 12px 14px; flex-wrap: wrap; }
  .brand-logo { max-width: 172px; }
  /* Botao de cotacao do topo: sempre visivel no mobile, largura total */
  .topbar-meta { display: flex; width: 100%; }
  .topbar-cta { width: 100%; justify-content: center; }

  .hero-compact { padding: 22px 18px; }
  .hero-main h1 { font-size: clamp(1.85rem, 8.4vw, 2.5rem); line-height: 1.08; }
  .hero-text { font-size: 1rem; line-height: 1.6; }
  .eyebrow { padding: 8px 12px; font-size: .8rem; }
  .hero-mini-row span { padding: 8px 11px; font-size: .85rem; }
  .hero-cta { width: 100%; min-width: 0; }

  .gift-callout-highlight { padding: 14px 14px 12px; }
  .gift-callout-highlight strong { font-size: 1rem; }
  .gift-callout-highlight .gift-callout-desc { font-size: .92rem; }

  .funnel-card, .result-card, .thanks-card { padding: 22px 18px; }
  .field-row, .option-grid.cols-2, .age-grid { grid-template-columns: 1fr; }
  .nav-row { flex-direction: column-reverse; }
  .nav-row .primary-btn, .nav-row .secondary-btn { width: 100%; }
  .cookie-content { flex-direction: column; align-items: stretch; }
  .thanks-secondary-row { grid-template-columns: 1fr; }
}
