/* ============================================================================
   drperezaverhoff.com — Design System
   Dr. Antonio Pérez Averhoff · Médico Internista · San Pedro Sula
   ----------------------------------------------------------------------------
   Hoja única compartida por todas las páginas. Sin build, sin dependencias
   externas, sin @import: se sirve desde /assets/css/site.css y se cachea entre
   navegaciones.
   Paleta y tipografía alineadas al logo real (§11 del documento maestro).
   ========================================================================== */

/* ---------------------------------------------------------------- 1. TOKENS */

:root {
  /* Azules — el navy 900 es el del logo (#0B1F33); el 800 es el del maestro */
  --navy-950: #06131F;
  --navy-900: #0B1F33;
  --navy-800: #082A4A;
  --navy-700: #0E3A63;
  --navy-600: #14507F;

  /* Dorado — acento, nunca dominante. 500 es el del logo (#B08D57) */
  --gold-700: #8C6B32;
  --gold-600: #A8813F;
  --gold-500: #B08D57;
  --gold-400: #C49A4A;
  --gold-200: #E5D2AE;
  --gold-100: #F3E7D2;

  /* Neutros */
  --white: #FFFFFF;
  --offwhite: #F7F8FA;
  --gray-100: #EEF2F5;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-500: #64748B;
  --text: #475569;
  --ink: #17293C;

  /* Señales */
  --green-600: #0F7A5A;
  --red-600: #B4232A;

  /* Tipografía */
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
                "Book Antiqua", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Escala tipográfica fluida */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-h4: clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  --fs-h3: clamp(1.3125rem, 0.9vw + 1.1rem, 1.625rem);
  --fs-h2: clamp(1.625rem, 1.8vw + 1.2rem, 2.375rem);
  --fs-h1: clamp(2.125rem, 3.4vw + 1.3rem, 3.5rem);

  /* Espaciado */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 4rem;
  --section-y: clamp(3.5rem, 6vw, 6.5rem);

  /* Formas */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 51, .06), 0 2px 8px rgba(11, 31, 51, .05);
  --shadow: 0 4px 14px rgba(11, 31, 51, .07), 0 12px 32px rgba(11, 31, 51, .07);
  --shadow-lg: 0 10px 30px rgba(11, 31, 51, .10), 0 30px 70px rgba(11, 31, 51, .12);

  --container: 1180px;
  --container-narrow: 760px;
  --header-h: 76px;
}

/* ------------------------------------------------------------------ 2. BASE */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: var(--fs-h4); line-height: 1.3; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

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

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

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.35rem; }
li { margin-bottom: 0.4rem; }
li:last-child { margin-bottom: 0; }

strong, b { color: var(--ink); font-weight: 650; }

hr {
  border: 0;
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-6) 0;
}

::selection { background: var(--gold-100); color: var(--navy-900); }

/* Foco visible — requisito WCAG 2.2 AA */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Salto al contenido */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--white); }

.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;
}

/* -------------------------------------------------------------- 3. LAYOUT */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.125rem, 4vw, 2.25rem);
}

.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }
.section--offwhite { background: var(--offwhite); }
.section--gray { background: var(--gray-100); }

.section--navy {
  background:
    radial-gradient(120% 100% at 85% 0%, rgba(176, 141, 87, .16), transparent 55%),
    linear-gradient(160deg, var(--navy-900), var(--navy-800) 65%, var(--navy-950));
  color: rgba(255, 255, 255, .84);
}
.section--navy h1, .section--navy h2,
.section--navy h3, .section--navy h4 { color: var(--white); }
.section--navy strong { color: var(--white); }
/* :not(.btn) — sin esto, el color de enlace pisa el de los botones y deja
   texto dorado sobre fondo dorado (contraste insuficiente). */
.section--navy a:not(.btn) { color: var(--gold-200); }
.section--navy a:not(.btn):hover { color: var(--gold-100); }

/* Encabezado de sección */
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 3.5vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: var(--fs-lg); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin: 0 0 var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--gold-500);
  flex: none;
}
.section-head--center .eyebrow { justify-content: center; }
.section--navy .eyebrow { color: var(--gold-400); }

/* Rejillas */
.grid { display: grid; gap: clamp(1.25rem, 2.2vw, 2rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

/* Artículos: cuerpo + barra lateral. Antes iba en un style= en línea sin media query, y a 390 px
   dejaba la columna del texto en 14 px (ver §6.2 del documento maestro). Colapsa a una columna. */
.article-grid { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
@media (max-width: 900px) { .article-grid { grid-template-columns: minmax(0, 1fr); } }

/* -------------------------------------------------------------- 4. BOTONES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;                 /* touch target §33 */
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease,
              border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-900); color: var(--white); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--gray-300);
}
.btn-outline:hover { border-color: var(--navy-800); color: var(--navy-900); background: var(--white); }

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { background: var(--gold-400); color: var(--navy-950); }

.btn-whatsapp { background: #128C7E; color: var(--white); }
.btn-whatsapp:hover { background: #0E7568; color: var(--white); }

.btn-ghost-light {
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  border-color: rgba(255, 255, 255, .34);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); color: var(--white); }

.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Enlace-flecha */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--navy-600);
}
.link-arrow::after { content: "→"; transition: transform .18s ease; }
.link-arrow:hover { color: var(--navy-900); }
.link-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------- 5. HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 38px; width: auto; }
@media (max-width: 420px) { .brand img { height: 32px; } }

.nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list > li { margin: 0; position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.5rem 0.55rem;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
@media (min-width: 1340px) {
  .nav-list { gap: 0.2rem; }
  .nav-link { padding: 0.55rem 0.7rem; font-size: var(--fs-sm); }
}
.nav-link:hover { background: var(--gray-100); color: var(--navy-900); }
.nav-link[aria-current="page"] { color: var(--navy-700); box-shadow: inset 0 -2px 0 var(--gold-500); }

/* Submenú Servicios */
.has-submenu > button.nav-link { background: none; border: 0; font-family: inherit; cursor: pointer; }
.submenu-caret { transition: transform .18s ease; }
.has-submenu > button[aria-expanded="true"] .submenu-caret { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 15rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  display: none;
}
.has-submenu > button[aria-expanded="true"] + .submenu { display: block; }
.submenu a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: var(--fs-sm);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.submenu a:hover { background: var(--gray-100); color: var(--navy-900); }

.header-cta { flex: none; padding-inline: 1.05rem; }
@media (min-width: 1340px) { .header-cta { padding-inline: 1.5rem; } }

/* El CTA que vive dentro de <nav> es solo para el panel móvil */
.nav > .btn { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-left: auto;
  background: transparent;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 1200px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  /* Panel lateral. Se oculta con clip-path y NO con translateX: un elemento
     `fixed` desplazado fuera del viewport ensancha el documento (body
     overflow-x:hidden no recorta elementos fijos) y provoca scroll horizontal
     en móvil. `visibility` lo saca además del orden de tabulación. */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(22rem, 88vw);
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5) var(--space-5) var(--space-8);
    overflow-y: auto;
    margin-left: 0;
    visibility: hidden;
    clip-path: inset(0 0 0 100%);
    transition: clip-path .24s ease, visibility 0s linear .24s;
  }
  .nav[data-open="true"] {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path .24s ease, visibility 0s;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav-link { padding: 0.8rem 0.75rem; font-size: 1rem; width: 100%; justify-content: space-between; }
  .submenu {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    background: var(--gray-100);
    margin: 0.25rem 0 0.5rem;
  }
  .nav > .btn { display: inline-flex; margin-top: var(--space-4); width: 100%; }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, .35);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.nav-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------ 6. HERO */

.hero {
  position: relative;
  background:
    radial-gradient(90% 70% at 88% 12%, rgba(176, 141, 87, .10), transparent 60%),
    linear-gradient(180deg, var(--offwhite), var(--white) 78%);
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 5vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 24rem; margin-inline: auto; }
}

.hero h1 { margin-bottom: 0.35rem; }
.hero-role {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.6vw + 1rem, 1.875rem);
  color: var(--navy-600);
  margin: 0 0 var(--space-5);
  letter-spacing: -0.01em;
}
.hero-lead { font-size: var(--fs-lg); color: var(--ink); max-width: 34rem; }
.hero-text { max-width: 34rem; }
.hero .btn-group { margin-top: var(--space-6); }

.hero-microtrust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--gray-200);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  text-transform: uppercase;
}
.hero-microtrust span { display: inline-flex; align-items: center; gap: 0.9rem; }
.hero-microtrust span:not(:last-child)::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-500);
}

.hero-media { position: relative; isolation: isolate; }
.hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--gray-100);
}
.hero-media::before {
  /* marco dorado sutil, desplazado tras la fotografía */
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1.5px solid var(--gold-200);
  border-radius: var(--radius-xl);
  z-index: 0;
}
@media (max-width: 560px) { .hero-media::before { display: none; } }

/* ----------------------------------------------------------- 7. TRUST STRIP */

.trust-strip { border-block: 1px solid var(--gray-200); background: var(--white); }
.trust-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-list li {
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem) 1rem;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}
.trust-list li:last-child { border-right: 0; }
@media (max-width: 720px) {
  .trust-list li { border-right: 0; border-bottom: 1px solid var(--gray-200); }
  .trust-list li:last-child { border-bottom: 0; }
}
.trust-value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2vw + 1rem, 2.125rem);
  color: var(--navy-800);
  line-height: 1.1;
  margin-bottom: 0.3rem;
  text-wrap: balance;
}
/* Los valores que son palabras («La Habana») necesitan menos cuerpo que las
   cifras para no romper la línea base de la tira. */
.trust-value--word { font-size: clamp(1.25rem, 1.2vw + 0.95rem, 1.625rem); }
.trust-label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 600;
}

/* --------------------------------------------------------------- 8. TARJETAS */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 2vw, 1.85rem);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: 0; }
.card p { font-size: var(--fs-sm); }
.card > *:last-child { margin-top: auto; padding-top: var(--space-2); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--navy-700);
  flex: none;
}
.card-icon svg { width: 22px; height: 22px; }

.card--featured {
  border-color: var(--gold-200);
  background: linear-gradient(180deg, var(--gold-100) 0%, var(--white) 42%);
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--gray-100);
  color: var(--navy-700);
}
.badge--gold { background: var(--gold-100); color: var(--gold-700); }
.badge--navy { background: var(--navy-800); color: var(--white); }

/* Listas de datos con icono. No van acopladas a .location-card: se usan
   también en las barras laterales de las páginas de servicio. */
.location-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-sm);
  display: grid;
  gap: 0.5rem;
}
.location-meta li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.6rem;
  align-items: start;
  margin: 0;
}
.location-meta svg { width: 18px; height: 18px; color: var(--gold-600); margin-top: 3px; }

.location-card { position: relative; overflow: hidden; }

.service-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.service-list li {
  margin: 0;
  font-size: var(--fs-xs);
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-500);
  background: var(--white);
}

/* Tarjetas de artículo */
.article-card { padding: 0; overflow: hidden; }
.article-card .article-body { padding: clamp(1.25rem, 2vw, 1.6rem); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.article-card h3 { font-size: var(--fs-h4); }
.article-meta { font-size: var(--fs-xs); color: var(--gray-500); letter-spacing: 0.03em; }

/* Tarjetas de video — click-to-load, sin iframes al inicio (§22) */
.video-card { padding: 0; overflow: hidden; }
.video-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  padding: 0;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  cursor: pointer;
  display: block;
  overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s ease, transform .3s ease; }
.video-thumb:hover img { opacity: 1; transform: scale(1.03); }
.video-thumb .play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--navy-900);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.video-thumb .play-badge svg { width: 24px; height: 24px; margin-left: 3px; }
.video-card .video-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; }
.video-card h3 { font-size: var(--fs-h4); }
.video-embed { aspect-ratio: 9 / 16; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* --------------------------------------------------------- 9. CREDENCIALES */

.credential-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.credential-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  text-align: left;
}
.credential-item button.credential-open {
  display: block;
  padding: 0;
  border: 0;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  width: 100%;
}
.credential-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; }
.credential-caption { padding: 0 0.4rem 0.4rem; }
.credential-caption strong { display: block; font-size: var(--fs-sm); color: var(--ink); line-height: 1.35; }
.credential-caption span { display: block; font-size: var(--fs-xs); color: var(--gray-500); margin-top: 0.2rem; }

/* Lightbox accesible */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6, 19, 31, .92);
}
.lightbox[data-open="true"] { display: grid; place-items: center; }
.lightbox-figure { margin: 0; max-width: min(58rem, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 1rem; }
.lightbox-figure img { max-height: 78vh; width: auto; margin-inline: auto; border-radius: var(--radius); background: var(--white); }
.lightbox-figure figcaption { color: rgba(255, 255, 255, .86); text-align: center; font-size: var(--fs-sm); }
.lightbox-close {
  position: absolute;
  top: clamp(.75rem, 2vw, 1.5rem);
  right: clamp(.75rem, 2vw, 1.5rem);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .2); }

/* --------------------------------------------------------- 10. WHATSAPP FAB */

.wa-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: #128C7E;
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(6, 19, 31, .28);
  transition: background-color .18s ease, transform .18s ease;
}
.wa-fab:hover { background: #0E7568; color: var(--white); transform: translateY(-2px); }
.wa-fab svg { width: 22px; height: 22px; flex: none; }
@media (max-width: 640px) {
  .wa-fab { padding: 0.9rem; }
  .wa-fab .wa-fab-text { display: none; }
}

/* ------------------------------------------------------------ 11. NEWSLETTER */

.newsletter { display: grid; gap: clamp(1.75rem, 3vw, 3rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .newsletter { grid-template-columns: 1fr 1fr; } }

.form-field { display: grid; gap: 0.35rem; margin-bottom: var(--space-4); }
.form-field label { font-size: var(--fs-sm); font-weight: 600; color: var(--white); }
.form-field input[type="text"],
.form-field input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
}
.form-field input::placeholder { color: var(--gray-500); }

.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: var(--fs-xs);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.form-consent input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold-500); }

.form-status { font-size: var(--fs-sm); margin-top: var(--space-3); min-height: 1.5rem; }
.form-status[data-state="success"] { color: #7BE0BE; }
.form-status[data-state="error"] { color: #FFB4A8; }
.form-status[data-state="loading"] { color: rgba(255, 255, 255, .75); }

.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* -------------------------------------------------------------- 12. FOOTER */

.site-footer {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: rgba(255, 255, 255, .72);
  font-size: var(--fs-sm);
  padding-block: clamp(3rem, 5vw, 4.5rem) var(--space-6);
}
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: var(--gold-200); text-decoration: underline; }

.footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-bottom: var(--space-7);
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1.05fr; }
  .footer-brand { max-width: 24rem; }
}
.footer-brand img { height: 46px; width: auto; margin-bottom: var(--space-4); }
.footer-identity { color: var(--white); font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.5; }
.footer-identity span { display: block; font-family: var(--font-sans); font-size: var(--fs-sm); color: rgba(255, 255, 255, .68); }

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-col li { margin: 0; }

.social-list { display: flex; gap: 0.6rem; margin-top: var(--space-4); list-style: none; padding: 0; }
.social-list li { margin: 0; }
.social-list a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: rgba(255, 255, 255, .85);
}
.social-list a:hover { background: rgba(255, 255, 255, .12); border-color: var(--gold-400); color: var(--white); }
.social-list svg { width: 19px; height: 19px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .55);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.medical-disclaimer {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: rgba(255, 255, 255, .62);
}

/* --------------------------------------------------------- 13. BREADCRUMBS */

.breadcrumbs { background: var(--offwhite); border-bottom: 1px solid var(--gray-200); }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0.85rem 0;
  font-size: var(--fs-xs);
  color: var(--gray-500);
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--gray-300); }
.breadcrumbs a { color: var(--gray-500); text-decoration: none; }
.breadcrumbs a:hover { color: var(--navy-700); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- 14. PROSA */

.prose { max-width: 42rem; font-size: var(--fs-lg); }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose > *:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li::marker { color: var(--gold-600); }
.prose blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--gold-500);
  background: var(--offwhite);
  font-style: italic;
  color: var(--ink);
}

.callout {
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--navy-600);
  border-radius: var(--radius);
  background: var(--offwhite);
  padding: var(--space-5);
  margin-block: var(--space-6);
}
.callout--gold { border-left-color: var(--gold-500); background: var(--gold-100); border-color: var(--gold-200); }
.callout h3 { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
.callout p:last-child { margin-bottom: 0; }

/* Datos operativos destacados */
.fact-list {
  display: grid;
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
}
.fact-list li { margin: 0; background: var(--white); padding: var(--space-5) var(--space-4); text-align: center; }
.fact-list dt, .fact-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy-800);
  line-height: 1.15;
}
.fact-label { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); margin-top: 0.3rem; font-weight: 600; }

/* FAQ */
.faq { border-top: 1px solid var(--gray-200); }
.faq details { border-bottom: 1px solid var(--gray-200); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-5) 2.5rem var(--space-5) 0;
  font-family: var(--font-serif);
  font-size: var(--fs-h4);
  color: var(--ink);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 1.5rem;
  color: var(--gold-600);
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > *:not(summary) { padding-bottom: var(--space-5); max-width: 46rem; }

/* Aviso de dato pendiente de confirmación (§45) — nunca se despliega a producción */
.pendiente {
  border: 2px dashed var(--red-600);
  background: #FFF5F5;
  color: var(--red-600);
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* --------------------------------------- 14b. COMPONENTES DE LOS ARTÍCULOS */
/* Clases heredadas de los 6 artículos SEO originales. Se conservan tal cual
   para no tocar el texto migrado; aquí se les da el aspecto del sistema nuevo. */

.articulo-cuerpo > *:first-child { margin-top: 0; }

.sintoma-list, .diagnostico-list, .sensacion-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
  display: grid;
  gap: var(--space-3);
}
.sintoma-list li, .diagnostico-list li, .sensacion-list li {
  position: relative;
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: var(--offwhite);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  font-size: var(--fs-base);
}
.sintoma-num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  vertical-align: 2px;
}
.sensacion-icon { margin-right: 0.5rem; }

.respuesta-destacada {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-lg);
  font-size: var(--fs-lg);
  color: var(--ink);
}
.respuesta-destacada > *:last-child { margin-bottom: 0; }

.articulo-video {
  margin: var(--space-6) 0;
  max-width: 22rem;
}
.articulo-video .video-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: var(--space-3);
}
.articulo-video .video-thumb { border-radius: var(--radius-lg); }

/* Video autoalojado (sin iframes de terceros, §22). El poster carga con la
   página; el mp4 solo cuando el usuario pulsa play (preload="none"). */
.articulo-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  object-fit: cover;
}

/* --------------------------------- 14c. FICHA DE AUTOR (§3.10 del PLAN_GEO) */
/* Obligatoria en todo contenido médico: quién lo firma, con qué credencial y
   cuándo se actualizó. El aspecto se controla solo desde aquí — ninguna ficha
   lleva `style=` en línea, por la avería de los 7 artículos del 27 ago 2026. */

.author-card {
  margin: var(--space-7) 0 0;
  padding: var(--space-5) var(--space-6);
  background: var(--offwhite);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--navy-600);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--text);
}
.author-card__aviso {
  margin: 0 0 var(--space-4);
  font-style: italic;
  color: var(--gray-500);
}
.author-card__titulo {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
}
.author-card dl { margin: 0; display: grid; gap: var(--space-2) var(--space-5); }
.author-card dt { font-weight: 700; color: var(--ink); }
.author-card dd { margin: 0; }
.author-card .link-arrow { margin-top: var(--space-4); font-size: var(--fs-sm); }

/* A partir de 40rem el par etiqueta/valor va en dos columnas; por debajo se
   apila, que es como se lee bien a 390 px. */
@media (min-width: 40rem) {
  .author-card dl { grid-template-columns: minmax(0, max-content) 1fr; align-items: baseline; }
}

/* ------------------------------------------------------- 15. UTILIDADES */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.lead { font-size: var(--fs-lg); color: var(--ink); }
.small { font-size: var(--fs-sm); }
.muted { color: var(--gray-500); }
.flow > * + * { margin-top: var(--space-4); }

/* Listas a dos columnas que colapsan a una en pantallas estrechas */
.cols-2 { columns: 2; column-gap: 2rem; }
@media (max-width: 560px) { .cols-2 { columns: 1; } }
.stack-center { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* --------------------------------------------------- 16. MOVIMIENTO / A11Y */

/* El estado oculto solo se aplica si el JS está corriendo (clase .js en <html>).
   Sin JS —o si el script falla— el contenido se ve siempre. Nunca debe haber
   texto invisible por depender de un IntersectionObserver. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ 17. IMPRESIÓN */

@media print {
  .site-header, .wa-fab, .site-footer, .nav-backdrop, .breadcrumbs { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
