/* ═══════════════════════════════════════════════════════════════
   INSTITUTO DE INVESTIGACIONES JAGÜEY — ESTILOS GLOBALES
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables de diseño ── */
:root {
  --color-rojo:      #db2626;
  --color-azul:      #0c7bb5;
  --color-amarillo:  #f4b840;
  --color-gris:      #585a5a;
  --color-negro:     #000000;
  --color-blanco:    #ffffff;
  --color-fondo:     #f5f5f5;
  --color-navbar-sep: #c8c8c8;

  --font-base: 'Lexend', sans-serif;

  --navbar-height: 72px;
  --topbar-height: 36px;

  --shadow-card: 0 8px 40px rgba(0,0,0,0.13);
  --radius-card: 14px;
  --radius-btn:  4px;

  --transition: 0.22s ease;
}

/* ── Reset base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--color-gris);
  background: var(--color-blanco);
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--color-rojo);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 100;
}

.topbar__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.topbar__item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-blanco);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 0 16px;
  white-space: nowrap;
}

.topbar__divider {
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.topbar__icon {
  width: 13px;
  height: 13px;
  stroke: var(--color-blanco);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.navbar {
  background: var(--color-blanco);
  height: var(--navbar-height);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 99;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.navbar__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Logo en navbar */
.navbar__logo-link {
  flex-shrink: 0;
  margin-right: 28px;
}

.navbar__logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Menú principal */
.navbar__menu {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.navbar__separator {
  width: 1px;
  height: 18px;
  background: var(--color-navbar-sep);
  flex-shrink: 0;
}

/* Items del menú */
.navbar__item {
  position: relative;
  flex-shrink: 0;
}

.navbar__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 13px;
  height: var(--navbar-height);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-negro);
  white-space: nowrap;
  transition: color var(--transition);
}

.navbar__link:hover {
  color: var(--color-rojo);
}

/* Item activo */
.navbar__item--active .navbar__link,
.navbar__link--active {
  color: var(--color-rojo) !important;
}

/* Caret de dropdown */
.navbar__caret {
  width: 13px;
  height: 13px;
  stroke: var(--color-rojo);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.navbar__item--dropdown:hover .navbar__caret,
.navbar__item--open .navbar__caret {
  transform: rotate(180deg);
}

/* Dropdown */
.navbar__dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: var(--color-blanco);
  border-top: 3px solid var(--color-rojo);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 210px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}

.navbar__item--dropdown:hover .navbar__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar__dropdown li {
  border-bottom: 1px solid #f0f0f0;
}

.navbar__dropdown li:last-child {
  border-bottom: none;
}

.navbar__dropdown-link {
  display: block;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gris);
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
}

.navbar__dropdown-link:hover {
  background: #faf0f0;
  color: var(--color-rojo);
  padding-left: 24px;
}

/* Botón hamburguesa (solo mobile) */
.navbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  color: var(--color-negro);
}

.navbar__hamburger svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-negro);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--topbar-height) - var(--navbar-height));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  /* padding-bottom = aire entre botones y tarjeta flotante (65px pedidos) + mitad card (~60px) */
  padding-bottom: calc(65px + 60px);
}

/* Imagen de fondo */
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('/static/img/hero-banner.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Overlay oscuro degradado a la izquierda */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.72) 35%,
    rgba(0, 0, 0, 0.42) 60%,
    rgba(0, 0, 0, 0.10) 100%
  );
  z-index: 1;
}

/* Contenido del hero */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Logo grande en el hero */
.hero__logo-wrap {
  margin-bottom: 28px;
}

.hero__logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

/* Título hero */
.hero__title {
  font-family: var(--font-base);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-blanco);
  margin-bottom: 22px;
  max-width: 600px;
}

.hero__title--accent {
  color: var(--color-amarillo);
}

/* Subtítulo hero */
.hero__subtitle {
  font-family: var(--font-base);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255,255,255,0.90);
  margin-bottom: 36px;
  max-width: 520px;
}

/* Botones CTA */
.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

/* Botón base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

/* Capa del Fill Sweep — pseudo-elemento que se desliza */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: var(--radius-btn);
}

.btn:hover::before {
  transform: translateX(0);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn__icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

/* ── Botón primario — rojo → sweep amarillo ── */
.btn--primary {
  background: var(--color-rojo);
  color: var(--color-blanco);
  border: 2px solid var(--color-rojo);
  box-shadow: 0 4px 18px rgba(219,38,38,0.35);
}

.btn--primary::before {
  background: var(--color-amarillo);
}

.btn--primary:hover {
  color: var(--color-negro);
  border-color: var(--color-amarillo);
  box-shadow: 0 6px 28px rgba(244,184,64,0.45);
}

/* ── Botón secundario — borde amarillo → sweep blanco, letras amarillas ── */
.btn--secondary {
  background: rgba(0,0,0,0.45);
  color: var(--color-blanco);
  border: 2px solid var(--color-amarillo);
  backdrop-filter: blur(4px);
}

.btn--secondary::before {
  background: var(--color-blanco);
}

.btn--secondary:hover {
  color: var(--color-amarillo);
  box-shadow: 0 6px 24px rgba(255,255,255,0.20);
}

/* ═══════════════════════════════════════════════════════════════
   TARJETA FLOTANTE — MODELO EDUCATIVO
   Estrategia: position absolute en la parte inferior del hero,
   centrada horizontalmente, con translateY(50%) para que quede
   exactamente 50% dentro del hero y 50% en diferenciadores.
   ═══════════════════════════════════════════════════════════════ */
.modelo-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  z-index: 20;
  background: var(--color-blanco);
  border-radius: var(--radius-card);
  /* Sombra más pronunciada para reforzar efecto flotante */
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.10),
    0 24px 56px rgba(0, 0, 0, 0.08);
  padding: 28px 40px 32px 40px;
  max-width: 900px;
  width: calc(100% - 64px);
}

.modelo-card__label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-gris);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.75;
}

.modelo-card__pillars {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  gap: 8px;
}

.modelo-card__pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding: 0 12px;
}

.modelo-card__pillar-divider {
  width: 1px;
  height: 52px;
  background: #e0e0e0;
  flex-shrink: 0;
  align-self: center;
}

.modelo-card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modelo-card__icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-gris);
}

.modelo-card__text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-negro);
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN DIFERENCIADORES
   La card mide ~120px de alto → la mitad = 60px.
   padding-top = 60px (mitad card) + 115px (separación visual pedida) = 175px
   ═══════════════════════════════════════════════════════════════ */
.diferenciadores {
  background: var(--color-blanco);
  padding-top: 175px;
  padding-bottom: 96px;
}

.diferenciadores__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Encabezado de sección reutilizable ── */
.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-header__title {
  font-family: var(--font-base);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-negro);
}

.section-header__title--accent {
  color: var(--color-rojo);
}

/* ── Grid de 4 cards ── */
.dif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* ── Card individual ── */
.dif-card {
  position: relative;
  background: var(--color-blanco);
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 0 24px 32px 24px;
  /* Espacio arriba para el círculo que sobresale */
  padding-top: 56px;
  text-align: center;
  transition: background 0.30s ease;
  cursor: default;
  overflow: visible;
}

/* Fondo gris en hover — igual que Vistario */
.dif-card:hover {
  background: #f2f2f2;
}

/* ── Círculo rojo con ícono (sobresale por encima) ── */
.dif-card__icon-wrap {
  position: absolute;
  /* Centrado horizontal */
  left: 50%;
  transform: translateX(-50%) translateY(0);
  /* Sobresale: la mitad del círculo fuera de la card */
  top: -36px;

  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(219, 38, 38, 0.30);

  /* Animación: baja suavemente en hover */
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
}

/* Al hacer hover en la CARD, el círculo baja */
.dif-card:hover .dif-card__icon-wrap {
  /* Sigue centrado en X, pero baja 8px en Y */
  transform: translateX(-50%) translateY(8px);
  box-shadow: 0 10px 28px rgba(219, 38, 38, 0.22);
}

.dif-card__icon {
  width: 28px;
  height: 28px;
  stroke: var(--color-blanco);
  stroke-width: 1.8;
  flex-shrink: 0;
}

/* ── Cuerpo de la card ── */
.dif-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dif-card__title {
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-negro);
  line-height: 1.3;
}

.dif-card__text {
  font-family: var(--font-base);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-gris);
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN PROGRAMAS ACADÉMICOS
   ═══════════════════════════════════════════════════════════════ */
.programas {
  background: #f1f1f1;
  padding: 80px 0 88px;
}

.programas__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Supertítulo encima del heading */
.section-header__super {
  display: block;
  font-family: var(--font-base);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gris);
  text-align: center;
  margin-bottom: 14px;
  opacity: 0.75;
}

.section-header__title--dark {
  color: var(--color-negro);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
}

/* ── Grid 3 columnas × 2 filas ── */
.prog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
  margin-bottom: 48px;
}

/* ════════════════════════════════
   CARDS DE CATEGORÍA (roja/azul)
   ════════════════════════════════ */
.prog-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: 12px;
  padding: 40px 24px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  /* Asegura mismo alto que las cards de imagen */
  min-height: 340px;
  border-top: 3px solid transparent;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.32s ease,
              border-color 0.28s ease;
}

/* Pseudo-elemento para el zoom del fondo (color sólido que escala) */
.prog-cat::before {
  content: '';
  position: absolute;
  inset: -6px;          /* ligeramente más grande que la card */
  background: inherit;  /* hereda el color de fondo */
  border-radius: inherit;
  z-index: 0;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.28s ease;
  opacity: 0;
}

/* Overlay de brillo suave */
.prog-cat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  border-radius: 12px;
  z-index: 1;
  transition: background 0.28s ease;
  pointer-events: none;
}

/* Todos los hijos de prog-cat por encima de los pseudos */
.prog-cat > * {
  position: relative;
  z-index: 2;
}

.prog-cat:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.22);
  border-top-color: rgba(255,255,255,0.85);
}

.prog-cat:hover::before {
  transform: scale(1.06);
  opacity: 1;
}

.prog-cat:hover::after {
  background: rgba(255,255,255,0.07);
}

.prog-cat--red  { background: var(--color-rojo); }
.prog-cat--blue { background: var(--color-azul); }

.prog-cat__title {
  font-family: var(--font-base);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-blanco);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.1;
  transition: font-weight 0.01s, letter-spacing 0.28s ease;
}

/* Hover: título más bold (900) + tracking más apretado para compensar ancho */
.prog-cat:hover .prog-cat__title {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.prog-cat__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  transition: border-color 0.24s, background 0.24s, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

.prog-cat:hover .prog-cat__arrow {
  border-color: var(--color-blanco);
  background: rgba(255,255,255,0.18);
  transform: scale(1.12);
}

.prog-cat__icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-blanco);
  stroke-width: 2.2;
}

/* ════════════════════════════════
   CARDS DE PROGRAMA (con imagen)
   ════════════════════════════════ */
.prog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-blanco);
  border-radius: 12px;
  /* overflow: visible para que el badge pueda sobresalir */
  overflow: visible;
  text-decoration: none;
  border: 1px solid #e4e4e4;
  position: relative;
  cursor: pointer;
  /* Transition base */
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.32s ease,
              border-color 0.22s ease,
              border-top-width 0.01s;
}

/* La imagen sí debe recortar su contenido */
.prog-card__img-wrap {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* ── Hover elegante: lift + sombra profunda + imagen zoom ── */
.prog-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.10),
    0 32px 56px rgba(0,0,0,0.08);
}

/* Imagen: zoom suave en hover */
.prog-card__img-wrap {
  position: relative;
  width: 100%;
  height: 185px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.prog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.prog-card:hover .prog-card__img {
  transform: scale(1.07);
}

/* Badge RVOE — flotante 50% imagen / 50% cuerpo
   Está como hermano directo de img-wrap (fuera del overflow:hidden),
   posicionado absolute respecto a .prog-card.
   La imagen mide 185px → el centro del badge = 185px - 24px (radio) = 161px desde top de card.
*/
.prog-card__badge {
  position: absolute;
  /* top = altura imagen (185px) - radio badge (24px) = 161px */
  top: 161px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-base);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-blanco);
  z-index: 10;
  /* Borde blanco para reforzar el efecto flotante */
  box-shadow:
    0 0 0 3px var(--color-blanco),
    0 4px 14px rgba(0,0,0,0.22);
  transition: transform 0.30s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.30s ease;
}

.prog-card:hover .prog-card__badge {
  transform: scale(1.12);
  box-shadow:
    0 0 0 3px var(--color-blanco),
    0 6px 20px rgba(0,0,0,0.28);
}

.prog-card__badge--red  { background: var(--color-rojo); }
.prog-card__badge--blue { background: var(--color-azul); }

/* Cuerpo de la card
   padding-top = 24px base + 24px (radio badge) = 48px para que el texto
   arranque debajo del badge que sobresale 24px dentro del cuerpo
*/
.prog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px 20px 20px 20px;
  gap: 10px;
}

.prog-card__title {
  font-family: var(--font-base);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}

.prog-card__title--red  { color: var(--color-rojo); }
.prog-card__title--blue { color: var(--color-azul); }

.prog-card__desc {
  font-family: var(--font-base);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-gris);
  flex: 1;
}

/* Separador */
.prog-card__separator {
  width: 100%;
  height: 1px;
  background: #e8e8e8;
  margin: 4px 0;
}

/* Pie: Modalidad | Duración */
.prog-card__meta {
  display: flex;
  align-items: center;
  gap: 0;
}

.prog-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.prog-card__meta-divider {
  width: 1px;
  height: 32px;
  background: #e0e0e0;
  flex-shrink: 0;
  margin: 0 14px;
}

.prog-card__meta-label {
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prog-card__meta-value {
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 600;
}

.prog-card__meta-label--red,
.prog-card__meta-value--red  { color: var(--color-rojo); }

.prog-card__meta-label--blue,
.prog-card__meta-value--blue { color: var(--color-azul); }

/* ──────────────────────────────────────────────
   Botón "Detalles del programa" (estado Active)
   Oculto por defecto; visible al hacer click en la card
   ────────────────────────────────────────────── */
.prog-card__btn {
  display: none;  /* oculto en default/hover */
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  margin-top: 4px;
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-negro);
  background: transparent;
  border: 2px solid var(--color-amarillo);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.prog-card__btn:hover {
  background: var(--color-amarillo);
  color: var(--color-negro);
}

.prog-card__btn-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ── Estado ACTIVE de la prog-card ── */
.prog-card--active {
  /* Lift + sombra más pronunciada */
  transform: translateY(-8px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.05),
    0 16px 40px rgba(0,0,0,0.12),
    0 36px 64px rgba(0,0,0,0.08);
  /* Borde superior de acento */
  border-top: 3px solid var(--color-amarillo);
}

/* En estado active: ocultar meta, mostrar botón */
.prog-card--active .prog-card__meta {
  display: none;
}

.prog-card--active .prog-card__separator {
  display: none;
}

.prog-card--active .prog-card__btn {
  display: flex;
}

/* Badge en estado active: escala y eleva */
.prog-card--active .prog-card__badge {
  transform: scale(1.12);
  box-shadow:
    0 0 0 3px var(--color-blanco),
    0 6px 20px rgba(0,0,0,0.28);
}

/* ── CTA inferior ── */
.programas__cta {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Responsive tablet */
@media (max-width: 1024px) {
  .prog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Reordenar: categorías al inicio de cada bloque */
  .prog-cat--red  { order: -2; }
  .prog-cat--blue { order: 10; }
}

/* Responsive mobile */
@media (max-width: 640px) {
  .prog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .prog-cat {
    min-height: 180px;
  }

  .programas {
    padding: 60px 0 72px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: PERSPECTIVAS Y HALLAZGOS ACADÉMICOS — BLOG
   ═══════════════════════════════════════════════════════════════ */
.blog {
  background: #f2f2f2;
  padding: 96px 0 100px;
}

.blog__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.blog__header {
  margin-bottom: 56px;
}

.blog__title {
  font-family: var(--font-base);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--color-negro);
  text-align: center;
}

.blog__title--accent {
  color: var(--color-azul);
}

/* ── Grid 3 columnas ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 52px;
}

/* ════════════════════════════════════════════════════
   FLIP CARD — 3D card que gira en hover
   Perspectiva en el contenedor padre (.flip-card)
   El .flip-card__inner rota 180deg en hover.
   Frente y reverso usan backface-visibility: hidden.
   ════════════════════════════════════════════════════ */
.flip-card {
  perspective: 1100px;
  height: 420px;
  cursor: pointer;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.45, 0, 0.55, 1);
  border-radius: 10px;
}

/* Activa el giro al hacer hover sobre la card */
.flip-card:hover .flip-card__inner {
  transform: rotateY(180deg);
}

/* ── Cara compartida: frente y reverso ── */
.flip-card__front,
.flip-card__back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* ── FRENTE ── */
.flip-card__front {
  background: var(--color-blanco);
  border: 1px solid #e4e4e4;
  display: flex;
  flex-direction: column;
}

.flip-card__img-wrap {
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
}

.flip-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Imagen en escala de grises para estilo académico */
  filter: grayscale(100%);
  transition: transform 0.55s ease;
}

.flip-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.flip-card__post-title {
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-negro);
}

.flip-card__author {
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.flip-card__date {
  font-family: var(--font-base);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-top: auto;
}

/* ── REVERSO ── */
.flip-card__back {
  background: var(--color-blanco);
  border: 1px solid #e4e4e4;
  /* El reverso ya nace rotado 180° → al girar la card queda derecho */
  transform: rotateY(180deg);
  display: flex;
  align-items: stretch;
}

.flip-card__back-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 26px 26px;
  width: 100%;
}

.flip-card__back-title {
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-negro);
}

.flip-card__back-author {
  font-family: var(--font-base);
  font-size: 13.5px;
  font-weight: 600;
  color: #666;
}

.flip-card__back-excerpt {
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: #333;
  text-align: justify;
  flex: 1;
  /* Corte elegante si el texto es muy largo */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}

/* ── Botón "Leer completo" — amarillo → sweep rojo ── */
.btn--blog-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-base);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  /* Colores: fondo amarillo, texto blanco */
  background: var(--color-amarillo);
  color: var(--color-blanco);
  border: 2px solid var(--color-amarillo);
  box-shadow: 0 4px 16px rgba(244,184,64,0.35);
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, border-color 0.22s ease;
  margin-top: auto;
}

/* Sweep rojo que se desliza de izquierda a derecha */
.btn--blog-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-rojo);
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 6px;
}

.btn--blog-cta:hover::before {
  transform: translateX(0);
}

.btn--blog-cta:hover {
  color: var(--color-blanco);
  border-color: var(--color-rojo);
  box-shadow: 0 6px 24px rgba(219,38,38,0.35);
  transform: translateY(-2px);
}

.btn--blog-cta:hover .btn__icon {
  transform: translateX(3px);
}

/* ── Botón CTA azul — "Ir al blog" ── */
.btn--azul {
  background: var(--color-azul);
  color: var(--color-blanco);
  border: 2px solid var(--color-azul);
  box-shadow: 0 4px 18px rgba(12,123,181,0.30);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn--azul::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #0a6a9e; /* azul más oscuro para el sweep */
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: var(--radius-btn);
}

.btn--azul:hover::before {
  transform: translateX(0);
}

.btn--azul:hover {
  box-shadow: 0 6px 28px rgba(12,123,181,0.40);
  transform: translateY(-2px);
}

/* CTA inferior centrado */
.blog__cta {
  display: flex;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: LÍNEAS DE INVESTIGACIÓN
   Layout: 2 columnas (imagen izq. | contenido der.)
   ═══════════════════════════════════════════════════════════════ */
.investigacion {
  background: var(--color-blanco);
  padding: 100px 0 100px;
}

.investigacion__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* ── Columna izquierda: imagen ── */
.investigacion__img-col {
  position: relative;
  /* perspective para que el transform3d se sienta con profundidad */
  perspective: 1200px;
}

.investigacion__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
}

/* ── Animación de entrada — estado inicial (antes de aparecer) ──
   Parte: invisible, desplazada 48px hacia abajo, ligeramente
   escalada hacia adentro (0.92) con un leve rotateX (6deg)
   para dar sensación de profundidad 3D al surgir.
   El transform-style: preserve-3d viene del atributo style inline.
*/
.investigacion__img--anim {
  opacity: 0;
  /* Estado inicial: abajo, pequeña, inclinada */
  transform: translate3d(0px, 48px, 0px)
             scale3d(0.92, 0.92, 1)
             rotateX(6deg)
             rotateY(0deg)
             rotateZ(0deg)
             skew(0deg, 0deg) !important;
  transition:
    opacity   0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* ── Estado VISIBLE: IntersectionObserver añade esta clase ──
   El transform queda exactamente como el style inline declarado:
   translate3d(0,0,0) scale3d(1,1,1) rotateX(0) … → posición natural.
   !important necesario para sobreescribir el inline style solo en visible.
*/
.investigacion__img--anim.investigacion__img--visible {
  opacity: 1;
  transform: translate3d(0px, 0px, 0px)
             scale3d(1, 1, 1)
             rotateX(0deg)
             rotateY(0deg)
             rotateZ(0deg)
             skew(0deg, 0deg) !important;
}

/* ── Columna derecha: contenido ── */
.investigacion__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* Título */
.investigacion__title {
  font-family: var(--font-base);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--color-negro);
}

.investigacion__title--accent {
  color: var(--color-rojo);
}

/* Párrafo introductorio */
.investigacion__desc {
  font-family: var(--font-base);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-gris);
  max-width: 480px;
}

/* ── Stack de tarjetas ── */
.inv-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ──────────────────────────────────────────────────────────────
   INV-CARD — tarjeta flotante con outline rojo deslizante
   Técnica: 4 pseudo-elementos ::before independientes (uno por lado)
   no son posibles en CSS puro, así que usamos la técnica de
   4 gradientes con background-size + transition-delay individual
   aplicados mediante variables CSS en cada pseudo-elemento.

   Implementación robusta:
   - ::before dibuja el outline con 4 gradientes lineales
   - Cada gradiente tiene su propia transición con delay escalonado
     usando la función custom() no disponible en CSS puro, pero
     sí podemos animar cada background-size de forma independiente
     usando la propiedad background-size como lista separada por comas
     y asignando transition-delay a cada item de la lista.
   ────────────────────────────────────────────────────────────── */
.inv-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-blanco);
  border-radius: 12px;
  padding: 18px 20px;
  /* Sombra base suave — efecto flotante */
  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    0 6px 20px rgba(0,0,0,0.05);
  /* Lift en hover */
  transition:
    transform 0.30s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.30s ease;
  overflow: hidden;
}

/* Lift suave en hover */
.inv-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.07),
    0 14px 36px rgba(0,0,0,0.10);
}

/* Outline rojo eliminado por solicitud — hover mantiene solo lift + sombra */

/* Ícono */
.inv-card__icon-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.inv-card__icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-gris);
  stroke-width: 1.8;
  flex-shrink: 0;
}

/* Texto */
.inv-card__text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.inv-card__title {
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-negro);
}

.inv-card__sub {
  font-family: var(--font-base);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-gris);
}

/* CTA */
.investigacion__btn {
  margin-top: 6px;
  align-self: flex-start;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: DOCENTES-INVESTIGADORES
   ═══════════════════════════════════════════════════════════════ */
.docentes {
  background: var(--color-blanco);
  padding: 96px 0 100px;
}

.docentes__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Título */
.docentes__title {
  font-family: var(--font-base);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: var(--color-negro);
  text-align: center;
  margin-bottom: 80px; /* espacio para la foto que sobresale */
  line-height: 1.2;
}

.docentes__title--accent {
  color: var(--color-rojo);
}

/* Grid 3 columnas */
.docentes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* Espacio arriba para los avatares flotantes */
  margin-top: 60px;
}

/* ── Card individual ── */
.docente-card {
  position: relative;
  background: #f3f3f3;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 70px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 60px;
  /* Overflow visible para que el avatar sobresalga */
  overflow: visible;

  /* Lift suave en hover */
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    background 0.28s ease;
}

/* Fondo más claro + lift al hacer hover — igual que dif-cards */
.docente-card:hover {
  background: #ebebeb;
  transform: translateY(-6px);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.05),
    0 14px 36px rgba(0,0,0,0.09),
    0 28px 56px rgba(0,0,0,0.06);
}

/* ── Avatar flotante 50/50 ──
   position: absolute; top: -60px → mitad fuera de la card (arriba)
   Al hover la card sube 6px → el avatar sube con ella (es hijo absoluto)
   Adicionalmente el avatar baja 8px respecto a la card → efecto neto = sube 2px
   Esto genera la sensación de que "flota" y se acomoda suavemente.
*/
.docente-card__avatar-wrap {
  position: absolute;
  top: -60px;
  left: 50%;
  /* Estado inicial: centrado, en reposo */
  transform: translateX(-50%) translateY(0px);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--color-rojo);
  overflow: hidden;
  box-shadow:
    0 0 0 4px var(--color-blanco),
    0 8px 24px rgba(0,0,0,0.15);
  flex-shrink: 0;
  background: #e8e8e8;
  /* Transición suave con spring — igual que dif-card__icon-wrap */
  transition:
    transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.38s ease;
}

/* Al hover en la CARD: el avatar baja 8px respecto a la card */
.docente-card:hover .docente-card__avatar-wrap {
  transform: translateX(-50%) translateY(8px);
  box-shadow:
    0 0 0 4px var(--color-blanco),
    0 12px 32px rgba(219,38,38,0.20);
}

.docente-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Animación de entrada escalonada ──
   Las cards arrancan invisible + desplazadas hacia abajo.
   IntersectionObserver añade .docente-card--visible con delay por índice.
*/
.docente-card {
  opacity: 0;
  translate: 0 40px;
}

.docente-card.docente-card--visible {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity   0.60s cubic-bezier(0.22, 1, 0.36, 1),
    translate 0.60s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    background 0.28s ease;
}

/* Cuerpo */
.docente-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Nombre */
.docente-card__name {
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-negro);
  line-height: 1.25;
}

/* Cargo / especialidad */
.docente-card__role {
  font-family: var(--font-base);
  font-size: 11.5px;
  font-weight: 500;
  color: #777;
  line-height: 1.5;
}

/* Bio */
.docente-card__bio {
  font-family: var(--font-base);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.7;
  color: #555;
  text-align: justify;
  margin: 6px 0 4px;
}

/* ── Botón "Conocer trayectoria" — rojo → sweep amarillo ── */
.btn--docente {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-base);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 22px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  /* Colores base: rojo */
  background: var(--color-rojo);
  color: var(--color-blanco);
  border: 2px solid var(--color-rojo);
  box-shadow: 0 4px 14px rgba(219,38,38,0.28);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
              color 0.22s ease, border-color 0.22s ease;
  margin-top: 6px;
}

/* Sweep amarillo de izquierda a derecha */
.btn--docente::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-amarillo);
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 4px;
}

.btn--docente:hover::before {
  transform: translateX(0);
}

.btn--docente:hover {
  color: var(--color-negro);
  border-color: var(--color-amarillo);
  box-shadow: 0 6px 22px rgba(244,184,64,0.40);
  transform: translateY(-2px);
}

.btn--docente:hover .btn__icon {
  transform: translateX(3px);
}

/* CTA inferior */
.docentes__cta {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (max 1024px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .navbar__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar__menu {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--color-blanco);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 3px solid var(--color-rojo);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    padding-bottom: 12px;
  }

  .navbar__menu--open {
    display: flex;
  }

  .navbar__separator {
    display: none;
  }

  .navbar__item {
    width: 100%;
  }

  .navbar__link {
    height: auto;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    justify-content: space-between;
  }

  /* Dropdown en mobile */
  .navbar__dropdown {
    position: static;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: max-height 0.3s ease, visibility 0.3s;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    background: #fafafa;
    display: block;
  }

  .navbar__item--open .navbar__dropdown {
    visibility: visible;
    max-height: 300px;
  }

  .navbar__dropdown-link {
    padding-left: 36px;
  }

  /* Docentes en tablet: 1 columna + 2 columnas */
  .docentes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 24px;
  }

  /* Blog en tablet: 2 columnas */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  /* Investigación en tablet: una columna */
  .investigacion__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .investigacion__img {
    aspect-ratio: 16 / 9;
    max-height: 380px;
  }

  /* Hero en tablet */
  .hero__title {
    font-size: clamp(26px, 4.5vw, 40px);
  }

  .modelo-card {
    padding: 24px 28px 28px 28px;
  }

  .modelo-card__pillar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 0 8px;
  }

  /* Diferenciadores en tablet: 2 columnas */
  .dif-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 24px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (max 640px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --topbar-height: 0px;
  }

  .topbar {
    display: none; /* Ocultar topbar en móvil muy pequeño */
  }

  .hero {
    padding-bottom: 80px;
  }

  .hero__logo {
    height: 64px;
  }

  .hero__subtitle .hero__br {
    display: none;
  }

  .hero__ctas {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 13px 18px;
  }

  .modelo-card {
    width: calc(100% - 32px);
    padding: 20px 20px 24px 20px;
    /* Mantiene el 50/50 con translateX(-50%) translateY(50%) */
    transform: translateX(-50%) translateY(50%);
  }

  .modelo-card__pillars {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .modelo-card__pillar {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding: 0;
    width: 100%;
  }

  .modelo-card__pillar-divider {
    width: 100%;
    height: 1px;
  }

  .navbar__logo {
    height: 42px;
  }

  /* Docentes en mobile: 1 columna */
  .docentes-grid {
    grid-template-columns: 1fr;
    gap: 80px 0;
  }

  .docentes {
    padding: 72px 0 80px;
  }

  .docentes__title {
    margin-bottom: 40px;
  }

  /* Blog en mobile: 1 columna */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .flip-card {
    height: 400px;
  }

  .blog {
    padding: 72px 0 80px;
  }

  /* Investigación en mobile */
  .investigacion {
    padding: 72px 0;
  }

  .investigacion__inner {
    gap: 36px;
  }

  .investigacion__img {
    aspect-ratio: 4 / 3;
  }

  .investigacion__btn {
    width: 100%;
    justify-content: center;
  }

  /* Diferenciadores en mobile: 1 columna */
  .dif-grid {
    grid-template-columns: 1fr;
    gap: 52px 0;
  }

  .diferenciadores {
    /* En mobile la card apilada es más alta (~200px) → mitad = 100px */
    padding-top: calc(100px + 60px);
    padding-bottom: 64px;
  }
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN: PUBLICACIONES
   Carrusel horizontal con tabs de categoría
═══════════════════════════════════════════════════════ */

.publicaciones {
  background: #fff;
  padding: 80px 0 88px;
  position: relative;
}

/* Líneas decorativas top/bottom */
.publicaciones::before,
.publicaciones::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--color-rojo);
  position: absolute;
  left: 0; right: 0;
}
.publicaciones::before { top: 0; }
.publicaciones::after  { bottom: 0; }

.publicaciones__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Encabezado */
.publicaciones__header {
  margin-bottom: 32px;
}

.publicaciones__title {
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 800;
  color: #111;
  margin: 6px 0 0;
  letter-spacing: -0.5px;
}

.publicaciones__title--accent {
  color: var(--color-rojo);
}

/* ── TABS ── */
.pub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.pub-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 2px solid var(--color-rojo);
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.18s;
  white-space: nowrap;
}

.pub-tab:hover {
  background: rgba(219, 38, 38, 0.07);
  color: var(--color-rojo);
  transform: translateY(-2px);
}

.pub-tab--active {
  background: var(--color-rojo);
  color: #fff;
  border-color: var(--color-rojo);
}

.pub-tab--active:hover {
  background: #c01f1f;
  color: #fff;
  transform: none;
}

/* ── CARRUSEL WRAPPER ── */
.pub-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

/* Flechas */
.pub-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 2;
}

.pub-arrow svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.pub-arrow:hover:not(.pub-arrow--disabled) {
  border-color: var(--color-rojo);
  color: var(--color-rojo);
  box-shadow: 0 4px 14px rgba(219,38,38,.18);
  transform: scale(1.07);
}

.pub-arrow--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* Viewport del carrusel */
.pub-carousel {
  flex: 1;
  overflow: hidden;
}

/* Track deslizable */
.pub-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ── TARJETA DE LIBRO ── */
.pub-card {
  flex: 0 0 calc((100% - 120px) / 6); /* 6 visibles, 5 gaps de 24px */
  min-width: 140px;
  background: #fff;
  border: 1px solid #e4e4e8;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.28s, transform 0.28s;
  display: flex;
  flex-direction: column;
}

.pub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

/* Card oculta (filtro de categoría) */
.pub-card--hidden {
  display: none;
}

/* Imagen de portada */
.pub-card__img-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #f0f0f0;
}

.pub-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.pub-card:hover .pub-card__img {
  transform: scale(1.04);
}

/* Cuerpo de texto */
.pub-card__body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.pub-card__title {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.pub-card__author {
  font-size: 10.5px;
  color: #666;
  font-weight: 500;
  margin: 0;
}

.pub-card__price {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-rojo);
  letter-spacing: 0.3px;
}

/* Botón "Ver más" */
.btn--pub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 7px 14px;
  background: var(--color-rojo);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s, transform 0.18s, box-shadow 0.25s;
  align-self: flex-start;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  isolation: isolate; /* crea contexto de apilamiento para z-index de hijos */
}

.btn--pub::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #f4b400;
  transform: translateX(-101%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1; /* debajo del texto nativo del botón gracias a isolation:isolate */
}

.btn--pub:hover::before {
  transform: translateX(0);
}

/* Todo el contenido del botón por encima del ::before */
.btn--pub span,
.btn--pub i,
.btn--pub svg {
  position: relative;
  z-index: 2;
}

.btn--pub:hover {
  color: #111 !important;
  border-color: #f4b400;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244,180,0,.3);
}

.btn--pub:hover span,
.btn--pub:hover i,
.btn--pub:hover svg {
  color: #111 !important;
  stroke: #111 !important;
}

.btn--pub .btn__icon {
  position: relative;
  z-index: 2;
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
}

.btn--pub:hover .btn__icon {
  transform: translateX(3px);
  color: #111 !important;
  stroke: #111 !important;
}

/* CTA inferior */
.publicaciones__cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.btn--pub-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: var(--color-rojo);
  color: #fff;
  font-family: var(--font-base);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 8px;
  border: 2px solid var(--color-rojo);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.28s, border-color 0.28s, transform 0.2s, box-shadow 0.28s;
}

.btn--pub-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #f4b400;
  transform: translateX(-101%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn--pub-cta:hover::before {
  transform: translateX(0);
}

.btn--pub-cta:hover {
  border-color: #f4b400;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244,180,0,.35);
}

.btn--pub-cta span,
.btn--pub-cta i,
.btn--pub-cta svg {
  position: relative;
  z-index: 1;
  color: inherit;
}

.btn--pub-cta .btn__icon {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}

.btn--pub-cta:hover .btn__icon {
  transform: translateX(4px);
  color: #111;
  stroke: #111;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .publicaciones__inner {
    padding: 0 24px;
  }

  .pub-card {
    flex: 0 0 calc((100% - 72px) / 4); /* 4 visibles en tablet */
  }
}

@media (max-width: 640px) {
  .publicaciones {
    padding: 52px 0 64px;
  }

  .publicaciones__inner {
    padding: 0 16px;
  }

  .pub-tabs {
    gap: 8px;
  }

  .pub-tab {
    font-size: 12px;
    padding: 6px 13px;
  }

  .pub-card {
    flex: 0 0 calc(100% - 0px); /* 1 visible */
  }

  .pub-arrow {
    width: 36px;
    height: 36px;
  }

  .publicaciones__cta {
    margin-top: 32px;
  }

  .btn--pub-cta {
    font-size: 12px;
    padding: 11px 22px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN: SERVICIOS ESCOLARES
═══════════════════════════════════════════════════════ */

.servicios {
  background: #fff;
  /* padding-bottom da espacio al 25% del banner (60px) que flota sobre esta sección */
  padding: 88px 0 100px;
}

.servicios__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
}

/* ── Columna izquierda ── */
.servicios__left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.servicios__title {
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0;
}

.servicios__title--accent {
  color: var(--color-rojo);
}

.servicios__desc {
  font-size: 14.5px;
  color: #444;
  line-height: 1.75;
  text-align: justify;
  margin: 0;
}

/* ── Grid 2×2 de tarjetas ── */
.servicios__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start; /* necesario para que el margin-top funcione */
}

/* Desface vertical: columna derecha baja 44px */
.svc-card:nth-child(2),
.svc-card:nth-child(4) {
  margin-top: 44px;
}

/* ── Tarjeta de servicio ── */
.svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 24px 28px;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: #111;
  cursor: pointer;
  transition:
    background   0.30s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.30s cubic-bezier(0.4, 0, 0.2, 1),
    color        0.30s cubic-bezier(0.4, 0, 0.2, 1),
    transform    0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow   0.30s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Capa de fondo que hace el sweep rojo */
.svc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-rojo);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  border-radius: inherit;
}

.svc-card--active::before,
.svc-card:hover::before {
  transform: scaleY(1);
}

/* Todo el contenido queda por encima del ::before */
.svc-card__icon-wrap,
.svc-card__title,
.svc-card__desc {
  position: relative;
  z-index: 1;
  transition: color 0.30s;
}

/* Ícono */
.svc-card__icon-wrap {
  width: 60px;
  height: 60px;
  border: 2px solid var(--color-rojo);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.30s, background 0.30s;
  background: transparent;
}

.svc-card__icon {
  width: 28px;
  height: 28px;
  stroke: var(--color-rojo);
  stroke-width: 1.6;
  transition: stroke 0.30s;
}

/* Estado activo / hover — colores invertidos */
.svc-card--active .svc-card__icon-wrap,
.svc-card:hover   .svc-card__icon-wrap {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
}

.svc-card--active .svc-card__icon,
.svc-card:hover   .svc-card__icon {
  stroke: #fff;
}

.svc-card--active,
.svc-card:hover {
  border-color: var(--color-rojo);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(219, 38, 38, 0.28);
}

/* Títulos y descripción */
.svc-card__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0;
  color: inherit;
}

.svc-card__desc {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  margin: 0;
  transition: color 0.30s;
}

.svc-card--active .svc-card__desc,
.svc-card:hover   .svc-card__desc {
  color: rgba(255,255,255,0.88);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .servicios__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 0 24px;
  }

  .servicios__left {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .servicios {
    padding: 56px 0;
  }

  .servicios__inner {
    padding: 0 16px;
    gap: 36px;
  }

  .servicios__grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Sin desface en móvil */
  .svc-card:nth-child(2),
  .svc-card:nth-child(4) {
    margin-top: 0;
  }

  .svc-card {
    padding: 24px 16px 20px;
  }

  .svc-card__icon-wrap {
    width: 50px;
    height: 50px;
  }

  .svc-card__icon {
    width: 22px;
    height: 22px;
  }

  .svc-card__title {
    font-size: 14px;
  }

  .svc-card__desc {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   CTA BANNER
═══════════════════════════════════════════════════════ */

/* Wrapper del banner — flota entre servicios y footer */
/* Banner flotante: 25% (60px) sobre la sección blanca, 75% (180px) dentro del footer negro.
   Altura: 240px → margin-top negativo = -60px */
.cta-banner-wrap {
  max-width: 1280px;
  margin: -60px auto 0;
  padding: 0 40px;
  position: relative;
  z-index: 10;
}

.cta-banner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  width: 100%;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.28);
  position: relative;
}

/* Columna izquierda amarilla */
.cta-banner__left {
  background: var(--color-amarillo);
  padding: 32px 40px 32px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* Supertítulo */
.cta-banner__super {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--color-rojo);
  text-transform: uppercase;
}

.cta-banner__super-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--color-rojo);
  border-radius: 2px;
}

/* Título principal */
.cta-banner__title {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
  color: #111;
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin: 0;
}

/* Botón CTA */
.btn--cta-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 11px 24px;
  background: var(--color-rojo);
  color: #fff;
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: 2px solid var(--color-rojo);
  border-radius: 6px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.28s, border-color 0.28s, transform 0.2s, box-shadow 0.28s;
}

.btn--cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #111;
  transform: translateX(-101%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn--cta-banner:hover::before {
  transform: translateX(0);
}

.btn--cta-banner:hover {
  border-color: #111;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.btn--cta-banner span,
.btn--cta-banner .btn__icon {
  position: relative;
  z-index: 1;
}

.btn--cta-banner .btn__icon {
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
}

.btn--cta-banner:hover .btn__icon {
  transform: translateX(4px);
}

/* Columna derecha: imagen */
.cta-banner__right {
  overflow: hidden;
  position: relative;
}

.cta-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.6s ease;
  display: block;
}

.cta-banner:hover .cta-banner__img {
  transform: scale(1.04);
}

/* ── Responsive CTA banner ── */
@media (max-width: 640px) {
  .cta-banner-wrap {
    padding: 0 16px;
    margin-top: -40px;
  }

  .footer {
    padding-top: calc(120px + 40px);
  }

  .cta-banner {
    width: 100%;
    grid-template-columns: 1fr;
    height: auto;
    border-radius: 10px;
  }

  .cta-banner__right {
    height: 160px;
  }

  .cta-banner__left {
    padding: 20px 20px;
    gap: 10px;
  }
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */

.footer {
  background: #111;
  color: #fff;
  /* 75% del banner (240px) dentro del footer = 180px + padding visual 56px */
  padding-top: calc(180px + 56px);
}

/* Contenedor del cuerpo principal */
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 64px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr 0.8fr;
  gap: 48px;
  align-items: start;
}

/* ── Col 1: Brand ── */
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__logo-link {
  display: inline-block;
  width: fit-content;
}

.footer__logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* blanco sobre fondo negro */
}

.footer__brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-rojo);
  margin: 0;
  line-height: 1.3;
}

.footer__brand-desc {
  font-size: 13px;
  color: #aaa;
  line-height: 1.75;
  margin: 0;
}

/* ── Columnas de navegación ── */
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__nav-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--color-rojo);
  text-transform: uppercase;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #bbb;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s, padding-left 0.2s;
  display: block;
  line-height: 1.4;
}

.footer__nav-link:hover {
  color: #fff;
  padding-left: 4px;
}

/* ── Barra inferior ── */
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
}

.footer__bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.footer__copy {
  font-size: 13px;
  color: #777;
}

.footer__policy-link {
  color: #777;
  text-decoration: none;
  transition: color 0.2s;
}

.footer__policy-link:hover {
  color: #fff;
}

/* ── Responsive Footer ── */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 24px 48px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer {
    padding-top: 52px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 16px 40px;
  }

  .footer__brand {
    grid-column: auto;
  }

  .footer__bottom-inner {
    padding: 0 16px;
  }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /instituto — HERO
═══════════════════════════════════════════════════════ */

/* Offset body para que el hero empiece bajo la topbar+navbar */
.page-instituto {
  padding-top: 0;
}

.inst-hero {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* Imagen de fondo */
.inst-hero__bg {
  position: absolute;
  inset: 0;
  background: url('/static/img/instituto-hero.jpg') center 30% / cover no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.inst-hero:hover .inst-hero__bg {
  transform: scale(1.0);
}

/* Overlay oscuro (aprox 45% opacity) */
.inst-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.48) 55%,
    rgba(0,0,0,0.18) 100%
  );
}

/* Contenido del hero */
.inst-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 56px 64px;
}

/* Logo + tagline */
.inst-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 24px;
}

.inst-hero__logo {
  width: 88px;
  height: auto;
  filter: brightness(0) invert(1);
}

.inst-hero__tagline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.88;
}

/* Headline principal */
.inst-hero__title {
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin: 0;
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /instituto — SECCIÓN MISIÓN/VISIÓN + ESTADÍSTICAS
═══════════════════════════════════════════════════════ */

.inst-about {
  background: #fff;
  padding: 80px 0 88px;
}

.inst-about__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;
}

/* ── Columna imagen ── */
.inst-about__img-col {
  position: relative;
}

.inst-about__img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 18px;
  display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
}

/* ── Columna texto ── */
.inst-about__text-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
}

/* Título */
.inst-about__title {
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 800;
  color: #111;
  line-height: 1.18;
  margin: 0 0 24px;
  letter-spacing: -0.3px;
}

.inst-about__title--accent {
  color: var(--color-rojo);
}

/* ── Tabs ── */
.inst-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 2px solid #e5e5e5;
}

.inst-tab {
  position: relative;
  padding: 10px 20px 10px;
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #888;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.22s;
}

.inst-tab:first-child {
  padding-left: 0;
}

.inst-tab--active {
  color: var(--color-rojo);
  border-bottom-color: var(--color-rojo);
}

.inst-tab:hover:not(.inst-tab--active) {
  color: #444;
}

/* ── Paneles de contenido ── */
.inst-tab-content {
  margin-top: 0;
}

.inst-panel {
  display: none;
  padding: 20px 0 0;
}

.inst-panel--active {
  display: block;
}

.inst-about__body {
  font-size: 14.5px;
  font-weight: 400;
  color: #444;
  line-height: 1.75;
  text-align: justify;
  margin: 0;
}

/* Línea roja lateral izquierda en el panel activo */
.inst-panel--active {
  display: block;
  border-left: 3px solid var(--color-rojo);
  padding-left: 16px;
  margin-left: 0;
}

/* ── Estadísticas ── */
.inst-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.inst-stat {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 22px 20px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  transition: box-shadow 0.22s, transform 0.22s;
}

.inst-stat:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  transform: translateY(-3px);
}

.inst-stat__num {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  margin: 0 0 6px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.inst-stat__plus {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-rojo);
  line-height: 1;
}

.inst-stat__label {
  font-size: 12px;
  font-weight: 500;
  color: #777;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .inst-about__inner {
    padding: 0 32px;
    gap: 40px;
  }

  .inst-about__img {
    height: 420px;
  }
}

@media (max-width: 768px) {
  .inst-hero {
    height: 420px;
  }

  .inst-hero__content {
    padding: 0 24px 48px;
  }

  .inst-hero__title {
    font-size: clamp(28px, 7vw, 40px);
  }

  .inst-about {
    padding: 56px 0 64px;
  }

  .inst-about__inner {
    grid-template-columns: 1fr;
    padding: 0 24px;
    gap: 36px;
  }

  .inst-about__img {
    height: 320px;
  }

  .inst-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .inst-stat__num {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .inst-hero {
    height: 360px;
  }

  .inst-hero__logo {
    width: 64px;
  }

  .inst-hero__title {
    font-size: 28px;
  }

  .inst-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN: FORMANDO PROFESIONISTAS (/instituto)
═══════════════════════════════════════════════════════ */

.fp-section {
  background: #f5f5f5;
  padding: 80px 0 88px;
}

.fp-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 56px;
  align-items: start;
}

/* ── Columna izquierda ── */
.fp-text-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fp-title {
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 800;
  color: #111;
  line-height: 1.18;
  letter-spacing: -0.3px;
  margin: 0 0 14px;
}

.fp-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #555;
  line-height: 1.65;
  margin: 0 0 36px;
  text-align: justify;
}

/* Items de propósitos */
.fp-item {
  margin-bottom: 32px;
}

.fp-item:last-child {
  margin-bottom: 0;
}

.fp-item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Ícono diamante rojo */
.fp-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fp-item__diamond {
  width: 18px;
  height: 18px;
  color: var(--color-rojo);
  stroke-width: 1.8;
}

.fp-item__title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  margin: 0;
}

.fp-item__text {
  font-size: 13.5px;
  font-weight: 400;
  color: #555;
  line-height: 1.72;
  text-align: justify;
  margin: 0;
  padding-left: 28px; /* alineado con el texto del título (tras el ícono) */
}

/* ── Columna derecha: imágenes ── */
.fp-media-col {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
  position: sticky;
  top: 100px;
}

/* Imagen tall (izquierda dentro de la col derecha) */
.fp-img-wrap {
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.fp-img-wrap--tall {
  width: 52%;
  aspect-ratio: 3 / 4;
}

/* Sub-columna derecha: imagen pequeña + botón */
.fp-img-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.fp-img-wrap--small {
  width: 100%;
  aspect-ratio: 1 / 1.1;
}

.fp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.55s ease;
}

.fp-img-wrap:hover .fp-img {
  transform: scale(1.04);
}

/* Botón CONTACTAR AHORA */
.fp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: var(--color-rojo);
  color: #fff;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.22s, transform 0.18s, box-shadow 0.22s;
}

.fp-btn:hover {
  background: #c00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180,0,0,.28);
}

.fp-btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.fp-btn:hover .fp-btn__icon {
  transform: translateX(4px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .fp-inner {
    padding: 0 32px;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .fp-section {
    padding: 56px 0 64px;
  }

  .fp-inner {
    grid-template-columns: 1fr;
    padding: 0 24px;
    gap: 40px;
  }

  .fp-media-col {
    position: static;
  }

  .fp-img-wrap--tall {
    width: 50%;
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 480px) {
  .fp-media-col {
    flex-direction: column;
  }

  .fp-img-wrap--tall {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .fp-img-wrap--small {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN: PRINCIPIOS FILOSÓFICOS (/instituto)
═══════════════════════════════════════════════════════ */

.principios {
  background: #fff;
  padding: 88px 0 96px;
}

.principios__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ── Encabezado centrado ── */
.principios__header {
  text-align: center;
  margin-bottom: 56px;
}

.principios__super {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 18px;
}

.principios__title {
  font-size: clamp(32px, 3.8vw, 50px);
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0;
}

/* ── Grid 4 cards ── */
.principios__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── Card individual ── */
.prin-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 28px 24px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.prin-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,.12);
  transform: translateY(-4px);
}

/* Ícono: cuadrado rojo redondeado con icono blanco */
.prin-card__icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--color-rojo);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prin-card__icon {
  width: 22px;
  height: 22px;
  color: #fff;
  stroke-width: 1.8;
}

/* Título */
.prin-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
  margin: 0;
}

/* Texto */
.prin-card__text {
  font-size: 13px;
  font-weight: 400;
  color: #555;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .principios__inner {
    padding: 0 32px;
  }

  .principios__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .principios {
    padding: 56px 0 64px;
  }

  .principios__inner {
    padding: 0 20px;
  }

  .principios__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .principios__title {
    font-size: 28px;
  }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /investigacion — HERO
═══════════════════════════════════════════════════════ */

.page-investigacion {
  padding-top: 0;
}

.inv-hero {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.inv-hero__bg {
  position: absolute;
  inset: 0;
  background: url('/static/img/investigacion-hero.jpg') center 40% / cover no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.inv-hero:hover .inv-hero__bg {
  transform: scale(1.0);
}

.inv-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.50) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.inv-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 56px 60px;
}

.inv-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 22px;
}

.inv-hero__logo {
  width: 84px;
  height: auto;
  filter: brightness(0) invert(1);
}

.inv-hero__tagline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.88;
}

.inv-hero__title {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.4px;
  margin: 0;
  max-width: 520px;
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /investigacion — LÍNEAS DE INVESTIGACIÓN
═══════════════════════════════════════════════════════ */

.lineas {
  background: #fff;
  padding: 80px 0 96px;
}

.lineas__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
}

/* Título centrado */
.lineas__header {
  text-align: center;
  margin-bottom: 52px;
}

.lineas__title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #111;
  margin: 0;
  letter-spacing: -0.3px;
}

.lineas__title--accent {
  color: var(--color-rojo);
}

/* Grid 2 columnas iguales */
.lineas__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
  align-items: start;
}

.lineas__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cada card */
.linea-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: box-shadow 0.22s, transform 0.22s;
}

.linea-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

/* Ícono: círculo gris claro con ícono gris oscuro */
.linea-card__icon-wrap {
  width: 36px;
  height: 36px;
  background: #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.linea-card__icon {
  width: 18px;
  height: 18px;
  color: #555;
  stroke-width: 1.8;
}

/* Texto de la línea */
.linea-card__text {
  font-size: 13.5px;
  font-weight: 500;
  color: #222;
  line-height: 1.6;
  margin: 0;
  text-align: justify;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .inv-hero__content {
    padding: 0 32px 52px;
  }

  .lineas__inner {
    padding: 0 32px;
  }
}

@media (max-width: 768px) {
  .inv-hero {
    height: 400px;
  }

  .inv-hero__content {
    padding: 0 24px 44px;
  }

  .inv-hero__title {
    font-size: clamp(28px, 7vw, 38px);
  }

  .lineas {
    padding: 56px 0 64px;
  }

  .lineas__inner {
    padding: 0 20px;
  }

  .lineas__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .inv-hero {
    height: 340px;
  }

  .inv-hero__logo {
    width: 64px;
  }
}

/* ============================================================
   DOCENTES-INVESTIGADORES — /investigacion
   ============================================================ */
.docentes-inv {
  background: #fff;
  padding: 80px 0 90px;
}
.docentes-inv__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.docentes-inv__super {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.docentes-inv__title {
  text-align: center;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  margin-bottom: 56px;
}
.docentes-inv__title--accent { color: #c0001a; }

/* Grid 3 cols */
.docentes-inv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* === CARD === */
.doc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .25s ease;
}
.doc-card--visible {
  opacity: 1;
  transform: translateY(0);
}
.doc-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transform: translateY(-4px);
}

.doc-card__img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
}
.doc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.doc-card:hover .doc-card__img { transform: scale(1.04); }

.doc-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.doc-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.3;
}
.doc-card__subtitle {
  font-size: 12px;
  color: #c0001a;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}
.doc-card__desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.doc-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #c0001a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  align-self: flex-start;
}
.doc-card__btn:hover {
  background: #a0001a;
  transform: translateX(2px);
}
.doc-card__btn-icon {
  width: 14px;
  height: 14px;
}

/* ============================================================
   MODAL DOCENTE
   ============================================================ */
.doc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.doc-modal-overlay--open {
  opacity: 1;
  pointer-events: all;
}

.doc-modal {
  background: #f9fafb;
  border-radius: 16px;
  max-width: 820px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden; /* el scroll va en __right, no aquí */
  display: flex;
  gap: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
}
.doc-modal-overlay--open .doc-modal {
  transform: translateY(0) scale(1);
}

.doc-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #c0001a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background .2s ease;
}
.doc-modal__close:hover { background: #900015; }
.doc-modal__close svg { width: 18px; height: 18px; }

/* Left photo column */
.doc-modal__left {
  flex: 0 0 260px;
  min-height: 340px;
  position: relative;
  overflow: hidden;
  border-radius: 16px 0 0 16px;
  border: 3px solid #c0001a;
}
.doc-modal__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Right text column — scroll independiente */
.doc-modal__right {
  flex: 1;
  padding: 40px 44px 40px 36px;
  background: #fff;
  border-radius: 0 16px 16px 0;
  border: 3px solid #c0001a;
  border-left: none;
  overflow-y: auto;
  max-height: 85vh;
}
.doc-modal__super {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.doc-modal__name {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  line-height: 1.25;
  margin-bottom: 6px;
}
.doc-modal__subtitle-text {
  font-size: 13px;
  color: #c0001a;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.4;
}
.doc-modal__bio p {
  font-size: 14px;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 14px;
}
.doc-modal__bio p:last-child { margin-bottom: 0; }
.doc-modal__bio strong { color: #111; font-weight: 700; }
.doc-modal__bio a { color: #c0001a; text-decoration: underline; }
.doc-modal__quote {
  border-left: 3px solid #c0392b;
  margin: 16px 0;
  padding: 10px 16px;
  background: #fff8f8;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: #444;
  font-style: italic;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .docentes-inv__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .docentes-inv { padding: 56px 0 64px; }
  .docentes-inv__inner { padding: 0 20px; }
  .docentes-inv__grid {
    grid-template-columns: 1fr;
  }
  .doc-modal {
    flex-direction: column;
    max-height: 90vh;
  }
  .doc-modal__left {
    flex: 0 0 220px;
    border-radius: 16px 16px 0 0;
    border: 3px solid #c0001a;
    border-bottom: none;
    min-height: 220px;
  }
  .doc-modal__right {
    border-radius: 0 0 16px 16px;
    border: 3px solid #c0001a;
    border-top: none;
    padding: 24px 20px;
  }
  .doc-modal__name { font-size: 18px; }
}

/* ============================================================
   PÁGINA /publicaciones — Hero + CTA banner personalizado
   ============================================================ */

/* ── Hero ── */
.pub-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.pub-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: scale(1.03);
}
.pub-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.48) 50%,
    rgba(0,0,0,0.18) 100%
  );
}
.pub-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pub-hero__logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pub-hero__logo {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
}
.pub-hero__tagline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  text-transform: uppercase;
}
.pub-hero__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pub-hero__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pub-hero__title {
  font-size: clamp(52px, 7vw, 78px);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  margin: 0;
}
.pub-hero__date {
  font-size: clamp(42px, 5.5vw, 62px);
  font-weight: 800;
  color: #f4b400;
  line-height: 1.1;
  margin: 0;
}

/* ── Sección publicaciones en página propia (sin margen top extra) ── */
.pub-page-section {
  padding-top: 60px;
}

/* ── CTA Banner variante Publicaciones (fondo amarillo) ── */
.cta-banner--pub {
  background: #f4b400 !important;
  height: auto !important;
  min-height: 240px;
}
.cta-banner__left--pub {
  background: #f4b400 !important;
  padding: 36px 48px 36px 48px !important;
  justify-content: flex-start !important;
  gap: 16px !important;
}
.cta-banner__super--pub {
  color: #c0001a !important;
}
.cta-banner__title--pub {
  color: #111 !important;
  font-size: clamp(18px, 2vw, 26px) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ── Responsive Hero ── */
@media (max-width: 768px) {
  .pub-hero { height: 380px; }
  .pub-hero__content { padding: 20px 24px 40px; }
  .pub-hero__title { font-size: 44px; }
  .pub-hero__date { font-size: 36px; }
}
@media (max-width: 480px) {
  .pub-hero { height: 320px; }
  .pub-hero__title { font-size: 36px; }
  .pub-hero__date { font-size: 30px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /contacto — HERO BANNER
═══════════════════════════════════════════════════════ */

.contacto-hero {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.contacto-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.contacto-hero:hover .contacto-hero__bg {
  transform: scale(1.0);
}

.contacto-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.44) 55%,
    rgba(0,0,0,0.16) 100%
  );
}

.contacto-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contacto-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-top: 48px;
}

.contacto-hero__logo {
  width: 88px;
  height: auto;
  filter: brightness(0) invert(1);
}

.contacto-hero__tagline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.88;
}

.contacto-hero__title {
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin: 0;
  max-width: 620px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .contacto-hero { height: 420px; }
  .contacto-hero__content { padding: 0 28px 48px; }
  .contacto-hero__title { font-size: clamp(28px, 6vw, 40px); }
}
@media (max-width: 480px) {
  .contacto-hero { height: 360px; }
  .contacto-hero__content { padding: 0 20px 36px; }
  .contacto-hero__logo { width: 68px; }
  .contacto-hero__logo-wrap { padding-top: 32px; }
  .contacto-hero__title { font-size: 28px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /contacto — SECCIÓN FORMULARIO
═══════════════════════════════════════════════════════ */

.contacto-form-section {
  background: #fff;
  padding: 80px 0 64px;
}

.contacto-form-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

/* ── Columna izquierda ── */
.contacto-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacto-img-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.contacto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.contacto-desc {
  font-size: 14.5px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* Redes sociales */
.contacto-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacto-social__label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.contacto-social__icons {
  display: flex;
  gap: 14px;
  align-items: center;
}

.contacto-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f3f3;
  color: #333;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contacto-social__link:hover {
  background: #c0392b;
  color: #fff;
  transform: translateY(-2px);
}

.contacto-social__svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Columna derecha: formulario ── */
.contacto-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contacto-form-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  margin: 0;
}

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contacto-form__row {
  display: flex;
  gap: 14px;
}

.contacto-form__row--full {
  flex-direction: column;
}

.contacto-form__row--half {
  flex-direction: row;
}

.contacto-form__input,
.contacto-form__textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.contacto-form__input::placeholder,
.contacto-form__textarea::placeholder {
  color: #aaa;
}

.contacto-form__input:focus,
.contacto-form__textarea:focus {
  border-color: #c0392b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.contacto-form__textarea {
  resize: vertical;
  min-height: 140px;
}

.contacto-form__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: #c0392b;
  color: #fff;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s ease, color 0.22s ease;
  align-self: flex-start;
}

.contacto-form__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #f4b400;
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 6px;
}

.contacto-form__btn:hover::before {
  transform: translateX(0);
}

.contacto-form__btn:hover {
  color: #111;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /contacto — TARJETAS DE INFORMACIÓN
═══════════════════════════════════════════════════════ */

.contacto-info {
  background: #fff;
  padding: 48px 0;
}

.contacto-info__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contacto-info__card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.contacto-info__card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.contacto-info__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contacto-info__icon {
  width: 24px;
  height: 24px;
  color: #c0392b;
  stroke: #c0392b;
}

.contacto-info__text {
  font-size: 14.5px;
  font-weight: 600;
  color: #222;
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /contacto — MAPA FULL WIDTH
═══════════════════════════════════════════════════════ */

.contacto-mapa {
  width: 100%;
  line-height: 0;
}

.contacto-mapa__iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .contacto-form-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 28px;
  }
  .contacto-img-wrap {
    aspect-ratio: 4 / 3;
    max-height: 320px;
  }
  .contacto-info__inner {
    grid-template-columns: 1fr;
    padding: 0 28px;
  }
}

@media (max-width: 600px) {
  .contacto-form-section { padding: 48px 0 40px; }
  .contacto-form-inner { padding: 0 20px; }
  .contacto-form__row--half { flex-direction: column; }
  .contacto-info__inner { padding: 0 20px; }
  .contacto-form-title { font-size: 26px; }
  .contacto-mapa__iframe { height: 300px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /contacto — SECCIÓN CÓMO LLEGAR
═══════════════════════════════════════════════════════ */

.como-llegar {
  background: #fff;
  padding: 64px 0 72px;
}

.como-llegar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
}

/* Divisor rojo */
.como-llegar__divider {
  width: 100%;
  height: 2px;
  background: #c0392b;
  margin-bottom: 48px;
}

/* Supertítulo */
.como-llegar__super {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 10px;
}

/* Título principal */
.como-llegar__title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  margin: 0 0 32px;
}

/* ── Tabs / botones de filtro ── */
.como-llegar__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.cl-tab {
  padding: 10px 20px;
  background: #fff;
  color: #222;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.4;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cl-tab:hover {
  border-color: #c0392b;
  color: #c0392b;
}

.cl-tab--active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

/* ── Paneles de contenido ── */
.cl-panel {
  display: none;
}

.cl-panel--active {
  display: block;
}

/* Bloque de modo (automóvil / transporte) */
.cl-modo {
  margin-bottom: 8px;
}

.cl-modo__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
}

.cl-modo__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #c0392b;
}

/* Separador entre automóvil y transporte */
.cl-separator {
  width: 100%;
  height: 1px;
  background: #e8e8e8;
  margin: 28px 0;
}

/* Etiqueta de opción */
.cl-opcion-label {
  font-size: 13px;
  font-weight: 700;
  color: #c0392b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 18px 0 10px;
}

/* Lista de pasos */
.cl-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #444;
  line-height: 1.65;
  padding-left: 4px;
}

.cl-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 8 16 12 12 16'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .como-llegar__inner {
    padding: 0 28px;
  }
  .cl-tab {
    font-size: 12px;
    padding: 9px 14px;
  }
}

@media (max-width: 480px) {
  .como-llegar { padding: 48px 0 56px; }
  .como-llegar__inner { padding: 0 20px; }
  .como-llegar__tabs { gap: 8px; }
  .cl-tab { font-size: 11.5px; padding: 8px 12px; }
  .cl-list li { font-size: 13.5px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /servicios-escolares — HERO BANNER
═══════════════════════════════════════════════════════ */

.serv-hero {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.serv-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.serv-hero:hover .serv-hero__bg {
  transform: scale(1.0);
}

.serv-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.46) 55%,
    rgba(0,0,0,0.16) 100%
  );
}

.serv-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.serv-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-top: 48px;
}

.serv-hero__logo {
  width: 88px;
  height: auto;
  filter: brightness(0) invert(1);
}

.serv-hero__tagline {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.88;
}

.serv-hero__title {
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin: 0;
  max-width: 680px;
}

.serv-hero__title--accent {
  color: #f4b400;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .serv-hero { height: 420px; }
  .serv-hero__content { padding: 0 28px 48px; }
  .serv-hero__title { font-size: clamp(28px, 6vw, 40px); }
}
@media (max-width: 480px) {
  .serv-hero { height: 360px; }
  .serv-hero__content { padding: 0 20px 36px; }
  .serv-hero__logo { width: 68px; }
  .serv-hero__logo-wrap { padding-top: 32px; }
  .serv-hero__title { font-size: 28px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /servicios-escolares — SECCIÓN INSCRIPCIONES
═══════════════════════════════════════════════════════ */

.serv-inscripciones {
  background: #fff;
  padding: 80px 0 72px;
}

.serv-insc__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 72px;
  align-items: center;
}

/* ── Columna imagen ── */
.serv-insc__img-col {
  display: flex;
  justify-content: center;
}

.serv-insc__img-wrap {
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.serv-insc__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 6s ease;
}

.serv-insc__img-wrap:hover .serv-insc__img {
  transform: scale(1.03);
}

/* ── Columna contenido ── */
.serv-insc__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.serv-insc__title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  color: #c0392b;
  line-height: 1.15;
  margin: 0;
}

.serv-insc__desc {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0;
}

/* ── Lista de servicios ── */
.serv-insc__list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.serv-insc__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.serv-insc__item:hover {
  border-color: #c0392b;
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.10);
  transform: translateX(4px);
}

.serv-insc__item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192, 57, 43, 0.07);
  border-radius: 8px;
  color: #c0392b;
}

.serv-insc__item-icon svg {
  width: 20px;
  height: 20px;
  stroke: #c0392b;
}

.serv-insc__item-text {
  flex: 1;
  font-size: 14.5px;
  color: #222;
  line-height: 1.5;
}

.serv-insc__item-arrow {
  width: 16px;
  height: 16px;
  color: #c0392b;
  stroke: #c0392b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.serv-insc__item:hover .serv-insc__item-arrow {
  transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .serv-insc__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 28px;
  }
  .serv-insc__img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .serv-inscripciones { padding: 48px 0 56px; }
  .serv-insc__inner { padding: 0 20px; }
  .serv-insc__title { font-size: 26px; }
  .serv-insc__item { padding: 14px 16px; gap: 12px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /servicios-escolares — SECCIÓN TRÁMITES
═══════════════════════════════════════════════════════ */

.serv-tramites {
  background: #f5f5f5;
  padding: 80px 0 72px;
}

.serv-tram__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 72px;
  align-items: center;
}

/* ── Columna contenido (izquierda) ── */
.serv-tram__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.serv-tram__title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  color: #c0392b;
  line-height: 1.15;
  margin: 0;
}

.serv-tram__desc {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0;
}

/* ── Lista de trámites ── */
.serv-tram__list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.serv-tram__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.serv-tram__item:hover {
  border-color: #c0392b;
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.10);
  transform: translateX(4px);
}

.serv-tram__item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192, 57, 43, 0.07);
  border-radius: 8px;
}

.serv-tram__item-icon svg {
  width: 20px;
  height: 20px;
  stroke: #c0392b;
}

.serv-tram__item-text {
  flex: 1;
  font-size: 14.5px;
  color: #222;
  line-height: 1.5;
}

.serv-tram__item-arrow {
  width: 16px;
  height: 16px;
  color: #c0392b;
  stroke: #c0392b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.serv-tram__item:hover .serv-tram__item-arrow {
  transform: translateX(3px);
}

/* ── Columna imagen (derecha) ── */
.serv-tram__img-col {
  display: flex;
  justify-content: center;
}

.serv-tram__img-wrap {
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.serv-tram__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 6s ease;
}

.serv-tram__img-wrap:hover .serv-tram__img {
  transform: scale(1.03);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .serv-tram__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 28px;
  }
  /* En móvil la imagen sube primero */
  .serv-tram__img-col { order: -1; }
  .serv-tram__img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .serv-tramites { padding: 48px 0 56px; }
  .serv-tram__inner { padding: 0 20px; }
  .serv-tram__title { font-size: 26px; }
  .serv-tram__item { padding: 14px 16px; gap: 12px; }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA /servicios-escolares — SECCIÓN TITULACIONES
═══════════════════════════════════════════════════════ */

.serv-titulacion {
  background: #fff;
  padding: 80px 0 72px;
}

.serv-titul__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 72px;
  align-items: center;
}

/* ── Columna imagen (izquierda) ── */
.serv-titul__img-col {
  display: flex;
  justify-content: center;
}

.serv-titul__img-wrap {
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.serv-titul__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 6s ease;
}

.serv-titul__img-wrap:hover .serv-titul__img {
  transform: scale(1.03);
}

/* ── Columna contenido (derecha) ── */
.serv-titul__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.serv-titul__title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  color: #c0392b;
  line-height: 1.15;
  margin: 0;
}

.serv-titul__desc {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0;
}

/* ── Lista ── */
.serv-titul__list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.serv-titul__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.serv-titul__item:hover {
  border-color: #c0392b;
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.10);
  transform: translateX(4px);
}

.serv-titul__item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192, 57, 43, 0.07);
  border-radius: 8px;
}

.serv-titul__item-icon svg {
  width: 20px;
  height: 20px;
  stroke: #c0392b;
}

.serv-titul__item-text {
  flex: 1;
  font-size: 14.5px;
  color: #222;
  line-height: 1.5;
}

.serv-titul__item-arrow {
  width: 16px;
  height: 16px;
  stroke: #c0392b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.serv-titul__item:hover .serv-titul__item-arrow {
  transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .serv-titul__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 28px;
  }
  .serv-titul__img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .serv-titulacion { padding: 48px 0 56px; }
  .serv-titul__inner { padding: 0 20px; }
  .serv-titul__title { font-size: 26px; }
  .serv-titul__item { padding: 14px 16px; gap: 12px; }
}

/* ============================================================
   SECCIÓN CÉDULAS PROFESIONALES
   ============================================================ */
.serv-cedulas {
  background: #f5f5f5;
  padding: 72px 0 80px;
}

.serv-ced__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Imagen */
.serv-ced__img-col {
  display: flex;
  justify-content: center;
}

.serv-ced__img-wrap {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  transition: box-shadow 0.3s ease;
}

.serv-ced__img-wrap:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

.serv-ced__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s ease;
}

.serv-ced__img-wrap:hover .serv-ced__img {
  transform: scale(1.04);
}

/* Contenido */
.serv-ced__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.serv-ced__title {
  font-size: 34px;
  font-weight: 700;
  color: var(--color-rojo);
  line-height: 1.15;
  margin: 0;
}

.serv-ced__desc {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* Lista */
.serv-ced__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.serv-ced__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.serv-ced__item:hover {
  border-color: var(--color-rojo);
  box-shadow: 0 4px 18px rgba(180,0,0,0.10);
  transform: translateX(4px);
}

.serv-ced__item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fdecea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rojo);
  transition: background 0.25s ease;
}

.serv-ced__item:hover .serv-ced__item-icon {
  background: var(--color-rojo);
  color: #fff;
}

.serv-ced__item-icon svg {
  width: 22px;
  height: 22px;
}

.serv-ced__item-text {
  flex: 1;
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

.serv-ced__item-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: #aaa;
  transition: stroke 0.25s ease, transform 0.25s ease;
}

.serv-ced__item:hover .serv-ced__item-arrow {
  stroke: var(--color-rojo);
  transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .serv-ced__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 28px;
  }
  .serv-ced__img-col {
    order: -1;
  }
  .serv-ced__img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .serv-cedulas { padding: 48px 0 56px; }
  .serv-ced__inner { padding: 0 20px; }
  .serv-ced__title { font-size: 26px; }
  .serv-ced__item { padding: 14px 16px; gap: 12px; }
}

/* ============================================================
   PÁGINA MAESTRÍA EN CUERPO Y SALUD — /programas/maestria
   ============================================================ */

/* ── HERO ── */
.maest-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
}

.maest-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transition: transform 0.6s ease;
}

.maest-hero:hover .maest-hero__bg {
  transform: scale(1.03);
}

.maest-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.05) 100%);
}

.maest-hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0 60px 40px;
}

.maest-hero__logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.maest-hero__logo {
  width: 90px;
  filter: brightness(0) invert(1);
}

.maest-hero__tagline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}

/* ── ENCABEZADO + DESCRIPCIÓN ── */
.maest-header {
  background: #fff;
  padding: 48px 0 40px;
  border-bottom: 1px solid #eee;
}

.maest-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

.maest-header__title {
  font-size: 36px;
  font-weight: 800;
  color: #111;
  margin: 0 0 20px;
  line-height: 1.15;
}

.maest-header__title--blue {
  color: #0c7bb5;
}

.maest-header__title--red {
  color: var(--color-rojo);
}

.maest-header__desc {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin: 0;
  text-align: justify;
}

/* ── BANNER DE ESTADÍSTICAS ── */
.maest-stats {
  position: relative;
  overflow: hidden;
}

.maest-stats__inner {
  position: relative;
}

.maest-stats__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.45);
}

.maest-stats__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 123, 181, 0.55);
}

.maest-stats__bar {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}

.maest-stats__item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: center;
}

.maest-stats__divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

.maest-stats__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: #fff;
}

.maest-stats__icon svg {
  width: 100%;
  height: 100%;
}

.maest-stats__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.maest-stats__label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.maest-stats__value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .maest-hero {
    height: 380px;
  }

  .maest-hero__content {
    padding: 0 28px 28px;
  }

  .maest-header__inner {
    padding: 0 28px;
  }

  .maest-header__title {
    font-size: 28px;
  }

  .maest-stats__bar {
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px 28px;
    justify-content: flex-start;
  }

  .maest-stats__item {
    flex: 0 0 calc(50% - 12px);
    justify-content: flex-start;
  }

  .maest-stats__divider {
    display: none;
  }
}

@media (max-width: 600px) {
  .maest-hero {
    height: 280px;
  }

  .maest-hero__content {
    padding: 0 20px 20px;
  }

  .maest-header {
    padding: 32px 0 28px;
  }

  .maest-header__inner {
    padding: 0 20px;
  }

  .maest-header__title {
    font-size: 22px;
  }

  .maest-header__desc {
    font-size: 14px;
  }

  .maest-stats__bar {
    padding: 24px 20px;
    gap: 20px;
  }

  .maest-stats__item {
    flex: 0 0 100%;
  }
}

/* ============================================================
   PERFIL DE INGRESO — /programas/maestria
   ============================================================ */
.maest-perfil {
  background: #fff;
  padding: 64px 0 56px;
}

.maest-perfil__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

.maest-perfil__title {
  font-size: 30px;
  font-weight: 800;
  color: #0c7bb5;
  margin: 0 0 20px;
}

.maest-perfil__desc {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  margin: 0 0 32px;
  text-align: justify;
}

.maest-perfil__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1.5px solid #e0e0e0;
  padding-top: 28px;
}

.maest-perfil__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.maest-perfil__item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: #0c7bb5;
  margin-top: 2px;
}

.maest-perfil__item-icon svg {
  width: 100%;
  height: 100%;
}

.maest-perfil__item-title {
  font-size: 14px;
  color: #111;
  margin: 0 0 4px;
  line-height: 1.5;
}

.maest-perfil__item-sub {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   PERFIL DE EGRESO — /programas/maestria
   ============================================================ */
.maest-egreso {
  background: #f8f9fa;
  padding: 64px 0 56px;
  border-top: 1.5px solid #e0e0e0;
}

.maest-egreso__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

.maest-egreso__title {
  font-size: 30px;
  font-weight: 800;
  color: #0c7bb5;
  margin: 0 0 8px;
}

.maest-egreso__subtitle {
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin: 0 0 12px;
}

.maest-egreso__desc {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  margin: 0 0 36px;
}

.maest-egreso__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: none;
}

.maest-egreso__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 24px 24px 0;
  border-bottom: none;
}

.maest-egreso__item:nth-child(even) {
  padding-left: 32px;
  border-left: none;
}

.maest-egreso__item--solo {
  grid-column: 1 / 2;
  border-bottom: none;
}

.maest-egreso__item-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: #0c7bb5;
  margin-top: 2px;
}

.maest-egreso__item-icon svg {
  width: 100%;
  height: 100%;
}

.maest-egreso__item-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.maest-egreso__item-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

/* ============================================================
   LÍNEAS DE INVESTIGACIÓN — /programas/maestria
   ============================================================ */
.maest-lineas {
  background: #fff;
  padding: 72px 0 80px;
  border-top: 1.5px solid #e0e0e0;
}

.maest-lineas__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Título centrado */
.maest-lineas__header {
  text-align: center;
  margin-bottom: 48px;
}

.maest-lineas__title {
  font-size: 36px;
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  margin: 0;
}

.maest-lineas__title--blue {
  color: #0c7bb5;
}

/* Grid de cards — 4 columnas en desktop */
.maest-lineas__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Card individual — mismo patrón que linea-card de investigación */
.maest-linea-card {
  background: #fff;
  border: 1px solid #e4e4e8;
  border-radius: 10px;
  padding: 22px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.maest-linea-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(12, 123, 181, .13);
}

.maest-linea-card__icon-wrap {
  width: 40px;
  height: 40px;
  background: #e8f4fb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.22s ease;
}

.maest-linea-card:hover .maest-linea-card__icon-wrap {
  background: #0c7bb5;
}

.maest-linea-card__icon {
  width: 20px;
  height: 20px;
  color: #0c7bb5;
  transition: color 0.22s ease;
}

.maest-linea-card:hover .maest-linea-card__icon {
  color: #fff;
}

.maest-linea-card__text {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .maest-lineas__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .maest-perfil__inner,
  .maest-egreso__inner,
  .maest-lineas__inner {
    padding: 0 28px;
  }

  .maest-perfil__grid {
    grid-template-columns: 1fr;
  }

  .maest-egreso__grid {
    grid-template-columns: 1fr;
  }

  .maest-egreso__item:nth-child(even) {
    padding-left: 0;
    border-left: none;
  }

  .maest-egreso__item--solo {
    grid-column: 1 / 2;
  }

  .maest-lineas__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .maest-perfil,
  .maest-egreso,
  .maest-lineas {
    padding: 44px 0 40px;
  }

  .maest-perfil__inner,
  .maest-egreso__inner,
  .maest-lineas__inner {
    padding: 0 20px;
  }

  .maest-perfil__title,
  .maest-egreso__title {
    font-size: 24px;
  }

  .maest-lineas__title {
    font-size: 26px;
  }

  .maest-lineas__grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

/* ============================================================
   PLAN DE ESTUDIOS — /programas/maestria
   ============================================================ */
.maest-plan {
  background: #ffffff;
  padding: 72px 0 80px;
  border-top: 1.5px solid #e0e0e0;
}

.maest-plan__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Título centrado */
.maest-plan__header {
  text-align: center;
  margin-bottom: 40px;
}

.maest-plan__title {
  font-size: 36px;
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  margin: 0;
}

.maest-plan__title--blue {
  color: #0c7bb5;
}

/* TABS */
.maest-plan__tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.maest-plan__tab {
  flex: 1;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-base);
  color: #0c7bb5;
  background: #fff;
  border: 1.5px solid #d0e6f5;
  border-bottom: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.22s ease, color 0.22s ease;
  position: relative;
  z-index: 1;
}

.maest-plan__tab:not(:first-child) {
  border-left: none;
}

.maest-plan__tab--active {
  background: #0c7bb5;
  color: #fff;
  border-color: #0c7bb5;
  z-index: 2;
}

.maest-plan__tab:hover:not(.maest-plan__tab--active) {
  background: #e8f4fb;
}

/* PANEL contenedor */
.maest-plan__panel {
  display: none;
  background: #fff;
  border: 1.5px solid #d0e6f5;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.maest-plan__panel--active {
  display: block;
}

/* MÓDULO row */
.maest-plan__modulo {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid #ebebeb;
  transition: background 0.18s ease;
}

.maest-plan__modulo:last-child {
  border-bottom: none;
}

.maest-plan__modulo:hover {
  background: #f7fbfe;
}

/* Thumbnail */
.maest-plan__modulo-img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Info texto */
.maest-plan__modulo-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maest-plan__modulo-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.maest-plan__dot {
  color: #0c7bb5;
  font-size: 16px;
  line-height: 1;
}

.maest-plan__modulo-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.4;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .maest-plan__inner {
    padding: 0 20px;
  }

  .maest-plan__tabs {
    flex-wrap: wrap;
  }

  .maest-plan__tab {
    flex: 1 1 48%;
    font-size: 12px;
    padding: 10px 12px;
    border: 1.5px solid #d0e6f5;
  }

  .maest-plan__modulo {
    padding: 14px 16px;
    gap: 14px;
  }

  .maest-plan__modulo-img {
    width: 90px;
    height: 60px;
  }

  .maest-plan__modulo-title {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .maest-plan {
    padding: 44px 0 48px;
  }

  .maest-plan__title {
    font-size: 26px;
  }

  .maest-plan__tab {
    flex: 1 1 100%;
  }

  .maest-plan__modulo-img {
    width: 72px;
    height: 48px;
  }
}

/* ═══════════════════════════════════════════════════════
   MAESTRÍA — SECCIÓN: OTROS PROGRAMAS
═══════════════════════════════════════════════════════ */

.maest-otros-prog {
  background: #fff;
  padding: 72px 0 80px;
}

.maest-otros-prog__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

.maest-otros-prog__super {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-azul, #0c7bb5);
  text-align: center;
  margin: 0 0 10px;
}

.maest-otros-prog__title {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  text-align: center;
  margin: 0 0 48px;
  letter-spacing: -0.3px;
}

.maest-otros-prog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Las prog-card dentro de este grid heredan el estilo base,
   pero forzamos el layout para que todas sean links directos */
.maest-otros-prog__grid .prog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.maest-otros-prog__grid .prog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(0,0,0,.14);
}

/* Responsive */
@media (max-width: 900px) {
  .maest-otros-prog__inner {
    padding: 0 24px;
  }

  .maest-otros-prog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .maest-otros-prog__title {
    font-size: 26px;
  }
}

@media (max-width: 560px) {
  .maest-otros-prog {
    padding: 48px 0 60px;
  }

  .maest-otros-prog__inner {
    padding: 0 16px;
  }

  .maest-otros-prog__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .maest-otros-prog__title {
    font-size: 22px;
    margin-bottom: 32px;
  }
}

/* ============================================================
   DOCTORADO — chips del encabezado
   ============================================================ */
.maest-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.maest-header__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #e8f4fb;
  color: #0c7bb5;
  border: 1px solid #c2e0f4;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
}

.maest-header__chip-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ============================================================
   DOCTORADO — líneas de investigación en 2 columnas (7 items)
   ============================================================ */
.maest-lineas__grid--2col {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 640px) {
  .maest-lineas__grid--2col {
    grid-template-columns: 1fr !important;
  }
  .maest-header__chips {
    gap: 8px;
  }
}

/* ============================================================
   STATS — variante roja (licenciaturas)
   ============================================================ */
.maest-stats--red .maest-stats__overlay {
  background: rgba(180, 30, 30, 0.58);
}

/* ============================================================
   PERFIL DE INGRESO — variante roja (licenciaturas)
   ============================================================ */
.maest-perfil--red .maest-perfil__title {
  color: var(--color-rojo);
}
.maest-perfil--red .maest-perfil__item-icon {
  color: var(--color-rojo);
}
.maest-perfil--red .maest-perfil__grid {
  border-top-color: #f0d0d0;
}
.maest-perfil--red .maest-perfil__item-icon svg {
  fill: var(--color-rojo);
}

/* Sub-secciones del perfil de ingreso (Conocimientos / Habilidades / Actitudes) */
.maest-perfil__subsection {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.maest-perfil__subsection-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ececec;
}
.maest-perfil__subsection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .maest-perfil__subsection-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PERFIL DE EGRESO — variante roja (licenciaturas)
   ============================================================ */
.maest-egreso--red .maest-egreso__title {
  color: var(--color-rojo);
}
.maest-egreso--red .maest-egreso__item-icon {
  color: var(--color-rojo);
}
.maest-egreso--red .maest-egreso__item-icon svg {
  fill: var(--color-rojo);
}
.maest-egreso--red .maest-egreso__grid {
  border-top-color: transparent;
}
.maest-egreso--red .maest-egreso__item {
  border-bottom-color: transparent;
}
.maest-egreso--red .maest-egreso__item:nth-child(even) {
  border-left-color: transparent;
}

/* ============================================
   PLAN DE ESTUDIOS — variante roja (psicología)
   ============================================ */
.maest-plan--red .maest-plan__title--red { color: #c0392b; }

.maest-plan--red .maest-plan__tab {
  color: #c0392b;
  border-color: #f5c6c6;
}
.maest-plan--red .maest-plan__tab--active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}
.maest-plan--red .maest-plan__tab:hover:not(.maest-plan__tab--active) {
  background: #fdf0f0;
  color: #c0392b;
}
.maest-plan--red .maest-plan__dot { color: #c0392b; }
.maest-plan--red .maest-plan__panel {
  border-color: #f5c6c6;
}

/* ============================================
   EDUCACIÓN CONTINUA — Sección Cursos
   ============================================ */
.ec-cursos {
  background: #f8f9fa;
  padding: 72px 0 80px;
  border-top: 1.5px solid #e8e8e8;
}

.ec-cursos__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

.ec-cursos__super {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #c0392b;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ec-cursos__title {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  margin-bottom: 48px;
}

.ec-cursos__title--red { color: #c0392b; }

.ec-cursos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start; /* evita que el grid estire los items */
}

/* ---- FLIP CARD ---- */
.ec-card {
  height: 560px;
  cursor: pointer;
  perspective: 1000px;
  border-radius: 16px;
  background: #fff; /* tapa el gris del section que se filtra por los lados */
  box-shadow: 0 6px 28px rgba(0,0,0,0.12); /* sombra visible antes del hover */
}

.ec-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(.4,0,.2,1);
  transform-style: preserve-3d;
  /* El inner llena todo el espacio: sin huecos laterales */
  border-radius: 16px;
}

.ec-card:hover .ec-card__inner,
.ec-card.flipped .ec-card__inner {
  transform: rotateY(180deg);
}

.ec-card__front,
.ec-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  /* sombra movida al .ec-card para evitar duplicado y gaps laterales */
}

/* FRENTE */
.ec-card__front {
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ec-card__img-wrap {
  width: 100%;
  height: 300px;
  overflow: hidden;
  flex-shrink: 0;
  /* el border-radius lo maneja el parent .ec-card__front que ya tiene overflow:hidden */
}

.ec-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.4s ease;
}

.ec-card__front-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ec-card__name {
  font-size: 15px;
  font-weight: 800;
  color: #c0392b;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ec-card__short {
  font-size: 14px;
  color: #444;
  line-height: 1.65;
  flex: 1;
}

.ec-card__front-sep {
  height: 1px;
  background: #e0e0e0;
  margin: 14px 0;
}

.ec-card__meta-line {
  font-size: 13.5px;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.5;
}

.ec-card__meta-label {
  color: #c0392b;
  font-weight: 700;
}

/* REVERSO */
.ec-card__back {
  background: #f5c518;
  transform: rotateY(180deg);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}

.ec-card__back-name {
  font-size: 15px;
  font-weight: 800;
  color: #c0392b;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.ec-card__back-desc {
  font-size: 13.5px;
  color: #222;
  line-height: 1.7;
  margin-bottom: 12px;
  text-align: justify;
}

.ec-card__back-sep {
  height: 1px;
  background: rgba(0,0,0,0.15);
  margin: 14px 0;
}

/* Responsive */
@media (max-width: 900px) {
  .ec-cursos__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
  .ec-card { height: 540px; }
}

@media (max-width: 600px) {
  .ec-cursos__inner { padding: 0 20px; }
  .ec-cursos__title { font-size: 26px; }
}

/* ============================================
   EDUCACIÓN CONTINUA — Sección Coordinadoras
   ============================================ */
.ec-coord {
  background: #fff;
  padding: 72px 0 80px;
  border-top: 1.5px solid #e8e8e8;
}

.ec-coord__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
}

.ec-coord__title {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  margin-bottom: 56px;
}

.ec-coord__title--red {
  color: #c0392b;
}

.ec-coord__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  justify-items: center;
}

.ec-coord__card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 16px;
  padding: 0 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  position: relative;
  padding-top: 56px; /* espacio para el avatar que sobresale */
}

.ec-coord__avatar-wrap {
  position: absolute;
  top: -52px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.ec-coord__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ec-coord__info {
  text-align: center;
}

.ec-coord__name {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin-bottom: 14px;
}

.ec-coord__detail {
  font-size: 13.5px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 4px;
}

.ec-coord__detail--schedule {
  margin-top: 10px;
  line-height: 1.8;
}

/* Responsive coordinadoras */
@media (max-width: 680px) {
  .ec-coord__grid {
    grid-template-columns: 1fr;
  }
  .ec-coord__card {
    max-width: 360px;
  }
  .ec-coord__title {
    font-size: 24px;
  }
  .ec-coord__inner {
    padding: 0 20px;
  }
}

/* ============================================================
   PÁGINA DE DETALLE DE LIBRO
   ============================================================ */

/* Breadcrumb */
.book-breadcrumb {
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
  padding: 14px 0;
}
.book-breadcrumb__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.book-breadcrumb__link {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}
.book-breadcrumb__link:hover {
  color: var(--color-rojo);
}
.book-breadcrumb__sep {
  color: #bbb;
  font-size: 12px;
}
.book-breadcrumb__current {
  color: var(--color-rojo);
  font-weight: 600;
}

/* Contenedor principal */
.book-detail {
  background: #fff;
  padding-bottom: 80px;
}

/* Sección gris superior con carátula flotante */
.book-detail__top {
  background: #f2f2f2;
  position: relative;
  padding: 48px 0 0 0;
  /* la altura se define por el contenido de la columna derecha + padding */
}
.book-detail__top-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}

/* Columna izquierda: carátula flotante */
.book-detail__cover-col {
  position: relative;
  /* la imagen sobresale hacia abajo del bloque gris */
}
.book-detail__cover {
  width: 100%;
  max-width: 320px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border-radius: 4px;
  position: relative;
  /* sobresale 160px por debajo del bloque gris */
  margin-bottom: -160px;
  background: #fff;
}

/* Columna derecha: metadatos */
.book-detail__meta {
  padding: 8px 0 48px 0;
}
.book-detail__category {
  font-family: 'Lexend', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.book-detail__title {
  font-family: 'Lexend', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 28px;
}
.book-detail__fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.book-detail__field {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
.book-detail__field strong {
  color: #333;
  font-weight: 600;
}

/* Sección inferior: sinopsis + botones de compra */
.book-detail__bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}

/* Columna izquierda inferior: espacio para la carátula + botones */
.book-detail__buy-col {
  /* padding-top = altura sobrante de la imagen flotante */
  padding-top: 180px;
}
.book-detail__buy-label {
  font-family: 'Lexend', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.book-detail__stores {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Botón de tienda — estado base (desactivado) */
.store-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.store-btn img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.45);
  transition: filter 0.2s;
}
/* Botón activo (Librería Jagüey) */
.store-btn--active {
  cursor: pointer;
  border-color: #ddd;
}
.store-btn--active img {
  filter: none;
}
/* Overlay hover rojo en Librería Jagüey */
.store-btn--active .store-btn__hover-label {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
}
.store-btn--active:hover .store-btn__hover-label {
  opacity: 1;
}
.store-btn__hover-label span {
  font-family: 'Lexend', sans-serif;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  padding: 0 8px;
}

/* Columna derecha inferior: sinopsis */
.book-detail__synopsis {
  padding-top: 48px;
}
.book-detail__synopsis p {
  font-family: 'Lexend', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: #333;
  text-align: justify;
  margin-bottom: 20px;
}
.book-detail__synopsis p:last-child {
  margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .book-detail__top-inner,
  .book-detail__bottom {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .book-detail__cover-col {
    display: flex;
    justify-content: center;
  }
  .book-detail__cover {
    max-width: 260px;
    margin-bottom: -120px;
  }
  .book-detail__meta {
    padding: 0 0 36px 0;
  }
  .book-detail__buy-col {
    padding-top: 140px;
  }
  .book-detail__title {
    font-size: 28px;
  }
}
@media (max-width: 520px) {
  .book-breadcrumb__inner,
  .book-detail__top-inner,
  .book-detail__bottom {
    padding: 0 20px;
  }
  .book-detail__cover {
    max-width: 200px;
    margin-bottom: -100px;
  }
  .book-detail__buy-col {
    padding-top: 120px;
  }
  .book-detail__title {
    font-size: 24px;
  }
  .book-detail__synopsis p {
    font-size: 14px;
  }
}
