/* =========================================================
   TAPEVI DOCTOR — SISTEMA VISUAL DE LANDINGS (MOBILE-FIRST)
   Basado en el volante oficial: "¿Eres médico? Tu agenda puede ser más simple."
   Paleta: azul marino + azul clínico + verde salud sobre blanco pulcro.
   ========================================================= */

:root {
  --navy: #071B41;
  --blue: #0072CE;
  --blue-dark: #005294;
  --blue-soft: #EBF4FB;
  --green: #10B981;
  --green-soft: #E8F7F0;
  --teal: #008C83;
  --teal-soft: #E6F6F4;
  --ink: #172033;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F6FAFF;
  --radius: 20px;
  --shadow: 0 12px 32px -12px rgba(7, 27, 65, 0.14);
  --shadow-lg: 0 24px 60px -20px rgba(0, 114, 206, 0.28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* espacio para la barra CTA fija en celular */
}
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- HEADER ---------- */
.l-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.l-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 10px; }
.l-logo img { height: 32px; width: auto; }
.l-nav { display: none; gap: 22px; }
.l-nav a { text-decoration: none; font-size: 0.9rem; font-weight: 500; color: var(--muted); transition: color .15s; white-space: nowrap; }
.l-nav a:hover, .l-nav a.is-active { color: var(--blue); }
.l-header-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-ghost {
  text-decoration: none; font-weight: 600; font-size: 0.86rem; color: var(--blue);
  padding: 8px 15px; border-radius: 999px; border: 1.5px solid #cfe2fb; background: #fff;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--blue-soft); }

/* Control unificado de Menú Móvil y Toggle Hamburguesa */
.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f9fd;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
  flex-shrink: 0;
}
.mobile-menu-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
  padding: 18px 20px;
  z-index: 99;
  box-shadow: 0 16px 32px rgba(13, 27, 69, 0.14);
  flex-direction: column;
  gap: 10px;
}
.mobile-menu-drawer.open { display: flex !important; }
.mobile-menu-drawer a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.94rem;
  border-bottom: 1px solid var(--line);
}

/* Utilidades de vista dedicada Móvil vs Escritorio en la misma URL (100% SEO-safe) */
.only-mobile { display: block; }
.only-desktop { display: none; }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .l-logo img { height: 27px; }
  /* En pantallas de celular angostas ocultamos "Entrar" del header superior porque ya está grande dentro del menú ☰ */
  .l-header-cta .btn-ghost { display: none; }
}

/* ---------- BOTÓN PRINCIPAL (estilo volante) ---------- */
.btn-main {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--blue);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(0, 114, 206, 0.4);
  transition: transform .15s, background .15s, box-shadow .15s;
  text-align: center;
}
.btn-main:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(0, 114, 206, 0.5);
}
.btn-main:active {
  background: #003057;
  transform: translateY(0);
}
.btn-main:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}
.btn-main svg { flex-shrink: 0; }
.btn-main.with-spark::before {
  display: none;
}
.btn-block { width: 100%; }
.btn-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--navy);
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  text-align: center;
}
.btn-light:hover { border-color: #c8d6e8; background: var(--bg-soft); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 70% at 100% 0%, #e7f1fd 0%, rgba(231,241,253,0) 60%),
    radial-gradient(90% 60% at 0% 100%, #eef8f4 0%, rgba(238,248,244,0) 60%),
    #fff;
  padding: 22px 0 32px;
}
.hero-grid { display: grid; gap: 24px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; color: var(--blue);
  background: var(--blue-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
  line-height: 1.3;
}
.hero h1 {
  font-size: clamp(1.88rem, 6.8vw, 3.6rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; color: var(--navy);
}
.hero h1 .h1-blue { display: block; color: var(--blue); font-weight: 700; margin-top: 6px; font-size: 0.84em; }
.hero-rule { width: 64px; height: 4px; border-radius: 4px; background: var(--green); margin: 16px 0; }
.hero-lead, .hero-sub { font-size: 0.98rem; color: var(--muted); max-width: 540px; line-height: 1.55; }
.hero-lead strong, .hero-sub b { color: var(--navy); font-weight: 600; }

.hero-visual { position: relative; }
.hero-visual::before {
  content: ''; position: absolute; inset: 8% -10% -6% 14%;
  background: radial-gradient(closest-side, #dbeafd, rgba(219,234,253,0));
  z-index: 0;
}
.hero-visual img {
  position: relative; z-index: 1; width: 100%; max-width: 420px; margin: 0 auto;
  border-radius: 24px; box-shadow: var(--shadow-lg);
  aspect-ratio: 544 / 860; object-fit: cover; object-position: top;
}
.hero-visual.landscape img {
  aspect-ratio: 1100 / 712;
  object-fit: cover;
  object-position: center;
  max-width: 540px;
  border-radius: 20px;
}
.hero-badge-float {
  position: absolute; z-index: 2; left: 8px; right: auto; max-width: calc(100% - 16px); bottom: 14%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-size: 0.78rem;
}
.hero-badge-float .dot { width: 10px; height: 10px; border-radius: 50%; background: #00A878; box-shadow: 0 0 0 4px #e8f7f0; flex-shrink: 0; }
.hero-badge-float b { display: block; color: var(--navy); font-size: 0.84rem; }
.hero-visual.phone img {
  aspect-ratio: auto; object-fit: contain; max-width: 270px; border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 24px 36px rgba(13,27,69,.2));
}

/* Lista de beneficios estilo volante */
.benefits { list-style: none; display: grid; gap: 12px; margin: 18px 0 22px; }
.benefit { display: flex; align-items: center; gap: 12px; }
.benefit-ico {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.benefit-ico svg { width: 24px; height: 24px; }
.benefit-txt { font-size: 0.95rem; line-height: 1.32; color: var(--muted); }
.benefit-txt b { display: block; color: var(--navy); font-weight: 600; font-size: 1rem; }

.hero-cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--green); }

/* ---------- SECCIONES ---------- */
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.s-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.s-tag { font-size: 0.78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.s-title { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.s-title span { color: var(--blue); }
.s-desc { color: var(--muted); margin-top: 10px; font-size: 1rem; }

/* Pasos */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 20px 74px; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 22px; width: 38px; height: 38px; border-radius: 12px;
  background: var(--blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1.05rem; color: var(--navy); font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 0.93rem; color: var(--muted); }

/* Showcase app */
.showcase { display: grid; gap: 28px; align-items: center; }
.showcase-img { max-width: 300px; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(13,27,69,.18)); }
.checklist { list-style: none; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.97rem; color: var(--muted); }
.checklist li b { color: var(--navy); font-weight: 600; }
.check {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; margin-top: 1px;
  background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center;
}

/* Precios */
.prices { display: grid; gap: 18px; max-width: 900px; margin: 0 auto; }
.price {
  position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 24px; padding: 28px 22px;
}
.price.is-main { border-color: var(--blue); box-shadow: var(--shadow-lg); }
.price-flag {
  position: absolute; top: -13px; left: 22px; background: var(--green); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.price h3 { font-size: 1.15rem; color: var(--navy); font-weight: 600; }
.price .for { font-size: 0.88rem; color: var(--muted); }
.price .amount { font-size: 2.6rem; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; margin: 12px 0 2px; }
.price .amount small { font-size: 0.92rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price .note { font-size: 0.85rem; color: var(--green); font-weight: 600; }
.price ul { list-style: none; display: grid; gap: 10px; margin: 18px 0 24px; }
.price li { display: flex; gap: 10px; font-size: 0.93rem; color: var(--ink); }
.price li svg { color: var(--green); flex-shrink: 0; margin-top: 3px; }
.price-total {
  max-width: 900px; margin: 18px auto 0; text-align: center; font-size: 0.92rem; color: var(--muted);
  background: #fff; border: 1px dashed #c8d6e8; border-radius: 14px; padding: 12px 16px;
}
.price-total b { color: var(--navy); }

/* Módulo WhatsApp */
.addon {
  display: flex; gap: 16px; align-items: flex-start; max-width: 900px; margin: 22px auto 0;
  background: var(--green-soft); border: 1.5px solid #bfe9d6; border-radius: 20px; padding: 20px;
}
.addon-ico { width: 48px; height: 48px; border-radius: 14px; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.addon h3 { font-size: 1.02rem; color: #0f5132; font-weight: 600; }
.addon p { font-size: 0.9rem; color: #1d5b40; }
.pill-soon { display: inline-block; font-size: 0.7rem; font-weight: 700; background: #fff; color: var(--green); border: 1px solid #bfe9d6; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* Más opciones (otras landings) */
.more-grid { display: grid; gap: 16px; }
.more {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  background: #fff; border: 1.5px solid var(--line); border-radius: 22px; padding: 24px 22px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.more:hover { border-color: #b9d4f6; transform: translateY(-3px); box-shadow: var(--shadow); }
.more-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.more-ico.blue { background: var(--blue-soft); color: var(--blue); }
.more-ico.teal { background: var(--teal-soft); color: var(--teal); }
.more-ico.green { background: var(--green-soft); color: var(--green); }
.more h3 { font-size: 1.1rem; color: var(--navy); font-weight: 600; }
.more p { font-size: 0.92rem; color: var(--muted); }
.more .go { font-size: 0.92rem; font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; margin-top: auto; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 28px 14px 0; position: relative;
  font-weight: 600; color: var(--navy); font-size: 0.98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--blue); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); font-size: 0.94rem; padding: 0 0 16px; }

/* CTA final */
.final {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, #f2f8ff 0%, #e6f1fe 100%);
  padding: 56px 0 60px;
}
.final h2 { font-size: clamp(1.7rem, 6.5vw, 2.6rem); font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.final p { color: var(--muted); max-width: 520px; margin: 10px auto 26px; }

/* Footer */
.l-footer { background: var(--navy); color: #a9b6cf; padding: 44px 0 28px; font-size: 0.88rem; }
.f-grid { display: grid; gap: 28px; }
.l-footer h4 { color: #fff; font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; }
.l-footer ul { list-style: none; display: grid; gap: 8px; }
.l-footer a { text-decoration: none; color: #a9b6cf; }
.l-footer a:hover { color: #fff; }
.f-brand img { height: 30px; width: auto; filter: brightness(0) invert(1); margin-bottom: 12px; }
.f-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; font-size: 0.8rem; text-align: center; }

/* Barra CTA fija en celular */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center;
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .txt { font-size: 0.78rem; color: var(--muted); line-height: 1.25; flex: 1; }
.sticky-cta .txt b { display: block; color: var(--navy); font-size: 0.92rem; }
.sticky-cta .btn-main { padding: 12px 18px; font-size: 0.92rem; }

/* Comparativa (consultorio) */
.compare { display: grid; gap: 16px; }
.cmp { border-radius: 22px; padding: 24px 22px; border: 1.5px solid var(--line); background: #fff; }
.cmp.bad { background: #fff7f7; border-color: #fbd5d5; }
.cmp.good { background: #f1fbf6; border-color: #bfe9d6; }
.cmp h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 12px; }
.cmp.bad h3 { color: #a12a2a; }
.cmp.good h3 { color: #0f6b46; }
.cmp ul { list-style: none; display: grid; gap: 10px; font-size: 0.93rem; color: var(--ink); }
.cmp li { display: flex; gap: 10px; }

/* Utilidades de tema por landing */
.theme-teal { --blue: #0d9488; --blue-dark: #0b7a70; --blue-soft: #e6f6f4; }
.theme-teal .btn-main { background: linear-gradient(180deg, #14a89b 0%, #0b7a70 100%); box-shadow: 0 12px 26px -8px rgba(13,148,136,.5); }
.theme-hosp { --blue: #1d4ed8; --blue-dark: #1e3a8a; --blue-soft: #e8eefc; }
.theme-hosp .btn-main { background: linear-gradient(180deg, #2f62e6 0%, #1e3a8a 100%); box-shadow: 0 12px 26px -8px rgba(29,78,216,.5); }

/* ---------- TABLET / ESCRITORIO ---------- */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .prices { grid-template-columns: 1fr 1fr; }
  .prices.three { grid-template-columns: repeat(3, 1fr); max-width: 1080px; }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
  .more-grid.two { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr 1fr; }
  .f-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .hero-cta { flex-direction: row; align-items: center; }
  .btn-block.btn-main { width: auto; }
  .hero-cta .btn-main.with-spark { margin-left: 26px; }
  .btn-main.with-spark::before {
    display: block;
    content: ''; position: absolute; left: -26px; top: 50%; width: 18px; height: 30px; transform: translateY(-50%);
    background:
      linear-gradient(var(--blue), var(--blue)) 0 0 / 12px 3px no-repeat,
      linear-gradient(var(--blue), var(--blue)) 0 50% / 16px 3px no-repeat,
      linear-gradient(var(--blue), var(--blue)) 0 100% / 12px 3px no-repeat;
    border-radius: 3px; opacity: .85;
  }
}

@media (min-width: 980px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .mobile-toggle { display: none !important; }
  .mobile-menu-drawer { display: none !important; }
  .only-mobile { display: none !important; }
  .only-desktop { display: block !important; }
  .l-nav { display: flex; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero-visual img { max-width: 470px; }
  .hero-visual.landscape img { max-width: 560px; }
  .section { padding: 84px 0; }
  .showcase { grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
  .showcase-img { max-width: 330px; }
  .price.is-main.scale-desktop { transform: scale(1.02); z-index: 2; }
}

/* ---------- PÁGINAS LEGALES (PRIVACIDAD Y TÉRMINOS) ---------- */
.legal-wrapper {
  max-width: 860px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.legal-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 36px 30px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .legal-card { padding: 48px 44px; }
}
.legal-header {
  border-bottom: 1.5px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 28px;
}
.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.legal-title {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 10px;
}
.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 18px 0 8px;
}
.legal-body p {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 14px;
}
.legal-body ul, .legal-body ol {
  margin: 10px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  font-size: 0.95rem;
}
.legal-callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.legal-callout.green {
  background: var(--green-soft);
  border-left-color: var(--green);
}
.legal-callout p {
  margin-bottom: 0;
  font-size: 0.92rem;
  color: var(--navy);
}
.legal-callout strong {
  color: var(--navy);
}
.legal-nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.legal-nav-tab {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  transition: all .15s;
}
.legal-nav-tab.is-active, .legal-nav-tab:hover {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: #bad6fa;
}

