/* Dental Carmen · estilos públicos */
:root {
  --white: #FFFFFF;
  --bg-soft: #F8FAFC;
  --blue: #0284C7;
  --blue-600: #0369A1;
  --blue-50: #F0F9FF;
  --blue-100: #E0F2FE;
  --mint: #10B981;
  --mint-600: #059669;
  --mint-50: #ECFDF5;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --danger: #DC2626;
  --danger-50: #FEF2F2;
  --wa: #25D366;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 48px -20px rgba(2, 132, 199, .25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--blue); margin-bottom: .75rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s; min-height: 44px; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 8px 14px; min-height: 40px; }
.btn--lg { padding: 14px 22px; font-size: 1rem; min-height: 52px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(2, 132, 199, .7); }
.btn--primary:hover { background: var(--blue-600); }
.btn--outline { background: var(--white); color: var(--blue); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--blue); background: var(--blue-50); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--bg-soft); }
.btn--mint { background: var(--mint); color: #fff; }
.btn--mint:hover { background: var(--mint-600); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #1EBE5A; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.15rem; letter-spacing: -.01em; }
.brand b { color: var(--blue); font-weight: 800; }
.brand__mark { width: 34px; height: 34px; color: var(--blue); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--bg-soft); color: var(--blue); }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
#accountLabel { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--blue-100), transparent 60%), linear-gradient(var(--white), var(--bg-soft)); padding: clamp(48px, 8vw, 96px) 0; }
.hero__grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: .925rem; font-weight: 500; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { color: var(--mint); width: 18px; height: 18px; }
.hero__card { padding: 28px; box-shadow: var(--shadow-lg); }
.hero__card-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--mint-600); text-transform: uppercase; letter-spacing: .06em; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--ok { background: var(--mint); box-shadow: 0 0 0 4px var(--mint-50); }
.hero__next { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; margin: 14px 0 2px; }
.hero__facts { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.hero__facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.hero__facts dd { margin: 2px 0 0; font-weight: 500; color: var(--ink-2); }
.hero__facts .maplink { display: inline-block; margin-top: 4px; font-weight: 600; color: var(--blue, #0284C7); text-decoration: none; white-space: nowrap; }
.hero__facts .maplink:hover { text-decoration: underline; }

/* Secciones */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section__head--left { text-align: left; margin: 0 0 24px; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.service { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.service__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; margin-bottom: 8px; }
.service h3 { margin: 0; font-size: 1.05rem; }
.service p { margin: 0; color: var(--muted); font-size: .925rem; flex: 1; }
.service__price { margin-top: 10px; font-weight: 600; color: var(--ink-2); font-size: .9rem; }

/* Agenda */
.booking { display: grid; grid-template-columns: 1.35fr 1fr; overflow: hidden; }
.booking__cal { padding: 28px; border-right: 1px solid var(--line); min-width: 0; }
.booking__form { padding: 28px; background: var(--bg-soft); }
.steplabel { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 0 14px; }
.steplabel span { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.steplabel small { font-weight: 500; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 28px; }
.day { border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 10px 4px; text-align: center; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; }
.day:hover:not([disabled]) { border-color: var(--blue); background: var(--blue-50); }
.day__wd { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.day__n { font-size: 1.25rem; font-weight: 750; line-height: 1.1; }
.day__c { font-size: .7rem; color: var(--mint-600); font-weight: 600; }
.day[disabled] { cursor: not-allowed; background: var(--bg-soft); opacity: .55; }
.day[disabled] .day__c { color: var(--muted); }
.day[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(2, 132, 199, .8); }
.day[aria-selected="true"] .day__wd, .day[aria-selected="true"] .day__c { color: rgba(255, 255, 255, .85); }
.slots__group { margin-bottom: 18px; }
.slots__group h4 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line-2); background: var(--white); border-radius: 10px; padding: 10px 6px; font-weight: 600; cursor: pointer; transition: all .15s; font-variant-numeric: tabular-nums; min-height: 44px; }
.slot:hover { border-color: var(--blue); color: var(--blue); }
.slot[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: #fff; }
.empty { padding: 28px; text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--bg-soft), var(--line), var(--bg-soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; min-height: 76px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.summary { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--mint); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.summary svg { color: var(--mint); width: 24px; height: 24px; }
.summary strong { display: block; }
.summary .muted { font-size: .85rem; }

.tabs { display: flex; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; min-height: 40px; }
.tabs button[aria-selected="true"] { background: var(--blue-50); color: var(--blue); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line-2); background: var(--white); border-radius: 10px; padding: 11px 12px; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-50); }
.formerror { background: var(--danger-50); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 500; }
.formok { background: var(--mint-50); color: var(--mint-600); border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 600; }
.who { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; font-size: .95rem; }
.who strong { display: block; }

.success { text-align: center; padding: 12px 0; }
.success__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--mint-50); color: var(--mint); display: grid; place-items: center; animation: pop .35s ease-out; }
.success__icon svg { width: 32px; height: 32px; stroke-width: 2.5; }
.success .btn { margin-top: 10px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* Cotizador */
.quote { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.quote__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.qitem { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: all .15s; }
.qitem:hover { border-color: var(--line-2); }
.qitem input { position: absolute; opacity: 0; pointer-events: none; }
.qitem__box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 1px; transition: all .15s; }
.qitem__box svg { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; }
.qitem input:checked ~ .qitem__box { background: var(--mint); border-color: var(--mint); }
.qitem input:checked ~ .qitem__box svg { opacity: 1; }
.qitem:has(input:checked) { border-color: var(--mint); background: var(--mint-50); }
.qitem input:focus-visible ~ .qitem__box { box-shadow: 0 0 0 4px var(--blue-100); }
.qitem strong { display: block; font-size: .975rem; }
.qitem small { display: block; color: var(--muted); font-size: .85rem; margin: 2px 0 6px; }
.qitem em { font-style: normal; font-weight: 600; color: var(--blue); font-size: .9rem; font-variant-numeric: tabular-nums; }
.quote__sum { padding: 24px; position: sticky; top: 88px; }
.quote__picked { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: .925rem; }
.quote__picked li { display: flex; justify-content: space-between; gap: 12px; }
.quote__picked li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; margin-bottom: 14px; border-block: 1px solid var(--line); }
.quote__total strong { font-size: 1.3rem; color: var(--blue); font-variant-numeric: tabular-nums; text-align: right; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.accordion { display: grid; gap: 10px; }
.accordion details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.accordion details[open] { border-color: var(--blue-100); box-shadow: var(--shadow); }
.accordion summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 600; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.accordion details[open] summary::after { transform: translateY(-30%) rotate(-135deg); border-color: var(--blue); }
.accordion p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.ask { padding: 24px; position: sticky; top: 88px; }

/* Pie */
.footer { background: var(--ink); color: #CBD5E1; padding: 48px 0 24px; }
.footer .muted { color: #94A3B8; }
.footer__in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.brand--light { color: #fff; margin-bottom: 12px; }
.brand--light b { color: #7DD3FC; }
.footer__links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 32px; align-content: start; }
.footer__links a { color: #E2E8F0; text-decoration: none; font-size: .95rem; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__copy { border-top: 1px solid #1E293B; padding-top: 20px; margin-top: 32px; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px -8px rgba(37, 211, 102, .6); transition: transform .15s; }
.fab:hover { transform: scale(1.06); }
.fab svg { width: 28px; height: 28px; }

/* Modales */
.modal { border: 0; border-radius: 20px; padding: 28px; width: min(440px, 100% - 32px); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35); color: var(--ink); }
.modal--wide { width: min(640px, 100% - 32px); }
.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.modal h2 { font-size: 1.4rem; margin-bottom: 4px; }
.modal__close { position: absolute; right: 14px; top: 12px; margin: 0; }
.modal__close button { border: 0; background: var(--bg-soft); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hist h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 10px; }
.hist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.hist li strong { display: block; font-size: .95rem; }
.hist li .muted { font-size: .85rem; }
.hist__right { display: flex; align-items: center; gap: 8px; flex: none; }
.badge { font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge--pendiente { background: #FEF3C7; color: #92400E; }
.badge--confirmada { background: var(--blue-50); color: var(--blue-600); }
.badge--completada { background: var(--mint-50); color: var(--mint-600); }
.badge--cancelada { background: var(--bg-soft); color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--danger); font-weight: 600; font-size: .85rem; cursor: pointer; padding: 6px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; z-index: 60; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }

/* Responsivo */
@media (max-width: 1024px) {
  .booking { grid-template-columns: 1fr; }
  .booking__cal { border-right: 0; border-bottom: 1px solid var(--line); }
  .quote, .faq { grid-template-columns: 1fr; }
  .quote__sum, .ask { position: static; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .topbar__actions { margin-left: auto; }
  .hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .booking__cal, .booking__form { padding: 20px 16px; }
  .days { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 64px; scroll-snap-align: start; }
  .slots__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__cta .btn { flex: 1 1 100%; }
  .modal { padding: 22px 18px; }
  .hist li { flex-direction: column; align-items: flex-start; }
  .footer__links { grid-template-columns: 1fr 1fr; }
  .fab { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.who p { margin: 0 0 10px; }
.quote > *, .faq > * { min-width: 0; }
[hidden] { display: none !important; }
.brand { white-space: nowrap; }
.slot { white-space: nowrap; }
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr 1fr; gap: 10px; }
  .service { padding: 16px; }
  .service p { display: none; }
  .service h3 { font-size: .95rem; }
}
