/* ======================================================
   RESET
====================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
}

/* ======================================================
   HEADER GENERAL
====================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
  color: #800404;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}


/* ======================================================
   HEADER INTERNO
====================================================== */

.header-inner {
  max-width: 1300px;
  margin: auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 75px;
}

/* ======================================================
   LINKS SUPERIORES
====================================================== */

.top-links a {
  color: #800404;
  text-decoration: none;
  margin: 0 6px;
  font-size: 13px;
  opacity: 0.9;
  transition: 0.3s;
}

.top-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
/* ======================================================
   MENÚ PRINCIPAL
====================================================== */

.main-nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
}

.nav-item {
  position: static;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0; 
  color: #800404;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;   
  letter-spacing: 0.5px;
}

.nav-item > a {
  position: relative;
}

.nav-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;              /* pegado abajo */
  width: 0;
  height: 3px;            /* grosor de línea */
  background: #ffffff;
  transition: width .3s ease;
}

.nav-item > a:hover::after {
  width: 100%;
}

.menu-arrow {
  font-size: 12px;
  margin-left: 6px;
 transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

/* Cuando el menú está abierto */
.nav-item.is-open > a .menu-arrow {
  transform: rotate(180deg);
}
/* ======================================================
   SUBMENU BASE
====================================================== */

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;

  background: #ffffff;

  padding: 0;   /* 👈 QUITA el espacio vertical */

  display: none;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
  z-index: 999;
}

.nav-item.is-open > .submenu {
  display: block;
}

.submenu-container {
  width: 100%;
  display: flex;
  gap: 40px;
  align-items: stretch;   /* 👈 CAMBIO CLAVE */
}

.submenu-left img {
  width: 300px;
  min-height: 303px;  
  object-fit: cover;
  display: block;
}

.submenu-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;

  min-height: 303px;
  align-content: center;   /* centra verticalmente todo el bloque */
  padding: 40px 0;     /* espacio elegante arriba y abajo */

}

.submenu-watermark {
  position: absolute;
  right: 18%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.05;
}

.submenu-watermark img {
  width: 240px;
}

.submenu-center .col {
  display: flex;
  flex-direction: column;
  gap: 16px;          /* más aire */
  justify-content: flex-start;  /* 👈 arriba, no centrado */
  align-items: flex-start;   
}

.submenu-center a {
  display: inline-block; 

  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.4px;
  line-height: 26px;

  color: #2c2c2c;
  text-decoration: none;

  transition: all 0.25s ease;
    position: relative;
}

.submenu-center a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;     
  height: 2px;
  background: #8B0000;
   transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.submenu-center a:hover {
  color: #8B0000;
}

.submenu-center a:hover::after {
  transform: scaleX(1);
  width: 100%;
}

.submenu-right {
  background: #dcdcdc;

  flex: 0 0 295px;      /* ancho fijo */
  min-height: 303px;    /* altura referencia */
  padding: 32px;

  margin-left: auto;    /* 👈 ESTO LO PEGA AL EXTREMO */

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.submenu-right h4 {
  margin-bottom: 10px;
  color: #252525;
}

.submenu-right a {
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-decoration: none; 
  display: block;       /* 👈 cada link en línea separada */
  margin-bottom: 18px;  /* 👈 espacio entre enlaces */
  font-size: 16px;      /* 👈 tamaño correcto */
  line-height: 24px;    /* 👈 altura de línea */
  font-weight: 500;     /* 👈 peso medio */
  color: rgb(37, 37, 37);
  transition: all 0.2s ease;
}
.submenu-right a:hover {
  color: #8B0000;
  transform: translateX(4px);
  }

.submenu-right a i {
  font-size: 12px;
  margin-left: 6px;
}

.external::after {
  content: "\f08e";   /* código del icono */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 6px;
  font-size: 12px;
}
/* ======================================================
   MOBILE (SOLO ACTIVO EN < 900px)
====================================================== */

@media (max-width: 900px) {

  .header-inner {
    position: relative;
    padding: 14px 16px;
  }

  .logo {
    height: 42px;
  }

  .main-nav,
  .top-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* ===== CONTENEDOR MENÚ ===== */

  .mobile-menu {
    position: fixed;
    inset: 0;
    background: #800404;

   width: 100%;
    height: 100dvh;

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    transform: translateX(100%);
    pointer-events: none;
    transition: transform .35s ease;
    z-index: 9999;
  }

  .mobile-menu.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* ===== CABECERA ===== */

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.25);
  }

  .mobile-logo {
    height: 44px;
    display: block;
  }

  .mobile-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
  }

  /* ===== LINKS NIVEL 1 ===== */

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu-links > .nav-item > a {
    padding: 14px 20px;   /* 🔥 más compacto */
    font-size: 14px;      /* un poco más pequeño */
    font-weight: 600;
    letter-spacing: .4px;
    color: #ffffff;
    text-decoration: none;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid rgba(255,255,255,.25);
  }

  .mobile-menu-links .nav-item > a::after {
    content: "▾";
    font-size: 14px;
    transition: transform .2s ease;
  }

  .mobile-menu-links .nav-item:not(.has-submenu) > a::after {
    content: "";
  }

  .mobile-menu .nav-item.is-open > a::after {
    transform: rotate(180deg);
  }


/* ===== SUBMENÚ MOBILE ESTABLE ===== */

/* ===== SUBMENÚ MOBILE DEFINITIVO ===== */

.mobile-menu .submenu {
  position: static !important;
  left: 0 !important;        /* 🔥 reset horizontal */
  right: auto !important;
  transform: none !important; /* 🔥 elimina translateX */

  width: 100% !important;

  background: #9c1f1f;
  border-radius: 0 !important;
  box-shadow: none !important;

  max-height: 0;
  overflow: hidden;
  padding: 0 !important;
  transition: max-height .35s ease;
}
.mobile-menu .nav-item.is-open > .submenu {
  max-height: 2000px;
  background: #8f1c1c;
}

/* Links hijos */
.mobile-menu .submenu a {
  display: block;
  width: 100%;
  padding: 10px 36px;   /* 🔥 submenú más compacto */
  font-size: 13px;
  font-weight: 500;
  background: #8f1c1c;  /* 🔥 ahora el color está solo en los links */
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.mobile-menu .submenu a,
.mobile-menu .submenu-link {
  padding: 10px 20px !important;
  font-size: 14px !important;
}

/* ===== SUB-SUBMENÚ (ACORDEÓN NIVEL 3) ===== */

.mobile-menu .submenu-item {
  display: block;
}

.mobile-menu .submenu-right {
  position: static !important;
  transform: none !important;

  display: block;
  width: 100%;

  background: #7c1919;

  max-height: 0;
  overflow: hidden;

  transition: max-height .35s ease;
}

.mobile-menu .submenu-item.is-open > .submenu-right {
  max-height: 1000px;
}

.mobile-menu .submenu-right a {
  padding: 10px 40px 10px 60px;
  font-size: 13px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
/* ===== SUB-SUBMENÚ (ACORDEÓN NIVEL 3) ===== */

.mobile-menu .submenu-item {
  display: block;
}

.mobile-menu .submenu-right {
  position: static !important;
  transform: none !important;

  display: block;
  width: 100%;

  background: #7c1919;

  max-height: 0;
  overflow: hidden;

  transition: max-height .35s ease;
}

.mobile-menu .submenu-item.is-open > .submenu-right {
  max-height: 1000px;
}

.mobile-menu .submenu-right a {
  padding: 10px 40px 10px 60px;
  font-size: 13px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
}
/* ======================================================
   DESKTOP — LIMPIO
====================================================== */
@media (min-width: 901px) {
  .mobile-menu,
  .hamburger {
    display: none !important;
  }
}
.hero-carousel {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
}


.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}


.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

 background: linear-gradient(
    to bottom,
     rgba(0, 0, 0, 0.30) 0%,
  rgba(0, 0, 0, 0.40) 40%,
  rgba(0, 0, 0, 0.60) 100%
);
}


.slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  color: #ffffff;
  padding: 0 24px;
}


.hero-logo {
  width: 110px;
  margin-bottom: 22px;

  position: relative;
  z-index: 3;

  opacity: 0.95;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55));
}


.slide-content h1 {
  max-width: 900px;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 14px;
}

.slide-content p {
  max-width: 700px;
  font-size: 18px;
  opacity: 0.9;
}


.slide.active .slide-content {
  animation: heroFadeUp 1.1s ease forwards;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 900px) {
  .hero-carousel {
    height: 65vh;
  }

  .hero-logo {
    width: 72px;
  }

  .slide-content h1 {
    font-size: 26px;
  }

  .slide-content p {
    font-size: 15px;
  }
}

/* ======================================================
   NOTICIAS + COMUNICADOS – ESTILO INSTITUCIONAL (FINAL)
====================================================== */

/* ===== CONTENEDOR GENERAL ===== */
.news-agenda {
  max-width: 1300px;
  margin: 80px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 60px;
  align-items: start; /* 🔥 CLAVE: evita que Comunicados se baje */
}

/* ===== HEADER DE SECCIONES ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h2 {
  font-size: 26px;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}

.section-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  width: 4px;
  height: 80%;
  background: rgb(155, 10, 21);
}

.section-header a {
  font-size: 14px;
  color: rgb(155, 10, 21);
  text-decoration: none;
}

.section-header a:hover {
  text-decoration: underline;
}

/* ===============================
   NOTICIAS
================================ */

/* ===============================
   NOTICIAS – BASADO EN TU HTML
================================ */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

/* ===== PORTADA ===== */
.news-cover {
  width: 100%;
  height: 360px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #f2f2f2;

  /* 🔥 Fallback institucional */
  background-image: url("assets/icons/pdf-placeholder.svg");
}

/* ===== TEXTO ===== */
.news-card p {
  margin: 0;
  padding: 14px 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.news-card p strong {
  display: block;
  font-size: 13px;
  color: #800404;
  margin-bottom: 2px;
}

/* ===============================
   COMUNICADOS
================================ */

.agenda-section.comunicados {
  background: #f3f3f3;
  padding: 22px;
  align-self: start; /* 🔥 asegura alineación superior */
}

.comunicados-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* CARD COMUNICADO */
.comunicado-card {
  display: block;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.comunicado-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.comunicado-code {
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #800404;
  border-bottom: 1px solid #e0e0e0;
}

.comunicado-title {
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #222;
  line-height: 1.45;
}

.comunicado-time {
  padding: 10px 16px;
  font-size: 11.5px;
  color: #777;
  border-top: 1px solid #e0e0e0;
}

/* ===============================
   RESPONSIVE – CELULAR
================================ */

@media (max-width: 900px) {

  .news-agenda {
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 40px auto;
    padding: 0 16px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .news-card {
    border-radius: 8px;
  }

  /* Imagen grande en móvil */
  .news-card img {
    height: 420px;      /* 🔥 imagen protagonista */
  }

  .news-card p {
    font-size: 14px;
    padding: 12px 16px;
  }

  .agenda-section.comunicados {
    padding: 16px;
    border-radius: 8px;
  }
}

@media (hover: hover) {

  .news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.14);
  }

  .news-card:hover img {
    transform: scale(1.04);
  }
}

/* ===============================
   MÓVIL – TOUCH (DEDOS 😄)
================================ */

.news-card:active {
  transform: scale(0.97); /* efecto presión */
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.news-card:active img {
  transform: scale(1.03);
}

/* Para accesibilidad (tap + teclado) */
.news-card:focus-visible {
  outline: none;
  transform: scale(0.98);
  box-shadow: 0 12px 26px rgba(0,0,0,0.14);
}

/* ===============================
   WELCOME – BLOQUE INSTITUCIONAL
================================ */

.welcome-block {
  max-width: 1300px;
  margin: 120px auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center; /* 🔑 alineación correcta */
}

/* ---------- TEXTO ---------- */

.welcome-text h2 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 28px;
  position: relative;
  padding-left: 14px;
}

.welcome-text h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  width: 4px;
  height: 80%;
  background: rgb(155, 10, 21); /* rojo UNI */
}

.welcome-text p {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 16px;
  max-width: 520px;
}

/* ---------- BOTÓN ---------- */

.welcome-btn {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;

  color: rgb(155, 10, 21);
  text-decoration: none;
  border-bottom: 2px solid transparent;

  transition: border-color 0.25s ease;
}

.welcome-btn:hover {
  border-bottom-color: rgb(155, 10, 21);
}

/* ---------- IMAGEN ---------- */

.welcome-images {
  display: flex;
  justify-content: flex-end;
}

.img-main {
  width: 100%;
  max-width: 560px;
  height: 420px;

  background-size: cover;
  background-position: center;
  border-radius: 6px;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 900px) {

  .welcome-block {
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 80px auto;
  }

  .welcome-images {
    justify-content: center;
  }

  .img-main {
    width: 100%;
    max-width: 420px;
    height: 320px;
    border-radius: 10px;
  }

  .welcome-text {
    text-align: center;
  }

  .welcome-text h2 {
    font-size: 28px;
    margin-bottom: 18px;
    padding-left: 0;
  }

  .welcome-text h2::before {
    display: none;
  }

  .welcome-text p {
    font-size: 15px;
    line-height: 1.7;
    margin-left: auto;
    margin-right: auto;
  }

  .welcome-btn {
    margin-top: 24px;
  }
}
/* =========================================
   LABORATORIOS - ANIMACIÓN EN TEXTO
   Contraste corregido + efecto elegante
========================================= */

.areas-section {
  max-width: 1300px;
  margin: 110px auto;
  padding: 0 20px;
}

.areas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
}

.areas-header h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #222;
}

/* FLECHAS */
.areas-arrows button {
  width: 44px;
  height: 44px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  transition: all 0.25s ease;
}

.areas-arrows button:hover {
  background: #444;
  color: #fff;
  border-color: #444;
}

/* WRAPPER */
.areas-wrapper {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.areas-wrapper::-webkit-scrollbar {
  display: none;
}

/* TARJETAS */
.area-card {
  min-width: 300px;
  height: 420px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* CAPA MEJOR DISTRIBUIDA */
.area-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.65) 25%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.10) 75%,
    rgba(0, 0, 0, 0.00) 90%
  );
  transition: opacity 0.45s ease;
  z-index: 1;
}

/* TEXTO */
.area-card h3 {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  z-index: 2;
  line-height: 1.3;
  text-shadow: 0 3px 10px rgba(0,0,0,0.55);
  transition: transform 0.35s ease;
}

/* LÍNEA ANIMADA */
.area-card h3::after {
  content: "";
  display: block;
  width: 0%;
  height: 2px;
  margin-top: 8px;
  background: #ffffff;
  transition: width 0.35s ease;
}

/* HOVER */
.area-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* No quitamos totalmente la capa */
.area-card:hover::before {
  opacity: 0.45;
}

/* Texto sube suave */
.area-card:hover h3 {
  transform: translateY(-4px);
}

/* Línea aparece */
.area-card:hover h3::after {
  width: 60%;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 900px) {

  .areas-arrows {
    display: none;
  }

  .areas-header {
    justify-content: center;
    text-align: center;
  }

  .areas-header h2 {
    width: 100%;
    text-align: center;
    font-size: 24px;
  }

  .areas-wrapper {
    gap: 16px;
    padding-left: 20px;
    padding-right: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  /* 🔥 MÁS ESTILIZADO EN CELULAR */
  .area-card {
    min-width: 85%;
    height: 360px; /* más compacto */
    scroll-snap-align: center;
    background-position: center;
  }

  .area-card h3 {
    font-size: 16px;
  }

}


.map-section {
  max-width: 1300px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
  overflow-x: hidden;
}


.map-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 30px;
}


.map-container {
  position: relative;
  width: 100%;
  height: 450px;
  margin-bottom: 25px;
  border-radius: 8px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}


.waze-pill {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;

  background: #39c6f4;
  padding: 14px 28px;
  border-radius: 40px;

  text-decoration: none;
  color: #ffffff;

  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

/* Hover tipo CODPESA */
.waze-pill:hover {
  background: #2fb6e8; /* apenas más oscuro */
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
}

/* Click (desktop + móvil) */
.waze-pill:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
}

/* Icono */
.waze-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

/* Texto */
.waze-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.waze-text span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #ffffff;
  margin-bottom: 4px;
}

.waze-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
}

/* =========================
   MÓVIL
========================= */
@media (max-width: 900px) {

  .waze-pill {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;

    padding: 12px 16px;
    border-radius: 24px;
    gap: 12px;
  }

  .waze-icon {
    width: 30px;
    height: 30px;
  }

  .waze-text span {
    font-size: 11px;
  }

  .waze-text strong {
    font-size: 14px;
  }
}

.main-footer {
  background: #001855;
  color: #cfd8dc;
  padding: 50px 20px 35px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  text-align: center;
}


.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 70px;
  margin-bottom: 50px;
}

.footer-col h4 {
  color: #ffffff;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: #FEE6A9;
  margin-bottom: 12px;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #ffffff;
}


.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
}

.footer-logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.35s ease;
}

.footer-logo-box:hover {
  transform: translateY(-6px);
}


.footer-logo {
  width: 220px;
}
.footer-logo.abet {
  width: 220px;
}


.footer-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, transparent, #FEE6A9, transparent);
  margin: 35px auto;
}


.footer-social {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.footer-social a {
  color: #ffffff;
  font-size: 26px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.footer-social a:hover {
  transform: scale(1.2);
  opacity: 0.85;
}


.footer-bottom {
  margin-top: 40px;
  font-size: 13px;
  color: #FEE6A9;
}

@media (max-width: 900px) {

  /* ===== ESTRUCTURA ===== */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 50px;
  }

  .footer-container {
    padding: 0 16px;
  }

  /* ===== TEXTOS ===== */
  .footer-col h4 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .footer-col a {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
  }

  /* ===== LOGOS ===== */
  .footer-logos {
    flex-direction: column;
    gap: 24px;
  }

  .footer-logo {
    width: 200px;
    max-width: 100%;
  }

  .footer-logo.abet {
    width: 220px;
    max-width: 100%;
  }

  /* 🔥 CLAVE: eliminar desplazamiento */
  .footer-logo-box:last-child {
    margin-left: 0;
  }

  /* ===== REDES ===== */
  .footer-social {
    gap: 22px;
    margin-top: 25px;
  }

  .footer-social a {
    font-size: 22px;
  }

  /* ===== COPYRIGHT ===== */
  .footer-bottom {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 35px;
    padding: 0 10px;
  }
}



.page-departamentos .page-content h1 {
  color: #800404;
  font-size: 38px;
  margin-bottom: 20px;
}


.page-departamentos .page-content p {
  font-size: 17px;
  color: #333;
  line-height: 1.7;
}
.page-departamentos .page-content {
  
  background: #f7f7f7;
  border-radius: 12px;


  max-width: 1300px;
  margin: 80px auto;
  padding: 60px 40px;
}


.page-departamentos .page-header {
  margin-bottom: 50px;
}

.page-departamentos .page-header h1 {
  font-size: 38px;
  font-weight: 600;
  margin-bottom: 12px;
}

.page-departamentos .page-header p {
  font-size: 16px;
  color: #555;
  max-width: 700px;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.department-card {
  background: #f5f5f5;
  padding: 30px;
  border-left: 6px solid #800404;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.department-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.department-card p {
  font-size: 14px;
  color: #333;
}

.department-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}


@media (max-width: 900px) {
  .page-departamentos .page-content {
    padding: 40px 20px;
  }

  .departments-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
   HERO AUTORIDADES
========================= */
.authorities-hero {
  background: linear-gradient(
    to right,
    #001855,
    #002b6b
  );
  margin: 0;
  padding: 90px 20px 80px;
  text-align: center;
}

.authorities-hero h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.authorities-hero .highlight {
  color: #f5c542;
}

.authorities-hero .dot {
  color: #f5c542;
  font-size: 26px;
  margin-right: 6px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .authorities-hero h1 {
    font-size: 28px;
  }
}
/* =========================
   HERO AUTORIDADES
========================= */
.authorities-hero {
  background: linear-gradient(to right, #001855, #002b6b);
  padding: 90px 20px 80px;
  text-align: center;
}

.authorities-hero h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.authorities-hero .highlight,
.authorities-hero .dot {
  color: #f5c542;
}

@media (max-width: 900px) {
  .authorities-hero h1 {
    font-size: 28px;
  }
}

/* =========================
   TABS
========================= */
.tabs {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 50px 0 30px;
  flex-wrap: wrap;
}

.tab {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  padding-bottom: 8px;
  position: relative;
}

.tab.active {
  color: #001855;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  background: #9b0a15;
}

/* =========================
   TABS MOBILE (solo móvil)
========================= */
@media (max-width: 768px) {

  .tabs {
    display: flex;
    justify-content: center;     /* 👈 centra */
    overflow-x: auto;
    gap: 14px;
    padding: 0 16px 8px;
    margin: 30px 0 20px;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f2f2f2;
    white-space: nowrap;
  }

  .tab.active {
    background: #001855;
    color: #ffffff;
    box-shadow: 0 0 0 2px #f5c542 inset; /* toque pro */
  }

  .tab.active::after {
    display: none;
  }
}
/* =========================
   CONTENIDO TABS
========================= */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =========================
   GRID AUTORIDADES
========================= */
.authorities-grid {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 36px;
  justify-content: center;
}

/* =========================
   CARD AUTORIDAD (BASE)
========================= */
.authority-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;

  width: 100%;
  max-width: 320px;

  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.authority-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

/* IMAGEN */
.authority-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

/* TEXTO */
.authority-card-body {
  padding: 16px 18px 20px;
}

.authority-card-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #000;
}

.authority-card-body p {
  font-size: 12.5px;
  color: #666;
}


  #autoridad .authority-card:first-child img {
  object-position: center 20%;
}

#autoridad .authority-card:first-child p {
  color: #800404;
  font-weight: 600;
}
#autoridad .authority-card:first-child {
  background: linear-gradient(
    to bottom,
    #ffffff,
    #fafafa
  );
}

/* =========================
   MODAL AUTORIDAD
========================= */
.authority-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.authority-modal.active {
  display: flex;
}

.authority-modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 960px;
  border-radius: 14px;
  padding: 42px;
  position: relative;
  max-height: 90vh;
  border-left: none
}

/* CERRAR */
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 30px;
  border: none;
  background: none;
  cursor: pointer;
}

/* =========================
   CONTENIDO
========================= */
.modal-profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: flex-start;

  max-height: calc(90vh - 90px);
  overflow-y: auto;
  padding-right: 8px;
}

/* CONTENEDOR IMAGEN */
.modal-profile img {
  width: 100%;
  height: auto;
  max-height: 420px;

  object-fit: cover;
  object-position: center top;

  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* TÍTULOS */
.modal-profile h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-profile h4 {
  font-size: 15px;
  color: #800404;
  margin-bottom: 20px;
  font-weight: 600;
}

/* TEXTO */
.modal-profile p {
  font-size: 14.6px;
  line-height: 1.75;
  color: #444;

  text-align: justify;
  text-justify: inter-word;
}

/* SCROLL */
.modal-profile::-webkit-scrollbar {
  width: 6px;
}
.modal-profile::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

  .modal-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .modal-profile img {
    max-width: 260px;
    margin: 0 auto 20px;
  }

  .modal-profile p {
    text-align: justify;              /* 👈 justificado */
    text-justify: inter-word;
    hyphens: auto;                    /* 👈 corta palabras bonito */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    font-size: 14px;
    line-height: 1.8;
  
  }

}

.schedule-section {
  background: #ffffff;
  padding: 70px 20px;
}


.schedule-container {
  max-width: 1100px;
  margin: auto;
  background: #ffffff;
  padding: 60px 70px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
   overflow: visible;
}


.schedule-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
   overflow: visible;
}

.schedule-left {
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 50;
}


.schedule-right {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  margin-top: 0;          
  align-self: flex-start;
  margin-bottom: 40px; 
}

.schedule-right span {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.schedule-right span.actualizando {
  opacity: 0;
  transform: translateY(-4px);
}
.schedule-right label {
  padding: 6px 8px;
  border-radius: 6px;
}

.schedule-right label:hover {
  background: #f6f6f6;
}


.schedule-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #111;
}

.schedule-desc {
  font-size: 14px;
  color: #555;
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 30px;
}


.schedule-search {
  display: flex;
  margin: 30px 0 30px; 
  max-width: 520px;
  position: relative;
  z-index: 100;
}

.schedule-search input {
  flex: 1;
  padding: 13px 15px;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
}

.schedule-search button {
  width: 46px;
  background: #800404;
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}


.schedule-summary {
  grid-column: 1 / -1;   
  width: 100%;
  max-width: 100%;
  margin: 0 auto 30px auto;
  margin-bottom: 20px;
  border-collapse: collapse;

}

.schedule-summary th,
.schedule-summary td {
  text-align: center;
  vertical-align: middle;
}
.schedule-summary th {
  background: #2f343a;
  color: #fff;
  padding: 10px;
  font-size: 13px;
   font-weight: 600;
}

.schedule-summary td {
  padding: 12px;
  font-size: 13px;
   background: #ffffff;
  border-bottom: 1px solid #eee;
}

.summary-empty {
  text-align: center;
  font-style: italic;
}

.schedule-summary td:last-child {
  width: 60px;
}


.schedule-table-wrapper {
   grid-column: 1 / -1;
  margin-top: 30px;
  padding: 18px 22px 26px; 
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.horarios-secciones {
  grid-column: 1 / -1;
  width: 100%;
}

.schedule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 20px;
}

.schedule-table th,
.schedule-table td {
  width: calc(100% / 7);
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 12px;
}

.schedule-desc {
  margin-bottom: 24px;
}

.titulo-seccion {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #2f343a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #800404;
}


.bloque-seccion {
  width: 100%;
  margin-top: 30px;
  padding: 18px 22px 26px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
.bloque-seccion .schedule-table {
  margin-top: 14px;
}

.bloque-seccion .schedule-table th {
  background: #f7f7f7;
  font-weight: 600;
}
.bloque-seccion .course-slot {
  background: #fafafa;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  margin: 2px auto;
  max-width: 92%;
}



/* Centrado */
.sin-cruce,
.cruce-permitido,
.cruce-no {
  display: flex;
  align-items: center;
  justify-content: center;
}


.schedule-right h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
}

.schedule-right label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}



.selected-courses {
  margin-top: 20px;
  max-width: 650px;
}

.course-block {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}

.course-header {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.course-sections label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}


.schedule-table th,
.schedule-table td {
  width: calc(100% / 7);
}

.horarios-secciones .schedule-table {
  margin-top: 10px;
}


.btn-remove {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  color: #800404;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove i {
  font-size: 13px;
}

.btn-remove:hover {
  background: #800404;
  color: #ffffff;
  border-color: #800404;
}

.schedule-summary td:last-child,
.schedule-summary th:last-child {
  text-align: center;
}

.course-slot {
  background: #f5f5f5;
  margin: 2px 0;
  padding: 3px 4px;
  font-size: 11px;
  border-radius: 4px;
  line-height: 1.2;
}
.btn-remove-course {
  width: 30px;
  height: 30px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  color: #800404;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove-course i {
  font-size: 13px;
}

.btn-remove-course:hover {
  background: #800404;
  color: #ffffff;
  border-color: #800404;
}



/* =========================
   TOOLTIP — DESKTOP / TABLET
========================= */
.tooltip-horario {
  position: absolute;
  display: none;
  max-width: 260px;              /* 👈 más ancho */
  padding: 10px 12px;            /* 👈 más aire */
  background: #ffffff;
  border-radius: 10px;
  border-left: 4px solid #800404;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  font-size: 12px;               /* 👈 texto más grande */
  line-height: 1.35;
  z-index: 9999;
}

/* Título del tooltip */
.tooltip-horario .tt-title {
  font-size: 13px;               /* 👈 destaca curso */
  font-weight: 600;
  margin-bottom: 4px;
  color: #111;
}

/* Texto secundario */
.tooltip-horario .tt-text {
  font-size: 11px;
  color: #444;
  line-height: 1.3;
}

/* Desktop: izquierda / derecha */
.tooltip-right {
  margin-left: 12px;
}

.tooltip-left {
  margin-left: -12px;
  transform: translateX(-100%);
}


.schedule-table th,
.schedule-table td {
  width: calc(100% / 7);
  box-sizing: border-box;
  padding: 6px;
}


.horarios-secciones {
  width: 100%;
}


.horarios-secciones > div {
  width: 100%;
}


.course-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  z-index: 9999;
  overflow-y: auto;
  max-height: 260px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.course-dropdown:not(:empty) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.schedule-left {
  position: relative;
  z-index: 10;
}

/* Cada opción */
.course-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

/* Hover */
.course-item:hover {
  background: #800404;
  color: #ffffff;
}

/* Scroll simple */
.course-dropdown::-webkit-scrollbar {
  width: 7px;
}
.course-dropdown::-webkit-scrollbar-thumb {
  background: #cfcfcf;
  border-radius: 6px;
}


.course-item:last-child {
  border-bottom: none;
}

button,
.course-item,
.course-slot,
.btn-remove,
.btn-remove-course,
.schedule-right label {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
/* ======================================================
   ANIMACIÓN TOOLTIP
====================================================== */
@keyframes tooltipFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ======================================================
   TABLET
====================================================== */
@media (max-width: 900px) {

  .schedule-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .schedule-right {
    margin-top: 25px;
    padding: 26px;
  }
}
/* ======================================================
   MÓVIL — HORARIO COMPACTO Y ORDENADO (NO TOCA DESKTOP)
====================================================== */
@media (max-width: 768px) {

  html, body {
   overflow-x: hidden;
}

  /* =========================
     CONTENEDOR GENERAL
  ========================= */
  .schedule-container {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  /* =========================
     LAYOUT EN COLUMNA (SOLO MÓVIL)
  ========================= */
  .schedule-layout {
    display: flex;
    flex-direction: column;
  }

  /* =========================
     ORDEN VISUAL EN MÓVIL
  ========================= */
  .schedule-left {
    order: 1;
  }

  .summary-wrapper {
    order: 2;
    margin-top: 16px;
  }

  .schedule-right {
    order: 3;
    margin-top: 16px;
  }

  .schedule-table-wrapper,
  .horarios-secciones {
    order: 4;
    margin-top: 16px;
  }

  /* =========================
     ANCHO COMPLETO SIN TARJETAS
  ========================= */
  .schedule-left,
  .summary-wrapper,
  .schedule-right,
  .schedule-table-wrapper,
  .horarios-secciones,
  .course-block {
    width: 100%;
    margin: 0 0 12px 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  /* =========================
     TÍTULO Y TEXTO
  ========================= */
  .schedule-title {
    font-size: 18px;
    margin-bottom: 8px;
    text-align: left;
  }

  .schedule-desc {
    font-size: 12px;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 12px;
  }

  /* =========================
     BUSCADOR
  ========================= */
  .schedule-search {
    margin-bottom: 12px;
  }

  /* =========================
     RESUMEN — SCROLL HORIZONTAL
  ========================= */
  .summary-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-summary {
    min-width: 650px;   /* 👈 NO achica columnas */
    table-layout: auto;
  }

  .schedule-summary th,
  .schedule-summary td {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px;
    text-align: center;
  }

  /* =========================
     TABLA DE HORARIO
  ========================= */
  .schedule-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .schedule-table th,
  .schedule-table td {
    font-size: 9px;
    padding: 2px 1px;
    line-height: 1.1;
    text-align: center;
    border: 1px solid #ddd;
  }

  /* Columna Hora */
  .schedule-table th:first-child,
  .schedule-table td:first-child {
    width: 44px;
    min-width: 44px;
    white-space: nowrap;
  }

  /* =========================
     BLOQUES DE CLASE (MÓVIL)
  ========================= */
  .schedule-table td .course-slot {
    background: #fafafa;
    border: none !important;     /* ❌ sin borde rojo */
    font-size: 7px !important;
    line-height: 1.05;
    padding: 1px 2px;
    border-radius: 3px;
    white-space: normal;
    word-break: break-word;
    text-align: center;
  }

  /* =========================
     TÍTULO DE SECCIÓN
  ========================= */
  .titulo-seccion {
    font-size: 13px;
    margin: 8px 0 6px;
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 2px solid #800404;
  }
}
/* =========================
   TOOLTIP — MÓVIL
========================= */
@media (max-width: 768px) {

  .tooltip-horario { 
    max-width: 180px;     /* 👈 chico solo en celular */
    padding: 6px 8px; 
    font-size: 9px; 
    line-height: 1.15; 
    border-radius: 8px;
  }

  .tooltip-horario .tt-title { 
    font-size: 10px; 
    margin-bottom: 2px; 
  }

  .tooltip-horario .tt-text { 
    font-size: 9px; 
    line-height: 1.1;
  }
}

/* =========================
   PORTADA INSTITUCIONAL UNI
========================= */

.hero-uni {
  position: relative;
  height: 75vh;
  min-height: 450px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-uni::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* LOGO PORTADA */
.hero-uni .hero-logo {
  position: relative;
  z-index: 2;
  width: 80%;
  max-width: 420px;
  height: auto;
}

/* =========================
   ARCHIVO POR AÑO — CARD PREMIUM
========================= */

.archive-box {
  background: #ffffff;
  border-radius: 22px;
  padding: 42px 40px 44px;
  max-width: 360px;
  box-shadow:
    0 24px 48px rgba(0,0,0,.08),
    0 10px 24px rgba(0,0,0,.06);
}

.archive-box .section-header {
  margin-bottom: 28px;
}

.year-active {
  margin-bottom: 34px;
  padding-left: 18px;
  position: relative;
}

.year-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 3px;
  height: 48px;
  background: #800404;
}

.year-big {
  font-size: 44px;
  font-weight: 600;
  color: #c9c9c9;
  line-height: 1;
  transition: color .25s ease;
}

.year-item.active .year-big {
  color: #800404;
}

.year-sub {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #9a9a9a;
}

.year-selector {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 18px;
}

.year-item {
  background: none;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: #c9c9c9;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: color .25s ease;
}

.year-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 2px;
  bottom: 2px;
  width: 2px;
  background: #eeeeee;
}

.year-item:hover {
  color: #800404;
}

.year-item.active {
  color: #800404;
  font-weight: 600;
}

.year-item.active::before {
  background: #800404;
}

/* =========================
   NOTIFIC – TARJETAS
========================= */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  justify-items: center;
}

.news-card {
  max-width: 300px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.news-cover {
  width: 100%;
  aspect-ratio: 1 / 1.42;
  background-size: cover;
  background-position: center;
}

.news-card p {
  font-size: 14px;
  padding: 14px 16px;
  color: #111;
  line-height: 1.45;
}

.news-card strong {
  display: block;
  margin-bottom: 4px;
  color: #800404;
}

/* =====================================================
   VISOR MEMORIA
===================================================== */

.memoria-viewer{
display:none;
position:relative;
width:100%;
max-width:1300px;

margin:0px auto 40px;

background:#0e0e0e;

padding:5px 10px;

border-radius:12px;

box-shadow:0 20px 60px rgba(0,0,0,0.5);

overflow:hidden;
grid-column:1 / 3;  
}
/* =====================================================
   CONTENEDOR DEL VISOR
===================================================== */
.flip-container{
  position:relative;
  width:100%;
  height:750px;
  max-width:1400px;
  margin:auto;

  background:#1a1a1a;

  display:flex;
  justify-content:center;
  align-items:center;

  padding:20px 20px 70px;

  border-radius:10px;
  overflow:hidden;
  /* mejora visual */
box-sizing:border-box;

}


/* =====================================================
   LIBRO
===================================================== */

#flipbook{
  width:100%;
  height:700px;
  margin:auto;
  max-width:100%;

  box-shadow:0 20px 60px rgba(0,0,0,0.6);
  transition:transform 0.25s ease;
  will-change: transform;
  transform: translateZ(0);
}


/* =====================================================
   AJUSTES DE PAGEFLIP
===================================================== */

/* quitar bordes y sombras del motor */
.stf__block{
  border:none !important;
  box-shadow:none !important;
  gap:0 !important;
  overflow:hidden !important;
}

.stf__wrapper{
  background:transparent !important;
  gap:0 !important;
}

.stf__item{
  overflow:hidden !important;
}

/* ocultar sombras del libro */
.stf__page-shadow,
.stf__outer-shadow,
.stf__inner-shadow{
  display:none !important;
}

/* reducir separación de páginas */
.stf__page,
.stf__hard-page{
  margin:0 !important;
}

/* pequeño ajuste visual de la portada */


.stf__hard-page .stf__block{
  margin:0 !important;
  padding:0 !important;
}

.stf__item,
.stf__block,
.stf__wrapper{
background:#111 !important;
backface-visibility:hidden;
}

/* =====================================================
   PÁGINAS
===================================================== */

.page{
  background:transparent;
  padding:0;
  margin:0;
}

.page img{
width:100%;
height:100%;
object-fit:cover;
image-rendering:auto;
backface-visibility:hidden;
transform: translateZ(0);
}


/* =====================================================
   BARRA DE CONTROLES
===================================================== */

.viewer-toolbar{

position:absolute;
bottom:0;
left:0;

width:100%;

display:flex;
align-items:center;
justify-content:space-between;

padding:12px 20px;

background:rgba(0,0,0,0.45);

backdrop-filter:blur(6px);
-webkit-backdrop-filter:blur(6px);

color:white;

border-radius:0 0 10px 10px;

box-shadow:0 -10px 25px rgba(0,0,0,0.5);

z-index:20;

}

/* =====================================================
   BOTONES
===================================================== */

.viewer-toolbar button{
  background:none;
  border:none;

  color:white;
  font-size:18px;

  cursor:pointer;

  padding:5px 10px;
  transition:color .2s;
}

.viewer-toolbar button:hover{
  color:#ff4d4d;
}


/* =====================================================
   CONTROLES CENTRALES
===================================================== */

.toolbar-center{
  display:flex;
  align-items:center;
  gap:10px;
}


/* =====================================================
   SLIDER ZOOM
===================================================== */

#zoomSlider{
  width:150px;
}


/* =====================================================
   FULLSCREEN
===================================================== */

.memoria-viewer:fullscreen{
width:100vw;
height:100vh;

display:flex;
justify-content:center;
align-items:center;

background:#000;

padding:60px 40px;
box-sizing:border-box;
}

.memoria-viewer:fullscreen .flip-container{
  width:100%;
  height:100%;

  display:flex;
  justify-content:center;
  align-items:center;

  position:relative;
}

.memoria-viewer:fullscreen #flipbook{

width:auto;
height:90vh;

max-width:90vw;
max-height:90vh;

margin:auto;

}

.memoria-viewer:fullscreen .viewer-toolbar{
  position:absolute;
  bottom:0;
  left:0;

  width:100%;
  z-index:10;
}
.memoria-viewer:fullscreen .flip-container{
padding-bottom:120px;
}
@media (max-width: 768px) {

  /* HERO */
  .hero-uni {
    height: 240px;
    min-height: auto;
  }

  .hero-uni .hero-logo {
    width: 170px;
  }

.news-agenda{
display:grid;
grid-template-columns: 1fr 320px;
gap:40px;
align-items:start;
}
  

  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-left: 16px;   /* 🔥 margen lateral */
    padding-right: 16px;  /* 🔥 margen lateral */
  }

  /* TARJETA MÁS ESTILIZADA */
  .news-card {
    max-width: 320px;   /* 🔥 ya no ocupa todo */
    width: 100%;
    margin: 0 auto;     /* 🔥 centrada */
  }

  .agenda-section.archive-by-year {
    position: relative;
    top: auto;
    max-height: none;
    overflow-y: visible;
    margin-top: 24px;
  }

}
/* ======================================================
   COMUNICADOS - ESTILO PROFESIONAL CON SCROLL INTERNO
====================================================== */

.comunicados-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 60px;
  margin-top: 60px;
  align-items: start;
}

/* ==============================
   CAJA IZQUIERDA (LISTA)
============================== */

.comunicados-box {
  background: #ffffff;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);

  height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
}

/* ==============================
   TÍTULO
============================== */

.titulo-comunicados {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  padding-left: 20px;
  letter-spacing: 0.5px;
}

.titulo-comunicados::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 80%;
  background: #7a0c0c;
  border-radius: 4px;
}

/* ==============================
   CONTENEDOR CON SCROLL
============================== */

.years-accordion {
  overflow-y: auto;
  padding-right: 8px;
  flex: 1;
}

/* Scroll personalizado */
.years-accordion::-webkit-scrollbar {
  width: 6px;
}

.years-accordion::-webkit-scrollbar-track {
  background: transparent;
}

.years-accordion::-webkit-scrollbar-thumb {
  background: rgba(122,12,12,0.35);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.years-accordion::-webkit-scrollbar-thumb:hover {
  background: rgba(122,12,12,0.6);
}

/* ==============================
   GRUPO POR AÑO
============================== */

.year-group {
  margin-bottom: 10px;
}

.year-toggle {
  width: 100%;
  background: transparent;
  border: 1px solid #e5e5e5;
  padding: 15px 18px;
  font-size: 17px;
  font-weight: 600;
  color: #7a0c0c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.year-toggle:hover {
  background: rgba(122,12,12,0.05);
  border-color: rgba(122,12,12,0.3);
}

.year-toggle.active {
  background: rgba(122,12,12,0.08);
  border-color: rgba(122,12,12,0.4);
}

.year-toggle i {
  font-size: 13px;
  transition: transform 0.3s ease;
}

.year-toggle.active i {
  transform: rotate(180deg);
}

/* ==============================
   LISTA DE COMUNICADOS
============================== */

.comunicado-items {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.comunicado-items.open {
  max-height: 5000px;
}

.comunicado-items li {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #fafafa;
  border: 1px solid #eee;
}

.comunicado-items li:hover {
  background: rgba(122,12,12,0.06);
  border-color: rgba(122,12,12,0.2);
  transform: translateX(4px);
}

.comunicado-items li.active {
  background: rgba(122,12,12,0.1);
  border-color: rgba(122,12,12,0.3);
}

.comunicado-items li strong {
  display: block;
  color: #7a0c0c;
  font-size: 15px;
  margin-bottom: 3px;
}

.comunicado-items li span {
  font-size: 13px;
  color: #666;
}

.empty-year {
  padding: 12px 16px;
  color: #999;
  font-size: 14px;
}

/* ==============================
   VISOR PDF
============================== */

.comunicado-viewer {
  background: #ffffff;
  border-radius: 24px;
  height: calc(100vh - 220px);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}

#pdfViewer {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

.viewer-placeholder {
  text-align: center;
  padding-top: 25%;
  color: #bbb;
}

.viewer-placeholder i {
  font-size: 55px;
  margin-bottom: 20px;
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 1200px) {
  .comunicados-layout {
    grid-template-columns: 1fr;
  }

  .comunicado-viewer {
    margin-top: 40px;
    height: 600px;
  }

  .comunicados-box {
    height: auto;
  }
}

/* =========================================
   DEPARTAMENTOS - DISEÑO PROFESIONAL
========================================= */

.department-page {
  padding: 60px 8%;
  background: #ffffff;
  font-family: 'Montserrat', sans-serif;
}

/* =========================================
   CONTENEDOR CENTRAL
========================================= */

.department-content {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  padding: 60px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}

/* =========================================
   SUBMENÚ DE DEPARTAMENTOS
========================================= */

/* =========================================
   SUBMENÚ DEPARTAMENTOS – ESTILO LIMPIO
========================================= */

.department-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
  margin-bottom: 60px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e3e3e3;
}

.department-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  color: #666;
  position: relative; /* 👈 FALTABA ESTO */
}

/* Línea inferior elegante */
.department-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #7a0000;
  transition: 0.3s ease;
}

.department-links a:hover {
  color: #7a0000;
}

.department-links a:hover::after {
  width: 100%;
}

/* Departamento activo */
.department-links a.active {
  color: #7a0000;
  font-weight: 600;
}

.department-links a.active::after {
  width: 100%;
}

/* =========================================
   TÍTULO PRINCIPAL
========================================= */

.department-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 30px;
  color: #1f1f1f;
}

.academic-lines li {
  margin-bottom: 14px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
  color: #444;
}

.academic-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: #7a0000;
  border-radius: 50%;
}
/* =========================================
   LAYOUT PRINCIPAL
========================================= */

.department-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  column-gap: 120px; /* separación horizontal */
  row-gap: 40px;
  align-items: start;
}

/* TARJETA PERFIL COMPLETA */

.department-profile-card {
  background: #ffffff;
  padding: 35px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.07);
  text-align: center;
}

.department-profile-card img {
  width: 100%;
  max-width: 260px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.department-profile-card hr {
  margin: 25px 0;
  border: none;
  height: 1px;
  background: #e5e5e5;
}

.profile-support h4 {
  color: #7a0000;
  margin-bottom: 15px;
}

.profile-support p {
  font-size: 14px;
  margin-bottom: 8px;
  text-align: left;
}
/* =========================================
   COLUMNA IZQUIERDA
========================================= */

.department-description {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.section-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin: 30px 0 20px;
  color: #7a0000;
}

.section-subtitle::before {
  content: none; /* elimina la línea */
}
.academic-lines {
  list-style: none;
  padding: 0;
  margin-bottom: 35px;
}

.academic-lines li {
  margin-bottom: 12px;
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
  color: #444;
}

.academic-lines li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #7a0000;
  font-weight: bold;
}

.department-support {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #7a0000;
}

.department-support p {
  margin: 8px 0;
  font-weight: 500;
  color: #333;
}
.department-main {
  text-align: justify;
  hyphens: auto;
}

.department-main p,
.department-main li {
  text-align: justify;
  line-height: 1.8;
}
/* =========================================
   SIDEBAR DERECHA
========================================= */

.department-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Tarjeta de contacto */

.contact-card {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid #e6e6e6;
  background: transparent;
  border-left: none;
  box-shadow: none;
  border-radius: 0;
}

.contact-card p {
  font-size: 13px;
  margin: 6px 0;
}

/* Cuerpo de la tarjeta */
.authority-card-body {
  padding: 22px 22px 26px;
  background: #ffffff;
}

/* Cargo */
.authority-card-body p:first-child {
  font-size: 12px;
  color: #8c8c8c;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  text-align: center;
}

/* Nombre */
.authority-card-body h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 6px 0 12px;
  color: #222;
  margin-bottom: 14px;
  line-height: 1.45;
  text-align: center;
}

/* Línea divisoria elegante */
.authority-support {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-top: 14px;
  border-top: 1px solid #eeeeee;
}

/* Título Apoyo */
.authority-support h4 {
  font-size: 11.5px;
  color: #7a0000;
   margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1 px;
    text-align: center;
}

/* Texto apoyo */
.authority-support p {
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 6px;
  color: #444;
}

.academic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px 60px; /* más aire */
  margin-top: 20px;
}

.academic-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1f1f1f;
}

.authority-support strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  color: #222;
}

.academic-item p {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

  .department-content {
    padding: 35px 25px;
  }

  .department-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .department-sidebar {
    order: -1;
  }

}

.no-scroll {
  overflow: hidden;
}





.documentos{
max-width:900px;
margin:90px auto;
padding:0 20px;
font-family:'Montserrat', sans-serif;
}

.documentos h2{
font-size:34px;
margin-bottom:10px;
}

.documentos-desc{
color:#6b6b6b;
margin-bottom:40px;
}

.documentos-lista{
display:flex;
flex-direction:column;
gap:14px;
}

.doc-item{
display:flex;
align-items:center;
justify-content:space-between;
padding:18px 22px;
border:1px solid #e5e5e5;
border-radius:10px;
text-decoration:none;
color:#222;
background:white;
transition:0.25s;
}

.doc-item:hover{
background:#f5f7fb;
transform:translateY(-2px);
box-shadow:0 6px 20px rgba(0,0,0,0.08);
}

.doc-left{
display:flex;
align-items:center;
gap:14px;
font-size:16px;
}

.pdf-icon{
color:#e63946;
font-size:20px;
}

.word-icon{
color:#2b579a;
font-size:20px;
}

.download-icon{
font-size:18px;
color:#002855;
}