/* Layout: póliza institucional — encabezado sobrio, cotizador como "solicitud" a la derecha del argumento, franjas de lectura a 1140px */
:root {
  --ink: #12244f;          /* azul marino del logotipo */
  --ink-2: #1f3a7a;
  --red: #c8172e;          /* rojo FIANZAS */
  --red-soft: #fbe9eb;
  --bg: #ffffff;
  --paper: #f3f5f9;        /* gris frío con sesgo azul */
  --line: #dde2ec;
  --fg: #1a2236;
  --muted: #5a6478;
  --card: #ffffff;
  --ok: #1f7a4d;
  --wa: #128c4b;
  --shadow: 0 1px 2px rgba(18,36,79,.06), 0 12px 32px -12px rgba(18,36,79,.18);
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --w: 1140px;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #c9d6f5; --ink-2: #9fb4e6; --red: #ff5a6c; --red-soft: #3a1820;
    --bg: #0d1424; --paper: #121b30; --line: #24304a; --fg: #e6eaf3; --muted: #9aa6bf;
    --card: #152038; --ok: #4cc58a; --wa: #2fbf71;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #c9d6f5; --ink-2: #9fb4e6; --red: #ff5a6c; --red-soft: #3a1820;
  --bg: #0d1424; --paper: #121b30; --line: #24304a; --fg: #e6eaf3; --muted: #9aa6bf;
  --card: #152038; --ok: #4cc58a; --wa: #2fbf71;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); line-height: 1.12; text-wrap: balance; margin: 0; font-stretch: 112%; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--w); margin: 0 auto; padding-inline: 20px; }
.eyebrow { font-family: var(--f-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--f-body); padding: 14px 22px; border-radius: 8px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #a91225; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Encabezado */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 42px; height: auto; }
.brand b { display: block; font-family: var(--f-display); font-size: 1.02rem; font-stretch: 110%; line-height: 1.1; }
.brand small { display: block; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--red); }
.top .btn { padding: 10px 16px; font-size: .92rem; }
@media (max-width: 900px) { .nav { display: none; } .top .btn { margin-left: auto; } }
@media (max-width: 420px) { .brand small { display: none; } .top .btn span { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--paper), var(--bg)); padding-block: 56px 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding-top: 12px; }
.hero h1 em { font-style: normal; color: var(--red); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 8px; }
.facts div { padding: 16px 16px 0 0; }
.facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts strong { display: block; font-family: var(--f-display); font-size: 1.9rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.facts span { font-size: .88rem; color: var(--muted); line-height: 1.35; display: block; margin-top: 6px; }
.hdi-note { display: flex; gap: 12px; align-items: flex-start; background: var(--red-soft); border-radius: var(--r); padding: 14px 16px; font-size: .96rem; }
.hdi-note b { color: var(--ink); }
.hdi-note svg { width: 22px; height: 22px; flex: none; color: var(--red); margin-top: 2px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 480px) { .facts strong { font-size: 1.5rem; } .facts div + div { padding-left: 10px; } .facts div { padding-right: 10px; } }

/* Cotizador */
.quote { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.quote-head { background: var(--ink); color: #fff; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
:root[data-theme="dark"] .quote-head { color: #0d1424; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quote-head { color: #0d1424; } }
.quote-head h2 { color: inherit; font-size: 1.25rem; }
.quote-head span { font-size: .82rem; opacity: .85; white-space: nowrap; }
.quote form { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--red); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-weight: 700; font-size: .9rem; color: var(--ink); }
.field input[type=text], .field input[type=number], .field input[type=tel], .field input[type=email] {
  font: 500 1rem var(--f-body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); width: 100%;
}
.field input:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink-2) 20%, transparent); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .err { font-size: .82rem; color: var(--red); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { font-weight: 700; font-size: .95rem; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--fg); font-variant-numeric: tabular-nums; transition: background .12s, border-color .12s; user-select: none; }
.chips label:hover { border-color: var(--ink-2); }
.chips input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips input:focus-visible + label { outline: 3px solid var(--red); outline-offset: 2px; }
.chips.sum label { min-width: 72px; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1; }
.fine { font-size: .78rem; color: var(--muted); text-align: center; }
.done { padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.done h3 { font-size: 1.3rem; }
.summary { background: var(--paper); border-radius: 8px; padding: 14px 16px; font-size: .92rem; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.copyline { font-size: .86rem; color: var(--muted); }
.copyline b { color: var(--fg); user-select: all; }

/* Fotos */
.photos { padding-block: 8px 24px; }
.photos .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photos figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--ink-2), var(--ink)); max-width: 100%; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(13,20,36,.78); color: #fff; font-size: .82rem; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.credit { font-size: .75rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .photos .wrap { grid-template-columns: 1fr; } .photos figure { aspect-ratio: 16 / 10; } }

/* Secciones */
.sec { padding-block: 72px; }
.sec.alt { background: var(--paper); }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 760px; }

/* Aseguradoras */
.insurers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ins { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.ins .logo-box { display: flex; align-items: center; justify-content: flex-start; height: 64px; background: #fff; border-radius: 8px; padding: 8px 12px; align-self: flex-start; }
.ins .logo-box img { height: 100%; width: auto; max-width: 190px; object-fit: contain; }
.ins .mark { font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; color: var(--ink); letter-spacing: -.01em; font-stretch: 105%; }
.ins p { color: var(--muted); font-size: .96rem; }
.ins .tag { align-self: flex-start; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); background: var(--red-soft); padding: 4px 8px; border-radius: 4px; }
@media (max-width: 820px) { .insurers { grid-template-columns: 1fr; } }

/* Pasos */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.how li { list-style: none; display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 3px solid var(--ink); }
.how li::before { counter-increment: s; content: "Paso " counter(s); font-family: var(--f-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.how p { color: var(--muted); }
ol.how { padding: 0; margin: 0; }
@media (max-width: 820px) { .how { grid-template-columns: 1fr; gap: 24px; } }

/* Explicador cuenta de hospital */
.bill { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.bill > div { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.terms { display: flex; flex-direction: column; gap: 14px; }
.terms div { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.terms i { width: 14px; height: 14px; border-radius: 3px; margin-top: 6px; }
.terms b { color: var(--ink); }
.ex { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.ex .t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ex .t b { font-family: var(--f-display); color: var(--ink); font-size: 1.05rem; }
.ex .t small { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.bar { display: flex; height: 44px; border-radius: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; }
.c-ded { background: var(--red); }
.c-coa { background: color-mix(in srgb, var(--red) 45%, var(--bg)); }
.c-ins { background: var(--ink-2); }
.legend { margin-top: 16px; display: grid; gap: 8px; font-size: .95rem; }
.legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend b { font-variant-numeric: tabular-nums; color: var(--fg); }
.legend .tot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.ex .note { margin-top: 14px; font-size: .82rem; color: var(--muted); }
@media (max-width: 860px) { .bill { grid-template-columns: 1fr; } }

/* Confianza */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.trust div { display: flex; flex-direction: column; gap: 8px; }
.trust svg { width: 28px; height: 28px; color: var(--red); }
.trust p { color: var(--muted); font-size: .96rem; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; color: var(--red); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: 68ch; }

/* CTA */
.cta { background: var(--ink); padding-block: 56px; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: var(--bg); max-width: 22ch; }
.cta p { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); margin-top: 8px; }
.cta .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.foot { background: var(--paper); padding-block: 56px 28px; border-top: 1px solid var(--line); font-size: .94rem; }
.foot .grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.foot .logo-plate { background: #fff; border-radius: var(--r); padding: 14px; max-width: 240px; border: 1px solid var(--line); }
.foot h4 { font-family: var(--f-display); color: var(--ink); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot a { color: var(--fg); text-decoration: none; }
.foot a:hover { color: var(--red); }
.foot address { font-style: normal; color: var(--muted); }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
@media (max-width: 900px) { .foot .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot .grid { grid-template-columns: 1fr; } }

/* Botón flotante WhatsApp */
.float-wa { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 30; }
.float-wa svg { width: 30px; height: 30px; }

/* Páginas de texto (aviso, blog) */
.page-head { background: var(--paper); padding-block: 48px 36px; border-bottom: 1px solid var(--line); }
.page-head .wrap { display: flex; flex-direction: column; gap: 12px; }
.prose { max-width: 760px; padding-block: 40px 72px; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--fg); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.prose .meta { color: var(--muted); font-size: .92rem; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post { border: 1px dashed var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.post small { color: var(--red); font-weight: 700; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.post p { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .posts { grid-template-columns: 1fr; } }

/* Página de aseguradora */
.crumbs { font-size: .88rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.page-head h1 { max-width: 22ch; }
.facts-4 { grid-template-columns: repeat(4, 1fr); max-width: 900px; }
@media (max-width: 720px) { .facts-4 { grid-template-columns: 1fr 1fr; row-gap: 16px; } .facts-4 div:nth-child(3) { border-left: 0; padding-left: 0; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.plans { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .98rem; }
.plans th, .plans td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans thead th { background: var(--paper); font-family: var(--f-display); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.plans tbody th { font-family: var(--f-display); color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.plans td:nth-child(2) { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plans td:last-child { color: var(--muted); }
.plans tr:last-child th, .plans tr:last-child td { border-bottom: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.feat { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--ink); min-width: 0; }
.feat p { color: var(--muted); font-size: .98rem; }
.features-2 { grid-template-columns: 1fr 1fr; max-width: 900px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.disclaimer { font-size: .84rem; color: var(--muted); padding-block: 28px; max-width: 80ch; }
.ins .more { margin-top: auto; font-weight: 700; color: var(--red); text-decoration: none; }
.ins .more:hover { text-decoration: underline; }
