/* Web de turnos + panel de secretaría. Sin dependencias externas ni JavaScript. */
:root {
  --bg: #f5eee2;
  --surface: #ffffff;
  --ink: #0e1626;
  --muted: #5a6070;
  --line: #e5dac4;
  --brand: #1b2b52;
  --brand-dark: #0c1630;
  --brand-deep: #0b1426;
  --brand-soft: #eee3cc;
  --accent: #8a6500;
  --accent-soft: #fff3c2;
  --ok-bg: #dff3e6;
  --ok-ink: #17623a;
  --warn-bg: #fff0c9;
  --warn-ink: #735000;
  --bad-bg: #fde2e2;
  --bad-ink: #98222a;
  --grey-bg: #ece5d6;
  --grey-ink: #5a6070;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 20, 38, .06), 0 10px 28px rgba(11, 20, 38, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; font-weight: 650; }
h1, h2 { font-family: var(--serif); letter-spacing: -.012em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #e0b400; outline-offset: 2px; border-radius: 6px; }
svg { display: block; }

.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }
.wrap.narrow { width: min(100% - 32px, 760px); }
.wrap.wide { width: min(100% - 32px, 1280px); }
.section { padding: 56px 0; }
.section.tint { background: var(--surface); border-block: 1px solid var(--line); }
.center { text-align: center; }

/* ---------- cabecera / pie ---------- */
.demo-banner { background: var(--brand-deep); color: #e8e1d2; text-align: center; font-size: .86rem; padding: 7px 12px; }
.site-head { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-deep); }
.brand svg { flex: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.12rem; line-height: 1.15; }
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.site-foot { background: var(--brand-deep); color: #e8e1d2; padding: 40px 0 48px; margin-top: 0; font-size: .92rem; }
.site-foot a { color: #fff; }
.site-foot .cols { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; }
.site-foot h3 { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.urgent { border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 12px 16px; }
main { padding: 0; }
main > .wrap:first-child { padding-top: 36px; padding-bottom: 8px; }

/* ---------- elementos comunes ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9em; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 58ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; text-align: center; font: inherit; font-weight: 650; padding: 11px 22px; border-radius: 999px; background: var(--brand); color: #fff; min-height: 46px; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--brand-soft); color: var(--brand-dark); }
.btn.secondary:hover { background: #e3d5b5; }
.btn.ghost { background: transparent; color: var(--brand-dark); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--bad-bg); color: var(--bad-ink); }
.btn.danger:hover { background: #f9cdcd; }
.btn.small { padding: 6px 14px; min-height: 36px; font-size: .9rem; }
.btn.btn-lg { padding: 15px 30px; min-height: 56px; font-size: 1.05rem; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.pill { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .82rem; font-weight: 650; background: var(--grey-bg); color: var(--grey-ink); }
.pill.PENDIENTE { background: var(--warn-bg); color: var(--warn-ink); }
.pill.CONFIRMADO { background: var(--ok-bg); color: var(--ok-ink); }
.pill.PENDIENTE_PAGO { background: #dcecf9; color: #124a7a; }
.pill.VENCIDO { background: var(--grey-bg); color: var(--grey-ink); }
.pill.CANCELADO { background: var(--bad-bg); color: var(--bad-ink); }
.pill.REALIZADO { background: var(--grey-bg); color: var(--grey-ink); }

.notice { border-radius: 12px; padding: 13px 18px; margin-bottom: 18px; background: var(--brand-soft); border: 1px solid #dccfb2; }
.notice svg { display: inline-block; vertical-align: -4px; margin-right: 6px; }
.notice.ok { background: var(--ok-bg); border-color: #b6e0c4; color: var(--ok-ink); }
.notice.err { background: var(--bad-bg); border-color: #f2bcbc; color: var(--bad-ink); }
.notice.warn { background: var(--warn-bg); border-color: #efd88f; color: var(--warn-ink); }

/* ---------- inicio ---------- */
.hero { background: linear-gradient(180deg, #f0e6d2 0%, var(--bg) 100%); padding: 52px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.15fr .85fr; align-items: center; }
.hero h1 { color: var(--brand-deep); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 24px; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px 22px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { color: var(--brand); flex: none; }
.hero-art { max-width: 420px; margin-inline: auto; width: 100%; }

.steps-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 28px; counter-reset: s; }
.step-card { position: relative; padding: 26px 24px 24px; }
.step-card .num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 14px; }
.step-card p { margin: 0; color: var(--muted); }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--accent-soft); border: 1px solid #f2e29b; border-radius: var(--radius); padding: 26px; }
.callout .ico { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; color: var(--accent); }
.callout h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: .3em; }
.callout p { margin: 0; color: #4a3d12; }

.team-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 26px; }
.person { text-align: center; padding: 28px 20px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--brand-deep); background: linear-gradient(135deg, #efe1b5, #f3ead8); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); }
.person h3 { margin-bottom: .15em; }
.person p { margin: 0; color: var(--muted); font-size: .92rem; }

.info-box { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: var(--brand-deep); color: #fff; border-radius: 22px; padding: 34px; }
.info-box h2 { color: #fff; margin-bottom: .35em; }
.info-box p { color: #e8e1d2; margin: 0; max-width: 56ch; }
.info-box .btn { background: #fff; color: var(--brand-deep); }
.info-box .btn:hover { background: #eee3cc; }

.faq { display: grid; gap: 10px; margin-top: 22px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 650; padding: 16px 28px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- reserva ---------- */
.stepper { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 30px; counter-reset: st; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; font-weight: 600; position: relative; }
.stepper li::after { content: ""; flex: 1; height: 2px; background: var(--line); margin: 0 12px; border-radius: 2px; }
.stepper li:last-child { flex: none; }
.stepper li:last-child::after { display: none; }
.stepper .n { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; flex: none; font-size: .9rem; }
.stepper .done { color: var(--brand-dark); }
.stepper .done .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .done::after { background: var(--brand); }
.stepper .current { color: var(--brand-deep); }
.stepper .current .n { border-color: var(--brand); color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-soft); }

.book-grid { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; align-items: start; }
.aside-card { background: var(--brand-soft); border: 1px solid #dccfb2; border-radius: var(--radius); padding: 24px; }
.aside-card h3 { font-family: var(--serif); font-size: 1.2rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.timeline .dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 1px #dccfb2; }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: .92rem; }

form.stack { display: grid; gap: 18px; }
.two { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
label { font-weight: 650; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid #cdbd9c; border-radius: 12px; background: #fff; color: var(--ink); min-height: 50px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; background: #fbf7ee; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.lock { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .88rem; }
.lock svg { color: var(--brand); flex: none; margin-top: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.seg { display: inline-flex; background: #ece1cb; border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 20px; flex-wrap: wrap; }
.seg a { padding: 8px 18px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seg a[aria-current="true"] { background: #fff; color: var(--brand-deep); box-shadow: 0 1px 3px rgba(11, 20, 38, .18); }
.daygrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); margin-bottom: 26px; }
.daycard { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); min-height: 84px; justify-content: center; }
.daycard:hover { border-color: var(--brand); }
.daycard .wd { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.daycard .dn { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; font-weight: 700; }
.daycard .mo { font-size: .8rem; color: var(--muted); }
.daycard .cnt { font-size: .74rem; color: var(--ok-ink); font-weight: 650; margin-top: 2px; }
.daycard[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.daycard[aria-current="true"] .wd, .daycard[aria-current="true"] .mo, .daycard[aria-current="true"] .cnt { color: #e8e1d2; }
.slotgroup { margin-bottom: 24px; }
.slotgroup h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.slot { padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--brand); color: var(--brand-dark); background: var(--surface); text-align: center; text-decoration: none; font-weight: 700; font-size: 1.05rem; min-height: 50px; }
.slot:hover { background: var(--brand); color: #fff; }
.slot small { display: block; font-weight: 500; font-size: .74rem; opacity: .8; }

.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.ticket-top { background: var(--brand-deep); color: #fff; padding: 22px 26px; }
.ticket-top .when { font-family: var(--serif); font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.2; }
.ticket-top .what { color: #cfc7b4; font-size: .92rem; margin-top: 4px; }
.ticket-body { padding: 8px 26px 22px; border-top: 2px dashed var(--line); position: relative; }
.ticket-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; padding: 14px 0; }
.ticket-body dt { color: var(--muted); }
.ticket-body dd { margin: 0; font-weight: 600; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 1.35rem; letter-spacing: .16em; font-weight: 700; color: var(--brand-deep); }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); display: grid; place-items: center; margin-bottom: 18px; }
.success-icon.wait { background: var(--warn-bg); color: var(--warn-ink); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- panel de secretaría ---------- */
.admin-head { background: var(--brand-deep); color: #fff; }
.admin-head .wrap { display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.admin-head .title { font-family: var(--serif); font-weight: 700; margin-right: auto; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a, .admin-nav button { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; background: transparent; border: 0; font: inherit; cursor: pointer; }
.admin-nav a:hover, .admin-nav button:hover { background: rgba(255,255,255,.14); }
.admin-nav a[aria-current="page"] { background: rgba(255,255,255,.22); font-weight: 650; }
.badge { background: #f7c948; color: var(--brand-deep); border-radius: 999px; padding: 0 8px; font-size: .8rem; font-weight: 700; margin-left: 6px; }
.toolbar { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.tab[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }

.wgrid { --rows: 24; display: grid; grid-template-columns: 52px repeat(5, minmax(132px, 1fr)); grid-template-rows: auto repeat(var(--rows), 44px); position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 760px; }
.scroll { overflow-x: auto; border-radius: var(--radius); }
.dayhead { grid-row: 1; text-align: center; font-weight: 650; padding: 10px 4px; border-bottom: 1px solid var(--line); background: #fbf7ee; position: sticky; top: 0; z-index: 3; }
.hline { grid-column: 1 / -1; border-top: 1px solid #ece2cf; z-index: 0; }
.tlabel { grid-column: 1; font-size: .75rem; color: var(--muted); padding: 2px 6px; z-index: 1; }
/* Huecos libres: invisibles hasta pasar el mouse (o enfocar con teclado) para que la agenda se vea limpia. */
.ghost { z-index: 1; margin: 1px 3px; border: 1px dashed transparent; border-radius: 8px; color: transparent; font-size: .8rem; text-decoration: none; padding: 2px 8px; display: flex; align-items: center; background: transparent; transition: background .12s, border-color .12s, color .12s; }
.ghost:hover, .ghost:focus-visible { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
@media (hover: none) { .ghost { border-color: #d9ccb3; color: #a9a190; } } /* en el celular no hay mouse: se dejan visibles */
.appt { z-index: 2; margin: 1px 3px; border-radius: 8px; padding: 4px 8px; font-size: .82rem; text-decoration: none; color: var(--ink); overflow: hidden; border-left: 4px solid; line-height: 1.25; }
.appt.PENDIENTE { background: var(--warn-bg); border-color: #e3a600; }
.appt.PENDIENTE_PAGO { background: #dcecf9; border-color: #3a86c8; }
.appt.CONFIRMADO { background: var(--ok-bg); border-color: #2c9a57; }
.appt.REALIZADO { background: var(--grey-bg); border-color: #8d9aa2; color: var(--grey-ink); }
.appt strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .76rem; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: 12px; }

.list { display: grid; gap: 12px; }
.row-card { display: grid; gap: 10px 20px; grid-template-columns: minmax(150px, 1.2fr) 2fr auto; align-items: center; padding: 18px 20px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.simple th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline-form > div { min-width: 120px; }
.inline-form input, .inline-form select { min-height: 44px; }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.summary { background: var(--brand-soft); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.flag { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 8px 12px; font-size: .9rem; font-weight: 600; }

@media (max-width: 860px) {
  .hero-grid, .book-grid, .info-box, .site-foot .cols { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-art { max-width: 300px; order: -1; }
  .steps-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .info-box { padding: 26px; }
}
@media (max-width: 640px) {
  .row-card, .two, .callout { grid-template-columns: 1fr; }
  .stepper li span.t { display: none; }
  .stepper li.current span.t { display: inline; }
  .brand small { display: none; }
  .head-actions .btn.secondary { display: none; }
  .ticket-body dl { grid-template-columns: 1fr; gap: 2px; }
  .ticket-body dt { margin-top: 10px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
@media print { .site-head, .admin-head, .site-foot, .toolbar, .btn { display: none; } }

/* ---------------------------------------------------------------- chat de la web */
.chat-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 22px 0 18px; padding: 18px 20px; background: var(--brand-deep); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.chat-hero .chat-hero-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .14); flex: none; }
.chat-hero > div { flex: 1 1 260px; }
.chat-hero strong { display: block; font-size: 1.12rem; margin-bottom: 4px; }
.chat-hero p { margin: 0; color: #e3d5b5; font-size: .95rem; }
.chat-hero .btn { background: #fff; color: var(--brand-deep); flex: none; }
.chat-hero .btn:hover { background: var(--brand-soft); }

.chat { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launcher { --lbg: var(--brand); position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 22px 8px 8px; border: 0; border-radius: 999px; background: var(--lbg); color: #fff; cursor: pointer; font: inherit; line-height: 1; box-shadow: 0 10px 28px rgba(11, 20, 38, .35); }
.chat-launcher:hover { --lbg: var(--brand-dark); }
.chat-launcher-ico { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
/* el dibujo del globo no está centrado en su caja (la cola tira abajo a la izquierda): se corre al centro real */
.chat-launcher-ico svg path, .chat-avatar svg path, .dock-chat svg path { transform: translate(-.5px, -.85px); }
.chat-launcher-txt { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.chat-launcher-txt strong { font-size: 1rem; line-height: 1.1; }
.chat-launcher-txt small { opacity: .85; font-size: .78rem; line-height: 1.1; }
.chat-dot { position: absolute; top: 0; right: 0; width: 13px; height: 13px; border-radius: 50%; background: #43c97b; box-shadow: 0 0 0 3px var(--lbg); }
.chat-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #43c97b; opacity: 0; animation: chat-pulse 2.2s ease-out infinite; }
.chat.open .chat-dot { display: none; }
@keyframes chat-pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-dot::after { animation: none; } }

.chat-teaser { position: relative; max-width: 270px; padding: 14px 34px 14px 16px; background: var(--surface); color: var(--ink); border-radius: 16px 16px 4px 16px; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer; font-size: .93rem; }
.chat-teaser[hidden] { display: none; }
.chat-teaser p { margin: 0; }
.chat-teaser-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }

.chat-panel { display: flex; flex-direction: column; width: min(390px, calc(100vw - 36px)); height: min(580px, calc(100vh - 120px)); background: var(--surface); border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(11, 20, 38, .28); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--brand-deep); color: #fff; }
.chat-head > div { flex: 1; line-height: 1.25; }
.chat-head small { display: block; color: #cfc7b4; font-size: .8rem; }
.chat-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.chat-close { border: 0; background: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.chat-log { position: relative; flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: .93rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.chat-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg a { color: var(--brand); text-decoration: underline; }
.chat-typing { display: flex; gap: 4px; padding: 14px 16px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: #a9a190; animation: chat-bounce 1s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-opts { display: flex; flex-direction: column; gap: 6px; align-self: stretch; margin: 2px 0 4px; }
.chat-opt { display: block; width: 100%; padding: 10px 14px; text-align: left; font: inherit; font-size: .92rem; color: var(--brand-dark); background: var(--surface); border: 1.5px solid var(--brand); border-radius: 12px; cursor: pointer; text-decoration: none; }
.chat-opt:hover { background: var(--brand-soft); }
.chat-opt.primary { background: var(--brand); color: #fff; text-align: center; font-weight: 600; }
.chat-opt.primary:hover { background: var(--brand-dark); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 14px; font: inherit; border: 1.5px solid var(--line); border-radius: 999px; }
.chat-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.chat.open .chat-launcher { display: none; }

@media (max-width: 560px) {
  .chat { right: 12px; bottom: 12px; }
  .chat.open { inset: 0; right: 0; bottom: 0; align-items: stretch; }
  .chat.open .chat-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .chat-launcher-txt small { display: none; }
}

/* ---------------------------------------------------------------- portada renovada (paleta: amarillo y gris del sitio de la Dra. + verde azulado) */
:root { --sun: #fcd52a; --sun-dark: #efc200; --sun-soft: #fff7d1; --charcoal: #2b3335; }
.btn { background: var(--sun); color: var(--charcoal); }
.btn:hover { background: var(--sun-dark); }
.btn.secondary:hover { background: #e3d5b5; }
.btn.ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .12); }
.chat-launcher-ico { background: var(--sun); color: var(--charcoal); }
.chat-form .btn { background: var(--sun); }
.info-box .btn { background: var(--sun); color: var(--charcoal); }
.info-box .btn:hover { background: var(--sun-dark); }
.hl { background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%); padding: 0 .08em; }
section[id] { scroll-margin-top: 76px; }

.site-nav { display: flex; gap: 2px; margin-left: auto; margin-right: 8px; }
.site-nav a { padding: 8px 13px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.site-nav a:hover { background: var(--brand-soft); }
@media (max-width: 1000px) { .site-nav { display: none; } }

.hero { background: radial-gradient(circle at 88% 8%, var(--sun-soft) 0, rgba(255, 247, 209, 0) 38%), linear-gradient(180deg, #f0e6d2 0%, var(--bg) 100%); padding: 64px 0 56px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.5rem); }
.hero .lead { margin-bottom: 0; }
.section.tight { padding: 44px 0 20px; }

.hero-art { position: relative; max-width: 410px; margin-inline: auto; width: 100%; padding: 0 12px 22px; }
.mock { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 22px 54px rgba(11, 20, 38, .2); overflow: hidden; transform: rotate(1.6deg); }
.mock-head { display: flex; align-items: center; gap: 11px; padding: 13px 16px; background: var(--brand-deep); color: #fff; }
.mock-head strong { display: block; font-size: .95rem; line-height: 1.2; }
.mock-head small { color: #cfc7b4; font-size: .76rem; }
.mock-ava { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--charcoal); flex: none; }
.mock-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px 20px; background: var(--bg); }
.mb { max-width: 88%; padding: 9px 13px; border-radius: 15px; font-size: .86rem; line-height: 1.4; }
.mb.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.mb.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.mb.opt { align-self: stretch; max-width: none; background: #fff; border: 1.5px solid var(--brand); color: var(--brand-dark); }
.mock-chip { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; font-size: .9rem; box-shadow: 0 10px 24px rgba(11, 20, 38, .18); border: 1px solid #b6e0c4; }

.action-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.action { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.action .ico, .pillar .ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--sun-soft); color: var(--charcoal); margin-bottom: 16px; box-shadow: inset 0 0 0 1px #f2e29b; }
.action p { color: var(--muted); flex: 1; }
.action .btn { margin-top: 4px; }

.approach { display: grid; gap: 44px; grid-template-columns: 1.2fr .8fr; align-items: center; }
.checklist { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); font-weight: 600; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist svg { flex: none; padding: 3px; border-radius: 50%; background: var(--sun); color: var(--charcoal); width: 26px; height: 26px; }
.quote { position: relative; margin: 0; padding: 40px 32px 36px; border-radius: 24px; background: var(--brand-deep); color: #fff; font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.22; box-shadow: var(--shadow); overflow: hidden; }
.quote .mark { position: absolute; top: -14px; left: 18px; font-size: 7rem; line-height: 1; color: var(--sun); opacity: .9; }
.quote::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(252, 213, 42, .18); }

.pillars { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.pillar { padding: 8px 8px 0 0; }
.pillar h3 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .3em; }
.pillar p { color: var(--muted); }

.circuit { display: grid; gap: 40px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.goals li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.goals .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--charcoal); font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.goals strong { display: block; }
.goals span:not(.n) { color: var(--muted); font-size: .92rem; }

.person .creds { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.person strong { font-weight: 650; color: var(--ink); }
.cta-stack { display: grid; gap: 10px; min-width: 230px; }

@media (max-width: 860px) {
  .hero { padding: 36px 0 44px; }
  .hero-art { order: 0; max-width: 380px; }
  .action-grid, .pillars { grid-template-columns: 1fr; }
  .approach, .circuit { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .checklist { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }
}
.info-box .btn.ghost-light { background: transparent; color: #fff; }
.info-box .btn.ghost-light:hover { background: rgba(255, 255, 255, .12); }

/* ---------------------------------------------------------------- preguntas frecuentes */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.faq-page { max-width: 820px; margin-inline: auto; padding-bottom: 8px; }
.faq-head { padding: 12px 0 8px; }
.faq-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); color: var(--brand-deep); }
.faq-search { margin: 22px 0 14px; }
.faq-search input { width: 100%; min-height: 54px; padding: 14px 20px; font: inherit; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); }
.faq-search input:focus { border-color: var(--sun-dark); outline: 4px solid var(--sun-soft); }
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.faq-chips a { padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.faq-chips a:hover { background: var(--sun-soft); border-color: #f2e29b; }
.faq-group { margin-top: 38px; }
.faq-group h2 { margin-bottom: 4px; padding-left: 14px; border-left: 5px solid var(--sun); }
.faq-group[hidden], .faq-page details[hidden], .faq-empty[hidden] { display: none; }
.faq-group details summary { padding-right: 34px; }
.faq .ans { padding-bottom: 8px; color: var(--ink); }
.faq .ans p { color: var(--muted); }
.faq .ans ul, .faq .ans ol { color: var(--muted); padding-left: 1.25em; margin: 0 0 1em; display: grid; gap: 4px; }
.faq .ans strong { color: var(--ink); }
.faq .ans .warn-text { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 14px; border-radius: 10px; }
.faq .ans .warn-text strong { color: inherit; }
.faq-empty { margin-top: 30px; padding: 18px 20px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; }
.faq-more { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-top: 44px; padding: 30px; background: var(--brand-deep); color: #fff; border-radius: 22px; }
.faq-more h2 { color: #fff; margin-bottom: .3em; }
.faq-more p { color: #e8e1d2; margin: 0; }
.faq-more .btn { background: var(--sun); color: var(--charcoal); }
.faq-more .btn.ghost-light { background: transparent; color: #fff; }
@media (max-width: 700px) { .faq-more { grid-template-columns: 1fr; padding: 24px; } }
.price-line { margin: 0 0 22px; padding: 12px 16px; background: var(--sun-soft); border: 1px solid #f2e29b; border-radius: 12px; display: inline-block; }
.faq-link { margin: 22px 0 0; text-align: center; }

/* ---------------------------------------------------------------- pie de página y páginas legales */
.site-foot { padding: 52px 0 0; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.5fr 1.2fr 1fr 1fr; }
.foot-grid:not(:has(> div:nth-child(4))) { grid-template-columns: 1.5fr 1.2fr 1fr; }
.foot-brand .brand { color: #fff; margin-bottom: 14px; }
.foot-brand .brand small { color: #b5ad99; }
.foot-note { margin: 0; max-width: 34ch; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; font-size: .88rem; }
.site-foot h3 { font-family: var(--serif); font-size: 1.05rem; color: #fff; margin-bottom: .7em; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-list a { display: inline-flex; align-items: center; gap: 10px; color: #f1ebdd; text-decoration: none; overflow-wrap: anywhere; }
.foot-list a:hover { color: var(--sun); text-decoration: underline; }
.foot-list svg { flex: none; color: var(--sun); }
.foot-list.plain a { color: #e8e1d2; }
.foot-bottom { margin-top: 36px; padding: 18px 0 22px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .82rem; color: #b5ad99; }
@media (max-width: 860px) { .foot-grid, .foot-grid:not(:has(> div:nth-child(4))) { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid, .foot-grid:not(:has(> div:nth-child(4))) { grid-template-columns: 1fr; } }

.legal { max-width: 760px; margin-inline: auto; padding-bottom: 12px; }
.legal h1 { font-size: clamp(1.9rem, 4.6vw, 2.5rem); color: var(--brand-deep); }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; padding-left: 12px; border-left: 4px solid var(--sun); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; margin: 0 0 1em; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.legal-toc a { padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .86rem; font-weight: 600; }
.legal-toc a:hover { background: var(--sun-soft); border-color: #f2e29b; }

/* ---------------------------------------------------------------- portada: lo importante y servicios */
.important { background: var(--sun-soft); border-block: 1px solid #f2e29b; padding: 30px 0 34px; }
.important h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--charcoal); }
.important-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.imp { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: #fff; border: 1px solid #f2e29b; border-radius: 14px; }
.imp .ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sun); color: var(--charcoal); }
.imp strong { display: block; line-height: 1.25; margin-bottom: 4px; color: var(--ink); }
.imp p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.imp p a { color: var(--brand-dark); font-weight: 600; }
.imp.urgent-imp { background: var(--bad-bg); border-color: #f2bcbc; }
.imp.urgent-imp .ico { background: #fff; color: var(--bad-ink); }
.imp.urgent-imp p { color: #6e2229; }

.service-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.service { display: flex; flex-direction: column; gap: 0; padding: 22px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.service:hover { border-color: var(--sun-dark); box-shadow: var(--shadow); transform: translateY(-2px); }
.service .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sun-soft); color: var(--charcoal); box-shadow: inset 0 0 0 1px #f2e29b; margin-bottom: 14px; }
.service h3 { font-size: 1.08rem; margin-bottom: .35em; }
.service p { flex: 1; color: var(--muted); font-size: .93rem; margin-bottom: 14px; }
.service .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--brand-dark); }
.service-note { margin: 24px 0 0; text-align: center; color: var(--muted); }
.approach + .pillars { margin-top: 44px; }

@media (max-width: 1000px) { .important-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .important-grid, .service-grid { grid-template-columns: 1fr; } }
