/* =============================================================
   Argus Salud — Sistema de diseño
   Paleta: azul institucional + acero (tomada del logo)
   ============================================================= */
:root {
  /* Fondos */
  --color-bg: #f6f9fd;
  --color-surface: #ffffff;
  --color-surface-alt: #eef4fc;

  /* Texto */
  --color-text: #0d1727;
  --color-text-muted: #51637d;
  --color-border: #dde7f5;

  /* Azules de marca */
  --color-primary: #1657cc;
  --color-primary-dark: #0b3585;
  --color-primary-light: #3f80e8;

  /* Acento eléctrico (el brillo del ojo del logo) */
  --color-accent: #2f9bf0;
  --color-accent-soft: #e8f2fe;
  --color-glow: rgba(47, 155, 240, .45);

  /* Acero / metálico del logo */
  --color-steel: #8fa3bd;
  --color-steel-light: #c3cfe0;
  --ink-900: #060c18;
  --ink-800: #0a1730;
  --ink-700: #12294f;

  /* Tipografía */
  --font-logo: "Michroma", "Segoe UI", sans-serif;
  --font-heading: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Formas */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;

  /* Sombras en capas */
  --shadow-sm: 0 1px 2px rgba(11, 30, 65, .05), 0 3px 10px rgba(11, 30, 65, .05);
  --shadow-md: 0 4px 12px rgba(11, 30, 65, .08), 0 14px 34px rgba(11, 30, 65, .10);
  --shadow-lg: 0 10px 28px rgba(11, 30, 65, .12), 0 30px 64px rgba(11, 30, 65, .16);
  --shadow-glow: 0 0 0 1px rgba(47, 155, 240, .25), 0 12px 34px rgba(47, 155, 240, .22);

  --container-w: 1180px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h2 { font-weight: 700; }
h3, h4 { font-weight: 600; }

p { margin: 0 0 1em; color: var(--color-text-muted); }
ul { padding-left: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--color-primary); color: #fff; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 26px;
  position: relative;
}

/* ===== Barra de progreso de lectura ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 200;
  transition: width .1s linear;
}

/* ===== Animación de entrada al hacer scroll ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== Botones ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s ease, color .3s ease;
}
/* destello que recorre el botón al pasar el cursor */
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  transition: left .6s var(--ease);
}
.btn:hover::before { left: 130%; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 87, 204, .32);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(22, 87, 204, .42);
}
.btn-ghost {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.45);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.16);
  border-color: #fff;
}
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(246, 249, 253, .72);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .35s ease, background .35s ease, box-shadow .35s ease;
}
.site-header.scrolled {
  border-color: var(--color-border);
  background: rgba(246, 249, 253, .93);
  box-shadow: 0 4px 22px rgba(11, 30, 65, .07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 20px;
}

/* Marca */
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  flex-shrink: 0;
  width: 44px; height: 44px;
  transition: transform .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(11, 30, 65, .28));
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-logo);
  font-size: .98rem;
  letter-spacing: .06em;
  color: var(--color-primary-dark);
  text-transform: uppercase;
}
.brand-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .34em;
  color: var(--color-steel);
  margin-top: 6px;
}

/* Navegación */
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: .92rem;
  color: var(--color-text);
  position: relative;
  padding: 6px 0;
  transition: color .25s ease;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width .3s var(--ease);
}
.main-nav a:not(.nav-cta):hover { color: var(--color-primary); }
.main-nav a:not(.nav-cta):hover::after,
.main-nav a:not(.nav-cta).active::after { width: 100%; }
.main-nav a.active { color: var(--color-primary); }

/* Botón de contacto por WhatsApp */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff !important;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(22, 87, 204, .3);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.nav-cta svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(22, 87, 204, .42);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 25px; height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 180px 0 110px;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 78% 6%, rgba(47, 155, 240, .40), transparent 62%),
    radial-gradient(760px 520px at 8% 92%, rgba(22, 87, 204, .42), transparent 60%),
    linear-gradient(140deg, var(--ink-900) 0%, #0b2a63 45%, #14498f 72%, #1e63b8 100%);
}
/* rejilla técnica sutil, evoca lo "tecnológico" del logo */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 600;
  color: #8fc4f5;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 2px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(105deg, #7fc4ff, #cfe6ff 55%, #7fc4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  color: rgba(226, 238, 252, .9);
  font-size: 1.12rem;
  max-width: 610px;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 58px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin: 0;
  max-width: 430px;
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 18px;
}
.hero-stats > div::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-accent), transparent);
}
.hero-stats dt {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.hero-stats dd {
  margin: 0;
  font-size: .84rem;
  color: rgba(190, 214, 242, .82);
}

.hero-logo { display: flex; justify-content: center; }
.hero-logo-img {
  width: 100%;
  max-width: 390px;
  filter: drop-shadow(0 22px 46px rgba(0,0,0,.5));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ===== Secciones ===== */
.section { padding: 104px 0; position: relative; }
.section-alt { background: var(--color-surface-alt); }

.section-head { max-width: 700px; margin: 0 auto 54px; text-align: center; }
.tag {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(47, 155, 240, .22);
  margin-bottom: 18px;
}
.tag-light {
  background: rgba(255,255,255,.12);
  color: #cfe4fb;
  border-color: rgba(255,255,255,.24);
}
.section-head h2 { font-size: clamp(1.7rem, 3.1vw, 2.4rem); }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  margin: 18px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 54px;
}
.lead-text { font-size: 1.06rem; color: var(--color-text); }
.lead-text.center { max-width: 740px; margin: 0 auto 34px; text-align: center; }

/* ===== Tarjetas Misión / Visión / Filosofía ===== */
.mvv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 62px;
}
.mvv-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .35s ease;
}
/* barra superior que se despliega al pasar el cursor */
.mvv-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width .5s var(--ease);
}
.mvv-card:hover {
  transform: translateY(-9px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(47, 155, 240, .34);
}
.mvv-card:hover::before { width: 100%; }
.mvv-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--color-accent-soft), #fff);
  border: 1px solid rgba(47, 155, 240, .2);
  margin-bottom: 20px;
  transition: transform .45s var(--ease), background .35s ease;
}
.mvv-card:hover .mvv-icon {
  transform: scale(1.08) rotate(-5deg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}
.mvv-icon svg {
  width: 25px; height: 25px;
  stroke: var(--color-primary); fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .35s ease;
  overflow: visible;
}
.mvv-card:hover .mvv-icon svg { stroke: #fff; }
.mvv-icon svg * { transform-origin: 12px 12px; }

/* Misión — la diana se cierra sobre el centro */
.mvv-card:hover .icon-target .ring-out { animation: diana 1.5s var(--ease) infinite; }
.mvv-card:hover .icon-target .ring-mid { animation: diana 1.5s var(--ease) .18s infinite; }
.mvv-card:hover .icon-target .ring-dot { fill: #fff; animation: latido 1.5s var(--ease) infinite; }
@keyframes diana {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.76); opacity: .55; }
}
@keyframes latido {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

/* Visión — el ojo parpadea y la pupila se dilata */
.mvv-card:hover .icon-eye .eye-lid { animation: parpadeo 2.4s ease-in-out infinite; }
.mvv-card:hover .icon-eye .eye-iris { animation: pupila 2.4s ease-in-out infinite; }
@keyframes parpadeo {
  0%, 44%, 56%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(.08); }
}
@keyframes pupila {
  0%, 44%, 56%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.7); opacity: 0; }
}

/* Filosofía — la aguja de la brújula busca el norte */
.mvv-card:hover .icon-compass .needle { animation: brujula 2.6s var(--ease) infinite; }
@keyframes brujula {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(160deg); }
  55% { transform: rotate(110deg); }
  75% { transform: rotate(135deg); }
}
.mvv-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.mvv-card p { margin: 0; font-size: .95rem; }

/* ===== Bloque de presentación: texto + foto ===== */
.about-feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 78px;
}
.about-copy .lead-text { font-size: 1.12rem; margin-bottom: 18px; }
/* Énfasis dentro de párrafos de contenido */
.about-copy strong,
.grid-2 p strong { color: var(--color-primary-dark); font-weight: 600; }

.about-points {
  list-style: none;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: .95rem;
  color: var(--color-text-muted);
  transition: transform .3s var(--ease);
}
.about-points li:hover { transform: translateX(5px); }
.about-points li strong { color: var(--color-text); font-weight: 600; }
.about-points svg {
  flex-shrink: 0;
  width: 34px; height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: var(--color-accent-soft);
  border: 1px solid rgba(47, 155, 240, .2);
  stroke: var(--color-primary); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: background .35s ease, stroke .35s ease;
}
.about-points li:hover svg { background: var(--color-primary); stroke: #fff; }

/* Foto con marco y sello de experiencia */
.about-media {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: visible;
}
.about-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
/* marco azul desplazado, detalle de diseño */
.about-media::before {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  opacity: .38;
  z-index: 0;
}
.about-badge {
  position: absolute;
  left: -26px; bottom: 26px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 17px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 14px 34px rgba(11, 30, 65, .34);
}
.about-badge-n {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.about-badge-t {
  font-size: .76rem;
  line-height: 1.32;
  color: rgba(214, 231, 250, .92);
}

/* ===== Sectores con imagen ===== */
.sectors-head { margin-top: 78px; }
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sector-tile {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink-800);
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.sector-tile:hover {
  transform: translateY(-9px);
  box-shadow: var(--shadow-lg);
}
.sector-tile img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease), filter .5s ease;
}
.sector-tile:hover img { transform: scale(1.07); }
/* velo azul de marca sobre la foto, para que todas se vean del mismo sistema */
.sector-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(6, 12, 24, .30) 46%, rgba(6, 12, 24, .90) 100%),
    linear-gradient(180deg, rgba(22, 87, 204, .10), rgba(11, 53, 133, .20));
  transition: opacity .5s ease;
}
.sector-tile-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 26px 24px 24px;
  color: #fff;
}
.sector-kicker {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9fd2ff;
  background: rgba(47, 155, 240, .18);
  border: 1px solid rgba(159, 210, 255, .34);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 11px;
  backdrop-filter: blur(4px);
}
.sector-tile h4 {
  color: #fff;
  font-size: 1.14rem;
  margin-bottom: 7px;
}
.sector-tile p {
  margin: 0;
  font-size: .87rem;
  line-height: 1.55;
  color: rgba(221, 234, 249, .88);
}

/* Cierre que abre explícitamente a cualquier sector */
.sectors-note {
  margin: 30px auto 0;
  max-width: 780px;
  text-align: center;
  font-size: .96rem;
  color: var(--color-text-muted);
  padding: 20px 26px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px dashed rgba(47, 155, 240, .34);
}

/* ===== Tarjetas de valores ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.value-card {
  --v: var(--color-primary);
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .35s ease;
}
/* un color propio por valor */
.v-1 { --v: #1657cc; }
.v-2 { --v: #0e8f9e; }
.v-3 { --v: #b8860f; }
.v-4 { --v: #12876f; }
.v-5 { --v: #5b52c8; }
.v-6 { --v: #2f9bf0; }

/* velo de color que sube desde abajo al pasar el cursor */
.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--v) 10%, transparent));
  opacity: 0;
  transition: opacity .45s ease;
}
.value-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--v);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--v) 22%, transparent);
  border-color: color-mix(in srgb, var(--v) 38%, transparent);
}
.value-card:hover::before { opacity: 1; }
.value-card:hover::after { transform: scaleX(1); }

.value-icon {
  position: relative;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--v) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--v) 22%, transparent);
  margin-bottom: 17px;
  transition: background .4s ease, transform .5s var(--ease);
}
.value-card:hover .value-icon {
  background: var(--v);
  transform: translateY(-3px) rotate(-7deg) scale(1.07);
}
.value-icon svg {
  width: 23px; height: 23px;
  stroke: var(--v); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .4s ease;
}
.value-card:hover .value-icon svg { stroke: #fff; }

.value-card h4 {
  position: relative;
  font-size: 1.04rem;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
  transition: color .35s ease;
}
.value-card:hover h4 { color: var(--v); }
.value-card p { position: relative; font-size: .87rem; margin: 0; line-height: 1.6; }

/* ===== Subtítulos ===== */
.subhead {
  font-size: 1.55rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.subhead::before {
  content: "";
  width: 5px; height: 26px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
}
.subhead-lead { max-width: 660px; margin-bottom: 36px; }

/* ===== Metodología ===== */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin: 0 0 62px;
}
.steps li {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s ease;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.steps li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(47, 155, 240, .3);
}
.steps li:hover::after { transform: scaleY(1); }
.step-n {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-accent);
  font-size: 1.25rem;
  letter-spacing: -.02em;
}
.step-t { font-size: .93rem; color: var(--color-text); font-weight: 500; line-height: 1.5; }

/* ===== Listas ===== */
.check-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 36px;
  margin-bottom: 54px;
}
.check-list li {
  position: relative;
  padding-left: 34px;
  font-size: .96rem;
  color: var(--color-text);
  transition: transform .3s var(--ease);
}
.check-list li:hover { transform: translateX(4px); }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 2px;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border-radius: 50%;
  font-size: .68rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(22, 87, 204, .28);
}

.dot-list { list-style: none; }
.dot-list li {
  position: relative;
  padding-left: 22px;
  font-size: .96rem;
  color: var(--color-text-muted);
  margin-bottom: 11px;
}
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(47, 155, 240, .16);
}

/* ===== Tarjeta de sectores ===== */
.sector-card {
  position: relative;
  background: linear-gradient(135deg, var(--ink-800), var(--color-primary-dark));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 42px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.sector-card::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 155, 240, .35), transparent 68%);
}
.sector-card h4 { color: #fff; margin-bottom: 12px; font-size: 1.2rem; position: relative; }
.sector-card p { color: rgba(214, 231, 250, .88); margin: 0; position: relative; }

/* ===== Dirección técnica ===== */
.doctor-card {
  display: flex;
  gap: 34px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 46px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 62px;
  transition: box-shadow .45s var(--ease);
}
.doctor-card:hover { box-shadow: var(--shadow-md); }
.doctor-avatar {
  flex-shrink: 0;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(22, 87, 204, .34);
}
.doctor-info h3 { margin-bottom: 5px; font-size: 1.4rem; }
.doctor-role {
  color: var(--color-accent);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 16px;
}

/* ===== Línea de tiempo (alterna) ===== */
/* Ocupa todo el ancho del contenedor para que sus bordes coincidan con la
   tarjeta de dirección técnica y las listas de especialización. */
.timeline {
  position: relative;
  margin: 0 0 62px;
}
/* Línea central de la que cuelgan las tarjetas */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 4px; bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent), transparent);
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 46px 22px 0;
}
/* Las tarjetas del lado derecho suben para entrelazarse con las de la
   izquierda: sin esto cada una deja un hueco vacío enfrente. */
.tl-item:nth-child(even) {
  margin-left: 50%;
  margin-top: -98px;
  padding: 0 0 22px 46px;
}
.tl-item:last-child { padding-bottom: 0; }

/* Punto sobre la línea */
.tl-dot {
  position: absolute;
  right: -7px; top: 28px;
  z-index: 2;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tl-item:nth-child(even) .tl-dot { left: -7px; right: auto; }
.tl-item:hover .tl-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(47, 155, 240, .18);
}

/* --- Tarjeta --- */
.tl-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .35s ease;
}
.tl-item:hover .tl-card {
  transform: translateY(-4px);
  border-color: rgba(47, 155, 240, .38);
  box-shadow: var(--shadow-md);
}

.tl-icono {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  border: 1px solid rgba(47, 155, 240, .22);
  display: flex; align-items: center; justify-content: center;
  transition: background .4s ease, border-color .4s ease, transform .4s var(--ease);
}
.tl-icono svg {
  width: 21px; height: 21px;
  stroke: var(--color-primary); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .4s ease;
}
.tl-item:hover .tl-icono {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-color: transparent;
  transform: rotate(-6deg) scale(1.06);
}
.tl-item:hover .tl-icono svg { stroke: #fff; }

/* El texto siempre va a la izquierda: solo alterna la posición de la tarjeta */
.tl-cuerpo { flex: 1; min-width: 0; }
.tl-date {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-primary);
  background: var(--color-accent-soft);
  border: 1px solid rgba(47, 155, 240, .24);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tl-card h4 {
  font-size: 1.04rem;
  margin-bottom: 4px;
  line-height: 1.35;
}
.tl-card p { margin: 0; font-size: .9rem; }

/* Distintivo del puesto vigente.
   Va dentro de .tl-cuerpo para poder fluir junto a la fecha en pantallas
   angostas; en escritorio se ancla a la esquina de .tl-card (posicionada). */
.tl-actual {
  position: absolute;
  top: 16px; right: 18px;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  padding: 5px 11px;
  border-radius: 999px;
  animation: latido-actual 2.8s ease-out infinite;
}
@keyframes latido-actual {
  0%   { box-shadow: 0 0 0 0 rgba(47, 155, 240, .5); }
  70%  { box-shadow: 0 0 0 10px rgba(47, 155, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 155, 240, 0); }
}

/* Entrada: cada tarjeta llega desde su propio lado.
   Necesita más peso que [data-reveal].is-visible, que impone transform:none. */
.tl-item[data-reveal] { transform: translateX(-28px); }
.tl-item:nth-child(even)[data-reveal] { transform: translateX(28px); }
.tl-item[data-reveal].is-visible,
.tl-item:nth-child(even)[data-reveal].is-visible { transform: none; }

.spec-grid h4 { margin-bottom: 16px; color: var(--color-primary); font-size: 1.08rem; }

/* ===== Servicios (acordeón) ===== */
.serv-intro {
  max-width: 620px;
  margin: -22px auto 38px;
  text-align: center;
  font-size: 1rem;
}

/* Azul metálico oscuro: separa la sección del resto de la página y hace
   que las seis líneas se lean como un mismo bloque de servicios. */
.serv-acordeon {
  max-width: 940px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(760px 420px at 88% -10%, rgba(47, 155, 240, .3), transparent 62%),
    linear-gradient(140deg, var(--ink-900) 0%, var(--color-primary-dark) 58%, #1a5fbe 100%);
  box-shadow: var(--shadow-lg);
}

.serv-item { position: relative; }
.serv-item + .serv-item { border-top: 1px solid rgba(255, 255, 255, .14); }

/* barra de acento que aparece en la línea activa */
.serv-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .45s var(--ease);
}
.serv-item.is-open::before { transform: scaleY(1); }

/* --- Cabecera clicable --- */
.serv-cabecera { margin: 0; }
.serv-boton {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 30px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .35s ease;
}
.serv-boton:hover { background: rgba(255, 255, 255, .06); }
.serv-boton:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -3px;
}
.serv-item.is-open .serv-boton { background: rgba(255, 255, 255, .09); }

.serv-letra {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #cfe4fb;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.08rem;
  backdrop-filter: blur(6px);
  transition: background .4s ease, color .4s ease, transform .45s var(--ease), border-color .4s ease;
}
.serv-boton:hover .serv-letra { transform: scale(1.05); }
.serv-item.is-open .serv-letra {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 87, 204, .3);
}

.serv-titulo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.serv-titulo strong {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  transition: color .3s ease;
}
.serv-boton:hover .serv-titulo strong,
.serv-item.is-open .serv-titulo strong { color: #9fd2ff; }
.serv-titulo > span {
  font-size: .88rem;
  line-height: 1.5;
  color: rgba(198, 220, 245, .8);
}

.serv-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.serv-conteo {
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9fd2ff;
  background: rgba(47, 155, 240, .18);
  border: 1px solid rgba(159, 210, 255, .32);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}
.serv-item.is-open .serv-conteo {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .42);
  color: #fff;
}
.serv-chevron {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: center;
  transition: transform .45s var(--ease), background .35s ease, border-color .35s ease;
}
.serv-chevron svg {
  width: 17px; height: 17px;
  stroke: #cfe4fb; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .35s ease;
}
.serv-item.is-open .serv-chevron {
  transform: rotate(180deg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-color: transparent;
}
.serv-item.is-open .serv-chevron svg { stroke: #fff; }

/* --- Cuerpo desplegable ---
   El truco de grid 0fr → 1fr anima la altura sin medirla con JS. */
.serv-cuerpo {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.serv-item.is-open .serv-cuerpo { grid-template-rows: 1fr; }
.serv-interior { overflow: hidden; }

.serv-lista {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  padding: 4px 30px 28px 96px;
  margin: 0;
}
.serv-lista li {
  position: relative;
  padding-left: 26px;
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(219, 233, 250, .92);
}
.serv-lista li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(47, 155, 240, .26);
  border: 1px solid rgba(159, 210, 255, .5);
}
.serv-lista li::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4aa8f5;
}

/* ===== Programas ===== */
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 62px;
}
.program-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .35s ease;
}
.program-card:hover {
  transform: translateY(-9px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(47, 155, 240, .42);
}
/* La tarjeta de programas a la medida ocupa el espacio sobrante de la fila */
.program-card-ancha { grid-column: span 2; }

/* --- Imagen --- */
/* Altura fija en vez de proporción: así la tarjeta ancha no dispara
   el alto de toda la fila y las imágenes quedan parejas entre tarjetas. */
.program-media {
  position: relative;
  display: block;
  height: 215px;
  overflow: hidden;
  background: var(--ink-800);
}
.program-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease);
}
.program-card:hover .program-media img { transform: scale(1.07); }
/* velo azul de marca, para que todas las fotos se lean como un sistema */
.program-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(6, 12, 24, .55) 100%),
    linear-gradient(180deg, rgba(22, 87, 204, .12), rgba(11, 53, 133, .2));
}
/* Marcador para los programas que aún no tienen foto */
.program-media-vacia {
  background:
    radial-gradient(560px 300px at 70% 10%, rgba(47, 155, 240, .3), transparent 62%),
    linear-gradient(140deg, var(--ink-900), var(--color-primary-dark));
}
.program-media-vacia::after { background: none; }

/* Programas a la medida: ilustración de controles deslizantes.
   Es un dibujo, no una foto: se muestra completo y sin el zoom. */
.program-media-medida img {
  object-fit: contain;
  padding: 26px 34px 26px 30px;
}
.program-card:hover .program-media-medida img { transform: none; }

/* --- Icono sobre la imagen --- */
.program-icon {
  position: absolute;
  left: 20px; bottom: 20px;
  z-index: 2;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 8px 22px rgba(6, 12, 24, .35);
  backdrop-filter: blur(6px);
  transition: background .4s ease, transform .45s var(--ease);
}
.program-card:hover .program-icon {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  transform: translateY(-4px) rotate(-6deg) scale(1.06);
}
.program-icon svg {
  width: 24px; height: 24px;
  stroke: var(--color-primary); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .4s ease;
}
.program-card:hover .program-icon svg { stroke: #fff; }
/* En las tarjetas sin foto el icono se centra y crece */
.program-media-vacia .program-icon {
  left: 50%; bottom: 50%;
  transform: translate(-50%, 50%);
  width: 68px; height: 68px;
  border-radius: 20px;
}
.program-card:hover .program-media-vacia .program-icon {
  transform: translate(-50%, 50%) rotate(-6deg) scale(1.06);
}
.program-media-vacia .program-icon svg { width: 30px; height: 30px; }

/* Con ilustración de fondo el icono vuelve a la esquina, como en las
   tarjetas con foto: centrado se montaría sobre los deslizadores. */
.program-media-medida .program-icon {
  left: 20px; bottom: 20px;
  transform: none;
  width: 50px; height: 50px;
  border-radius: 15px;
}
.program-card:hover .program-media-medida .program-icon {
  transform: translateY(-4px) rotate(-6deg) scale(1.06);
}
.program-media-medida .program-icon svg { width: 24px; height: 24px; }

/* --- Contenido --- */
.program-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 24px 24px;
}
.program-card h3 {
  font-size: 1.08rem;
  margin-bottom: 9px;
  transition: color .3s ease;
}
.program-card:hover h3 { color: var(--color-primary); }
.program-card p {
  font-size: .88rem;
  margin: 0 0 18px;
  line-height: 1.6;
}
.program-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: .87rem;
  font-weight: 600;
  color: var(--color-primary);
}
.program-cta svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.program-card:hover .program-cta svg { transform: translateX(5px); }

/* ===== Chips ===== */
.chip-list { display: flex; flex-wrap: wrap; gap: 13px; }
.chip-list.center { justify-content: center; }
.chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-primary-dark);
  font-size: .87rem;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s ease, color .3s ease, box-shadow .3s ease;
  cursor: default;
}
.chip:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink-900);
  color: rgba(196, 214, 236, .74);
  padding-top: 62px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.footer-brand-mark { display: flex; align-items: center; gap: 13px; }
.footer-brand-mark .brand-mark img { filter: drop-shadow(0 2px 7px rgba(0,0,0,.6)); }
.footer-brand-mark .brand-name { color: #fff; }
.footer-brand-mark .brand-sub { color: rgba(160, 190, 224, .6); }
.footer-brand p {
  max-width: 340px;
  margin-top: 16px;
  font-size: .9rem;
  color: rgba(163, 187, 214, .62);
}
.footer-correo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  font-size: .92rem;
  color: rgba(207, 228, 251, .92);
  transition: color .25s ease;
}
.footer-correo svg {
  width: 18px; height: 18px;
  stroke: var(--color-accent); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .25s ease;
}
.footer-correo:hover { color: #fff; }
.footer-correo:hover svg { stroke: #fff; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a {
  font-family: var(--font-heading);
  font-size: .9rem;
  color: rgba(196, 214, 236, .74);
  transition: color .25s ease, transform .25s var(--ease);
}
.footer-links a:hover { color: #fff; transform: translateY(-2px); }
.footer-bottom {
  text-align: center;
  padding: 22px 0;
  font-size: .8rem;
  color: rgba(140, 166, 196, .5);
}
.footer-bottom p { margin: 0; }
.footer-credits {
  margin-top: 7px !important;
  font-size: .72rem;
  color: rgba(140, 166, 196, .38);
}
.footer-credits a { color: rgba(159, 210, 255, .6); text-decoration: underline; }
.footer-credits a:hover { color: #9fd2ff; }

/* ===== Volver arriba ===== */
.back-to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(22, 87, 204, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s var(--ease), visibility .35s ease, box-shadow .35s ease;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(22, 87, 204, .5); }
.back-to-top svg {
  width: 21px; height: 21px;
  stroke: #fff; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1100px) {
  .main-nav { gap: 20px; }
}

@media (max-width: 980px) {
  .grid-2, .mvv-grid, .steps, .check-list { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .sector-tile img { height: 290px; }
  .about-feature { grid-template-columns: 1fr; gap: 52px; }
  .about-media { max-width: 560px; }
  .about-media::before { inset: 16px -16px -16px 16px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 660px; }
  .hero-logo { order: -1; margin-bottom: 22px; }
  .hero-logo-img { max-width: 290px; }
}

/* La línea alterna se vuelve una sola columna antes de que las tarjetas se estrechen */
@media (max-width: 860px) {
  .timeline::before { left: 7px; transform: none; }
  .tl-item,
  .tl-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    padding: 0 0 20px 34px;
  }
  .tl-dot,
  .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
  .tl-item[data-reveal],
  .tl-item:nth-child(even)[data-reveal] { transform: translateY(22px); }
}

/* El menú pasa a hamburguesa antes de chocar con el logo */
@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 80px; left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 26px 22px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform .38s var(--ease), opacity .3s ease, visibility .3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: 16px 0; border-bottom: 1px solid var(--color-border); font-size: 1rem; }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .main-nav a:last-child { border-bottom: none; }
  /* En el menú desplegable el botón se separa y ocupa todo el ancho */
  .nav-cta {
    justify-content: center;
    margin-top: 14px;
    padding: 15px 20px;
    border-bottom: none !important;
  }
  .nav-toggle { display: flex; }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  /* En 2 columnas la tarjeta ancha ya no sobra: vuelve a ocupar una sola */
  .program-card-ancha { grid-column: span 2; }
}

/* Celulares */
@media (max-width: 720px) {
  .grid-2, .mvv-grid, .steps, .check-list, .values-grid, .program-grid {
    grid-template-columns: 1fr;
  }
  /* El acordeón se reordena: el conteo baja y la lista pasa a una columna */
  .serv-boton { flex-wrap: wrap; gap: 14px; padding: 20px; }
  .serv-titulo { flex: 1 1 auto; min-width: 0; }
  .serv-meta { order: 3; width: 100%; justify-content: space-between; }
  .serv-lista { grid-template-columns: 1fr; padding: 0 20px 24px; gap: 11px; }
  .program-card-ancha { grid-column: span 1; }
  .sectors-grid { grid-template-columns: 1fr; gap: 20px; }
  .sector-tile img { height: 250px; }
  .sectors-head { margin-top: 56px; }
  .about-feature { gap: 42px; margin-bottom: 56px; }
  .about-copy .lead-text { font-size: 1.05rem; }
  /* El sello desplazado se sale de pantalla en celular: se centra bajo la foto.
     Debe quedar posicionado para que su z-index gane a la imagen (z-index:1). */
  .about-media::before { display: none; }
  .about-badge {
    position: relative;
    left: auto; bottom: auto;
    z-index: 2;
    margin: -32px auto 0;
    width: fit-content;
    padding: 14px 22px;
  }
  .doctor-card { flex-direction: column; padding: 34px 26px; align-items: center; }
  .doctor-info { text-align: left; }

  .hero { padding: 140px 0 72px; }
  .hero-logo-img { max-width: 230px; }
  .hero-actions { gap: 12px; margin-bottom: 46px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .hero-stats dt { font-size: 1.8rem; }

  .section { padding: 70px 0; }
  .section-head { margin-bottom: 40px; }
  .sector-card { padding: 30px 26px; }
  .value-card { padding: 26px 24px; }
  .subhead { font-size: 1.35rem; }

  .footer-inner { flex-direction: column; }
  .footer-links { gap: 15px 26px; }
  .back-to-top { right: 16px; bottom: 16px; }
}

/* Celulares pequeños */
@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-lead { font-size: 1rem; }
  .hero-logo-img { max-width: 195px; }
  .hero-stats { grid-template-columns: 1fr; }
  .brand-name { font-size: .82rem; }
  .brand-sub { font-size: .55rem; letter-spacing: .28em; }
  .brand-mark { width: 38px; height: 38px; }
  .mvv-card { padding: 28px 24px; }
  .serv-letra { width: 40px; height: 40px; font-size: .96rem; }
  .serv-titulo strong { font-size: 1rem; }
  .tl-card { padding: 18px 20px; gap: 13px; }
  /* La etiqueta pasa a fluir junto al chip de fecha en vez de anclarse
     a la esquina, donde en pantallas angostas aplastaba el texto. */
  .tl-actual {
    position: static;
    display: inline-block;
    margin: 0 0 10px 8px;
    vertical-align: top;
  }
}

/* Accesibilidad: respetar la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-logo-img { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
