/* ══════════════════════════════════════════════════════════════════════════
   Dr. Abraham Delgadillo — hoja de estilos única
   BEM: block__element--modifier · estados .is-* (los alterna el JS)
   Los hooks .js-* NUNCA se estilizan.

   TABLA DE CONTENIDOS
   01 · Tokens (:root)
   02 · Reset y base
   03 · Accesibilidad
   04 · Tipografía y layout
   05 · Botones
   06 · Barra superior y encabezado
   07 · Hero
   08 · Casos
   09 · Síntomas
   10 · Tratamientos
   11 · Experiencia
   12 · Segunda opinión
   13 · Pacientes foráneos
   14 · Contacto
   15 · Pie de página y WhatsApp flotante
   16 · Revelado (fail-safe)
   17 · Páginas legales (.page-legal)
   18 · Impresión
   ══════════════════════════════════════════════════════════════════════════ */


/* ══ 01 · TOKENS ═════════════════════════════════════════════════════════ */

:root {
  /* Marca — paleta del diseño original */
  --brand:        #3e83bd;
  --brand-light:  #6aa7d8;
  --brand-pale:   #a9c2da;
  --brand-muted:  #7d99b5;
  --brand-deep:   #2d6da3;
  --accent-wa:    #25a05a;
  --accent-wa-deep: #1d8047;

  --navy:         #0b1826;
  --navy-deep:    #081320;
  --navy-mid:     #10263c;
  --navy-light:   #16334f;
  --ink:          #16283a;
  --cream:        #f6f3ee;
  --cream-line:   #e8e2d8;
  --cream-grid:   #d9d2c7;
  --cream-muted:  #b8ab97;
  --cream-border: #c9bfae;
  --white:        #ffffff;

  /* Escala semántica de texto */
  --text-clear:   var(--ink);
  --text-mid:     #5c6f81;
  --text-faint:   #93a3b3;
  --text-invert:  var(--white);
  --text-nav:     #c3d4e4;
  --text-footer:  #61798f;

  --surface:      var(--white);
  --surface-cream: var(--cream);
  --line:         color-mix(in srgb, var(--ink) 12%, transparent);
  --line-strong:  color-mix(in srgb, var(--ink) 28%, transparent);
  --line-on-dark: rgba(255, 255, 255, 0.12);
  --line-on-dark-soft: rgba(255, 255, 255, 0.08);

  --font-sans:    "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius:       3px;
  --pad-x:        clamp(1.25rem, 4vw, 3.5rem);
  --maxw:         1240px;
  --section-y:    clamp(4rem, 8vw, 6rem);
  --header-h:     auto;
  --ease:         cubic-bezier(0.2, 0.7, 0.2, 1);

  --shadow-card:  0 18px 44px rgba(0, 0, 0, 0.35);
  --shadow-hero:  0 28px 48px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 10px 30px rgba(11, 24, 38, 0.4);
  --shadow-wa:    0 10px 30px rgba(11, 24, 38, 0.4);
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}


/* ══ 02 · RESET Y BASE ═══════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--navy);
  color: var(--text-clear);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: pretty;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }

img { display: block; max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

address { font-style: normal; }

::selection { background: var(--brand); color: var(--white); }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}


/* ══ 03 · ACCESIBILIDAD ═════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100%;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}
.skip-link:focus-visible { top: 0.5rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 3px;
}


/* ══ 04 · TIPOGRAFÍA Y LAYOUT ════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand);
}

.kicker--light { color: var(--brand-light); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head__title {
  font-size: clamp(2rem, 4vw, 2.625rem);
  color: var(--ink);
}

.section-head__title--invert { color: var(--white); }

.section-head__lede {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-mid);
}

.section-head__lede--invert { color: var(--brand-pale); }


/* ══ 05 · BOTONES ════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 17px 32px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover { color: var(--white); }

.btn__icon { width: 18px; height: 18px; flex: none; }

.btn--wa { background: var(--accent-wa); }
.btn--wa:hover { background: var(--accent-wa-deep); }

.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: #d9e6f2; color: var(--navy); }

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-weight: 600;
}
.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.btn--ghost-dark {
  background: transparent;
  border-color: var(--cream-border);
  color: var(--ink);
  font-weight: 600;
  padding: 15px 30px;
  font-size: 14.5px;
}
.btn--ghost-dark:hover { border-color: var(--ink); color: var(--ink); }

.btn--dark { background: var(--ink); color: var(--white); font-size: 14.5px; padding: 15px 30px; }
.btn--dark:hover { background: var(--navy); color: var(--white); }

.btn--brand { background: var(--brand); padding: 17px 34px; }
.btn--brand:hover { background: var(--brand-deep); }

.btn--nav {
  background: var(--white);
  color: var(--navy);
  padding: 11px 24px;
  font-weight: 700;
  font-size: 13.5px;
}
.btn--nav:hover { background: #d9e6f2; color: var(--navy); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}


/* ══ 06 · BARRA SUPERIOR Y ENCABEZADO ═══════════════════════════════════ */

.topbar {
  background: var(--navy-deep);
  color: var(--brand-muted);
  font-size: 12.5px;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 9px var(--pad-x);
}

.topbar__location { letter-spacing: 0.04em; }

.topbar__location--short { display: none; }

.topbar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.topbar__hours { white-space: nowrap; }

@media (max-width: 900px) {
  .topbar__inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3px;
    padding: 6px var(--pad-x);
    font-size: 10.5px;
  }

  .topbar__location--full { display: none; }

  .topbar__location--short {
    display: block;
    letter-spacing: 0.02em;
    line-height: 1.35;
  }

  .topbar__meta {
    justify-content: center;
    gap: 8px;
    font-size: 10.5px;
  }

  .topbar__phone { font-size: 11px; }
}

.topbar__phone {
  color: var(--brand-pale);
  font-weight: 600;
  text-decoration: none;
}
.topbar__phone:hover { color: var(--white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 24, 38, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--pad-x);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.brand:hover { color: inherit; }

.brand__mark {
  width: clamp(36px, 7vw, 44px);
  height: auto;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 2.4vw, 18px);
  color: var(--white);
  letter-spacing: 0.01em;
}

.brand__tagline {
  font-size: 10px;
  color: var(--brand-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.nav-toggle__box {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.nav-toggle__box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__box span:nth-child(1) { top: 0; }
.nav-toggle__box span:nth-child(2) { top: 6px; }
.nav-toggle__box span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-nav);
  text-decoration: none;
}
.nav__link:hover { color: var(--white); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--pad-x) 1.5rem;
    background: var(--navy);
    border-bottom: 1px solid var(--line-on-dark);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link { min-height: 48px; font-size: 15px; }

  .nav__cta { margin-top: 0.75rem; width: 100%; justify-content: center; }

  body.nav-ready .nav { display: none; }
  body.nav-ready .nav.is-open { display: flex; }

  .site-header { position: sticky; }
}


/* ══ 07 · HERO ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-mid) 58%, var(--navy-light) 100%);
  color: var(--white);
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 82% 40%, rgba(62, 131, 189, 0.22), transparent 65%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: stretch;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3.5rem, 8vw, 5.5rem);
}

.hero__kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__kicker-line {
  width: 44px;
  height: 1px;
  background: var(--brand);
}

.hero__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand-light);
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.625rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--white);
}

.hero__lede {
  font-size: 18px;
  line-height: 1.7;
  color: var(--brand-pale);
  max-width: 50ch;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
  row-gap: 24px;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 36px;
  border-right: 1px solid var(--line-on-dark);
}
.hero__stat:nth-child(even) {
  border-right: 0;
  padding-right: 0;
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--white);
}

.hero__stat-label {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--brand-muted);
  max-width: 20ch;
}

.hero__media {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  padding-top: 24px;
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}

.hero__photo {
  position: relative;
  width: 100%;
  height: clamp(510px, 86vh, 900px);
  object-fit: contain;
  object-position: bottom center;
  margin-inline: auto;
  transform: scale(1.08);
  transform-origin: bottom center;
  filter: drop-shadow(var(--shadow-hero));
}

.hero__card {
  position: absolute;
  left: -24px;
  bottom: clamp(3.5rem, 8vw, 5.5rem);
  width: max-content;
  max-width: calc(100% + 24px);
  box-sizing: border-box;
  background: var(--white);
  padding: 18px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero__card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.hero__card-role {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.hero__card-creds {
  font-size: 12px;
  color: #64798e;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__media { order: -1; padding-top: 0; padding-bottom: 0; }
  .hero__content { padding-block: 2rem clamp(3.5rem, 8vw, 5.5rem); }
  .hero__photo { height: clamp(320px, 55vh, 520px); transform: none; }
  .hero__card { left: 0; bottom: 24px; max-width: 100%; }
  .hero__stats {
    column-gap: 20px;
    row-gap: 16px;
  }
  .hero__stat { padding-right: 20px; }
  .hero__stat:nth-child(even) { padding-right: 0; }
}


/* ══ 08 · CASOS ══════════════════════════════════════════════════════════ */

.casos {
  padding-block: var(--section-y);
  background: var(--cream);
}

.casos__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.casos__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.casos__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: var(--cream-grid);
}

.caso-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 36px 36px;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  min-height: 100%;
  transition: background-color 0.2s var(--ease);
}
.caso-card:hover {
  background: #fdfcfa;
  color: inherit;
}

.caso-card__num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  color: var(--cream-grid);
  line-height: 1;
}

.caso-card__title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.caso-card__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mid);
}

.caso-card__cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .casos__intro { grid-template-columns: 1fr; }
  .casos__grid { grid-template-columns: 1fr; }
}


/* ══ 09 · SÍNTOMAS ═══════════════════════════════════════════════════════ */

.sintomas {
  padding-block: var(--section-y);
  background: var(--white);
}

.sintomas__grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
}

.sintomas__aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 120px;
  align-self: start;
}

.sintomas__photo {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: var(--radius);
  margin-top: 8px;
}

.sintoma-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  padding: 26px 4px;
  border-bottom: 1px solid var(--cream-line);
  transition: background-color 0.2s var(--ease);
}
.sintoma-item:hover { background: #fbf9f6; }

.sintoma-item__num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--cream-muted);
  padding-top: 3px;
}

.sintoma-item__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}

.sintoma-item__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mid);
  margin-top: 8px;
}

.sintoma-item__rel {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-top: 8px;
}

@media (max-width: 900px) {
  .sintomas__grid { grid-template-columns: 1fr; }
  .sintomas__aside { position: static; }
}


/* ══ 10 · TRATAMIENTOS ═══════════════════════════════════════════════════ */

.tratamientos {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--navy);
  color: var(--white);
}

.tratamientos__grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.tratamientos__media { position: relative; min-width: 0; }

.tratamientos__photo {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
}

.tratamientos__badge {
  position: absolute;
  right: -20px;
  bottom: -20px;
  background: var(--brand);
  color: var(--white);
  padding: 22px 26px;
  border-radius: var(--radius);
  max-width: 260px;
}

.tratamientos__badge-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}

.tratamientos__badge-desc {
  font-size: 13px;
  color: #cfe2f2;
  line-height: 1.5;
  display: block;
  margin-top: 6px;
}

.tratamientos__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tratamiento-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tratamiento-row__title {
  font-size: 16.5px;
  font-weight: 600;
  color: #e8f0f8;
}

.tratamiento-row__desc {
  font-size: 13.5px;
  color: var(--brand-muted);
  text-align: right;
  max-width: 32ch;
}

@media (max-width: 900px) {
  .tratamientos__grid { grid-template-columns: 1fr; }
  .tratamientos__badge { right: 0; bottom: -12px; }
}


/* ══ 11 · EXPERIENCIA ════════════════════════════════════════════════════ */

.experiencia {
  padding-block: var(--section-y);
  background: var(--cream);
}

.experiencia__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.experiencia__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.experiencia__body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.experiencia__media-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.experiencia__photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

.sociedades {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sociedades__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-light);
}

.sociedades__item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--line-on-dark-soft);
  padding-bottom: 10px;
}
.sociedades__item:last-child { border-bottom: 0; padding-bottom: 0; }

.sociedades__bullet {
  color: var(--brand);
  font-size: 13px;
}

.sociedades__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-nav);
}

.formacion-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--cream-line);
}

.formacion-item__anio {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--cream-muted);
  padding-top: 2px;
}

.formacion-item__title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}

.formacion-item__lugar {
  font-size: 14.5px;
  color: var(--text-mid);
  margin-top: 4px;
}

.experiencia__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .experiencia__intro,
  .experiencia__body { grid-template-columns: 1fr; }
  .formacion-item { grid-template-columns: 80px 1fr; gap: 16px; }
}


/* ══ 12 · SEGUNDA OPINIÓN ═══════════════════════════════════════════════ */

.segunda-opinion {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--white);
  border-top: 1px solid #eee8de;
}

.segunda-opinion__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
  align-items: center;
}

.segunda-opinion__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 26ch;
}

.segunda-opinion__lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 62ch;
}

.segunda-opinion__note {
  font-size: 13px;
  color: var(--text-faint);
}

.segunda-opinion__art {
  width: min(100%, 400px);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(22, 40, 58, 0.14);
}


/* ══ 13 · PACIENTES FORÁNEOS ═════════════════════════════════════════════ */

.foraneos {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  background: var(--navy-mid);
  color: var(--white);
}

.foraneos__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 15% 30%, rgba(62, 131, 189, 0.18), transparent 60%);
  pointer-events: none;
}

.foraneos__grid {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.foraneos__content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.foraneos__list {
  border-top: 1px solid var(--line-on-dark);
}

.foraneo-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-on-dark);
  align-items: start;
}

.foraneo-item__num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--brand);
  padding-top: 2px;
}

.foraneo-item__title {
  font-size: 16px;
  font-weight: 700;
  color: #e8f0f8;
}

.foraneo-item__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--brand-muted);
  margin-top: 3px;
}

.foraneos__media {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.foraneos__photo {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
}

.ciudades {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ciudades__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
  width: 100%;
}

.ciudades__tag {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-nav);
}

@media (max-width: 900px) {
  .foraneos__grid { grid-template-columns: 1fr; }
}


/* ══ 14 · CONTACTO ═══════════════════════════════════════════════════════ */

.contacto {
  padding-block: var(--section-y);
  background: var(--cream);
}

.contacto__grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.contacto__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacto__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.contacto__lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 48ch;
}

.contacto__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid var(--cream-line);
  padding-top: 24px;
  margin-top: 4px;
}

.contacto__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contacto__value {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  margin-top: 4px;
}

.contacto__phone {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
.contacto__phone:hover { color: var(--brand); }

.contacto__photo {
  width: 100%;
  max-height: 640px;
  object-fit: contain;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .contacto__grid { grid-template-columns: 1fr; }
  .contacto__details { grid-template-columns: 1fr; }
}


/* ══ 15 · PIE Y WHATSAPP FLOTANTE ════════════════════════════════════════ */

.site-footer {
  background: var(--navy-deep);
  color: var(--text-footer);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 32px var(--pad-x);
}

.site-footer__brand {
  display: flex;
  align-items: center;
}

.site-footer__logo-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.site-footer__logo-link:hover { opacity: 0.92; }

.site-footer__logo {
  display: block;
  height: clamp(48px, 7vw, 60px);
  width: auto;
  max-width: min(100%, 300px);
  object-fit: contain;
  object-position: left center;
}

.site-footer__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.site-footer__meta {
  font-size: 12.5px;
}

.site-footer__legal {
  font-size: 12.5px;
  margin: 0;
}

.site-footer__links {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  color: var(--text-footer);
  font-size: 12.5px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-footer__links a:hover { color: var(--brand-pale); }

@media (max-width: 900px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .site-footer__logo {
    margin-inline: auto;
    object-position: center;
  }

  .site-footer__aside {
    align-items: center;
    text-align: center;
  }
}

.wa-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100;
}

.wa-float__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--accent-wa);
  color: var(--white);
  box-shadow: var(--shadow-wa);
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}
.wa-float__btn:hover {
  background: var(--accent-wa-deep);
  color: var(--white);
}

.wa-float__icon { width: 28px; height: 28px; }


/* ══ 16 · REVELADO (FAIL-SAFE) ═══════════════════════════════════════════ */

body.anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
body.anim-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body.anim-ready [data-reveal] { opacity: 1; transform: none; }
}


/* ══ 17 · PÁGINAS LEGALES ════════════════════════════════════════════════ */

.page-legal { background: var(--white); color: var(--ink); }

.page-legal .site-header {
  background: var(--navy);
  border-bottom-color: var(--line-on-dark);
}

.page-legal .nav__link { color: var(--text-nav); }

.page-legal .legal {
  max-width: 78ch;
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad-x);
}

.page-legal h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); color: var(--ink); }

.page-legal h2 {
  margin-top: 2.5em;
  font-size: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cream-line);
  color: var(--ink);
}

.page-legal h3 { margin-top: 2em; font-size: 1.15rem; color: var(--ink); }

.page-legal p,
.page-legal li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-mid);
}

.page-legal p { margin-bottom: 1em; }
.page-legal li { margin-bottom: 0.4em; }

.legal__updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.controller-card {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 14px;
  text-align: left;
}

.controller-card th,
.controller-card td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cream-line);
  vertical-align: top;
}

.controller-card tr:last-child th,
.controller-card tr:last-child td { border-bottom: 0; }

.controller-card th {
  width: 34%;
  background: var(--cream);
  font-weight: 600;
  color: var(--text-mid);
}

.callout {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--cream-border);
  border-left-width: 4px;
  border-left-color: var(--brand);
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 14px;
}

.callout__title {
  margin: 0 0 0.35em;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}


/* ══ 18 · IMPRESIÓN ══════════════════════════════════════════════════════ */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }

  .topbar,
  .nav-toggle,
  .nav,
  .skip-link,
  .wa-float,
  .actions,
  .btn { display: none !important; }

  .site-header { position: static; background: #fff; color: #000; border: 0; }
  .brand__name { color: #000; }

  section { break-inside: avoid; page-break-inside: avoid; }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }
}
