@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ══════════════════════════════════════════
   VARIABLES & RESET
══════════════════════════════════════════ */
:root {
  --blue:        #1e5aa8;
  --blue-dark:   #163f78;
  --blue-hover:  #1a4f96;
  --blue-light:  #eef3fc;
  --accent:      #d4a017;
  --accent-dark: #b8870f;

  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white:    #ffffff;

  --radius:     0.5rem;
  --radius-lg:  1rem;
  --shadow:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 28px rgba(0,0,0,0.12);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.16);
  --transition: all 0.2s ease;
}

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

html  { scroll-behavior: smooth; font-size: 16px; }

body  {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-700);
  line-height: 1.65;
  background: var(--white);
}

img   { max-width: 100%; height: auto; display: block; }
a     { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-dark); }
ul    { list-style: none; }

/* ══════════════════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════════════════ */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section         { padding: 5rem 0; }
.section--compact { padding: 2rem 0; }
.section--gray   { background: var(--gray-50); }
.section--blue   { background: var(--blue-light); }
.section--dark   { background: var(--blue-dark); color: var(--white); }
.section--amber  { background: #fffbeb; border-top: 1px solid #fde68a; border-bottom: 1px solid #fde68a; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 0.3rem 0.875rem;
  border-radius: 2rem;
  margin-bottom: 0.875rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--gray-600);
  max-width: 580px;
  margin-bottom: 2.5rem;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn--primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,90,168,0.35);
}

.btn--outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline:hover {
  background: var(--blue);
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: var(--blue-dark);
}

.btn--sm {
  padding: 0.5rem 1.125rem;
  font-size: 0.825rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  transition: var(--transition);
}
.link-arrow:hover { gap: 0.55rem; color: var(--blue-dark); }

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.topbar {
  background: #0e2244;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 0.5rem 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-items { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.topbar-item  { display: flex; align-items: center; gap: 0.35rem; }
.topbar-item a { color: #94a3b8; }
.topbar-item a:hover { color: var(--white); }
.topbar-item svg  { width: 13px; height: 13px; flex-shrink: 0; }
.topbar-icon      { width: 16px; height: 16px; flex-shrink: 0; }
.topbar-divider { width: 1px; height: 12px; background: #334155; }

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.2s;
}
.header.scrolled { box-shadow: var(--shadow); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  gap: 1.5rem;
}

.logo img { height: 44px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--blue); background: var(--blue-light); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.25rem;
  border-radius: var(--radius);
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem 1.25rem;
  gap: 0.125rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { display: block; padding: 0.625rem 0.875rem; }
.mobile-nav .btn { margin-top: 0.75rem; justify-content: center; width: 100%; }

/* ══════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════ */
.splash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.splash-logo {
  width: 280px;
  max-width: 70vw;
  animation: splashPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes splashPop {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  position: relative;
  height: 50vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Las animaciones del hero arrancan justo cuando termina el splash (2s) + fade (0.6s) */
  --hero-base: 2.6s;
}

/* ── Video sin ningún filtro ni overlay ── */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: none;
}

/* ── Grid de 3 columnas ── */
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: center;
  width: 100%;
}

/* ════ COLUMNA IZQUIERDA ════ */
.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Card estadística — fondo blanco, texto azul */
.hero-stat-card {
  background: rgba(255, 255, 255, 0.93);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 150px;
}

/* Texto secuencial: cada línea aparece una tras otra */
.hero-seq {
  opacity: 0;
  animation: seqFadeIn 0.45s ease forwards;
  animation-delay: calc(var(--hero-base, 0s) + var(--si, 0) * 0.3s + 0.2s);
}
@keyframes seqFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.1;
  display: flex;
  justify-content: center;
  gap: 0;
  overflow: visible;
}

/* ── Dígitos cayendo del cielo ──
   --di controla el ORDEN de caída (0 = primero, 6 = último).
   El "4" tiene --di:0 para caer primero y generar el impacto.
   El "+" tiene --di:6 para rematar cuando ya se leyó el número. */
.dchar {
  display: inline-block;
  opacity: 0;
  transform: translateY(-42px);
  animation: digitDrop 0.48s cubic-bezier(0.34, 1.65, 0.64, 1) forwards;
  animation-delay: calc(var(--hero-base, 0s) + var(--di) * 0.14s + 0.15s);
}

@keyframes digitDrop {
  0%   { opacity: 0; transform: translateY(-42px) scaleY(0.65); }
  55%  { opacity: 1; transform: translateY(5px)   scaleY(1.08); }
  75%  { transform: translateY(-2px) scaleY(0.97); }
  100% { opacity: 1; transform: translateY(0)     scaleY(1); }
}
.hero-stat-pacientes {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}
.hero-stat-since {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--blue);
  line-height: 1.4;
  margin-top: 0.1rem;
}

/* Card ícono (estetoscopio y validación) — recuadro al tamaño del ícono */
.hero-icon-card {
  background: rgba(255, 255, 255, 0.93);
  border-radius: var(--radius);
  padding: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  overflow: hidden;
}

/* Ícono con cortina de izquierda a derecha */
.hero-icon-svg {
  width: 48px;
  height: 48px;
  display: block;
}
.hero-curtain-ltr {
  clip-path: inset(0 100% 0 0);
  animation: curtainLTR 0.65s cubic-bezier(0.4,0,0.2,1) forwards;
  animation-delay: calc(var(--hero-base, 0s) + 0.55s);
}
@keyframes curtainLTR {
  to { clip-path: inset(0 0% 0 0); }
}

/* ════ COLUMNA CENTRAL ════ */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Título: blanco con sombra gris suave */
.hero-title {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0.875rem;
  letter-spacing: -0.01em;
  text-shadow: 1px 2px 8px rgba(80, 80, 80, 0.55);
}
.hero-title--anim {
  opacity: 0;
  animation: heroFadeIn 0.7s ease forwards;
  animation-delay: var(--hero-base, 0s);
}
@keyframes heroFadeIn {
  to { opacity: 1; }
}

/* Subtítulo: blanco, entra de abajo hacia arriba */
.hero-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.93);
  margin-bottom: 1.5rem;
  max-width: 460px;
  line-height: 1.65;
}
.hero-text--anim {
  opacity: 0;
  transform: translateY(16px);
  animation: heroSlideUp 0.6s ease forwards;
  animation-delay: calc(var(--hero-base, 0s) + 0.3s);
}
@keyframes heroSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

/* Botones: entran de derecha a izquierda de forma escalonada */
.hero-btn-anim {
  opacity: 0;
  transform: translateX(24px);
  animation: heroBtnSlide 0.55s ease forwards;
  animation-delay: calc(var(--hero-base, 0s) + 0.55s + var(--bi, 0) * 0.15s);
}
@keyframes heroBtnSlide {
  to { opacity: 1; transform: translateX(0); }
}

/* Botón outline color topbar */
.btn--hero-outline {
  background: transparent;
  color: #0e2244;
  border-color: #0e2244;
  border-width: 2px;
}
.btn--hero-outline:hover {
  background: #0e2244;
  color: #ffffff;
  border-color: #0e2244;
}

/* ════ COLUMNA DERECHA ════ */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Card IPN — cortina de abajo hacia arriba */
.hero-ipn-card {
  background: rgba(255, 255, 255, 0.93);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 155px;
}
.hero-curtain-btt {
  clip-path: inset(100% 0 0 0);
  animation: curtainBTT 0.65s cubic-bezier(0.4,0,0.2,1) forwards;
  animation-delay: calc(var(--hero-base, 0s) + 0.7s);
}
@keyframes curtainBTT {
  to { clip-path: inset(0% 0 0 0); }
}

.hero-ipn-logo {
  width: 110px;
  height: auto;
}
/* ══════════════════════════════════════════
   PADECIMIENTOS — encabezado
══════════════════════════════════════════ */
/* Título mismo color que +40,000 (--blue) y más grande */
.pade-title {
  color: var(--blue) !important;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem) !important;
}
/* Subtítulo: una sola línea continua sin corte forzado */
.pade-sub {
  white-space: normal;
  max-width: 100%;
}

/* ══════════════════════════════════════════
   PILARES / CARDS  (legacy, se mantiene para otras secciones)
══════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.875rem;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-icon {
  width: 52px; height: 52px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--blue);
}
.card-icon svg { width: 26px; height: 26px; }
.card-title { font-size: 1.075rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.625rem; }
.card-text  { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 1.25rem; line-height: 1.65; }

/* ══════════════════════════════════════════
   PADECIMIENTOS — PCARDS (nuevas)
══════════════════════════════════════════ */
/* ── Estado base + transición suave al hover ── */
.pcard {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  transition:
    background  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform   0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.pcard:hover {
  background: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ── Animaciones de entrada (IntersectionObserver) ── */
/* Izquierda entra desde la izquierda */
.pcard--from-left {
  opacity: 0;
  transform: translateX(-70px);
  transition:
    opacity     0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform   0.7s cubic-bezier(0.4, 0, 0.2, 1),
    background  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Centro cae del cielo con ligero rebote */
.pcard--from-top {
  opacity: 0;
  transform: translateY(-80px);
  transition:
    opacity     0.65s cubic-bezier(0.34, 1.4, 0.64, 1),
    transform   0.65s cubic-bezier(0.34, 1.4, 0.64, 1),
    background  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Derecha entra desde la derecha */
.pcard--from-right {
  opacity: 0;
  transform: translateX(70px);
  transition:
    opacity     0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform   0.7s cubic-bezier(0.4, 0, 0.2, 1),
    background  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Estado visible — el JS añade .pcard--visible al detectar la sección */
.pcard--visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}
/* El central tiene un delay pequeño para que caiga justo cuando los laterales ya arrancan */
.pcard--from-top.pcard--visible  { transition-delay: 0.1s; }
.pcard--from-left.pcard--visible,
.pcard--from-right.pcard--visible { transition-delay: 0s; }

/* Tarjeta inferior: entra subiendo desde abajo */
.pcard--from-bottom {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity     0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform   0.7s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform   0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.pcard--from-bottom.pcard--visible { transition-delay: 0.15s; }

/* Ícono: dos versiones, se alterna en hover */
.pcard-icon-wrap {
  width: 52px;
  height: 52px;
  position: relative;
  flex-shrink: 0;
}
.pcard-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}
.pcard-icon--blue  { opacity: 1; }
.pcard-icon--white { opacity: 0; }

.pcard:hover .pcard-icon--blue  { opacity: 0; }
.pcard:hover .pcard-icon--white { opacity: 1; }

/* Título */
.pcard-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue);
  transition: color 0.25s ease;
  line-height: 1.3;
}
.pcard:hover .pcard-title { color: var(--white); }

/* Texto */
.pcard-text {
  font-size: 0.855rem;
  color: var(--blue);
  line-height: 1.65;
  flex: 1;
  transition: color 0.25s ease;
}
.pcard:hover .pcard-text { color: rgba(255,255,255,0.9); }

/* Botón */
.pcard-btn {
  display: inline-block;
  margin-top: auto;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--blue);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.pcard:hover .pcard-btn {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

/* ══════════════════════════════════════════
   PADECIMIENTOS — TARJETA "APOYO INMUNOLÓGICO"
   (antes sección aparte, ahora 4ta tarjeta debajo de las otras 3)
══════════════════════════════════════════ */
.apoyo-card {
  margin-top: 1.5rem;
  display: flex;
  align-items: stretch;
  gap: 2rem;
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  transition:
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform  0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.apoyo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.apoyo-card__main {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.apoyo-card__divider {
  width: 1px;
  align-self: stretch;
  background: var(--gray-200);
  flex-shrink: 0;
}
.apoyo-card__aside {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.apoyo-card__aside-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 0.25rem;
}
.apoyo-card__aside-title {
  font-size: 1.235rem;
  font-weight: 700;
  color: var(--gray-900);
}
.apoyo-card__aside-text {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   RESPALDO INSTITUCIONAL
══════════════════════════════════════════ */
/* Grid de 3 columnas: texto | humano | logos */
.respaldo-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 0.8fr;
  gap: 2.5rem;
  align-items: end;     /* texto y humano se alinean desde abajo */
}

/* ── COL 1: Texto ── */
.respaldo-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 1rem;
  align-self: start;   /* texto arranca desde arriba */
}

.respaldo-title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
  margin: 0.75rem 0 1.25rem;
}

.respaldo-text {
  color: var(--blue);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

/* ── COL 2: Humano protagonista ── */
.respaldo-hombre {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  /* align-items:end del grid ya lo pega al fondo */
}

.respaldo-hombre img {
  width: 100%;
  max-width: 420px;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(30,90,168,0.13));
  display: block;
}

/* ── COL 3: Logos + íconos ── */
.respaldo-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0;
  align-self: start;   /* sube al nivel del título, independiente del grid align-items:end */
}

/* Stack de logos: 3 cards, misma altura, alineados verticalmente */
.rlogo-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rlogo-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 0.6rem;        /* más alto, menos ancho */
  height: 100px;               /* cards más altos */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.rlogo-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(30,90,168,0.1);
}

.rlogo-card img {
  max-height: 68px;           /* logos más grandes */
  max-width: 90%;
  width: auto;
  object-fit: contain;
}

.rlogo-card__name {
  font-size: 0.5rem;          /* texto más pequeño → logo gana espacio */
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.2;
}

/* ENCB: mismo alto que los demás, logo cuadrado ajustado */
.rlogo-card--encb { height: 110px; }
.rlogo-card--encb img { max-height: 58px; }

/* 3 íconos — sin recuadro, solo imagen alineada */
.ricon-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.ricon-bare {
  width: 38px;
  height: 38px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ricon-bare:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   HOMBRE — emerge desde abajo
══════════════════════════════════════════ */
/* Estado inicial: invisible, desplazado hacia abajo */
.hombre-img {
  opacity: 0;
  transform: translateY(110px);
  transition: opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1),
              transform 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Estado final: en su lugar */
.hombre-img.hombre-img--in {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   TYPEWRITER — título Respaldo institucional
══════════════════════════════════════════ */
/* Cada carácter envuelto en .tchar por JS */
.tchar        { opacity: 0; }
.tchar--on    { opacity: 1; }

/* Cursor parpadeante mientras se escribe */
@keyframes tw-blink {
  0%, 49% { opacity: 1; }
  50%,100% { opacity: 0; }
}
.tw-cursor {
  display: inline-block;
  width: 3px;
  height: 0.8em;
  background: var(--blue);
  margin-left: 1px;
  vertical-align: middle;
  border-radius: 1px;
  animation: tw-blink 0.6s step-end infinite;
}


/* ══════════════════════════════════════════
   DOCTOR CARDS — 3/4 foto + 1/4 info
══════════════════════════════════════════ */
.dcard-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.dcard {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  flex: 0 1 calc(20% - 1rem);
  max-width: calc(20% - 1rem);
}
.dcard:hover { box-shadow: var(--shadow-md); border-color: var(--blue); }

/* 3/4 del card = foto */
.dcard__photo {
  flex: 3;
  overflow: hidden;
  background: var(--gray-100);
  min-height: 108px;   /* 154px × 0.7 ≈ 108px */
}
.dcard__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}
.dcard:hover .dcard__photo img { transform: scale(1.04); }

/* 1/4 del card = info */
.dcard__info {
  flex: 1;
  padding: 0.6rem 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1.5px solid var(--gray-100);
}
.dcard__name {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.3;
  margin: 0;
}
.dcard__role {
  font-size: 0.884rem;
  font-weight: 400;
  color: var(--blue);
  margin: 0;
}
.dcard__li {
  margin-top: 0.3rem;
  display: inline-block;
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dcard__li:hover { opacity: 1; transform: scale(1.15); }
.dcard__li img { width: 100%; height: 100%; object-fit: contain; }

/* ══════════════════════════════════════════
   PROCESO — encabezado
══════════════════════════════════════════ */
.proceso-header { text-align: center; max-width: 600px; margin: 0 auto; }
.proceso-title  {
  color: var(--blue);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════
   PROCESO — pasos animados
══════════════════════════════════════════ */
.steps-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 1.5rem;
  position: relative;
}

/* Cada paso ocupa 1/5 del ancho */
.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* Nodo: círculo + línea horizontal */
.step-node {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 1rem;
}

/* Círculo numerado */
.step-circle {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--blue);
  position: relative;
  z-index: 2;
  /* estado inicial para animación */
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step-circle.sc--in { opacity: 1; transform: scale(1); }

/* Línea que conecta al siguiente círculo */
.step-line {
  flex: 1;
  height: 3px;
  background: var(--blue);
  margin-left: 4px;
  /* animación: crece de 0 a 100% de ancho */
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.45s ease;
}
.step-line.sl--in { transform: scaleX(1); }

/* Texto del paso */
.step-body {
  padding: 0 0.5rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.step-body.sb--in { opacity: 1; transform: translateY(0); }

.step-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--blue);
  margin-bottom: 0.35rem;
}
.step-text {
  font-size: 0.775rem;
  color: var(--blue);
  line-height: 1.55;
}

/* ══════════════════════════════════════════
   SEDES
══════════════════════════════════════════ */
.sedes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sede-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.sede-card:hover { box-shadow: var(--shadow); }

.sede-map {
  height: 200px;
  background: var(--gray-100);
  overflow: hidden;
  position: relative;
}
.sede-map iframe { width: 100%; height: 100%; border: none; }

.sede-info { padding: 1.375rem 1.5rem; }
.sede-name { font-weight: 700; font-size: 1rem; color: var(--gray-900); margin-bottom: 0.5rem; }
.sede-address { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0.5rem; line-height: 1.5; }
.sede-ext { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 0.75rem; }

/* Fila con el QR y la caja de WhatsApp de la sede, una junto a la otra */
.sede-links {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

/* QR de ubicación en cada sede */
.sede-qr {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  width: fit-content;
}
.sede-qr canvas,
.sede-qr img { display: block; border-radius: 2px; }
.sede-qr::after {
  content: 'Escanea para llegar';
  font-size: 0.62rem;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Caja de WhatsApp — misma estructura que la del QR: ícono arriba, "Cómo llegar" abajo,
   alineado con la leyenda "Escanea para llegar" del QR */
.sede-wa-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  width: fit-content;
}

.sede-wa-icon {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: 2px;
  transition: var(--transition);
}
.sede-wa-icon img { width: 52px; height: 52px; }
.sede-wa-icon:hover { background: var(--blue); }
.sede-wa-icon:hover img { filter: brightness(0) invert(1); }

.sede-wa-cta {
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   SERVICIOS CARDS (Laboratorio + Comunidad)
══════════════════════════════════════════ */
.servicios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Card con video de fondo — sin filtro ni overlay */
.svc-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

/* Video ocupa todo el card */
.svc-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Body: flex column que ocupa todo el espacio, tag arriba y contenido abajo */
.svc-card__body {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* Tag al tope del card */
.svc-tag--top {
  align-self: flex-start;
}

/* Contenido (título + texto + botones) en la parte inferior */
.svc-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
}

.section-tag--white {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}

.svc-card__title {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.25;
  margin: 0;
}

.svc-card__text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin: 0;
}

.svc-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Botón contorno blanco */
.btn--outline-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  background: transparent;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
}

/* Botón sólido blanco */
.btn--white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  color: var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--white);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn--white:hover { background: var(--gray-100); transform: translateY(-1px); color: var(--blue-dark); }

/* Badge "Principal" dentro del nombre de sede */
.sede-badge {
  font-size: .75rem;
  color: var(--blue);
  font-weight: 600;
  background: var(--blue-light);
  padding: .15rem .5rem;
  border-radius: 2rem;
  margin-left: .5rem;
  vertical-align: middle;
}

/* ══════════════════════════════════════════
   FARMACOVIGILANCIA
══════════════════════════════════════════ */
.farma-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.375rem 2rem;
  border-radius: var(--radius);
}

.farma-icon {
  width: 46px; height: 46px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.2rem;
  color: #92400e;
}

.farma-text { flex: 1; min-width: 200px; }
.farma-text strong { display: block; font-size: 0.9rem; color: var(--gray-900); margin-bottom: 0.2rem; }
.farma-text p { font-size: 0.8rem; color: var(--gray-600); }

/* ══════════════════════════════════════════
   CONTACTO RÁPIDO
══════════════════════════════════════════ */
.contacto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contacto-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  display: block;
  cursor: pointer;
}
.contacto-card:hover {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.contacto-card:hover .contacto-title { color: var(--white); }
.contacto-card:hover .contacto-value { color: var(--white); }
.contacto-card:hover .contacto-hours  { color: rgba(255,255,255,0.75); }
.contacto-card:hover .contacto-icon  { background: rgba(255,255,255,0.18); }
.contacto-card:hover .contacto-icon__img--blue  { opacity: 0; }
.contacto-card:hover .contacto-icon__img--white { opacity: 1; }

.contacto-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  transition: background 0.25s ease;
}
.contacto-icon__img {
  width: 36px; height: 36px;
  object-fit: contain;
  transition: opacity 0.25s ease;
  position: absolute;
}
.contacto-icon__img--blue  { opacity: 1; }
.contacto-icon__img--white { opacity: 0; }

.contacto-title { font-weight: 700; color: var(--blue-dark); margin-bottom: 0.375rem; transition: color 0.25s ease; }
.contacto-value { display: block; font-size: 0.95rem; font-weight: 600; color: var(--blue); margin-bottom: 0.25rem; transition: color 0.25s ease; }
.contacto-hours { font-size: 0.75rem; color: var(--gray-500); transition: color 0.25s ease; }

/* ══════════════════════════════════════════
   CTA SECTION
══════════════════════════════════════════ */
.cta-section {
  background: var(--gray-100);
  padding: 0;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 340px;
  overflow: hidden;
}

.cta-img {
  flex: 0 0 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.cta-img img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: bottom center;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-img--left  { order: 1; }
.cta-img--left  img { transform: translateX(-120px); }
.cta-img--right { order: 3; }
.cta-img--right img { transform: translateX(120px); }

.cta-img--left  img.cta-img--in { opacity: 1; transform: translateX(0); }
.cta-img--right img.cta-img--in { opacity: 1; transform: translateX(0); }

.cta-content {
  order: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.cta-content h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--blue-dark); margin-bottom: 0.875rem; }
.cta-content p  { font-size: 1rem; color: var(--gray-600); max-width: 440px; margin: 0 auto 2rem; }

.btn--cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}
.btn--cta:hover { background: var(--blue); color: var(--white); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer { background: var(--gray-900); color: #94a3b8; padding: 4rem 0 2rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}

.footer-logo img { height: 38px; filter: brightness(0) invert(1); opacity: 0.9; margin-bottom: 1rem; }
.footer-desc { font-size: 0.83rem; line-height: 1.7; margin-bottom: 1rem; }

.footer-col h5 { font-size: 0.85rem; font-weight: 700; color: var(--white); margin-bottom: 1.25rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-col ul li a { color: #94a3b8; font-size: 0.83rem; }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.footer-credits {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.32);
}

/* ══════════════════════════════════════════
   WHATSAPP FLOAT
══════════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
}

.wa-tooltip {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  font-size: 0.8rem;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  color: var(--gray-700);
  font-weight: 500;
  display: none;
}

.wa-btn {
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,0.45);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  color: white;
}
.wa-btn:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(37,211,102,0.55); color: white; }
.wa-btn svg { width: 30px; height: 30px; }

.wa-float:hover .wa-tooltip { display: block; }

/* ══════════════════════════════════════════
   PÁGINA FARMACOVIGILANCIA
══════════════════════════════════════════ */
/* ── Hero ── */
.fv-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.fv-title { color: var(--blue); }

.fv-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

.fv-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.fv-hero-visual__img {
  width: 100%;
  max-width: 360px;
  filter: drop-shadow(0 18px 40px rgba(30,90,168,0.2));
}

/* ── Contenido: tarjetas informativas + formulario ── */
.fv-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.fv-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fv-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}

.fv-form-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}
.fv-form-sub {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1.75rem;
}

.fv-form { display: flex; flex-direction: column; gap: 1.25rem; }

.fv-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.fv-field { display: flex; flex-direction: column; gap: 0.45rem; }
.fv-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-900);
}
.fv-required { color: var(--accent-dark); }

.fv-field input,
.fv-field textarea {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gray-900);
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fv-field input::placeholder,
.fv-field textarea::placeholder { color: var(--gray-400); }
.fv-field input:focus,
.fv-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.fv-field textarea { resize: vertical; min-height: 110px; }

.fv-submit { justify-content: center; width: 100%; margin-top: 0.25rem; }

.fv-helper-text {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.55;
  text-align: center;
  margin: 0;
}
.fv-helper-text a { font-weight: 600; }

.fv-confidential {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-600);
}
.fv-confidential svg { flex-shrink: 0; color: var(--blue); }

/* ══════════════════════════════════════════
   PÁGINA AVISO DE PRIVACIDAD
══════════════════════════════════════════ */
/* ── Selector de versión (Simplificado / Integral) ── */
.aviso-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--blue-light);
  border-radius: 999px;
  padding: 0.3rem;
  gap: 0.3rem;
}
.aviso-tab {
  border: none;
  background: transparent;
  color: var(--blue);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.aviso-tab:hover { background: rgba(255,255,255,0.6); }
.aviso-tab.is-active {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}

/* ── Paneles de contenido ── */
.aviso-panel { display: none; }
.aviso-panel.is-active { display: block; }

.legal-doc {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow);
}

.legal-doc__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.3;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.legal-section { margin-bottom: 2rem; }
.legal-section:last-child { margin-bottom: 0; }

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.4;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gray-200);
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section p strong { color: var(--gray-900); }

.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  padding: 0;
}
.legal-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.7;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.legal-list li strong { color: var(--gray-900); }

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cards-grid       { grid-template-columns: 1fr 1fr; }
  .dcard            { flex-basis: calc(50% - 0.625rem); max-width: calc(50% - 0.625rem); }
  .steps-track      { flex-wrap: wrap; gap: 1.5rem; }
  .step-item        { flex: 0 0 calc(50% - 1rem); }
  .step-line        { display: none; }
  .footer-grid      { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  .hero-grid        { grid-template-columns: 1fr 2fr; }
  .hero-right       { display: none; }
}

@media (max-width: 768px) {
  .nav, .header .btn--primary { display: none; }
  .hamburger { display: flex; }

  .cta-section { min-height: auto; }
  .cta-img     { display: none; }
  .cta-content { padding: 3rem 1.5rem; }

  .hero              { height: auto; min-height: 60vh; padding: 3rem 0; }
  .hero-grid         { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-left         { display: none; }
  .hero-right        { display: none; }
  .hero-text         { max-width: 100%; }

  .section { padding: 3.5rem 0; }

  .cards-grid     { grid-template-columns: 1fr; }
  .apoyo-card         { flex-direction: column; gap: 1.25rem; padding: 1.5rem; }
  .apoyo-card__divider { width: 100%; height: 1px; }
  .fv-hero-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .fv-hero-visual__img { max-width: 260px; }
  .fv-grid        { grid-template-columns: 1fr; gap: 2rem; }
  .fv-field-row   { grid-template-columns: 1fr; }
  .fv-form-card   { padding: 1.75rem; }
  .legal-doc      { padding: 1.75rem 1.5rem; }
  /* Tablet: colapsa a 2 cols — texto encima, luego humano + logos lado a lado */
  .respaldo-grid  { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .respaldo-left  { grid-column: 1 / -1; }          /* texto ocupa todo el ancho */
  .respaldo-hombre img { max-width: 320px; }
  .dcard          { flex-basis: calc(50% - 0.625rem); max-width: calc(50% - 0.625rem); }
  .dcard__photo   { min-height: 180px; }
  .sedes-grid     { grid-template-columns: 1fr; }
  .contacto-grid  { grid-template-columns: 1fr; }
  .servicios-grid { grid-template-columns: 1fr; }
  .svc-card       { min-height: 300px; }
  .topbar .container { justify-content: center; }
}

@media (max-width: 480px) {
  .dcard         { flex-basis: 100%; max-width: 100%; }
  .step-item     { flex: 0 0 100%; }
  .footer-grid   { grid-template-columns: 1fr; }
  /* Móvil: una sola columna */
  .respaldo-grid  { grid-template-columns: 1fr; gap: 1.5rem; }
  .respaldo-left  { grid-column: auto; }
  .respaldo-hombre img { max-width: 260px; margin: 0 auto; }
  .ricon-row      { justify-content: center; }
  .hero-actions  { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .aviso-tabs    { width: 100%; }
  .aviso-tab     { flex: 1; text-align: center; }
}
