@import url('./tokens.css');

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-main);
}

/* =========================================================
   COMPORTAMIENTO STICKY PERMANENTE DEL HEADER
   ========================================================= */
unt-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

unt-topbar,
unt-whatsapp {
  display: block;
}

main {
  position: relative;
  z-index: 30;
}

unt-footer,
footer,
#footer {
  display: block;
  position: relative;
  z-index: 10;
}


/* Ocultar barra de scroll en carruseles */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Subrayado Animado Azul Institucional #0B369A */
.nav-link-animated {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0;
  transition: color 0.2s ease-in-out;
  font-size: clamp(13.5px, 0.92vw, 16px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nav-link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2.5px;
  background-color: var(--color-accent, #C34811);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
  width: 100%;
}

/* =========================================================
   1. LAYOUT PERIMETRAL Y SANGRADO LATERAL (BLEED SLIDERS)
   ========================================================= */
.perimetral-padding {
  padding-left: clamp(1rem, 3.5vw, 4rem);
  padding-right: clamp(1rem, 3.5vw, 4rem);
}

.bleed-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.bleed-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-left: clamp(1rem, 3.5vw, 4rem);
  padding-right: 5dvw;
  gap: 1.5rem;
}

/* ==========================================================
   SECCIÓN DE PROGRAMAS DESTACADOS (RESPIRA LATERAL MÍNIMO)
   ========================================================== */
.seccion-programas-destacados {
  width: 100%;
  position: relative;
  overflow: hidden; /* Evita scroll horizontal indeseado en la página */
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  background-color: #ffffff;
}

/* Contenedor con margen lateral mínimo (entre 14px y 2vw) */
.contenedor-carrusel-fluido {
  width: 100%;
  margin: 0 auto;
  /* Separación mínima en los costados sin encajonar */
  padding: 0 clamp(14px, 2vw, 28px);
  box-sizing: border-box;
}

/* Encabezado */
.encabezado-seccion {
  text-align: center;
  margin-bottom: 1.75rem;
}

.encabezado-seccion h2 {
  font-size: clamp(28px, 2.5vw, 38px);
  font-weight: 800;
  color: var(--color-primary, #0B369A);
  letter-spacing: -0.02em;
}

.encabezado-seccion h2 span {
  color: var(--color-accent, #C34811);
}

/* Envoltorio del slider */
.envoltorio-slider {
  position: relative;
  width: 100%;
  /* Padding vertical para que las sombras y hover no se corten arriba o abajo */
  padding: 15px 0 25px;
}

/* Ajustes del carrusel Swiper */
.carrusel-programas {
  width: 100%;
  overflow: visible !important; /* Permite ver las tarjetas asomándose con fluidez */
}

.carrusel-programas .swiper-wrapper {
  display: flex;
  gap: 1.5rem;
}

.carrusel-programas .swiper-slide {
  width: 290px !important; /* Ancho base de tarjeta */
  height: auto;
  flex-shrink: 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Optimización de Sección de Carrusel: Content-Visibility */
.contenedor-carrusel-fluido {
  content-visibility: auto;
  contain-intrinsic-size: 1000px 520px;
}

/* Tarjeta interactiva con aceleración por hardware (GPU) y Cero CLS */
.card-programa {
  position: relative;
  aspect-ratio: 328 / 403;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: #111827;
  border: 1px solid rgba(217, 209, 202, 0.6);
  touch-action: manipulation;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout style paint;
}

.card-programa:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25), 0 8px 16px rgba(195, 72, 17, 0.2);
  border-color: #C34811;
}

.card-programa .img-fondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

.card-programa:hover .img-fondo {
  transform: scale(1.08) translateZ(0);
}

/* Gradiente y contenido sobre la imagen (Neutro, sin capa ni tinte azul) */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.05) 35%, rgba(0, 0, 0, 0.5) 65%, rgba(0, 0, 0, 0.92) 100%);
  color: #fff;
  z-index: 2;
  pointer-events: none; /* Delegación limpia de clics a la tarjeta */
}

.card-overlay * {
  pointer-events: auto;
}

.card-overlay h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.25;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-overlay p {
  font-size: 0.825rem;
  line-height: 1.35;
  margin-bottom: 12px;
  color: #D9D1CA;
  /* Máximo 2 líneas para no saturar */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-card {
  align-self: flex-start;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  touch-action: manipulation;
}

.card-programa:hover .btn-card {
  background: var(--color-accent, #C34811);
  border-color: var(--color-accent, #C34811);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(195, 72, 17, 0.4);
}

.btn-card:hover {
  background: var(--color-accent, #C34811);
  border-color: var(--color-accent, #C34811);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(195, 72, 17, 0.4);
}

/* Swiper navigation buttons styling */
.carrusel-programas .swiper-button-prev,
.carrusel-programas .swiper-button-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #0B369A;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border: 1px solid #D9D1CA;
  transition: all 0.25s ease;
}

.carrusel-programas .swiper-button-prev::after,
.carrusel-programas .swiper-button-next::after {
  font-size: 16px;
  font-weight: 900;
}

.carrusel-programas .swiper-button-prev:hover,
.carrusel-programas .swiper-button-next:hover {
  background: #0B369A;
  color: #ffffff;
  border-color: #0B369A;
  transform: scale(1.1);
}

.carrusel-programas .swiper-pagination-bullet {
  background: #D9D1CA;
  opacity: 1;
  transition: all 0.3s ease;
}

.carrusel-programas .swiper-pagination-bullet-active {
  background: #C34811;
  width: 24px;
  border-radius: 8px;
}

/* Máscara de Desvanecimiento en Borde Derecho (Continuidad visual) */
.desvanecidoSwiperRight {
  position: relative;
}

.desvanecidoSwiperRight::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10dvw;
  background: linear-gradient(to right, transparent, #FFFFFF 90%);
  pointer-events: none;
  z-index: 25;
}

.desvanecidoSwiperRight-surface::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10dvw;
  background: linear-gradient(to right, transparent, #F4F1EE 90%);
  pointer-events: none;
  z-index: 25;
}

/* =========================================================
   2. MENÚS DESPLEGABLES DEL HEADER (DROPDOWNS)
   ========================================================= */
.nav-dropdown {
  position: absolute;
  top: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  pointer-events: none;
  z-index: 999;
}

.group:hover .nav-dropdown,
.group:focus-within .nav-dropdown,
.nav-dropdown:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  display: block !important;
}

/* Megamenú full-width 5 columnas (9 cols Programas / 3 cols Unidades de Posgrado) */
.megamenu-item {
  position: static;
}

.megamenu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out, visibility 0.15s ease-out;
}

.megamenu-item.is-open .megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.megamenu-item.is-open .megamenu-chevron {
  transform: rotate(180deg);
}

.megamenu-surface {
  border-top: 4px solid var(--unt-dark, #0E0080);
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
  background-color: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(5, 0, 51, 0.22), 0 0 0 1px var(--surface-border, #D9D1CA);
}

.nav-dropdown.megamenu-surface {
  width: 16.5rem;
  padding: 1rem 1.25rem;
}

.group:hover .nav-dropdown-chevron,
.group:focus-within .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.megamenu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.megamenu-subcols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 1.25rem;
}

@media (min-width: 640px) {
  .megamenu-subcols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .megamenu-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .megamenu-programs-col {
    grid-column: span 9 / span 9;
  }
  .megamenu-faculties-col {
    grid-column: span 3 / span 3;
  }
  .megamenu-subcols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.megamenu-dashed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.megamenu-dashed-list > li + li {
  border-top: 1px dashed var(--surface-border, #D9D1CA);
}

.megamenu-program-link {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  padding: 0.375rem 0;
  color: #475569;
  transition: color 0.15s ease;
}

.megamenu-program-link:hover {
  color: var(--unt-dark, #0E0080);
}

.megamenu-program-link .megamenu-arrow {
  margin-top: 0.2rem;
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.megamenu-program-link:hover .megamenu-arrow {
  transform: translateX(2px);
  color: var(--terracota, #C84F44);
}

/* Cabecera descriptiva y listado horizontal de Unidad Académica filtrada */
.catalog-unit-header,
.catalog-program-list {
  grid-column: 1 / -1;
}

.catalog-program-list > a + a {
  border-top: 1px dashed var(--surface-border, #D9D1CA);
}

.catalog-unit-banner-media {
  position: relative;
  width: 100%;
  height: 12.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.catalog-unit-banner-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .catalog-unit-header {
    height: 16.5rem;
  }
  .catalog-unit-banner-media {
    width: 18rem;
    height: 100%;
  }
}

/* =========================================================
   3. CARRUSEL EN ARCO O "EFECTO DIAL" (LISTA CURVADA 3D)
   ========================================================= */
.dial-carousel-wrapper {
  position: relative;
  width: 100%;
  padding: 2.5rem 0;
  perspective: 1200px;
  overflow: hidden;
}

.lineaOnda {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 240px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.dial-track {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  position: relative;
  z-index: 10;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 2rem 5dvw 2.5rem clamp(1rem, 3.5vw, 4rem);
  scroll-snap-type: x mandatory;
}

.dial-item {
  flex: 0 0 320px;
  scroll-snap-align: center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease, border-color 0.4s ease, opacity 0.45s ease;
  transform: translateX(0px) scale(0.95);
  opacity: 0.75;
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid #D9D1CA;
  overflow: hidden;
}

.dial-item.is-adjacent {
  transform: translateX(24px) scale(0.98);
  opacity: 0.9;
}

.dial-item.is-active,
.dial-item:hover {
  transform: translateX(48px) scale(1.04);
  opacity: 1;
  border: 2px solid #C34811 !important;
  box-shadow: 0 20px 40px -10px rgba(195, 72, 17, 0.3), 0 10px 20px -5px rgba(11, 54, 154, 0.15) !important;
  z-index: 30;
}

.dial-item img {
  transition: transform 0.4s ease;
}

.dial-item:hover img,
.dial-item.is-active img {
  transform: scale(1.1);
}

/* =========================================================
   4. TIPOGRAFÍA PROTAGÓNICA Y SÍNTESIS DE TEXTO
   ========================================================= */
.title-dominant-h1 {
  font-size: clamp(40px, 2.8vw + 32px, 50px) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.03em !important;
}

.title-dominant-h2 {
  font-size: clamp(32px, 2.5vw + 24px, 40px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
}

.text-synthesis-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.text-synthesis-3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ================= BOTÓN FLOTANTE DE WHATSAPP ================= */
.whatsapp-btn {
  width: 58px;
  height: 58px;
  background-color: #25D366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.12);
  background-color: #20ba5a;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.6);
}

/* Globo / Tooltip emergente de WhatsApp "¿Necesitas ayuda? Escríbenos por WhatsApp" */
.whatsapp-bubble {
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.whatsapp-bubble.show,
.group:hover .whatsapp-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Toast Notification Flotante */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  background-color: #0B369A;
  color: #ffffff;
  border: 2px solid #C34811;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(7, 37, 109, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast-notification.hide {
  opacity: 0;
  transform: translateX(100%);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Gradientes Oficiales UNT (Gallery Blue #0B369A) */
.gradient-unt-hero {
  background: radial-gradient(circle at top right, #1A4EB8 0%, #0B369A 50%, #041745 100%);
}

.terracotta-glow {
  color: #C34811;
  text-shadow: 0 0 25px rgba(195, 72, 17, 0.6);
}

/* Glassmorphism y Formulario */
.glass-hero-search {
  background: rgba(11, 54, 154, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(195, 72, 17, 0.4);
}

.form-box-dark {
  background-color: #07256D;
  border: 1px solid #1A4EB8;
}

/* Botones CTA Institucionales Burnt Terracotta #C34811 */
.btn-cta-gold,
.btn-cta-terracotta {
  background-color: #C34811;
  color: #ffffff;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(195, 72, 17, 0.45);
}

.btn-cta-gold:hover,
.btn-cta-terracotta:hover {
  background-color: #A4390B;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(164, 57, 11, 0.5);
}

.btn-cta-gold:active,
.btn-cta-terracotta:active {
  transform: scale(0.98);
}

/* ================= SCROLL REVEAL REENTRANTE Y BI-DIRECCIONAL ================= */
.scroll-reveal,
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible,
.reveal-on-scroll.revealed,
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desactivar el efecto de ocultamiento en móviles y pantallas táctiles */
@media (max-width: 768px) {

  .scroll-reveal,
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
  }
}

/* Acordeones */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.accordion-content.open {
  max-height: 1000px;
  transition: max-height 0.5s ease-in-out;
}

.chevron-icon {
  transition: transform 0.3s ease-in-out;
}

.chevron-icon.rotate {
  transform: rotate(180deg);
}

/* Validación y Feedback */
.input-error {
  border-color: var(--color-error) !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
}

.input-success {
  border-color: var(--color-whatsapp) !important;
}

.field-error-msg {
  color: #FFDE29;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
  font-weight: 600;
}

/* =========================================================
   CARRUSEL DE PROGRAMAS DESTACADOS (TOP 10)
   ========================================================= */
#carousel-featured {
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

#carousel-featured>div {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* =========================================================
   TARJETAS Y POPOVERS FLOTANTES DE UNIDADES ACADÉMICAS
   ========================================================= */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Tarjeta de Unidad: Conserva siempre 100% de brillo, color y nitidez */
.unit-card {
  position: relative;
  background-color: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.unit-card:hover,
.unit-card.is-open {
  z-index: 99999 !important;
  border-color: rgba(28, 0, 255, 0.4);
}

/* Contenedor del Botón y Popover (Wrapper) */
.popover-wrapper {
  position: relative;
}

.popover-wrapper:hover,
.popover-wrapper:focus-within {
  z-index: 99999 !important;
}

/* Panel Popover con máxima prioridad visual */
.popover-panel {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999 !important;
  background-color: #ffffff;
  pointer-events: auto !important;
}

/* Hit-bridge superior para posición hacia abajo */
.popover-panel.popover-pos-down::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
}

/* Hit-bridge inferior para posición hacia arriba (Flip) */
.popover-panel.popover-pos-up::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
}

/* Scrollbar Personalizado para Popovers */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =========================================================
   TARJETAS MISIÓN / VISIÓN CON BORDE GEOMÉTRICO (EPG UNT)
   ========================================================= */
.uc_image_grid_border_holder {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .uc_image_grid_border_holder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.uc_image_grid_border_box {
  position: relative;
  border-radius: 1.75rem;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.25rem;
  box-shadow: 0 15px 35px -10px rgba(7, 37, 109, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(11, 54, 154, 0.3);
  background-color: #07256D;
}

.uc_image_grid_border_box:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(11, 54, 154, 0.45);
  border-color: rgba(11, 54, 154, 0.7);
}

.uc_image_grid_border_box .uc_image_box {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.uc_image_grid_border_box:hover .uc_image_box {
  transform: scale(1.08);
}

.uc_image_grid_border_box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.92) 100%);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.uc_image_grid_border_box .uc_box_content {
  position: relative;
  z-index: 3;
  color: #ffffff;
  padding: 1rem 0 0 0;
}

.uc_image_grid_border_box .border.one {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 44px;
  height: 44px;
  border-top: 3px solid #C34811;
  border-left: 3px solid #C34811;
  border-top-left-radius: 12px;
  pointer-events: none;
  z-index: 4;
}

.uc_image_grid_border_box .border.two {
  position: absolute;
  bottom: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border-bottom: 3px solid #C34811;
  border-right: 3px solid #C34811;
  border-bottom-right-radius: 12px;
  pointer-events: none;
  z-index: 4;
}

.uc_image_grid_border_box .uc_title {
  font-size: 1.75rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.uc_image_grid_border_box .uc_sub_title {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #f1f5f9;
  font-weight: 500;
  text-align: justify;
}

/* ==========================================================
   SUITE GLOBAL DE ANIMACIONES, INTERACCIONES Y DINAMISMO VISUAL
   ========================================================== */

/* 1. TRANSICIONES GLOBALES DE IMÁGENES Y ELEMENTOS INTERACTIVOS */
img {
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease, opacity 0.3s ease;
}

.group:hover img:not(.no-zoom),
.group:hover .img-zoom,
.unit-card:hover img,
.tarjetaCampus:hover img,
.tarjetaNoticia:hover img {
  transform: scale(1.06);
}

/* 2. BOTONES Y ENLACES (HOVER, ESCALA Y DESPLAZAMIENTO) */
.btn-cta-gold,
.btn_hero,
.btn_postula_hd_cds,
.btn_controlador,
.botonPrimario {
  transition: background-color 0.3s ease, transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease, color 0.3s ease !important;
}

.btn-cta-gold:hover,
.btn_hero:hover,
.btn_postula_hd_cds:hover,
.btn_controlador:hover,
.botonPrimario:hover,
.botonPrimario:focus-visible {
  transform: scale(1.05) translateY(-2px);
}

.botonReproducirGrande {
  transition: all 0.3s ease;
}

.botonReproducirGrande:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Botones de control de carruseles / sliders */
.ctn_btn_slider .swiper-button-prev,
.ctn_btn_slider .swiper-button-next,
.ctn_btn_destacada .swiper-button-prev,
.ctn_btn_destacada .swiper-button-next,
.ctn_btn_slider_programas .swiper-button-prev,
.ctn_btn_slider_programas .swiper-button-next,
.ctn_btn_info_destacada .swiper-button-prev,
.ctn_btn_info_destacada .swiper-button-next,
.botonControl,
#prev-featured,
#next-featured {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.ctn_btn_slider .swiper-button-prev:hover,
.ctn_btn_slider .swiper-button-next:hover,
.ctn_btn_destacada .swiper-button-prev:hover,
.ctn_btn_destacada .swiper-button-next:hover,
.ctn_btn_slider_programas .swiper-button-prev:hover,
.ctn_btn_slider_programas .swiper-button-next:hover,
.ctn_btn_info_destacada .swiper-button-prev:hover,
.ctn_btn_info_destacada .swiper-button-next:hover,
.botonControl:hover,
#prev-featured:hover,
#next-featured:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px -5px rgba(69, 48, 43, 0.25);
}

/* Botones de enlace / lectura */
.botonLeer,
.enlaceLlamadoAccion {
  transition: all 0.3s ease;
}

.botonLeer:hover,
.enlaceLlamadoAccion:hover {
  transform: translateY(-2px);
}

.linkCard {
  transition: all 0.3s ease;
}

.linkCard:hover {
  transform: translateY(-2px) scale(1.02);
}

.enlaceTodas {
  transition: color 0.3s ease, transform 0.3s ease;
}

.enlaceTodas:hover {
  transform: translateX(5px);
}

.itemCategoria {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.itemCategoria:hover {
  transform: translateX(5px);
}

.itemCategoria.activo {
  transform: translateX(0);
}

/* Paginación interactiva */
.paginacionProgramas .swiper-pagination-bullet,
.paginacionInfoDestacada .swiper-pagination-bullet {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.paginacionProgramas .swiper-pagination-bullet:hover,
.paginacionInfoDestacada .swiper-pagination-bullet:hover {
  transform: scale(1.25);
}

/* Botón de cierre modal */
.btnCerrar {
  scale: 0.9;
  transition: scale 0.2s ease;
}

.btnCerrar:hover {
  scale: 1;
}

/* 3. TARJETAS E IMÁGENES (ELEVACIÓN Y ZOOM SUAVE) */
.tarjetaInfo,
.tarjetaNoticia {
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.tarjetaInfo:hover {
  transform: translateY(-6px);
}

.tarjetaNoticia:hover {
  transform: translateY(-8px);
}

.tarjetaCampus {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

.tarjetaCampus:hover {
  transform: translateY(-8px);
}

.imagenFondoCampus {
  transition: transform 0.6s ease;
}

.tarjetaCampus:hover .imagenFondoCampus {
  transform: scale(1.08);
}

.card,
.card-hover-lift {
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease;
}

.card:hover,
.card-hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
}

.cardInfoDestacada {
  transition: box-shadow 0.4s ease, transform 0.4s ease, scale 0.4s ease;
}

.cardInfoDestacada:hover {
  transform: scale(1.02) translateY(-6px);
}

.imagenNoticia {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tarjetaNoticia:hover .imagenNoticia {
  transform: scale(1.06);
}

.imagenVideoDestacado {
  transition: transform 0.4s ease-out;
}

.contenedorReproductor:hover .imagenVideoDestacado {
  transform: scale(1.03);
}

.imagenMiniatura {
  transition: transform 0.4s ease;
}

.tarjetaLineaTiempo:hover .imagenMiniatura {
  transform: scale(1.1);
}

.btnChatBot img {
  transition: transform 0.2s ease;
}

.btnChatBot:hover .ctnUcvcito {
  transform: scale(1.1);
}

.revealTopBack {
  transform: perspective(800px) rotateX(15deg) translateY(40px) scale(0.7);
  opacity: 0.1;
}

/* 4. ANIMACIONES CON KEYFRAMES */
.anim-abajo {
  animation: entrarAbajo 0.55s ease-out both;
}

@keyframes entrarAbajo {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-entrada,
.anim-izquierda {
  animation: entrarIzquierda 0.55s ease-out both;
}

@keyframes entrarIzquierda {
  0% {
    opacity: 0;
    transform: translateX(-70px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes entrarDerecha {
  0% {
    opacity: 0;
    transform: translateX(80px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.ctnVideos img,
.anim-flotar {
  animation: flotacionSuave 3s ease-in-out infinite;
}

@keyframes flotacionSuave {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.01);
  }
}

.cargando {
  animation: cargando 1s ease-in-out infinite !important;
}

@keyframes cargando {
  0%   { transform: translateY(0) rotate(0); }
  25%  { transform: translateY(4px) rotate(-8deg); }
  50%  { transform: translateY(0) rotate(0); }
  75%  { transform: translateY(4px) rotate(8deg); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}