/* ==========================================================================
   PÁGINA DE INICIO — ITSRLL / TecNM
   --------------------------------------------------------------------------
   Sistema visual:
   · Color      Azul institucional #0b2652 (autoridad), dorado #d4af37 (acento,
                solo en botones, líneas y detalles), dorado oscuro #8a6a0a para
                texto sobre fondo claro (contraste 5:1). Fondos: papel, arena y blanco.
   · Tipografía Playfair Display (titulares) + Source Sans 3 (texto e interfaz).
   · Escala     Títulos fluidos con clamp(); texto 17 px; etiquetas 13 px.
   · Espacio    Escala de 4 px; secciones con --sec.
   · Formas     Radio 6 px, líneas de 1 px, una sola sombra suave.
   Todo el contenido propio del home usa el prefijo "rh-" y vive dentro de
   <main class="rh-home">; las reglas de la parte superior (franja de logos
   y menú) sólo ajustan la integración visual del encabezado oficial.
   ========================================================================== */

:root {
  --azul: #0b2652;
  --azul-700: #12336a;
  --azul-100: #e8eef7;
  --oro: #d4af37;
  --oro-claro: #f0dca0;
  --oro-texto: #8a6a0a;
  --papel: #fbfaf6;
  --arena: #f3efe6;
  --tinta: #16233b;
  --gris: #566178;
  --linea: #e2dccd;
  --f-titulo: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-texto: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r: 6px;
  --sombra: 0 1px 2px rgba(11, 38, 82, .06), 0 14px 30px -18px rgba(11, 38, 82, .32);
  --ancho: 1200px;
  --sec: clamp(64px, 8vw, 112px);
  --solape: clamp(48px, 6vw, 80px);
}

/* ---------- Base del contenido propio ---------- */
.rh-home {
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: #fff;
}

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

.rh-home h1,
.rh-home h2,
.rh-home h3,
.rh-home h4 {
  font-family: var(--f-titulo);
  font-weight: 600;
  color: var(--azul);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -.005em;
}

.rh-home p { margin: 0; }
.rh-home ul { list-style: none; margin: 0; padding: 0; }
.rh-home figure { margin: 0; }
.rh-home img { display: block; max-width: 100%; background: none; animation: none; }
/* Color y subrayado de enlaces: cada componente define --c; así Bootstrap 4 (a:hover) no los altera */
.rh-home a,
.rh-home a:hover,
.rh-home a:focus,
#modalPromocion a,
#modalPromocion a:hover,
#modalPromocion a:focus { color: var(--c, inherit); text-decoration: none; }

.rh-wrap {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.rh-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rh-saltar {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 5000;
  background: var(--azul);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font: 600 .9375rem var(--f-texto);
  text-decoration: none;
}
.rh-saltar:hover { color: #fff; }
.rh-saltar:focus { top: 12px; }

/* Foco visible en todo el contenido propio */
.rh-home a:focus-visible,
.rh-home button:focus-visible {
  outline: 3px solid var(--oro);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Iconos (sprite SVG único) ---------- */
.rh-ico {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rh-ico--lleno { fill: currentColor; stroke: none; }

/* ---------- Componentes ---------- */
.rh-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 .8125rem/1 var(--f-texto);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--oro-texto);
  margin-bottom: 16px;
}
.rh-eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--oro);
}

.rh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 4px;
  font: 600 1rem/1 var(--f-texto);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.rh-btn .rh-ico { transition: transform .2s; }
.rh-btn:hover .rh-ico { transform: translateX(3px); }

.rh-btn--oro { background: var(--oro); --c: var(--azul); }
.rh-btn--oro:hover { background: #e2bf4c; transform: translateY(-1px); }

.rh-btn--linea { --c: var(--azul); border-color: rgba(11, 38, 82, .28); background: transparent; }
.rh-btn--linea:hover { border-color: var(--azul); background: #fff; }

.rh-btn--claro { --c: #fff; border-color: rgba(255, 255, 255, .4); background: transparent; }
.rh-btn--claro:hover { border-color: var(--oro); --c: var(--oro-claro); }

.rh-btn--azul { background: var(--azul); --c: #fff; }
.rh-btn--azul:hover { background: var(--azul-700); }

.rh-cab {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.rh-cab h2 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); }
.rh-cab p { margin-top: 12px; max-width: 36rem; color: var(--gris); }

.rh-mas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--oro);
  font-weight: 600;
  --c: var(--azul);
  transition: color .2s, gap .2s;
}
.rh-mas:hover { --c: var(--oro-texto); gap: 12px; }

/* ==========================================================================
   1. PORTADA - HERO IMPACTANTE
   ========================================================================== */
.rh-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--azul);
}

/* Imagen de fondo a pantalla completa */
.rh-hero__imagen-fondo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rh-hero__imagen-fondo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay oscuro para legibilidad */
.rh-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 38, 82, 0.88) 0%,
    rgba(11, 38, 82, 0.82) 40%,
    rgba(11, 38, 82, 0.75) 100%
  );
}

/* Contenido del hero */
.rh-hero__contenido {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 8vw, 120px) 0;
}

.rh-hero__texto {
  max-width: 900px;
}

.rh-hero .rh-eyebrow {
  color: var(--oro-claro);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.rh-hero .rh-eyebrow::before {
  background: var(--oro);
}

.rh-hero__titulo {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 24px;
  color: #d4af37 !important;
  font-weight: 700;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.6);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.rh-hero__titulo em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: #d4af37 !important;
  margin-top: 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

.rh-hero__subtitulo {
  font-family: var(--f-titulo);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 32px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 1s;
}

.rh-hero__ubicacion {
  font-family: var(--f-texto);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 1.2s;
}

.rh-hero__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

/* Estadísticas impactantes */
.rh-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 800px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 1.4s;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 0;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Animación fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-numero {
  font-family: var(--f-titulo);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--oro);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  word-break: keep-all;
}

.stat-logo {
  font-family: var(--f-titulo);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--oro);
  line-height: 1.2;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.08em;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 1024px) {
  .rh-hero {
    min-height: 75vh;
  }

  .rh-hero__titulo {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }

  .rh-hero__intro {
    font-size: 1.125rem;
  }

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

@media (max-width: 768px) {
  .rh-hero {
    min-height: auto;
  }

  .rh-hero__contenido {
    padding: clamp(80px, 12vw, 100px) 0 clamp(60px, 10vw, 80px);
  }

  .rh-hero__titulo {
    font-size: clamp(1.875rem, 7vw, 2.5rem);
    margin-bottom: 20px;
  }

  .rh-hero__subtitulo {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    margin-bottom: 32px;
  }

  .rh-hero__ubicacion {
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin-bottom: 48px;
  }

  .rh-hero__acciones {
    flex-direction: column;
    gap: 12px;
  }

  .rh-hero__acciones .rh-btn {
    width: 100%;
  }

  .rh-hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 20px 12px;
  }

  .stat-numero {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  .stat-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .rh-hero__stats {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  .rh-hero__overlay {
    background: linear-gradient(
      135deg,
      rgba(11, 38, 82, 0.94) 0%,
      rgba(11, 38, 82, 0.88) 100%
    );
  }
}

/* ==========================================================================
   2. OFERTA EDUCATIVA — Grid pegado full-width
   ========================================================================== */
.rh-oferta { 
  padding: 0;
  margin: 0;
  background: transparent;
}

.rh-oferta .rh-wrap {
  max-width: none;
  padding: 0;
  margin: 0;
}

.rh-oferta__header {
  display: none;
}

/* Grid de carreras pegado y full-width */
.rh-carreras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  width: 100%;
}

/* Tarjeta individual */
.carrera-card {
  position: relative;
  overflow: hidden;
  background: var(--azul);
  aspect-ratio: 16 / 9;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación de aparición al hacer scroll */
.carrera-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay escalonado para cada tarjeta */
.carrera-card:nth-child(1) { transition-delay: 0.1s; }
.carrera-card:nth-child(2) { transition-delay: 0.2s; }
.carrera-card:nth-child(3) { transition-delay: 0.3s; }
.carrera-card:nth-child(4) { transition-delay: 0.4s; }
.carrera-card:nth-child(5) { transition-delay: 0.5s; }
.carrera-card:nth-child(6) { transition-delay: 0.6s; }

.carrera-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

/* Imagen de la carrera */
.carrera-imagen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carrera-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrera-card:hover .carrera-imagen img {
  transform: scale(1.08);
}

/* Overlay con información */
.carrera-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 38, 82, 0.85) 0%,
    rgba(11, 38, 82, 0.5) 50%,
    rgba(11, 38, 82, 0.3) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 32px;
  transition: background 0.4s ease;
}

.carrera-card:hover .carrera-overlay {
  background: linear-gradient(
    to top,
    rgba(11, 38, 82, 0.92) 0%,
    rgba(11, 38, 82, 0.7) 60%,
    rgba(11, 38, 82, 0.4) 100%
  );
}

/* Información de la carrera */
.carrera-info {
  color: white;
  width: 100%;
}

.carrera-nombre {
  font-family: var(--f-titulo);
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: #d4af37 !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.carrera-modalidad {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95) !important;
  margin: 0 0 16px 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.carrera-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--oro);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.carrera-card:hover .carrera-cta {
  opacity: 1;
  transform: translateY(0);
  gap: 12px;
}

.carrera-cta .rh-ico {
  width: 1em;
  height: 1em;
}

/* Link extra (modalidad virtual) */
.carrera-extra {
  display: none;
}

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

@media (max-width: 768px) {
  .rh-carreras-grid {
    grid-template-columns: 1fr;
  }

  .carrera-overlay {
    padding: 24px;
  }

  .carrera-nombre {
    font-size: 1.25rem;
  }

  .carrera-cta {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   3. NOTICIAS — composición editorial
   ========================================================================== */
.rh-noticias { background: var(--arena); padding: var(--sec) 0; }

.rh-noticias__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 56px);
}

.rh-nota { position: relative; }
.rh-nota__foto { overflow: hidden; border-radius: var(--r); background: #e6dfcd; }
.rh-nota__foto img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.rh-nota:hover .rh-nota__foto img { transform: scale(1.03); }

.rh-nota__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 8px;
  font: 700 .75rem/1.2 var(--f-texto);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--oro-texto);
}
.rh-nota__meta span + span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: .875rem;
  color: var(--gris);
}
.rh-nota h3 a { color: inherit; text-decoration: none; }
.rh-nota h3 a::after { content: ""; position: absolute; inset: 0; }
.rh-nota h3 a:hover { text-decoration: underline; text-decoration-color: var(--oro); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.rh-nota p { color: var(--gris); }

.rh-nota--principal .rh-nota__foto { aspect-ratio: 16 / 9; margin-bottom: 24px; }
.rh-nota--principal h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 12px; }
.rh-nota--principal p { max-width: 38rem; }

.rh-notas-lado { display: flex; flex-direction: column; justify-content: space-between; }
.rh-nota--fila {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid #d8d0bd;
}
.rh-nota--fila:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.rh-nota--fila .rh-nota__foto { aspect-ratio: 4 / 3; }
.rh-nota--fila h3 { font-size: 1.25rem; margin-bottom: 8px; }
.rh-nota--fila p { font-size: .9375rem; line-height: 1.55; }

.rh-campana {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  margin-top: clamp(40px, 5vw, 72px);
  background: #fff;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sombra);
}
.rh-campana__foto img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.rh-campana__texto { padding: clamp(24px, 4vw, 48px); border-left: 4px solid var(--oro); }
.rh-campana h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); margin-bottom: 12px; }
.rh-campana p { color: var(--gris); }
.rh-campana ul { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.rh-campana li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--linea);
  border-radius: 20px;
  font-size: .9375rem;
  font-weight: 600;
  --c: var(--azul);
  transition: border-color .2s, background-color .2s;
}
.rh-campana li a:hover { border-color: var(--oro); background: var(--papel); }

/* ==========================================================================
   4. AVISOS Y COMUNICADOS
   ========================================================================== */
.rh-avisos { background: #fff; padding: var(--sec) 0; }

.rh-avisos__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.rh-aviso-vigente { padding: 16px; background: var(--azul-100); border-radius: var(--r); }
.rh-aviso-vigente img { width: 100%; height: auto; border-radius: 4px; }
.rh-aviso-vigente figcaption { padding: 16px 4px 4px; }
.rh-aviso-vigente strong {
  display: block;
  margin-bottom: 2px;
  font: 700 .75rem/1.2 var(--f-texto);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--oro-texto);
}
.rh-aviso-vigente span { font: 600 1.25rem/1.3 var(--f-titulo); color: var(--azul); }
.rh-aviso-vigente small { display: block; margin-top: 2px; color: var(--gris); }

.rh-comunicados { border-bottom: 1px solid var(--linea); }
.rh-comunicados li { border-top: 1px solid var(--linea); }
.rh-com {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  --c: var(--azul);
  transition: padding-left .2s, background-color .2s;
}
.rh-com:hover { padding-left: 14px; background: var(--papel); }
.rh-com small {
  display: block;
  font: 700 .6875rem/1.2 var(--f-texto);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--oro-texto);
}
.rh-com strong { display: block; font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.rh-com__tipo {
  font: 700 .6875rem/1 var(--f-texto);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gris);
}
.rh-com > .rh-ico { color: var(--oro-texto); transition: transform .2s; }
.rh-com:hover > .rh-ico { transform: translateX(3px); }

/* ==========================================================================
   5. VIDA ESTUDIANTIL — mosaico
   ========================================================================== */
.rh-vida { background: var(--papel); padding: var(--sec) 0; }

.rh-mosaico {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(110px, 15vw, 190px);
  gap: 12px;
}
.rh-mosaico figure { overflow: hidden; border-radius: var(--r); background: var(--arena); }
.rh-mosaico img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.rh-mosaico figure:hover img { transform: scale(1.03); }
.rh-mosaico__a { grid-column: 1 / 6; grid-row: 1 / 4; }
.rh-mosaico__b { grid-column: 6 / 13; grid-row: 1 / 3; }
.rh-mosaico__c { grid-column: 6 / 10; grid-row: 3 / 4; }
.rh-mosaico__d { grid-column: 10 / 13; grid-row: 3 / 4; }
.rh-mosaico__a img { object-position: 72% center; }

/* ==========================================================================
   6. COMUNIDAD EN REDES
   ========================================================================== */
.rh-comunidad { background: var(--azul); color: #fff; padding: var(--sec) 0; }
.rh-comunidad .rh-eyebrow { color: var(--oro-claro); }
.rh-comunidad h2 { color: #fff; }
.rh-comunidad .rh-cab p { color: rgba(255, 255, 255, .78); }
.rh-comunidad__botones { display: flex; flex-wrap: wrap; gap: 12px; }
.rh-comunidad__botones .rh-btn { min-height: 44px; }

.rh-comunidad__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 3vw, 32px);
}
.rh-video {
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
}
.rh-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.rh-fb { border-radius: var(--r); overflow: hidden; background: #fff; min-height: 340px; }
.rh-fb iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ==========================================================================
   7. ENLACES DE INTERÉS
   ========================================================================== */
.rh-enlaces { background: #fff; padding: clamp(48px, 6vw, 72px) 0 clamp(56px, 7vw, 88px); }
.rh-enlaces h2 { font-size: clamp(1.375rem, 2vw, 1.625rem); margin-bottom: 24px; }

.rh-enlaces__lista {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 32px;
}
.rh-enlace {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-top: 1px solid var(--linea);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.3;
  --c: var(--azul);
  transition: color .2s, padding-left .2s;
}
.rh-enlace:hover { --c: var(--oro-texto); padding-left: 10px; }
.rh-enlace img { flex: none; width: 64px; height: 34px; object-fit: contain; }

/* ==========================================================================
   Adaptación a pantallas
   ========================================================================== */
@media (max-width: 1080px) {
  .rh-noticias__grid { grid-template-columns: 1fr; }
  .rh-notas-lado { flex-direction: row; gap: 28px; }
  .rh-notas-lado .rh-nota--fila { flex: 1; grid-template-columns: 1fr; border-bottom: 0; margin: 0; padding: 0; }
  .rh-enlaces__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .rh-hero::before { display: none; }
  .rh-hero__grid { grid-template-columns: 1fr; }
  .rh-hero__media { padding-right: 0; }
  .rh-hero__media::before { right: -8px; }
  .rh-hero__inset { left: 0; }
  .rh-hero { padding-bottom: calc(var(--solape) + 24px); }

  .rh-oferta__grid { grid-template-columns: 1fr; }
  .rh-visor { display: none; }
  .rh-prog { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .rh-prog::before { display: none; }
  .rh-home .rh-prog__miniatura { display: block; width: 84px; height: 64px; object-fit: cover; border-radius: 4px; }
  .rh-prog__extra { margin-left: 100px; }

  .rh-avisos__grid { grid-template-columns: 1fr; }
  .rh-campana { grid-template-columns: 1fr; }
  .rh-campana__foto img { min-height: 0; aspect-ratio: 16 / 9; }
  .rh-campana__texto { border-left: 0; border-top: 4px solid var(--oro); }
  .rh-comunidad__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rh-hero__datos { grid-template-columns: 1fr 1fr; }
  .rh-hero__datos div:last-child { grid-column: 1 / -1; }
  .rh-hero__inset { width: 40%; }
  .rh-hero__acciones .rh-btn { flex: 1 1 100%; }

  .rh-notas-lado { flex-direction: column; }
  .rh-notas-lado .rh-nota--fila { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .rh-com { grid-template-columns: minmax(0, 1fr) auto; }
  .rh-com__tipo { display: none; }

  .rh-mosaico { grid-auto-rows: 120px; gap: 8px; }
  .rh-mosaico__a { grid-column: 1 / 8; grid-row: 1 / 3; }
  .rh-mosaico__b { grid-column: 8 / 13; grid-row: 1 / 3; }
  .rh-mosaico__c { grid-column: 1 / 7; grid-row: 3 / 4; }
  .rh-mosaico__d { grid-column: 7 / 13; grid-row: 3 / 4; }

  .rh-enlaces__lista { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-home *,
  .rh-home *::before,
  .rh-home *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   INTEGRACIÓN VISUAL DEL ENCABEZADO OFICIAL (sólo en esta página)
   No se modifican logotipos, enlaces ni textos: sólo alineación, tamaños
   homogéneos y estilo del menú. Los selectores empiezan en "body" porque las
   hojas del encabezado se cargan después de ésta.
   ========================================================================== */

/* Barra gob.mx: alinear con la columna de contenido */
body #barraGobmx .navbar-brand {
  margin-left: max(20px, calc((100vw - var(--ancho)) / 2 + 40px)) !important;
}
body #barraGobmx > .ml-auto {
  padding-right: max(20px, calc((100vw - var(--ancho)) / 2 + 40px)) !important;
}

/* Franja de logotipos: misma altura y separación regular */
body .centro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 40px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--linea);
}
body .centro a {
  display: flex;
  align-items: center;
  font-size: 0;      /* anula los &nbsp; que separaban los logos */
  line-height: 0;
}
body .centro a img {
  width: auto !important;
  height: 50px;
  max-width: none;
  background: none !important;
  animation: none !important;
}
body .centro a img[alt="Correo institucional"],
body .centro a img[alt="Calendario de actividades"] { height: 34px; }
body .centro a:nth-of-type(6) {
  margin-left: 12px;
  padding-left: 40px;
  border-left: 1px solid var(--linea);
}

/* Menú principal */
body nav.navbar.sticky-top {
  background: var(--azul);
  padding: 0;
  box-shadow: none;
  border-bottom: 2px solid var(--oro);
}
body nav.navbar.sticky-top .navbar-nav { margin: 0 auto; }
body nav.navbar.sticky-top .nav-item { margin: 0 2px; }
body nav.navbar.sticky-top .nav-link {
  position: relative;
  padding: 18px 14px !important;
  font: 600 .8125rem/1 var(--f-texto);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #fff !important;
  transition: color .2s;
}
body nav.navbar.sticky-top .nav-link::before {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 10px;
  height: 2px;
  background: var(--oro);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
body nav.navbar.sticky-top .nav-link:hover,
body nav.navbar.sticky-top .nav-link:focus,
body nav.navbar.sticky-top .nav-link.active,
body nav.navbar.sticky-top .show > .nav-link { color: var(--oro-claro) !important; }
body nav.navbar.sticky-top .nav-link:hover::before,
body nav.navbar.sticky-top .nav-link:focus::before,
body nav.navbar.sticky-top .nav-link.active::before,
body nav.navbar.sticky-top .show > .nav-link::before { transform: scaleX(1); }
body nav.navbar.sticky-top .nav-link:focus-visible { outline: 2px solid var(--oro); outline-offset: -4px; }

body nav.navbar.sticky-top .dropdown-menu {
  min-width: 270px;
  margin-top: 0;
  padding: 8px 0;
  background: #fff;
  border: 0;
  border-top: 3px solid var(--oro);
  border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 22px 36px -14px rgba(11, 38, 82, .4);
}
body nav.navbar.sticky-top .dropdown-menu .dropdown-item {
  padding: 9px 20px;
  font: 500 .9375rem/1.4 var(--f-texto);
  white-space: normal;
  color: var(--azul) !important;
  background: transparent;
}
body nav.navbar.sticky-top .dropdown-menu .dropdown-item:hover,
body nav.navbar.sticky-top .dropdown-menu .dropdown-item:focus {
  background: var(--arena);
  color: var(--azul) !important;
}
body nav.navbar.sticky-top .navbar-toggler {
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, .5);
}

@media (max-width: 1199px) {
  body nav.navbar.sticky-top .nav-link { padding: 18px 9px !important; letter-spacing: .06em; }
  body nav.navbar.sticky-top .nav-link::before { left: 9px; right: 9px; }
  body .centro { gap: 10px 28px; }
}

@media (max-width: 991px) {
  body nav.navbar.sticky-top .navbar-collapse { padding-bottom: 12px; }
  body nav.navbar.sticky-top .nav-item { margin: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  body nav.navbar.sticky-top .nav-link { padding: 14px 4px !important; }
  body nav.navbar.sticky-top .nav-link::before { display: none; }
  body nav.navbar.sticky-top .dropdown-menu {
    background: rgba(255, 255, 255, .07);
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body nav.navbar.sticky-top .dropdown-menu .dropdown-item { color: #fff !important; }
  body nav.navbar.sticky-top .dropdown-menu .dropdown-item:hover,
  body nav.navbar.sticky-top .dropdown-menu .dropdown-item:focus { background: rgba(255, 255, 255, .1); color: var(--oro-claro) !important; }
}

@media (max-width: 767px) {
  body #barraGobmx .navbar-brand { margin-left: 16px !important; }
  body #barraGobmx > .ml-auto { padding-right: 12px !important; gap: 12px !important; }
  body .centro { gap: 8px 20px; padding: 10px 16px; }
  body .centro a img { height: 40px; }
  body .centro a img[alt="Correo institucional"],
  body .centro a img[alt="Calendario de actividades"] { height: 30px; }
  body .centro a:nth-of-type(6) { margin-left: 0; padding-left: 20px; }
}

/* Botón "subir": plano, con los colores institucionales */
body #scrollToTop {
  background: var(--oro);
  box-shadow: var(--sombra);
  color: var(--azul);
}
body #scrollToTop:hover { background: #e2bf4c; box-shadow: var(--sombra); }

/* ==========================================================================
   VENTANA PROMOCIONAL (se abre una vez por sesión; lógica en js/modal-promocion.js)
   ========================================================================== */
#modalPromocion.modal-promocion {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  padding: 16px;
  align-items: center;
  justify-content: center;
}
#modalPromocion.modal-promocion.active { display: flex !important; }
#modalPromocion .modal-promocion-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 38, 82, .55);
}
#modalPromocion .modal-promocion-contenido {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 40px 36px 32px;
  background: #fff;
  border-top: 4px solid var(--oro);
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
  font-family: var(--f-texto);
  color: var(--tinta);
  animation: none;
}
#modalPromocion .modal-promocion-cerrar {
  position: absolute;
  top: 10px; right: 10px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: var(--gris);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
#modalPromocion .modal-promocion-cerrar:hover { background: var(--arena); color: var(--azul); transform: none; }
#modalPromocion .modal-promocion-cerrar:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
#modalPromocion .modal-logo { width: 52px; height: auto; margin-bottom: 16px; animation: none; }
#modalPromocion .modal-promocion-titulo {
  margin: 0 0 8px !important;
  font: 600 clamp(1.625rem, 4vw, 2rem)/1.15 var(--f-titulo) !important;
  color: var(--azul) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
#modalPromocion .modal-promocion-subtitulo { margin: 0 0 20px; font-size: 1.0625rem; color: var(--gris); opacity: 1; }
#modalPromocion .modal-carreras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 24px;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  list-style: none;
}
#modalPromocion .modal-carreras li {
  padding: 4px 12px;
  background: var(--azul-100);
  border-radius: 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--azul);
}
#modalPromocion .modal-promocion-botones { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
#modalPromocion .modal-promocion-botones .rh-btn { flex: 1 1 180px; }
#modalPromocion .modal-promocion-contacto {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: .9375rem;
  color: var(--gris);
}
#modalPromocion .modal-contacto-item { display: flex; align-items: center; gap: 8px; }
#modalPromocion .modal-contacto-item i { color: var(--oro-texto); }
@media (max-width: 480px) {
  #modalPromocion .modal-promocion-contenido { padding: 36px 22px 24px; }
}
