/* =============================================================
   Dr. Diego Enrique Sánchez Herrera — Endocrinología y Medicina Interna
   Hoja de estilos única, organizada por secciones.
   Editar colores y tipografía en el bloque "1. Tokens".
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Paleta — derivada del logo (azul marino, petróleo, turquesa) */
  --navy:        #0B3B54;   /* autoridad, header, textos fuertes */
  --navy-700:    #124763;
  --teal:        #1F7A97;   /* acento principal (botones, links) */
  --teal-600:    #24879f;
  --turquoise:   #4FA9C4;   /* acento secundario */
  --sky-200:     #BCE3ED;   /* del logo — detalles claros */
  --sky-100:     #EAF6F9;   /* fondo hero / secciones claras */
  --sky-50:      #F4FAFB;
  --white:       #FFFFFF;
  --ink:         #142A33;   /* texto largo, casi negro azulado */
  --ink-soft:    #3E5964;
  --ink-mute:    #6B838C;
  --line:        rgba(20,42,51,0.10);
  --line-strong: rgba(20,42,51,0.16);

  /* Tinte oscuro para la sección "Salud metabólica" (nunca negro puro) */
  --dark-bg:     #0C2E40;
  --dark-bg-2:   #123F55;
  --dark-text:   #EAF6F9;
  --dark-text-mute: rgba(234,246,249,0.72);
  --dark-line:   rgba(234,246,249,0.14);

  --whatsapp:    #1F7A97; /* CTA WhatsApp usa el acento de marca, no verde, para mantener identidad */

  /* Tipografía */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Espaciado */
  --gutter: 1.25rem;
  --container-max: 1200px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Easings */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --header-height: 112px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  text-wrap: balance;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
::selection { background: var(--sky-200); color: var(--navy); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.2rem; background: var(--navy); color: var(--white);
  z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tint { background: var(--sky-50); }
.section--dark { background: linear-gradient(160deg, var(--dark-bg), var(--dark-bg-2)); color: var(--dark-text); }
.section--dark h2 { color: var(--dark-text); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .9rem;
}

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin-top: .8rem; }
.section-tag { color: var(--ink-mute); font-size: .95rem; margin-top: .5rem; }

.section-note {
  color: var(--ink-mute);
  font-size: .92rem;
  max-width: 68ch;
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--sky-200);
}
.section-note--on-dark { border-left-color: var(--turquoise); color: var(--dark-text-mute); }

.section-cta { margin-top: 2rem; }

.pending-note {
  font-size: .82rem;
  color: var(--dark-text-mute);
  margin-top: .6rem;
  font-style: italic;
}

.badge-pending {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--sky-100);
  border: 1px dashed var(--teal);
  border-radius: 999px;
  padding: .2rem .6rem;
  margin-left: .5rem;
  vertical-align: middle;
}

.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: currentColor; }

/* =============================================================
   4. Botones y componentes
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .96rem;
  line-height: 1;
  padding: .95rem 1.6rem;
  border-radius: var(--radius-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .25s var(--ease-out);
  max-width: 100%;
  text-align: center;
}
.btn--primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(31,122,151,0.55);
}
.btn--primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(11,59,84,0.5); }
.btn--primary .icon { fill: currentColor; }
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn--sm { padding: .6rem 1.1rem; font-size: .85rem; }
.btn--block { width: 100%; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  color: var(--teal);
  font-size: .92rem;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.link-more:hover { border-color: currentColor; color: var(--navy); }
.link-more::after { content: "→"; transition: transform .2s var(--ease-out); }
.link-more:hover::after { transform: translateX(3px); }

/* =============================================================
   5. Header / navegación
   ============================================================= */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 500;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0);
  transition: background-color .3s var(--ease-out), box-shadow .3s var(--ease-out), height .3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 6px 24px -14px rgba(11,59,84,0.28);
  height: 84px;
}
@supports not (backdrop-filter: blur(10px)) {
  .site-header.is-scrolled { background: rgba(255,255,255,0.98); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }

/* Logo: dimensionado por ancho (height:auto respeta la proporción real
   del archivo horizontal recortado, 1400×426 ≈ 3.29:1). Ver README para
   cómo se generó assets/images/logo-dr-diego-horizontal.webp. */
.brand__logo {
  width: clamp(190px, 50vw, 225px);
  height: auto;
  transition: width .3s var(--ease-out);
}
@media (min-width: 720px) {
  .brand__logo { width: clamp(250px, 20vw, 330px); }
}
@media (min-width: 720px) {
  .is-scrolled .brand__logo { width: clamp(215px, 16vw, 245px); }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.main-nav__list { display: none; }
.main-nav__cta { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 8px;
}
.nav-toggle__bar {
  width: 22px; height: 2px; background: var(--navy);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 959.98px) {
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem var(--gutter) 2rem;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s linear .25s;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s linear 0s;
  }
  .main-nav__list {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  .main-nav__link {
    display: block;
    padding: .85rem .25rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
  }
  .main-nav__cta { display: flex; }
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .main-nav__list {
    display: flex;
    align-items: center;
    gap: 1.35rem;
  }
  .main-nav__link {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink-soft);
    padding: .4rem .1rem;
    position: relative;
  }
  .main-nav__link::after {
    content: "";
    position: absolute; left: 0; right: 100%; bottom: -2px;
    height: 2px; background: var(--teal);
    transition: right .25s var(--ease-out);
  }
  .main-nav__link:hover { color: var(--navy); }
  .main-nav__link:hover::after, .main-nav__link.is-active::after { right: 0; }
  .main-nav__link.is-active { color: var(--navy); }
  .main-nav__cta { display: inline-flex; }
}
@media (min-width: 960px) and (max-width: 1279.98px) {
  .main-nav__list { gap: .9rem; }
  .main-nav__link { font-size: .8rem; }
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  padding-top: calc(var(--header-height) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: linear-gradient(180deg, var(--sky-100) 0%, var(--white) 100%);
  position: relative;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  top: -10%; right: -12%;
  width: 55vw; height: 55vw; max-width: 700px; max-height: 700px;
  border-radius: 50%;
  border: 40px solid var(--sky-200);
  opacity: .35;
  pointer-events: none;
}
.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero__title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 1.1rem;
  max-width: 16ch;
}
.hero__text {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 1.75rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.9rem; }
.hero__badges {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.hero__badges li {
  display: flex; align-items: center; gap: .55rem;
  font-size: .88rem; font-weight: 600; color: var(--navy);
}
.hero__badges .icon { color: var(--teal); }

.hero__media { position: relative; }
.hero__photo-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -24px rgba(11,59,84,0.35);
}
.hero__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.hero__trust-card {
  margin-top: 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--navy);
  text-align: center;
  box-shadow: 0 12px 30px -18px rgba(11,59,84,0.25);
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
  .hero__photo-wrap { aspect-ratio: 4 / 4.6; }
}

/* =============================================================
   7. Pilares (introducción)
   ============================================================= */
.intro__head { max-width: 68ch; margin-bottom: 2.75rem; }
.intro__head p { color: var(--ink-soft); font-size: 1.05rem; margin-top: 1rem; }

.pillars {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.pillar:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(11,59,84,0.28); border-color: var(--sky-200); }
.pillar__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--sky-100);
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.pillar__icon svg { width: 26px; height: 26px; }
.pillar h3 { margin-bottom: .5rem; }
.pillar p { color: var(--ink-soft); font-size: .95rem; }

@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

/* =============================================================
   8. Cards de servicios / padecimientos
   ============================================================= */
.cards-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -26px rgba(11,59,84,0.3);
  border-color: var(--sky-200);
}
.service-card__icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--sky-100);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.service-card p { color: var(--ink-soft); font-size: .92rem; flex-grow: 1; margin-bottom: 1rem; }

@media (min-width: 720px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

/* =============================================================
   9. Síntomas / cuándo consultar
   ============================================================= */
.symptoms-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: 1fr;
}
.symptoms-grid li {
  position: relative;
  padding: 1rem 1.1rem 1rem 2.6rem;
  background: var(--sky-50);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .94rem;
  color: var(--navy);
}
.symptoms-grid li::before {
  content: "";
  position: absolute; left: 1.1rem; top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
}
@media (min-width: 720px) { .symptoms-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .symptoms-grid { grid-template-columns: repeat(3, 1fr); } }

/* =============================================================
   10. Sobre el doctor
   ============================================================= */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
.about__photo {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 20%;
  box-shadow: 0 26px 54px -26px rgba(11,59,84,0.32);
}
.about__lead { font-size: 1.05rem; color: var(--ink-soft); margin: 1.1rem 0 1.75rem; max-width: 58ch; }

.credentials {
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.75rem;
}
.credentials__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy);
  margin-bottom: .85rem;
}
.credentials__list { display: flex; flex-direction: column; gap: .5rem; }
.credentials__list li {
  font-size: .88rem;
  color: var(--ink-mute);
  font-style: italic;
  padding-left: 1.1rem;
  position: relative;
}
.credentials__list li::before {
  content: "—";
  position: absolute; left: 0; color: var(--sky-200);
}

.social-links { display: flex; gap: .8rem; }
.social-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600; font-size: .88rem;
  color: var(--navy);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out);
}
.social-link:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

@media (min-width: 960px) { .about-grid { grid-template-columns: .85fr 1.15fr; gap: 3.5rem; } }

/* =============================================================
   11. Proceso de atención
   ============================================================= */
.process-list {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
.process-step {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--sky-50);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}
.process-step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--sky-200);
  -webkit-text-stroke: 1.5px var(--teal);
  color: transparent;
  flex-shrink: 0;
  min-width: 2.4ch;
}
.process-step h3 { font-size: 1rem; }

@media (min-width: 720px) { .process-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .process-list { grid-template-columns: repeat(4, 1fr); } .process-step { flex-direction: column; align-items: flex-start; gap: .6rem; } }

/* =============================================================
   12. Salud metabólica
   ============================================================= */
.metabolic-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.metabolic-grid > * { min-width: 0; }
.metabolic__content p { color: var(--dark-text-mute); font-size: 1.02rem; margin: 1rem 0; max-width: 56ch; }
.metabolic__content .btn--primary { margin-top: .5rem; }

.metabolic__indicators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  min-width: 0;
}
.indicator-card { min-width: 0; }
.indicator-card {
  background: rgba(234,246,249,0.06);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-md);
  padding: 1.4rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  text-align: center;
  color: var(--dark-text);
  font-weight: 600;
  font-size: .85rem;
}
.indicator-card svg { width: 30px; height: 30px; color: var(--turquoise); }

@media (min-width: 960px) {
  .metabolic-grid { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; }
  .metabolic__indicators { grid-template-columns: repeat(3, 1fr); }
  .indicator-card:nth-child(4), .indicator-card:nth-child(5) { grid-column: span 1; }
}

/* =============================================================
   13. Ubicaciones
   ============================================================= */
.locations-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.location-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
}
.location-card h3 { margin-bottom: .9rem; }
.location-card__address {
  font-style: normal;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: .9rem;
}
.location-card p { color: var(--ink-mute); font-size: .9rem; margin-bottom: 1.2rem; }

/* Mapa: iframe de Google Maps (sin API key) con capa "skeleton" mientras carga */
.location-card__map {
  position: relative;
  height: 210px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.1rem;
  background: linear-gradient(100deg, var(--sky-50) 30%, var(--sky-100) 50%, var(--sky-50) 70%);
  background-size: 200% 100%;
  animation: mapSkeleton 1.6s ease-in-out infinite;
}
.location-card__map iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.location-card__map.is-loaded { animation: none; background: var(--sky-50); }
.location-card__map.is-loaded iframe { opacity: 1; }

@keyframes mapSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .location-card__map { animation: none; background: var(--sky-100); }
}

.location-card__actions { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 540px) {
  .location-card__actions { flex-direction: row; }
  .location-card__actions .btn { flex: 1; }
}

@media (min-width: 720px) {
  .locations-grid { grid-template-columns: repeat(2, 1fr); }
  .location-card__map { height: 240px; }
}

/* =============================================================
   14. Artículos (vista previa del blog)
   ============================================================= */
.articles-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -26px rgba(11,59,84,0.3);
  border-color: var(--sky-200);
}
.article-card__link { display: block; color: inherit; }
.article-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sky-50);
}
.article-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease-out);
}
.article-card:hover .article-card__media img { transform: scale(1.04); }
.article-card__body { padding: 1.5rem 1.6rem 1.6rem; }
.article-card__category {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--sky-100);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-bottom: .9rem;
}
.article-card__title { font-size: 1.08rem; margin-bottom: .6rem; }
.article-card__excerpt {
  color: var(--ink-soft);
  font-size: .92rem;
  margin-bottom: 1.1rem;
  /* extracto de longitud uniforme: se recorta a 3 líneas si el texto varía */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.article-card__meta { font-size: .78rem; color: var(--ink-mute); }
.article-card__cta { font-size: .85rem; font-weight: 700; color: var(--teal); }
.article-card:hover .article-card__cta { color: var(--navy); }

/* Destacado editorial del artículo más reciente (home) */
.latest-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: inherit;
  margin-bottom: 2.5rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.latest-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -26px rgba(11,59,84,0.3);
  border-color: var(--sky-200);
}
.latest-post__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sky-50);
}
.latest-post__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease-out);
}
.latest-post:hover .latest-post__media img { transform: scale(1.04); }
.latest-post__body {
  padding: 1.6rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.latest-post__body > .article-card__category { align-self: flex-start; }
.latest-post__eyebrow {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 .75rem;
}
.latest-post__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 .7rem;
}
.latest-post__excerpt {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 58ch;
}
.latest-post__meta {
  font-size: .85rem;
  color: var(--ink-mute);
  margin: 0 0 1.1rem;
}
.latest-post__cta {
  font-weight: 700;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.latest-post:hover .latest-post__cta { color: var(--teal-600); }
@media (min-width: 860px) {
  .latest-post { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  .latest-post__media { aspect-ratio: auto; height: 100%; }
  .latest-post__body { padding: 2rem 2.2rem; }
}

@media (min-width: 720px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

/* Distintivo "Nuevo" — mismo chip que la categoría, en relleno sólido
   para que se distinga sin introducir un color ajeno a la identidad. */
.article-card__badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-bottom: .9rem;
  margin-right: .45rem;
}

/* Paginación visual del blog ("Ver más artículos") */
.blog-more {
  display: flex;
  justify-content: center;
  margin-top: .5rem;
  margin-bottom: 2rem;
}
.blog-more .btn[hidden] { display: none; }

/* Filtros de categoría (portada del blog) */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin: 2rem 0 2.5rem;
}
.filter-pill {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: .5rem 1.1rem;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* =============================================================
   15. FAQ
   ============================================================= */
.faq-list { display: flex; flex-direction: column; gap: .8rem; max-width: 80ch; }
.faq-item {
  background: var(--sky-50);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 3rem 1.2rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  color: var(--navy);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 1.4rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--teal);
  transition: transform .25s var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  padding: 0 1.4rem 1.3rem;
  color: var(--ink-soft);
  font-size: .93rem;
  max-width: 68ch;
}

/* =============================================================
   16. CTA final
   ============================================================= */
.cta-final {
  background: linear-gradient(160deg, var(--navy), var(--navy-700));
  text-align: center;
  color: var(--white);
}
.cta-final h2 { color: var(--white); }
.cta-final__inner { max-width: 620px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.cta-final p { color: rgba(255,255,255,0.82); font-size: 1.05rem; }
.cta-final .btn--primary { margin-top: .4rem; }
.cta-final__locations { font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sky-200); }

/* =============================================================
   17. Footer
   ============================================================= */
.site-footer {
  background: var(--sky-50);
  border-top: 1px solid var(--line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.footer-grid {
  display: grid;
  gap: 2.25rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand__logo { width: 200px; height: auto; margin-bottom: 1rem; }
.footer-brand p { font-weight: 700; color: var(--navy); }
.footer-brand__specialty { font-weight: 500 !important; color: var(--ink-mute) !important; font-size: .88rem; margin-bottom: 1rem; }
.social-links--footer { margin-top: 1rem; }
.social-links--footer a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--navy);
  margin-right: .5rem;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.social-links--footer a:hover { border-color: var(--teal); color: var(--teal); }
.social-links--footer .icon { width: 1rem; height: 1rem; }

.footer-nav h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-mute);
  margin-bottom: 1rem;
  font-weight: 700;
}
.footer-nav ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-nav a { font-size: .9rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--teal); }

.footer-legal {
  padding-block: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-legal p { font-size: .78rem; color: var(--ink-mute); }

@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); } }

/* =============================================================
   18. WhatsApp flotante + sticky CTA móvil
   ============================================================= */
.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -10px rgba(11,59,84,0.55);
  z-index: 400;
  transition: transform .25s var(--ease-out);
}
.whatsapp-float:hover { transform: scale(1.07); }
.whatsapp-float .icon { width: 28px; height: 28px; }

.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 399;
  transform: translateY(100%);
  transition: transform .3s var(--ease-out);
}
.sticky-cta.is-visible { transform: translateY(0); }

/* En móvil, el botón flotante y la barra fija inferior cumplen la misma
   función (WhatsApp) y pueden coincidir en pantalla al hacer scroll —
   se oculta el flotante para evitar la superposición. */
@media (max-width: 719.98px) {
  .whatsapp-float { display: none; }
}

@media (min-width: 720px) {
  .sticky-cta { display: none; }
  .whatsapp-float { right: 1.75rem; bottom: 1.75rem; }
}

/* =============================================================
   19. Reveal on scroll
   ============================================================= */
/* Gated by .js on <html> (set synchronously in <head>) so content
   stays visible by default if JavaScript never runs. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =============================================================
   20.5 Artículo de blog (breadcrumbs, TOC, cuerpo, FAQ, autor…)
   ============================================================= */
.breadcrumbs {
  max-width: 900px;
  margin: 0 auto;
  padding-top: calc(var(--header-height) + 1.75rem);
  font-size: .82rem;
  color: var(--ink-mute);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.breadcrumbs a { color: var(--teal); font-weight: 600; }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs li { display: flex; align-items: center; gap: .3rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--line-strong); }
.breadcrumbs li[aria-current] { color: var(--ink-mute); }

.article-hero { max-width: 900px; margin: 1.4rem auto 0; }
.article-hero__category {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--sky-100);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-bottom: 1rem;
}
.article-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); max-width: 22ch; margin-bottom: 1.1rem; }
.article-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem;
  font-size: .88rem; color: var(--ink-mute);
}

.article-featured-image {
  max-width: 900px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 26px 54px -30px rgba(11,59,84,0.32);
}
.article-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.article-toc {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  background: var(--sky-50);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
}
.article-toc p { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--navy); margin-bottom: .8rem; }
.article-toc ol { display: flex; flex-direction: column; gap: .55rem; counter-reset: toc; }
.article-toc li { counter-increment: toc; font-size: .92rem; }
.article-toc li::before { content: counter(toc) ". "; color: var(--teal); font-weight: 700; }
.article-toc a { color: var(--ink-soft); font-weight: 600; }
.article-toc a:hover { color: var(--teal); }

.article-body { max-width: 720px; margin: 0 auto; font-size: 1.05rem; color: var(--ink-soft); }
.article-body h2 { font-size: 1.5rem; margin: 2.6rem 0 1rem; scroll-margin-top: calc(var(--header-height) + 16px); }
.article-body h3 { font-size: 1.15rem; margin: 1.8rem 0 .8rem; scroll-margin-top: calc(var(--header-height) + 16px); }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: .5rem; }
.article-body strong { color: var(--navy); }

.article-callout {
  background: var(--sky-50);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
}
.article-callout p { margin-bottom: 0; font-size: .96rem; }
.article-callout p:not(:last-child) { margin-bottom: .6rem; }
.article-callout strong { color: var(--navy); }

.article-faq { max-width: 720px; margin: 3rem auto 0; }
.article-faq h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }

.article-cta-box {
  max-width: 720px;
  margin: 3.5rem auto;
  text-align: center;
  background: linear-gradient(160deg, var(--navy), var(--navy-700));
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  color: var(--white);
}
.article-cta-box h2 { color: var(--white); font-size: 1.4rem; margin-bottom: .7rem; }
.article-cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 1.4rem; }

.article-note {
  max-width: 720px;
  margin: 2.5rem auto 0;
  font-size: .85rem;
  color: var(--ink-mute);
  font-style: italic;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.article-author {
  max-width: 720px;
  margin: 2.5rem auto 0;
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--sky-50);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
}
.article-author__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.article-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-author__name { font-weight: 700; color: var(--navy); font-size: .96rem; }
.article-author__role { font-size: .84rem; color: var(--ink-mute); }

.article-related { max-width: 1000px; margin: 3.5rem auto 0; }
.article-related h2 { text-align: center; margin-bottom: 1.8rem; }
.article-related .articles-grid { margin-bottom: 0; }

.article-back { text-align: center; margin: 3rem 0 4rem; }

/* Fuentes / referencias médicas */
.article-sources {
  max-width: 720px;
  margin: 2.5rem auto 0;
  background: var(--sky-50);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
}
.article-sources p { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--navy); margin-bottom: .8rem; }
.article-sources ol { display: flex; flex-direction: column; gap: .5rem; padding-left: 1.2rem; list-style: decimal; }
.article-sources li { font-size: .85rem; color: var(--ink-soft); }
.article-sources a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article-sources a:hover { color: var(--navy); }

/* Bloque local de conversión (CDMX) dentro de artículos */
.article-local-block {
  max-width: 720px;
  margin: 2.5rem auto 0;
  border: 1.5px solid var(--sky-200);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.7rem;
}
.article-local-block h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.article-local-block p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1rem; }
.article-local-block address { font-style: normal; color: var(--ink-soft); font-size: .88rem; line-height: 1.6; margin-bottom: 1.1rem; }
.article-local-block address strong { color: var(--navy); }

/* Insignia de borrador — visible solo si alguien accede directamente a la URL */
.draft-badge {
  max-width: 720px;
  margin: calc(var(--header-height) + 1.5rem) auto 0;
  background: #FFF4E5;
  border: 1.5px dashed #C98A1A;
  border-radius: var(--radius-sm);
  padding: 1rem 1.3rem;
  font-size: .85rem;
  color: #7A5410;
  font-weight: 600;
}

@media (min-width: 720px) {
  .article-hero h1 { max-width: 26ch; }
}

/* =============================================================
   20. Responsive — breakpoints adicionales de contenedor
   ============================================================= */
@media (min-width: 540px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1280px) { :root { --gutter: 2rem; } }

/* =============================================================
   21. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition-duration: .01ms; }
  .hero::before { display: none; }
}
