/*
 * Sitio público MedPay (`paginas/` + páginas de error) — rediseño de landing.
 * Ver design_handoff_medpay_landing/README.md para tokens, pantallas y fidelidad.
 *
 * Los tokens `--mp-*` de paleta y tipografía NO se definen aquí: vienen de
 * `css/medpay.css`, que `base_publico.html` carga antes que este archivo. Acá
 * solo se derivan las variables propias del layout público (`--mp-pub-*`) y los
 * tonos que únicamente existen sobre fondo navy.
 *
 * Convención de unidades: el prototipo usa `cqi` (relativo al contenedor); en
 * producción el contenedor es el viewport, así que el equivalente es `vw`.
 */

:root {
  /* Medidas de layout */
  --mp-pub-max: 1240px; /* ancho de contenido */
  --mp-pub-bleed: 1288px; /* bloques redondeados full-bleed */
  --mp-pub-hero-max: 1400px; /* bloque del hero del home */
  --mp-pub-pad: clamp(18px, 4vw, 40px); /* padding lateral de página */
  --mp-pub-pad-block: clamp(64px, 9vw, 120px); /* padding vertical de sección */
  --mp-pub-radius: clamp(24px, 3vw, 40px); /* radio de bloques grandes */

  /* Tonos que solo aplican sobre el degradado navy */
  --mp-on-navy: #b8c8d9; /* cuerpo sobre navy */
  --mp-on-navy-strong: #dde4ec; /* pills sobre navy */
  --mp-on-photo: #d6e0ea; /* metadatos sobre foto con scrim */
  --mp-teal-light: #7fc4ae; /* eyebrow sobre navy + acento del footer */
  --mp-numeral: #b9c8d8; /* numerales 01–04 de "Cómo funciona" */
  --mp-footer-text: #a7b6c5;

  /* Degradados reutilizados */
  --mp-grad-hero: radial-gradient(
    90% 120% at 0% 0%,
    #1d4d80 0%,
    #12335a 42%,
    #0b2036 100%
  );
  --mp-grad-sim: radial-gradient(
    120% 90% at 0% 0%,
    #1d4d80 0%,
    #12335a 45%,
    #0b2036 100%
  );
  --mp-grad-foto: linear-gradient(150deg, #2f6aa8, #12335a);
}

body {
  background: var(--mp-page-bg);
  color: var(--mp-text);
  font-family: var(--mp-font-body);
  -webkit-font-smoothing: antialiased;
}

/* Offset del header sticky para el scroll a anclas (#simulador, #especialidades). */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ================================================================
   Primitivas de layout y tipografía
   ================================================================ */

.mp-pub-section {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: var(--mp-pub-pad-block) var(--mp-pub-pad);
}

/* Sección sobre fondo blanco a todo el ancho ("Cómo funciona", "Equipo"). */
.mp-pub-band {
  background: var(--mp-surface);
  border-top: 1px solid var(--mp-border);
  border-bottom: 1px solid var(--mp-border);
}

.mp-pub-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-teal);
}

/* Eyebrow sobre navy: el teal base no contrasta, se usa el derivado claro. */
.mp-pub-eyebrow--light {
  color: var(--mp-teal-light);
}

/* Eyebrow del hero: lleva una línea de 28px al lado. */
.mp-pub-eyebrow--rule {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mp-teal-border);
}

.mp-pub-eyebrow--rule::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--mp-teal-border);
  flex: none;
}

.mp-pub-h1 {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  color: var(--mp-ink);
  text-wrap: balance;
}

.mp-pub-h2 {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--mp-ink);
  text-wrap: balance;
}

.mp-pub-lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--mp-text-muted);
  max-width: 560px;
  text-wrap: pretty;
}

/* Encabezado de sección a 2 columnas: título a la izquierda, bajada a la derecha. */
.mp-pub-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 40px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.mp-pub-head-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.mp-pub-head-aside {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--mp-text-muted);
  max-width: 360px;
}

/* ================================================================
   Botones
   ================================================================ */

.mp-pub-btn,
.mp-pub-btn-teal,
.mp-pub-btn-ghost,
.mp-pub-btn-outline,
.mp-pub-btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: var(--mp-font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

/* CTA primario: "Solicitar crédito". */
.mp-pub-btn-teal {
  background: var(--mp-teal);
  color: #fff;
  border: 1px solid var(--mp-teal);
  padding: 16px 26px;
  box-shadow: 0 10px 24px rgba(31, 125, 104, 0.25);
}

.mp-pub-btn-teal:hover,
.mp-pub-btn-teal:focus-visible {
  background: var(--mp-success-text);
  border-color: var(--mp-success-text);
  color: #fff;
}

/* Variante del hero: sombra más marcada y micro-elevación. */
.mp-pub-btn-teal--hero {
  padding: 17px 28px;
  box-shadow: 0 12px 28px -6px rgba(31, 125, 104, 0.6);
}

.mp-pub-btn-teal--hero:hover {
  transform: translateY(-1px);
}

.mp-pub-btn-teal--block {
  width: 100%;
  padding: 17px 24px;
}

.mp-pub-btn-teal--sm {
  padding: 10px 16px;
  font-size: 14px;
  box-shadow: none;
}

/* Secundario sobre claro. */
.mp-pub-btn-outline {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  color: var(--mp-navy-deep);
  padding: 15px 24px;
}

.mp-pub-btn-outline:hover,
.mp-pub-btn-outline:focus-visible {
  border-color: var(--mp-navy);
  color: var(--mp-navy-deep);
}

.mp-pub-btn-outline--sm {
  padding: 11px 16px;
  font-size: 14px;
}

/* Secundario sobre navy (hero, CTA final). */
.mp-pub-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 16px 26px;
}

.mp-pub-btn-ghost:hover,
.mp-pub-btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* Botón blanco sobre el bloque teal del CTA final. */
.mp-pub-btn-light {
  background: #fff;
  border: 1px solid #fff;
  color: var(--mp-success-text);
  font-weight: 700;
  padding: 16px 24px;
  box-shadow: 0 10px 24px rgba(11, 32, 54, 0.2);
}

.mp-pub-btn-light:hover,
.mp-pub-btn-light:focus-visible {
  background: var(--mp-teal-bg);
  border-color: var(--mp-teal-bg);
  color: var(--mp-success-text);
}

/* Enlace de texto (volver, toggles). */
.mp-pub-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--mp-navy-mid);
  font-family: var(--mp-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.mp-pub-link:hover {
  color: var(--mp-navy-deep);
}

/* ================================================================
   Header
   ================================================================ */

.mp-pub-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 247, 251, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--mp-border);
}

.mp-pub-header-inner {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: 14px var(--mp-pub-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Marca propia del sitio público (32px) — independiente de `.mp-mark`, que los
   portales usan a 22px y no se debe alterar desde acá. */
.mp-pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.mp-pub-brand-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--mp-navy);
  flex: none;
}

/* Cruz médica blanca + punto teal arriba a la derecha. */
.mp-pub-brand-icon::before,
.mp-pub-brand-icon::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 2px;
}

.mp-pub-brand-icon::before {
  left: 14px;
  top: 8px;
  width: 4px;
  height: 16px;
}

.mp-pub-brand-icon::after {
  left: 8px;
  top: 14px;
  width: 16px;
  height: 4px;
}

.mp-pub-brand-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mp-teal-border);
}

.mp-pub-wordmark {
  white-space: nowrap;
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--mp-ink);
}

.mp-pub-wordmark span {
  font-weight: 400;
  color: var(--mp-teal);
}

.mp-pub-nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
}

.mp-pub-nav a {
  white-space: nowrap;
  padding: 6px 0;
  font-weight: 500;
  color: var(--mp-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.mp-pub-nav a:hover {
  color: var(--mp-ink);
}

.mp-pub-nav a.is-active {
  font-weight: 600;
  color: var(--mp-ink);
  border-bottom-color: var(--mp-teal);
}

.mp-pub-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* "Iniciar sesión": ghost sobre claro. */
.mp-pub-btn-ghost-light {
  white-space: nowrap;
  color: var(--mp-navy-deep);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
}

.mp-pub-btn-ghost-light:hover {
  background: #e7edf4;
  color: var(--mp-navy-deep);
}

/* Barra compacta de móvil: "Solicitar" + hamburguesa. */
.mp-pub-header-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}

.mp-pub-burger {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex: none;
}

.mp-pub-burger span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--mp-navy-deep);
}

.mp-pub-menu {
  padding: 8px var(--mp-pub-pad) 20px;
  border-top: 1px solid var(--mp-border);
  background: var(--mp-page-bg);
}

.mp-pub-menu a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--mp-border);
  font-family: var(--mp-font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--mp-ink);
  text-decoration: none;
}

.mp-pub-menu a.mp-pub-menu-login {
  font-family: var(--mp-font-body);
  font-size: 16px;
  color: var(--mp-navy-mid);
  border-bottom: none;
}

/* ================================================================
   Hero — home
   ================================================================ */

.mp-hero {
  padding: clamp(10px, 2vw, 20px) clamp(10px, 2vw, 20px) clamp(56px, 8vw, 104px);
}

.mp-hero-block {
  max-width: var(--mp-pub-hero-max);
  margin: 0 auto;
  border-radius: var(--mp-pub-radius);
  overflow: hidden;
  background: var(--mp-grad-hero);
  color: #fff;
  box-shadow: 0 50px 100px -50px rgba(11, 32, 54, 0.6);
}

.mp-hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
}

.mp-hero-copy {
  padding: clamp(36px, 7vw, 96px) clamp(22px, 5.5vw, 80px) clamp(36px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 32px);
  justify-content: center;
}

.mp-hero-title {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-wrap: balance;
  color: #fff;
}

.mp-hero-title em {
  font-style: normal;
  color: var(--mp-teal-border);
}

.mp-hero-sub {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.6;
  color: var(--mp-on-navy);
  max-width: 480px;
  text-wrap: pretty;
}

.mp-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-hero-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: clamp(8px, 2vw, 20px);
}

.mp-hero-pills-label {
  font-size: 13px;
  color: var(--mp-text-faint);
}

.mp-hero-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-hero-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--mp-on-navy-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.mp-hero-pill:hover {
  border-color: var(--mp-teal-border);
  color: #fff;
}

.mp-hero-media {
  position: relative;
  min-height: clamp(360px, 52vw, 680px);
  padding: clamp(10px, 1.4vw, 16px);
}

.mp-hero-photo {
  position: absolute;
  inset: clamp(10px, 1.4vw, 16px);
  border-radius: clamp(18px, 2.4vw, 30px);
  overflow: hidden;
  background: var(--mp-navy-deep);
}

.mp-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 32, 54, 0) 55%,
    rgba(11, 32, 54, 0.65)
  );
  pointer-events: none;
}

/* Franja de cifras al pie del hero. */
.mp-hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.mp-hero-stat {
  padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3vw, 40px);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.mp-hero-stat + .mp-hero-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-hero-stat-value {
  white-space: nowrap;
  flex: none;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.03em;
}

.mp-hero-stat-label {
  font-size: 14px;
  color: var(--mp-on-navy);
}

/* ================================================================
   Cómo funciona
   ================================================================ */

.mp-steps-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(40px, 6vw, 96px);
}

.mp-steps-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mp-steps-intro p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--mp-text-muted);
  max-width: 420px;
}

.mp-steps-list {
  display: flex;
  flex-direction: column;
}

/* Numeral tipográfico en vez de ícono genérico (decisión del brief). */
.mp-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  padding: 28px 0;
  border-top: 1px solid var(--mp-border);
}

.mp-step-number {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--mp-numeral);
  width: 1.6em;
}

.mp-step-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.mp-step-title {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--mp-navy-deep);
}

.mp-step-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-success-text);
  background: var(--mp-teal-bg);
  border-radius: 999px;
  padding: 4px 10px;
}

.mp-step-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--mp-text-muted);
}

/* ================================================================
   Simulador
   ================================================================ */

.mp-sim-section {
  padding: 0 clamp(10px, 2vw, 24px) clamp(56px, 8vw, 104px);
}

.mp-sim-inner {
  max-width: var(--mp-pub-bleed);
  margin: 0 auto;
  border-radius: var(--mp-pub-radius);
  background: var(--mp-grad-sim);
  color: #fff;
  padding: clamp(28px, 6vw, 80px) clamp(18px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.mp-sim-intro {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mp-sim-intro h2 {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
  color: #fff;
}

.mp-sim-intro p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--mp-on-navy);
  max-width: 440px;
}

/* Resumen (total a pagar / intereses / tasa) con separadores. */
.mp-sim-stats {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mp-sim-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 15px;
}

.mp-sim-stat-label {
  color: var(--mp-on-navy);
}

.mp-sim-stat-value {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mp-sim-card {
  background: var(--mp-surface);
  color: var(--mp-text);
  border-radius: 28px;
  padding: clamp(22px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 30px;
  box-shadow: 0 40px 80px -24px rgba(11, 32, 54, 0.45);
}

.mp-sim-field {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-sim-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-sim-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--mp-text-muted);
}

/* El monto se edita por slider y también escribiendo. El "$" lo pone el JS
   dentro del valor (al teclear se ignora todo lo que no sea dígito), así no
   queda un hueco entre el símbolo y la cifra. */
.mp-sim-monto-input {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
  color: var(--mp-ink);
  background: none;
  border: none;
  border-bottom: 1px dashed transparent;
  text-align: right;
  width: 12ch;
  max-width: 100%;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.mp-sim-monto-input:hover {
  border-bottom-color: var(--mp-border);
}

.mp-sim-monto-input:focus {
  outline: none;
  border-bottom-color: var(--mp-teal);
}

.mp-sim-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: var(--mp-border);
  outline: none;
  margin: 0;
}

.mp-sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 7px solid var(--mp-teal);
  box-shadow: 0 4px 12px rgba(11, 32, 54, 0.22);
  cursor: pointer;
}

.mp-sim-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 7px solid var(--mp-teal);
  box-shadow: 0 4px 12px rgba(11, 32, 54, 0.22);
  cursor: pointer;
}

.mp-sim-range:focus-visible {
  outline: 2px solid var(--mp-teal);
  outline-offset: 4px;
}

.mp-sim-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--mp-text-faint);
}

/* Grid de plazos: tantas columnas como opciones vigentes haya. */
.mp-sim-plazo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 6px;
}

.mp-sim-plazo-pill {
  padding: 13px 0;
  border-radius: 12px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-navy-deep);
  font-family: var(--mp-font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-sim-plazo-pill:hover {
  border-color: var(--mp-navy);
}

.mp-sim-plazo-pill.active {
  background: var(--mp-navy);
  border-color: var(--mp-navy);
  color: #fff;
}

.mp-sim-result {
  background: var(--mp-page-bg);
  border: 1px solid var(--mp-border);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-sim-cuota-eyebrow {
  font-size: 14px;
  color: var(--mp-text-muted);
}

.mp-sim-cuota-figure {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 52px);
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--mp-navy-deep);
  font-variant-numeric: tabular-nums;
}

.mp-sim-toggle-btn {
  align-self: flex-start;
  margin-top: 6px;
}

.mp-sim-table-wrap {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 12px;
}

.mp-sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.mp-sim-table th {
  position: sticky;
  top: 0;
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-text-faint);
  text-align: right;
}

.mp-sim-table th:first-child,
.mp-sim-table td:first-child {
  text-align: left;
  color: var(--mp-text-faint);
  width: 44px;
}

.mp-sim-table td {
  padding: 7px 12px;
  color: var(--mp-text);
  text-align: right;
}

/* ================================================================
   Especialidades — grid editorial del home
   ================================================================ */

.mp-esp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}

.mp-esp-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  background: var(--mp-grad-foto);
  text-decoration: none;
  display: block;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s;
}

.mp-esp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 60px -24px rgba(18, 51, 90, 0.55);
}

.mp-esp-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* El degradado del brief (transparente hasta el 45%) asumía fotos oscuras. Las
   reales son de alta clave —bata blanca, consultorio blanco, parque soleado— y
   dejaban el título por debajo de 2:1 de contraste. El texto ocupa del 55% para
   abajo, así que de ahí en adelante el navy va casi opaco. El velo superior se
   mantiene: es lo que hace legible el numeral. */
.mp-esp-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 32, 54, 0.35) 0%,
    rgba(11, 32, 54, 0) 20%,
    rgba(11, 32, 54, 0) 34%,
    rgba(11, 32, 54, 0.68) 48%,
    rgba(11, 32, 54, 0.9) 64%,
    rgba(11, 32, 54, 0.96) 100%
  );
  pointer-events: none;
}

.mp-esp-card-index {
  position: absolute;
  top: 18px;
  left: 20px;
  /* El velo superior es tenue (.35): sobre una clínica blanca el numeral se
     perdería sin esta sombra. */
  text-shadow: 0 1px 4px rgba(11, 32, 54, 0.85);
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.mp-esp-card-body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Igual que en las tarjetas de médicos: la sombra garantiza el contraste
     aunque la foto sea muy clara, sin tener que oscurecer más la imagen. */
  text-shadow:
    0 1px 3px rgba(11, 32, 54, 0.9),
    0 0 14px rgba(11, 32, 54, 0.55);
}

/* El botón tiene su propio fondo; la sombra del texto ahí sobra. */
.mp-esp-card-cta {
  text-shadow: none;
}

.mp-esp-card-name {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 26px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.mp-esp-card-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--mp-on-photo);
}

/* Botón glass que pasa a teal en hover de la tarjeta. */
.mp-esp-card-cta {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.mp-esp-card:hover .mp-esp-card-cta {
  background: var(--mp-teal);
  border-color: var(--mp-teal);
}

/* Fallback cuando todavía no existe la foto editorial de la especialidad. */
.mp-esp-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(64px, 9vw, 112px);
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.16);
}

/* ================================================================
   Equipo médico — teaser del home
   ================================================================ */

.mp-team-teaser-count {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mp-team-teaser-count b {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: clamp(44px, 5.6vw, 68px);
  letter-spacing: -0.05em;
  color: var(--mp-navy);
  line-height: 1;
}

.mp-team-teaser-count span {
  font-size: 15px;
  color: var(--mp-text-muted);
  max-width: 120px;
  line-height: 1.35;
}

.mp-team-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

/* Tarjeta-foto única del sitio: la usan el teaser del home, el listado de
   "Nuestro equipo médico" y la sección de clínicas, para que no haya dos
   diseños distintos para lo mismo. */
.mp-team-photocard {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--mp-grad-foto);
  text-decoration: none;
  display: block;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.mp-team-photocard:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(18, 51, 90, 0.45);
}

/* El `display: block` de arriba le gana a la hoja del navegador, así que el
   atributo `hidden` que usa el buscador no ocultaría nada sin esta regla. */
.mp-team-photocard[hidden] {
  display: none;
}

.mp-team-photocard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Los retratos traen la cara en el tercio superior; recortar desde el centro
     les corta la cabeza. */
  object-position: 50% 18%;
  display: block;
}

/* El scrim arranca en el último tercio para no apagar la foto (antes subía casi
   hasta la mitad). El contraste del caption no depende solo de él: el texto
   lleva `text-shadow`, que es lo que garantiza legibilidad sobre batas blancas
   sin tener que oscurecer la imagen. */
.mp-team-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 32, 54, 0) 60%,
    rgba(11, 32, 54, 0.3) 70%,
    rgba(11, 32, 54, 0.85) 82%,
    rgba(11, 32, 54, 0.95) 100%
  );
  pointer-events: none;
}

/* Clínicas: su pieza ya viene con el mismo encuadre 4:5 que la del resto del
   directorio y trae el nombre impreso, así que se muestra a sangre como las
   demás. Antes era un logo suelto al que había que reservarle la franja del
   caption; ya no hay caption que reservar. */
.mp-team-photocard--clinica,
.mp-esp-team-card--clinica {
  background: var(--mp-surface);
}

/* Peor caso de contraste: logo sobre blanco. Como el logo no baja de esa franja
   (lleva `padding-bottom`), oscurecerla del todo no tapa nada. */
.mp-team-photocard--clinica .mp-team-photo-scrim,
.mp-esp-team-card--clinica .mp-team-photo-scrim {
  background: linear-gradient(
    180deg,
    rgba(11, 32, 54, 0) 60%,
    rgba(11, 32, 54, 0.92) 72%,
    rgba(11, 32, 54, 0.98) 100%
  );
}

.mp-team-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  /* La sombra es lo que asegura el contraste sobre fotos claras; permite dejar
     el scrim bajo y no apagar la imagen. */
  text-shadow:
    0 1px 3px rgba(11, 32, 54, 0.9),
    0 0 14px rgba(11, 32, 54, 0.55);
}

.mp-team-name {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  /* Acotado a 2 líneas: mantiene las tarjetas uniformes y el caption corto, que
     es lo que permite bajar el scrim. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-team-meta {
  font-size: 13px;
  color: var(--mp-on-photo);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inicial grande cuando el médico/clínica no tiene foto cargada. */
.mp-team-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 72px;
  color: rgba(255, 255, 255, 0.3);
}

.mp-team-teaser-cta {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* ================================================================
   Equipo médico — página completa
   ================================================================ */

.mp-team-hero {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--mp-pub-pad) clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
}

.mp-team-hero-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
}

.mp-team-hero-count {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-team-hero-count b {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: clamp(48px, 6vw, 76px);
  letter-spacing: -0.05em;
  color: var(--mp-navy);
  line-height: 1;
}

.mp-team-hero-count span {
  font-size: 15px;
  color: var(--mp-text-muted);
}

/* Filtros por categoría — scroll horizontal en móvil. */
.mp-team-filters {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: 0 var(--mp-pub-pad) 8px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mp-team-filters::-webkit-scrollbar {
  display: none;
}

/* Sirve tanto para <button> (filtros del equipo) como para <a> (tabs de
   especialidad): `inline-flex` es lo que hace que el padding cuente en la
   altura y que un contenedor con `overflow` no la recorte. */
.mp-pub-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-navy-deep);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--mp-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.mp-pub-pill:hover {
  color: var(--mp-navy-deep);
}

.mp-pub-pill.active:hover {
  color: #fff;
}

.mp-pub-pill:hover {
  border-color: var(--mp-navy);
}

.mp-pub-pill.active {
  background: var(--mp-navy);
  border-color: var(--mp-navy);
  color: #fff;
}

.mp-team-group {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--mp-pub-pad) 0;
}

.mp-team-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--mp-border);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.mp-team-group-title {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.03em;
  color: var(--mp-navy-deep);
}

.mp-team-group-count {
  font-size: 14px;
  color: var(--mp-text-faint);
  white-space: nowrap;
}

.mp-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

/* El listado usa la MISMA tarjeta-foto que el teaser del home (.mp-team-photocard):
   antes era una tarjeta blanca con foto 1:1 y botón, lo que daba dos diseños
   distintos para lo mismo y tamaños de imagen desiguales entre clínicas y
   profesionales. */

/* Buscador desplegable (combobox): lista todo el directorio y filtra al teclear;
   al elegir una opción navega a esa ficha. Las pills de abajo son otra cosa —
   filtran la grilla — por eso van separadas con margen. */
.mp-team-busqueda {
  max-width: var(--mp-pub-max);
  margin: 0 auto 28px;
  padding: 0 var(--mp-pub-pad);
  display: flex;
}

.mp-team-combo {
  position: relative;
  flex: 1 1 auto;
  max-width: 460px;
  /* Por encima de la grilla, para que el panel no quede por debajo. */
  z-index: 10;
}

.mp-team-combo input {
  width: 100%;
  font-family: var(--mp-font-body);
  font-size: 15px;
  color: var(--mp-text);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  padding: 13px 44px 13px 18px;
  transition: border-color 0.2s;
}

.mp-team-combo input::placeholder {
  color: var(--mp-text-faint);
}

.mp-team-combo input:focus {
  outline: none;
  border-color: var(--mp-navy);
}

.mp-team-busqueda-icono {
  position: absolute;
  right: 16px;
  top: 25px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--mp-text-faint);
  pointer-events: none;
}

/* Panel de resultados */
.mp-team-opciones {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 20px;
  box-shadow: 0 24px 48px -16px rgba(11, 32, 54, 0.3);
}

.mp-team-opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  cursor: pointer;
}

.mp-team-opcion:hover,
.mp-team-opcion[aria-selected="true"] {
  background: var(--mp-page-bg);
}

/* `display: flex` le gana a la hoja del navegador: sin esto el atributo
   `hidden` con el que el filtro oculta opciones no haría nada. */
.mp-team-opcion[hidden] {
  display: none;
}

.mp-team-opcion-foto {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: var(--mp-grad-foto);
  display: grid;
  place-items: center;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.mp-team-opcion-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

/* Los logos de clínica no se recortan. */
.mp-team-opcion-foto--clinica {
  background: var(--mp-page-bg);
}

.mp-team-opcion-foto--clinica img {
  object-fit: contain;
  object-position: 50% 50%;
  padding: 3px;
  box-sizing: border-box;
}

.mp-team-opcion-texto {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mp-team-opcion-nombre {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--mp-ink);
}

.mp-team-opcion-meta {
  font-size: 13px;
  color: var(--mp-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-team-opcion-vacio {
  padding: 16px 12px;
  font-size: 14px;
  color: var(--mp-text-muted);
}

/* Caja "¿Tu especialista no está en la lista?". */
.mp-team-missing {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--mp-pub-pad) 0;
}

.mp-team-missing-inner {
  background: var(--mp-teal-bg);
  border: 1px solid var(--mp-teal-border);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.mp-team-missing-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.mp-team-missing-copy h2 {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: -0.03em;
  color: var(--mp-success-text);
}

.mp-team-missing-copy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mp-success-text);
}

/* ================================================================
   Ficha de especialista / clínica
   ================================================================ */

.mp-specialist {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) var(--mp-pub-pad) clamp(40px, 6vw, 72px);
}

.mp-specialist-back {
  display: inline-block;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.mp-specialist-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.mp-specialist-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mp-specialist-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-specialist-name {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--mp-ink);
}

.mp-specialist-title {
  font-size: 18px;
  color: var(--mp-text-muted);
}

.mp-specialist-bio {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--mp-text);
  max-width: 540px;
}

/* Dos cosas distintas, y por eso dos formas distintas:
   1. La ESPECIALIDAD es la categoría con la que el profesional se agrupa en el
      directorio. Va como bloque etiquetado con barra de acento — no es una
      credencial suya, es una clasificación nuestra.
   2. Los ESTUDIOS (modelo `Credencial`) son títulos y membresías propios del
      profesional: chips teal con ícono de medalla. */
.mp-specialist-especialidad {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--mp-teal);
}

.mp-specialist-especialidad-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mp-text-faint);
}

.mp-specialist-especialidad-valor {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--mp-navy-deep);
}

.mp-specialist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-specialist-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-success-text);
  background: var(--mp-teal-bg);
  border: 1px solid var(--mp-teal-border);
  border-radius: 999px;
  padding: 8px 14px 8px 11px;
}

.mp-specialist-chip-icono {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--mp-teal);
}

.mp-specialist-contacts {
  display: flex;
  flex-direction: column;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 20px;
  overflow: hidden;
}

.mp-specialist-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: var(--mp-text);
  text-decoration: none;
  transition: background 0.2s;
}

.mp-specialist-contact-item + .mp-specialist-contact-item {
  border-top: 1px solid var(--mp-border);
}

a.mp-specialist-contact-item:hover {
  background: var(--mp-page-bg);
  color: var(--mp-text);
}

.mp-specialist-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: 13px;
  background: var(--mp-teal-bg);
  color: var(--mp-teal);
}

.mp-specialist-contact-icon--mail {
  background: #e7edf4;
  color: var(--mp-navy);
}

.mp-specialist-contact-icon--addr {
  background: var(--mp-pending-bg);
  color: var(--mp-pending-text);
}

.mp-specialist-contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mp-specialist-contact-label {
  font-size: 12px;
  color: var(--mp-text-faint);
}

.mp-specialist-contact-value {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mp-specialist-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* El `max-width` NO es estético: las fotos de los médicos son de 720px de ancho
   (las de clínicas, 629). A 560 CSS px en una pantalla retina se piden 1120 px
   físicos y la imagen se escala ~1.6×, que es lo que se veía pixelado. Topando
   el ancho a 440 el escalado baja a ~1.2× y se ve nítida. Si algún día llegan
   fotos de mayor resolución, este tope se puede subir. */
.mp-specialist-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 440px;
  justify-self: center;
  border-radius: 32px;
  overflow: hidden;
  background: var(--mp-grad-foto);
  box-shadow: 0 40px 80px -30px rgba(18, 51, 90, 0.45);
}

.mp-specialist-photo img {
  width: 100%;
  height: 100%;
  /* "contain", no "cover": los logos de clínicas tienen proporciones distintas
     y no se deben recortar. */
  object-fit: contain;
  display: block;
}

.mp-specialist-photo--foto img {
  object-fit: cover;
}

.mp-specialist-photo .mp-team-photo-fallback {
  font-size: clamp(96px, 14vw, 160px);
  color: rgba(255, 255, 255, 0.35);
}

/* ================================================================
   Landing por especialidad
   ================================================================ */

.mp-esp-hero {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) var(--mp-pub-pad) clamp(56px, 8vw, 104px);
}

/* `overflow-x: auto` fuerza `overflow-y: auto` por spec, así que el contenedor
   recorta en vertical: necesita padding propio para no comerse las pills. */
.mp-esp-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin-bottom: clamp(24px, 5vw, 52px);
  scrollbar-width: none;
}

.mp-esp-tabs::-webkit-scrollbar {
  display: none;
}

.mp-esp-hero-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.mp-esp-hero-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.mp-esp-hero-title {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(38px, 5.8vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  color: var(--mp-ink);
  text-wrap: balance;
}

.mp-esp-hero-title em {
  font-style: normal;
  color: var(--mp-teal);
}

/* Fila de 3 datos (monto / plazo / especialistas) con divisores. */
.mp-esp-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--mp-border);
  border-radius: 20px;
  background: var(--mp-surface);
}

.mp-esp-fact {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mp-esp-fact + .mp-esp-fact {
  border-left: 1px solid var(--mp-border);
}

.mp-esp-fact-label {
  font-size: 12px;
  color: var(--mp-text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mp-esp-fact-value {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(15px, 1.8vw, 20px);
  color: var(--mp-navy-deep);
}

.mp-esp-procs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-esp-proc {
  font-size: 14px;
  font-weight: 500;
  color: var(--mp-navy-deep);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  padding: 8px 14px;
}

.mp-esp-hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 32px;
  overflow: hidden;
  background: var(--mp-grad-foto);
  box-shadow: 0 40px 80px -30px rgba(18, 51, 90, 0.45);
}

.mp-esp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-esp-team {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: 0 var(--mp-pub-pad) clamp(56px, 8vw, 104px);
}

.mp-esp-team h2 {
  margin: 0 0 28px;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  color: var(--mp-ink);
}

.mp-esp-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.mp-esp-team-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--mp-grad-foto);
  text-decoration: none;
  display: block;
}

.mp-esp-team-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Aquí el caption es más alto que en el teaser (lleva el botón "Ver perfil"),
   así que el navy tiene que empezar antes para que el nombre quede legible. */
.mp-esp-team-card .mp-team-photo-scrim {
  background: linear-gradient(
    180deg,
    rgba(11, 32, 54, 0) 26%,
    rgba(11, 32, 54, 0.5) 46%,
    rgba(11, 32, 54, 0.9) 62%,
    rgba(11, 32, 54, 0.97) 100%
  );
}

.mp-esp-team-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-esp-team-caption .mp-team-name {
  font-size: 18px;
}

.mp-esp-team-cta {
  align-self: flex-start;
  margin-top: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mp-navy-deep);
  transition: background 0.2s;
}

.mp-esp-team-card:hover .mp-esp-team-cta {
  background: var(--mp-teal-bg);
}

/* ================================================================
   Simulador standalone y Contacto
   ================================================================ */

.mp-pub-pagehead {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--mp-pub-pad) clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mp-pub-pagehead .mp-pub-h1 {
  max-width: 800px;
}

.mp-contacto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.mp-contacto-card {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  color: var(--mp-text);
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 220px;
  box-sizing: border-box;
  text-decoration: none;
  transition: transform 0.3s;
}

.mp-contacto-card:hover {
  transform: translateY(-4px);
  color: var(--mp-text);
}

.mp-contacto-card--navy {
  background: var(--mp-navy);
  border-color: var(--mp-navy);
  color: #fff;
}

.mp-contacto-card--navy:hover {
  color: #fff;
}

.mp-contacto-card--navy .mp-pub-eyebrow {
  color: #a9c6e6;
}

.mp-contacto-card-body {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-contacto-card-title {
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--mp-navy-deep);
}

.mp-contacto-card--navy .mp-contacto-card-title {
  color: #fff;
}

.mp-contacto-card-desc {
  font-size: 15px;
  color: var(--mp-text-muted);
  overflow-wrap: anywhere;
}

.mp-contacto-card--navy .mp-contacto-card-desc {
  color: #c9d8e8;
}

/* ================================================================
   CTA final (todas las páginas)
   ================================================================ */

.mp-cta-final {
  padding: clamp(48px, 7vw, 96px) clamp(10px, 2vw, 24px) clamp(10px, 2vw, 24px);
}

.mp-cta-final-inner {
  max-width: var(--mp-pub-bleed);
  margin: 0 auto;
  border-radius: var(--mp-pub-radius);
  background: var(--mp-teal);
  color: #fff;
  padding: clamp(36px, 7vw, 96px) clamp(22px, 6vw, 80px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

/* Círculo decorativo arriba a la derecha. */
.mp-cta-final-inner::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(226, 240, 235, 0.08);
  pointer-events: none;
}

.mp-cta-final-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 620px;
}

.mp-cta-final-copy h2 {
  margin: 0;
  font-family: var(--mp-font-heading);
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
}

.mp-cta-final-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--mp-teal-bg);
}

.mp-cta-final-actions {
  position: relative;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Outline blanco sobre el bloque teal. */
.mp-cta-final-actions .mp-pub-btn-ghost {
  background: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.mp-cta-final-actions .mp-pub-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ================================================================
   Footer
   ================================================================ */

.mp-pub-footer {
  background: var(--mp-ink);
  color: var(--mp-footer-text);
  margin-top: clamp(10px, 2vw, 24px);
}

.mp-pub-footer-inner {
  max-width: var(--mp-pub-max);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) var(--mp-pub-pad) 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.mp-pub-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 36px;
}

.mp-pub-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: span 2;
  min-width: 0;
}

.mp-pub-footer-wordmark {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.02em;
}

.mp-pub-footer-wordmark span {
  font-weight: 400;
  color: var(--mp-teal-light);
}

.mp-pub-footer-brand p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
}

.mp-pub-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.mp-pub-footer-col-title {
  color: #fff;
  font-weight: 600;
}

.mp-pub-footer-col a {
  color: var(--mp-footer-text);
  text-decoration: none;
}

.mp-pub-footer-col a:hover {
  color: #fff;
}

.mp-pub-footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--mp-text-faint);
}

/* ================================================================
   WhatsApp flotante
   ================================================================ */

.mp-whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mp-ink);
  color: #fff;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: 0 16px 32px -8px rgba(11, 32, 54, 0.45);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.mp-whatsapp-float:hover {
  color: #fff;
  background: var(--mp-navy-deep);
}

.mp-whatsapp-float::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7fe0b0;
  box-shadow: 0 0 0 4px rgba(127, 224, 176, 0.25);
  flex: none;
}

/* En móvil la etiqueta larga no cabe junto al contenido. */
.mp-whatsapp-float-short {
  display: none;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1099px) {
  .mp-pub-nav,
  .mp-pub-header-actions {
    display: none;
  }

  .mp-pub-header-mobile {
    display: flex;
  }

  .mp-whatsapp-float-long {
    display: none;
  }

  .mp-whatsapp-float-short {
    display: inline;
  }
}

@media (min-width: 1100px) {
  /* El menú se renderiza con `.collapse` de Bootstrap para el toggle de móvil;
     en desktop no debe ocultar nada (mismo patrón que `.mp-panel-nav.collapse`). */
  .mp-pub-menu {
    display: none !important;
  }
}

@media (max-width: 760px) {
  /* Hero: el texto va primero y la foto debajo. */
  .mp-hero-media {
    min-height: 360px;
    order: 2;
  }

  .mp-hero-stat + .mp-hero-stat {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mp-esp-facts {
    grid-template-columns: 1fr;
  }

  .mp-esp-fact + .mp-esp-fact {
    border-left: none;
    border-top: 1px solid var(--mp-border);
  }

  .mp-pub-footer-brand {
    grid-column: span 1;
  }

  .mp-team-missing-inner,
  .mp-cta-final-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .mp-whatsapp-float {
    right: 16px;
    bottom: 16px;
    padding: 12px 16px;
  }

  /* Hit targets de al menos 44px en los CTA apilados. */
  .mp-hero-ctas > *,
  .mp-specialist-ctas > *,
  .mp-cta-final-actions > * {
    flex: 1 1 auto;
    min-height: 44px;
  }
}
