/* ============================================================
   Dr. José Isaac Pacheco Enríquez · Ortopedista en Mérida
   Sistema visual — mobile first desde 320 px
   Paleta de marca:
     #202879  navy    (institucional)
     #046ad5  azul    (acento / enlaces)
     #a3d5e6  celeste (fondos suaves)
     blanco permitido · degradados sutiles
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* marca */
  --navy:        #202879;
  --navy-700:    #2b3596;
  --navy-900:    #171d5a;
  --blue:        #046ad5;
  --blue-700:    #0356ac;
  --sky:         #a3d5e6;
  --sky-100:     #e4f2f8;
  --sky-050:     #f2f9fc;

  /* neutros */
  --white:       #ffffff;
  --paper:       #f7fafc;
  --line:        #dfe7ef;
  --ink:         #16193d;
  --muted:       #4e5674;

  /* whatsapp */
  --wa:          #25d366;
  --wa-600:      #1da851;
  --wa-800:      #128c7e;

  /* estado */
  --warn-bg:     #fff8e6;
  --warn-line:   #e8cf94;
  --warn-ink:    #6b5312;

  /* degradados sutiles */
  --grad-soft:   linear-gradient(170deg, #ffffff 0%, var(--sky-050) 45%, var(--sky-100) 100%);
  --grad-band:   linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 45%, var(--blue) 100%);
  --grad-btn:    linear-gradient(180deg, var(--blue) 0%, var(--blue-700) 100%);
  --grad-wa:     linear-gradient(165deg, #4ee07d 0%, var(--wa) 45%, var(--wa-600) 100%);

  /* tipografía fluida */
  --text-sm:     clamp(.86rem, .83rem + .12vw, .94rem);
  --text-base:   clamp(1rem, .96rem + .2vw, 1.125rem);
  --text-lead:   clamp(1.05rem, 1rem + .3vw, 1.25rem);
  --h4:          clamp(1.05rem, 1rem + .25vw, 1.2rem);
  --h3:          clamp(1.25rem, 1.14rem + .5vw, 1.65rem);
  --h2:          clamp(1.7rem, 1.46rem + 1.1vw, 2.5rem);
  --h1:          clamp(2.05rem, 1.7rem + 1.9vw, 3.6rem);

  /* medidas */
  --wrap:        1200px;
  --gutter:      clamp(1.25rem, .9rem + 1.6vw, 2.5rem);
  --radius:      14px;
  --radius-lg:   22px;
  --header-h:    64px;

  /* sombras */
  --sh-sm:  0 1px 2px rgba(22,25,61,.06), 0 2px 8px rgba(22,25,61,.05);
  --sh-md:  0 4px 12px rgba(22,25,61,.07), 0 12px 32px rgba(22,25,61,.07);
  --sh-lg:  0 10px 24px rgba(22,25,61,.09), 0 28px 60px rgba(32,40,121,.12);

  /* Tipografía — equivalentes libres de la identidad del Dr. Pacheco:
       Clother Black (Black[Foundry]) → Albert Sans  · geométrica moderna,
         monolineal y de bajo contraste, con peso Black real (900).
       Futura → Jost · revival abierto de Futura, misma construcción
         geométrica y la "a" de un solo piso.
     En macOS el fallback es la propia Futura; en Windows, Century Gothic. */
  --font-titulos: "Albert Sans", "Jost", Futura, "Century Gothic", "Segoe UI", system-ui, sans-serif;
  --font-cuerpo:  "Jost", Futura, "Century Gothic", "Segoe UI", system-ui, sans-serif;

  /* alias heredado */
  --font: var(--font-cuerpo);
}

/* ---------- 2. Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-cuerpo);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-titulos);
  line-height: 1.16;
  margin: 0 0 .5em;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -.015em;
}
h1 { font-size: var(--h1); font-weight: 900; letter-spacing: -.025em; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: var(--h4); font-weight: 700; letter-spacing: -.01em; }
p  { margin: 0 0 1rem; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--blue); }

strong { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* utilidades */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -80px; z-index: 999;
  background: var(--navy); color: #fff; padding: .75rem 1.15rem;
  border-radius: 0 0 10px 10px; text-decoration: none; font-weight: 600;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.measure { max-width: 68ch; }
.center { text-align: center; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .7rem 1.4rem;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: var(--text-sm);
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease,
              color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--grad-btn); color: #fff; box-shadow: var(--sh-sm); }
.btn--primary:hover { color: #fff; box-shadow: var(--sh-md); }

.btn--navy { background: var(--navy); color: #fff; box-shadow: var(--sh-sm); }
.btn--navy:hover { background: var(--navy-700); color: #fff; }

.btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--sh-sm); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn--wa { background: var(--grad-wa); color: #fff; box-shadow: 0 4px 14px rgba(18,140,126,.28); }
.btn--wa:hover { color: #fff; box-shadow: 0 8px 22px rgba(18,140,126,.34); }

.btn--onblue { background: #fff; color: var(--navy); }
.btn--onblue:hover { color: var(--blue); }

.btn--block { width: 100%; }
.btn--lg { min-height: 52px; padding: .9rem 1.7rem; font-size: var(--text-base); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: var(--text-sm); text-decoration: none;
  min-height: 44px;
}
.link-arrow::after { content: "\2192"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- 4. Topbar ---------- */
.topbar {
  background: var(--navy);
  color: #cfd6ff;
  font-size: .8rem;
  line-height: 1.4;
}
.topbar__inner {
  display: flex; flex-wrap: wrap; gap: .35rem 1.5rem;
  align-items: center; justify-content: center;
  padding-block: .5rem;
}
.topbar__item { display: inline-flex; align-items: center; gap: .45rem; }
.topbar__item svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.topbar strong { color: #fff; font-weight: 600; }
@media (min-width: 900px) {
  .topbar__inner { justify-content: space-between; }
}

/* ---------- 5. Header ---------- */
.header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { min-height: var(--header-h); display: flex; align-items: center; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: var(--grad-band);
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--sh-sm);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__logo { height: 38px; width: auto; display: block; }
@media (min-width: 1024px) { .brand__logo { height: 44px; } }
.footer__logo { height: 52px; width: auto; display: block; margin-bottom: .25rem; }

.brand__name { font-family: var(--font-titulos); font-weight: 800; color: var(--navy); font-size: 1.05rem; letter-spacing: -.025em; }
.brand__role {
  font-family: var(--font-titulos);
  font-size: .66rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--blue); font-weight: 700;
}

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .4rem .75rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--blue); background: var(--sky-050); }

.nav__group { position: relative; }
/* el botón debe medir y pesar exactamente igual que los enlaces de al lado:
   nada de `font: inherit`, que reinicia el tamaño heredando del body */
.nav__toggle {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: .92rem; font-weight: 600;
  line-height: inherit; letter-spacing: inherit;
}
.nav__toggle svg { width: 12px; height: 12px; margin-left: .3rem; transition: transform .18s ease; }
.nav__group[data-open="true"] .nav__toggle svg { transform: rotate(180deg); }
.nav__submenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 5;
  min-width: 232px; padding: .4rem; margin: 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-md);
  display: none;
}
.nav__group[data-open="true"] .nav__submenu { display: block; }
.nav__submenu a {
  display: flex; align-items: center; min-height: 44px; padding: .4rem .7rem;
  border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500;
}
.nav__submenu a:hover { background: var(--sky-050); color: var(--blue); }

.header__cta { display: none; }

.burger {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-width: 44px; min-height: 44px; padding: .35rem .7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  color: var(--navy); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.burger svg { width: 20px; height: 20px; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }
}

/* menú móvil */
.mobile-menu { position: fixed; inset: 0; z-index: 90; display: none; }
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu__scrim { position: absolute; inset: 0; background: rgba(22,25,61,.5); }
.mobile-menu__panel {
  position: absolute; inset: 0 0 0 auto; width: min(88vw, 380px);
  background: #fff; padding: 1.1rem var(--gutter) 2rem;
  overflow-y: auto; box-shadow: var(--sh-lg);
  display: flex; flex-direction: column; gap: .35rem;
}
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.mobile-menu__close {
  min-width: 44px; min-height: 44px; border-radius: 10px;
  background: var(--sky-050); border: 1px solid var(--line); color: var(--navy);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  padding: .5rem .75rem; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.mobile-menu a:hover { background: var(--sky-050); color: var(--blue); }
.mobile-menu__sub { padding-left: .75rem; border-left: 2px solid var(--sky); margin: .1rem 0 .35rem .75rem; }
.mobile-menu__sub a { font-weight: 500; font-size: .95rem; min-height: 44px; }
.mobile-menu__label {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: .6rem .75rem .2rem;
}
.mobile-menu .btn { margin-top: .8rem; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-soft);
  padding-top: clamp(2rem, 1.2rem + 3vw, 4rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -20% -60% 40%;
  height: 120%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(163,213,230,.55), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3rem); align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.h1__l1 { display: block; color: var(--navy); }
.h1__sep { display: none; }
.h1__l2 { display: block; color: var(--blue); }
.hero__lead { font-size: var(--text-lead); font-weight: 300; color: var(--muted); max-width: 60ch; line-height: 1.58; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero__actions .btn { flex: 1 1 220px; }

.creds { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.creds li {
  margin: 0;
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255,255,255,.8); border: 1px solid var(--sky);
  border-radius: 999px; padding: .35rem .85rem;
  font-size: .8rem; font-weight: 600; color: var(--navy);
}
.creds svg { width: 14px; height: 14px; color: var(--blue); flex: none; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; }
  .hero__actions .btn { flex: 0 0 auto; }
}

/* ---------- 7. Fotografías y placeholders ---------- */

/* fotografías reales: el aspect-ratio reserva el espacio y evita saltos de layout */
.foto {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-md);
  object-fit: cover;
  background: var(--sky-100);
}
.foto--hero { aspect-ratio: 4 / 5; object-position: center 38%; }
@media (min-width: 900px) { .foto--hero { aspect-ratio: 3 / 4; } }
.foto--45    { aspect-ratio: 4 / 5; object-position: center 35%; }
/* originales más verticales que su marco: se ancla arriba para no recortar
   la cara, de modo que el recorte se lo lleve la parte baja de la foto */
.foto--retrato { object-position: center 6%; }
.foto--alta    { object-position: center 8%; }
.foto--43    { aspect-ratio: 4 / 3; }
.foto--ancha { aspect-ratio: 16 / 9; object-position: center 40%; }
@media (min-width: 700px) { .foto--ancha { aspect-ratio: 21 / 9; } }

/* pie de foto */
.foto-pie {
  margin-top: .6rem; font-size: .8rem; color: var(--muted);
  text-align: center; line-height: 1.45;
}

.img-slot { margin: 0; }
.img-slot > .img-slot__placeholder {
  aspect-ratio: var(--ratio, 4 / 3);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--sky);
  background:
    linear-gradient(150deg, rgba(255,255,255,.9), rgba(228,242,248,.9)),
    repeating-linear-gradient(45deg, rgba(4,106,213,.06) 0 12px, transparent 12px 24px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; padding: 1.25rem; text-align: center;
  box-shadow: var(--sh-sm);
}
.img-slot__filename {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .72rem; color: var(--navy); word-break: break-all; max-width: 32ch;
}
.img-slot__status {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--blue);
}
.img-slot--hero > .img-slot__placeholder { --ratio: 4 / 5; }
@media (min-width: 900px) { .img-slot--hero > .img-slot__placeholder { --ratio: 3 / 4; } }

/* ---------- 8. Franja de pilares ---------- */
.pillars { position: relative; z-index: 2; margin-top: clamp(-1rem, -3vw, -3rem); }
.pillars__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--sh-lg);
  display: grid; gap: 1.25rem;
  padding: clamp(1.25rem, .9rem + 1.4vw, 2rem);
}
.pillar { display: flex; gap: .9rem; align-items: flex-start; }
.pillar__icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--sky-100); color: var(--blue);
  display: grid; place-items: center;
}
.pillar__icon svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 1rem; margin-bottom: .15rem; color: var(--blue); }
.pillar p { font-size: .87rem; color: var(--muted); margin: 0; }
@media (min-width: 640px) { .pillars__card { grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; } }
@media (min-width: 1024px) {
  .pillars__card { grid-template-columns: repeat(4, 1fr); }
  .pillar + .pillar { border-left: 1px solid var(--line); padding-left: 1.5rem; }
}

/* ---------- 9. Secciones ---------- */
.section { padding-block: clamp(2.75rem, 2rem + 3.5vw, 5.5rem); }
.section--paper { background: var(--paper); }
.section--sky { background: linear-gradient(180deg, #fff 0%, var(--sky-050) 100%); }
.section__head {
  max-width: 760px; margin-inline: auto; text-align: center;
  margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}
.section__head--left { margin-inline: 0; text-align: left; }
.eyebrow {
  display: block; font-family: var(--font-titulos);
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--blue); margin-bottom: .6rem;
}
.section__title { margin-bottom: .85rem; }
.section__head p { color: var(--muted); font-weight: 300; font-size: var(--text-lead); margin: 0 auto; max-width: 68ch; }
.section__head--left p { margin-inline: 0; }
.rule { width: 64px; height: 3px; border-radius: 3px; background: var(--grad-band); margin: 1rem auto 0; }
.section__head--left .rule { margin-inline: 0; }

/* ---------- 10. Tarjetas ---------- */
.cards { display: grid; gap: 1rem; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.25rem 1.1rem;
  box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: .55rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--sky); }
.card__icon {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(160deg, var(--sky-100), #fff);
  border: 1px solid var(--sky);
  color: var(--blue); display: grid; place-items: center;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.05rem; color: var(--blue); margin: .35rem 0 0; }
.card p { font-size: .9rem; color: var(--muted); margin: 0; }
.card .link-arrow { margin-top: auto; padding-top: .35rem; }

/* ---------- 11. Banda de formación ---------- */
.band {
  background: var(--grad-band); color: #fff;
  padding-block: clamp(2.25rem, 1.6rem + 2.5vw, 3.75rem);
  position: relative; overflow: hidden;
}
.band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(163,213,230,.14); pointer-events: none;
}
.band h2, .band h3 { color: #fff; }
.band__head { text-align: center; margin-bottom: 2rem; position: relative; }
.band__head .eyebrow { color: var(--sky); }
.band__head p { color: #d5ddff; max-width: 66ch; margin-inline: auto; }
.band__grid { position: relative; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .band__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .band__grid { grid-template-columns: repeat(4, 1fr); } }
.band__item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
}
.band__item h3 { font-size: .98rem; margin-bottom: .3rem; }
.band__item p { color: #cfd8ff; font-size: .86rem; margin: 0; }
.band__item span {
  display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sky); font-weight: 700; margin-bottom: .5rem;
}

/* ---------- 12. Bloque de dos columnas ---------- */
.split { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3.25rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.stack { display: grid; gap: 1rem; }

.factlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.factlist li { margin: 0; padding-left: 1.9rem; position: relative; font-size: .95rem; color: var(--muted); }
.factlist li::before {
  content: ""; position: absolute; left: 0; top: .38em;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--sky-100); border: 2px solid var(--blue);
}

.note {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-left-width: 4px; border-radius: 10px;
  padding: .9rem 1.1rem; color: var(--warn-ink); font-size: .89rem;
}
.note strong { color: var(--warn-ink); }

.callout {
  background: linear-gradient(160deg, #fff, var(--sky-050));
  border: 1px solid var(--sky); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--sh-sm);
}
.callout h3 { color: var(--blue); font-size: 1.05rem; }

.price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .35rem 0 .75rem; }
.price__amount { font-family: var(--font-titulos); font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem); font-weight: 900; color: var(--navy); line-height: 1; letter-spacing: -.02em; }
.price__label { font-size: .85rem; color: var(--muted); }

/* ---------- 13. Pestañas de servicios ---------- */
/* Móvil: rejilla de 2x2. Los cuatro botones caben completos en pantalla,
   sin desplazamiento horizontal ni contenido cortado en el borde. */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding: .35rem 0 .85rem;
}
.tab {
  min-height: 48px; padding: .5rem .6rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  color: var(--navy); font: inherit; font-weight: 600; font-size: .82rem;
  line-height: 1.2; text-align: center; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.tab svg { width: 16px; height: 16px; flex: none; color: var(--blue); }
.tab:hover { border-color: var(--sky); background: var(--sky-050); }
.tab[aria-selected="true"] { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: var(--sh-md); }
.tab[aria-selected="true"] svg { color: #fff; }

/* A partir de ~700 px los cuatro caben en una sola fila de píldoras;
   por debajo se mantiene la rejilla 2x2, que se ve más ordenada que
   una fila partida en 3 + 1. */
@media (min-width: 700px) {
  .tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
  .tab {
    flex: 0 0 auto; min-height: 46px; padding: .6rem 1.15rem;
    border-radius: 999px; font-size: .9rem; white-space: nowrap;
  }
  .tab svg { width: 18px; height: 18px; }
}

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
  box-shadow: var(--sh-sm);
  margin-top: 1.25rem;
}
.panel + .panel { margin-top: 1.5rem; }
/* Con JS solo se ve el panel activo; sin JS los cuatro paneles
   permanecen visibles y legibles (progressive enhancement).
   data-active evita el parpadeo antes de que main.js se ejecute. */
.js .panel[data-active="false"],
.js .panel[hidden] { display: none; }
.panel__head { display: grid; gap: 1.5rem; margin-bottom: 1.75rem; }
@media (min-width: 860px) { .panel__head { grid-template-columns: 1.15fr .85fr; align-items: center; } }
.panel h2 { margin-top: 0; }
.panel h3 { font-size: 1.15rem; margin-top: 1.75rem; color: var(--navy); }
.panel__body > h3:first-child { margin-top: 0; }
@media (min-width: 1024px) {
  .panel__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; align-items: start; }
}
.panel__actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}

/* ---------- 14. FAQ ---------- */
.faq { display: grid; gap: .6rem; max-width: 900px; margin-inline: auto; }
.faq--left { margin-inline: 0; max-width: none; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-sm); overflow: hidden; }
.faq details[open] { border-color: var(--sky); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.1rem; min-height: 52px;
  font-weight: 600; color: var(--navy); font-size: .98rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(0); }
.faq summary:hover { background: var(--sky-050); }
.faq__answer { padding: 0 1.1rem 1.1rem; color: var(--muted); font-size: .94rem; }
.faq__answer p { margin: 0; }
.faq h3 { font-size: inherit; margin: 0; font-weight: inherit; color: inherit; }

/* ---------- 15. Opiniones ---------- */
.reviews { display: grid; gap: 1rem; }
@media (min-width: 700px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .reviews { grid-template-columns: repeat(3, 1fr); } }
.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.25rem; box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: .9rem; margin: 0;
}
.review::before { content: "\201C"; font-size: 2.5rem; line-height: .6; color: var(--sky); font-family: Georgia, serif; }
.review__quote { color: var(--muted); font-size: .93rem; margin: 0; }
.review__quote p { margin: 0; }
.review figcaption { display: flex; align-items: center; gap: .7rem; margin-top: auto; }
.review__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--sky-100); color: var(--blue);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.review__name { font-weight: 600; color: var(--navy); font-size: .9rem; display: block; line-height: 1.3; }
.review__meta { font-size: .78rem; color: var(--muted); }

/* ---------- 16. Contacto y formulario ---------- */
.contact-grid { display: grid; gap: 1.5rem; align-items: start; }

/* Móvil primero: las dos columnas se disuelven con display:contents y las
   tarjetas se ordenan por prioridad —dirección y mapa arriba, luego el
   formulario y al final el detalle— para no obligar a recorrer toda la
   sección antes de ver dónde está el consultorio. */
.contact-col          { display: contents; }
.info-card--datos     { order: 1; }
.info-card--ubicacion { order: 2; }
.form-card            { order: 3; }
.info-card--horario   { order: 4; }
.info-card--consulta  { order: 5; }
.info-card--llevar    { order: 6; }

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1fr 1.05fr; gap: 2.5rem; }
  .contact-col  { display: block; }
  .info-card + .info-card,
  .form-card + .info-card { margin-top: 1.25rem; }
}

.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 1.9rem); box-shadow: var(--sh-sm);
}
.info-card h3 { font-size: 1.1rem; }

/* horario de consulta */
.horario { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin: .25rem 0 .85rem; }
.horario__dias {
  font-family: var(--font-titulos); font-weight: 700; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.horario__hora {
  font-family: var(--font-titulos); font-weight: 900;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--navy);
  letter-spacing: -.02em; line-height: 1;
}

/* bloque de urgencias */
.urgencias {
  margin-top: 1.25rem; padding: 1rem 1.15rem;
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-left-width: 4px; border-radius: 10px;
  color: var(--warn-ink); font-size: .88rem;
}
.urgencias p { margin: 0 0 .5rem; }
.urgencias p:last-child { margin-bottom: 0; }
.urgencias strong { color: var(--warn-ink); }
.urgencias__titulo {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .35rem; font-size: .95rem; color: var(--warn-ink);
}
.urgencias__titulo svg { width: 18px; height: 18px; flex: none; }
.urgencias__numero { margin: 0 0 .6rem; }
.urgencias__numero a {
  font-family: var(--font-titulos); font-weight: 900;
  font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem);
  color: var(--warn-ink); text-decoration: none;
  letter-spacing: -.01em;
}
.urgencias__numero a:hover { text-decoration: underline; }

.form-card {
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-700) 60%, var(--blue) 100%);
  border-radius: var(--radius-lg); color: #fff;
  padding: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
  box-shadow: var(--sh-lg);
}
.form-card h3 { color: #fff; font-size: 1.35rem; margin-bottom: .35rem; }
.form-card > p { color: #cdd6ff; font-size: .9rem; }

.form { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 700px) { .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }
.field { display: grid; gap: .35rem; }
.field > label { font-size: .85rem; font-weight: 600; color: #fff; }
.field .req { color: var(--sky); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid transparent; border-radius: 10px;
}
.field textarea { min-height: 104px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23046ad5' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px;
  padding-right: 2.4rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 1px;
}
.field .hint { font-size: .78rem; color: #cdd6ff; }
.field .error { font-size: .8rem; font-weight: 600; color: #ffd9d9; }
.field .error:empty { display: none; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #ff9a9a; box-shadow: 0 0 0 3px rgba(255,154,154,.35); }

.radios { display: flex; flex-wrap: wrap; gap: .5rem; }
.radios label {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .35rem .95rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; font-size: .88rem; cursor: pointer; color: #fff;
}
.radios input { accent-color: var(--sky); width: 18px; height: 18px; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: #e6ebff; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: .1rem; accent-color: var(--sky); }
.consent a { color: #fff; text-decoration: underline; }

.form__notice {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; padding: .75rem .9rem; font-size: .82rem; color: #e6ebff;
}
.form__status { font-size: .88rem; font-weight: 600; color: #fff; }
.form__status:empty { display: none; }

.map-frame {
  width: 100%; aspect-ratio: 16 / 9; display: block;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--sky-050);
}

/* ---------- 17. Footer ---------- */
.footer {
  background: var(--navy-900); color: #b9c2ee;
  padding-block: clamp(2.25rem, 1.6rem + 2vw, 3.5rem) 1.5rem;
  font-size: .9rem;
}
.footer a { color: #dfe5ff; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer h3 { color: #fff; font-size: .95rem; letter-spacing: .04em; margin-bottom: .8rem; }
.footer__grid { display: grid; gap: 1.75rem; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5rem; }
.footer .brand__name { color: #fff; }
.footer .brand__role { color: var(--sky); }
.footer__legal {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .82rem; color: #97a1d6;
}
.footer__disclaimer { font-size: .8rem; color: #97a1d6; margin-top: 1rem; max-width: 75ch; }

/* ---------- 18. Botón flotante de WhatsApp ---------- */
/* solo el logotipo: círculo de 56 px, sin etiqueta en ningún tamaño */
.fab-wa {
  position: fixed; z-index: 70;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; padding: 0;
  border-radius: 50%;
  background: var(--grad-wa); color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(18,140,126,.35), 0 2px 6px rgba(22,25,61,.18);
  border: 2px solid rgba(255,255,255,.85);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.94);
  transition: opacity .22s ease, transform .22s ease, visibility .22s, box-shadow .22s ease;
}
.fab-wa[data-visible="true"] { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.fab-wa:hover { color: #fff; box-shadow: 0 10px 26px rgba(18,140,126,.45), 0 3px 8px rgba(22,25,61,.2); }
.fab-wa svg { width: 30px; height: 30px; flex: none; }
.fab-wa__pulse {
  position: absolute; inset: -2px; border-radius: 999px;
  border: 2px solid var(--wa);
  animation: wa-pulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .5; }
  70%  { transform: scale(1.32); opacity: 0; }
  100% { transform: scale(1.32); opacity: 0; }
}
html:not(.js) .fab-wa { opacity: 1; visibility: visible; transform: none; }

.map-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }

/* ---------- 19. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 20. Impresión ---------- */
@media print {
  .header, .topbar, .fab-wa, .mobile-menu, .form-card { display: none !important; }
  .panel[hidden] { display: block !important; }
  body { color: #000; }
}
