/* ============================================================
   TECNICA75.EDU.MX - Estilos Principales
   REDISEÑO INSTITUCIONAL MODERNO
   Paleta Oficial EST N° 75
   ============================================================ */

/* ============================================================
   1. FUENTE PERSONALIZADA
   ============================================================ */
@font-face {
  font-family: 'Panton';
  src: url('../fonts/Panton.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html, body, *, *::before, *::after,
input, button, select, textarea, optgroup, option,
fieldset, legend, label, table, th, td, caption,
h1, h2, h3, h4, h5, h6,
p, span, a, li, dt, dd,
blockquote, q, cite, code, pre, kbd, samp,
small, strong, em, b, i, u, sub, sup {
  font-family: 'Panton', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
[class*=" fa-"]::before, [class^="fa-"]::before {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
}

/* ============================================================
   2. VARIABLES (Paleta Oficial)
   ============================================================ */
:root {
  --rojo:         #BC2251;
  --rojo-oscuro:  #7A0C2E;
  --rojo-suave:   rgba(188, 34, 81, 0.06);
  --rojo-medio:   rgba(188, 34, 81, 0.55);
  --dorado:       #c9a35d;
  --dorado-suave: rgba(201, 163, 93, 0.12);
  --dorado-vivo:  #e0bd7e;
  --fondo:        #f5f6f8;
  --fondo-medio:  #eceef2;
  --blanco:       #ffffff;
  --texto:        #1a1d20;
  --texto-suave:  #6c757d;
  --borde:        #e3e6ec;
  --borde-fuerte: #cdd2db;
  --verde:        #1cb87a;
  --verde-suave:  rgba(28, 184, 122, 0.1);
  --alerta:       #e63946;
  --alerta-suave: rgba(230, 57, 70, 0.1);

  /* Sombras MUY sutiles (institucional) */
  --sh-xs: 0 1px 2px rgba(20, 25, 35, 0.04);
  --sh-sm: 0 2px 4px rgba(20, 25, 35, 0.05);
  --sh-md: 0 4px 10px rgba(20, 25, 35, 0.06);
  --sh-lg: 0 8px 20px rgba(20, 25, 35, 0.08);

  --radio-sm: 4px;
  --radio:    8px;
  --radio-lg: 12px;
  --radio-xl: 16px;

  --trans:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);

  --header-h:    78px;
  --header-h-sm: 64px;

  --max-width:   1240px;
  --max-content: 1140px;
}

/* ============================================================
   3. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  background: var(--fondo);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { overflow-x: hidden; }

/* Protección defensiva: evita que cualquier media o tabla rompa el viewport */
img, video, iframe, svg, canvas, embed, object {
  max-width: 100%;
  height: auto;
}
iframe { width: 100%; }

/* Tablas dentro de cards: scroll interno si son muy anchas */
table { max-width: 100%; }

/* Texto largo (URLs, emails, palabras sin espacios) no rompen layout */
.sitio-nombre, .sitio-desc,
.personal-nombre, .personal-email,
.recurso-info .titulo, .recurso-info .desc,
.info-item span, .info-item a,
.galeria-desc, .gov-bar {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; transition: color var(--trans-fast); }
a:hover { color: var(--rojo); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* Scrollbar institucional */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--fondo); }
::-webkit-scrollbar-thumb {
  background: var(--borde-fuerte);
  border-radius: 10px;
  border: 3px solid var(--fondo);
}
::-webkit-scrollbar-thumb:hover { background: var(--rojo); }

::selection { background: var(--rojo); color: var(--blanco); }

/* ============================================================
   4. UTILIDADES
   ============================================================ */
.contenedor {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .contenedor { padding: 0 16px; }
}

/* Asegurar que ningún hijo directo de section o contenedor pueda
   producir scroll horizontal (caso típico en mobile cuando algún
   elemento dinámico se sale por culpa de un width fijo) */
section,
.section-body,
.contenedor,
main {
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   5. HEADER - INSTITUCIONAL DE DOS NIVELES
   ============================================================
   Nivel 1: barra superior delgada roja con info contextual
   Nivel 2: header principal blanco con logo + nombre + nav
   ============================================================ */

/* Barra superior gubernamental */
.gov-bar {
  background: var(--rojo-oscuro);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  height: 30px;
  display: flex;
  align-items: center;
}
.gov-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.gov-bar-left,
.gov-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gov-bar i {
  margin-right: 6px;
  color: var(--dorado-vivo);
  font-size: 0.78rem;
}
.gov-bar a:hover { color: var(--dorado-vivo); }

/* Header principal */
#header {
  position: fixed;
  top: 30px; /* debajo de gov-bar */
  left: 0; right: 0;
  z-index: 100;
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  transition: all var(--trans);
}

#header.scrolled {
  box-shadow: var(--sh-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height var(--trans);
}

#header.scrolled .header-inner { height: 64px; }

/* Logo + nombre */
.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.logo-img-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
}
#header.scrolled .logo-img-wrap { width: 48px; height: 48px; }

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--trans-fast);
}
.logo-area:hover .logo-img { transform: scale(1.04); }

.logo-divider {
  width: 1px;
  height: 38px;
  background: var(--borde-fuerte);
  flex-shrink: 0;
}

.logo-text { min-width: 0; }
.logo-text .nombre {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--rojo-oscuro);
  letter-spacing: -0.005em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-text .clave {
  font-size: 0.74rem;
  color: var(--texto-suave);
  letter-spacing: 0.04em;
  margin-top: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Nav desktop - underline sutil al borde inferior del header */
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: stretch;
  height: 100%;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--texto);
  transition: color var(--trans-fast);
  letter-spacing: 0.005em;
}

/* Underline al borde inferior del header (no toca el texto) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px; /* sobre el border-bottom del header */
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--trans);
}

.nav-link:hover { color: var(--rojo); }
.nav-link:hover::after { transform: scaleX(0.55); }

.nav-link.activo { color: var(--rojo); }
.nav-link.activo::after { transform: scaleX(1); }

/* Hamburguesa */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: transparent;
  border: 1.5px solid var(--borde-fuerte);
  position: relative;
  transition: all var(--trans-fast);
}
.hamburger:hover { border-color: var(--rojo); background: var(--rojo-suave); }

.hamburger span {
  display: block;
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--rojo-oscuro);
  border-radius: 2px;
  transition: all var(--trans);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }

.hamburger.abierto { background: var(--rojo); border-color: var(--rojo); }
.hamburger.abierto span { background: var(--blanco); }
.hamburger.abierto span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.abierto span:nth-child(2) { opacity: 0; }
.hamburger.abierto span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Espaciador para que el contenido no quede oculto bajo headers fijos */
.header-spacer { height: calc(30px + var(--header-h)); }

/* ============================================================
   6. DRAWER MÓVIL (lateral derecho)
   ============================================================ */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: min(330px, 88vw);
  height: 100vh;
  height: 100dvh;
  background: var(--blanco);
  z-index: 200;
  transform: translateX(110%);
  transition: transform var(--trans);
  box-shadow: -8px 0 30px rgba(20, 25, 35, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nav-mobile.visible { transform: translateX(0); }

/* Cabecera con franja roja sólida */
.nav-mobile-header {
  background: var(--rojo);
  padding: 22px 22px 18px;
  color: var(--blanco);
  position: relative;
}
.nav-mobile-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--dorado);
}
.nav-mobile-header .titulo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.nav-mobile-header .sub {
  font-size: 0.76rem;
  opacity: 0.85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.nav-mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all var(--trans-fast);
}
.nav-mobile-close:hover { background: rgba(255,255,255,0.28); }

.nav-mobile ul {
  list-style: none;
  padding: 14px 12px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.nav-mobile li {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-mobile.visible li { opacity: 1; transform: translateX(0); }
.nav-mobile.visible li:nth-child(1) { transition-delay: 0.06s; }
.nav-mobile.visible li:nth-child(2) { transition-delay: 0.12s; }
.nav-mobile.visible li:nth-child(3) { transition-delay: 0.18s; }
.nav-mobile.visible li:nth-child(4) { transition-delay: 0.24s; }

.nav-mobile a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--texto);
  margin-bottom: 2px;
  transition: all var(--trans-fast);
  border-left: 3px solid transparent;
}
.nav-mobile a i {
  width: 20px;
  text-align: center;
  color: var(--rojo);
  font-size: 0.95rem;
}
.nav-mobile a:hover {
  background: var(--rojo-suave);
  color: var(--rojo);
  border-left-color: var(--rojo);
}

.nav-mobile-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--borde);
  font-size: 0.76rem;
  color: var(--texto-suave);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 35, 0.55);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans);
}
.nav-overlay.visible { opacity: 1; visibility: visible; }

/* ============================================================
   7. ENCABEZADO DE SECCIÓN - CENTRADO INSTITUCIONAL
   ============================================================ */
section {
  position: relative;
  background: var(--blanco);
}

.section-banner {
  background: var(--blanco);
  padding: 50px 0 30px;
  position: relative;
  border-bottom: 1px solid var(--borde);
}

.section-banner-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

/* Icono en círculo elegante */
.section-banner-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rojo-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rojo);
  font-size: 1.4rem;
  border: 1px solid rgba(188, 34, 81, 0.12);
  position: relative;
}
/* Anillo decorativo */
.section-banner-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(188, 34, 81, 0.25);
}

.section-banner-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.section-banner h2 {
  color: var(--texto);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  position: relative;
  padding-bottom: 14px;
}

/* Línea decorativa con punto central */
.section-banner h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--rojo);
  border-radius: 2px;
}
.section-banner h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background: var(--dorado);
  border-radius: 50%;
  z-index: 1;
}

.section-banner-sub {
  color: var(--texto-suave);
  font-size: 0.96rem;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
  max-width: 600px;
}

/* Contenedor de contenido de cada sección */
.section-body {
  padding: 38px 0 70px;
}

/* Fondos alternados muy sutiles */
section:nth-of-type(odd)  .section-banner,
section:nth-of-type(odd)  .section-body { background: var(--blanco); }
section:nth-of-type(even) .section-banner,
section:nth-of-type(even) .section-body { background: var(--fondo); }

/* ============================================================
   8. CARRUSEL DE AVISOS (banner horizontal 1280:250)
   ============================================================ */
.carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
  background: var(--fondo-medio);
  border: 1px solid var(--borde);
}

.carousel-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.65, 0, 0.35, 1);
  aspect-ratio: 1280 / 250;
}

.carousel-slide {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
  display: block;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.carousel-slide:hover img { transform: scale(1.02); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,26,54,0.25) 0%, transparent 50%);
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blanco);
  color: var(--rojo);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all var(--trans-fast);
  box-shadow: var(--sh-md);
  border: 1px solid var(--borde);
}
.carousel-btn:hover {
  background: var(--rojo);
  color: var(--blanco);
  border-color: var(--rojo);
  transform: translateY(-50%) scale(1.05);
}
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--borde-fuerte);
  transition: all var(--trans-fast);
}
.carousel-dot:hover { background: var(--rojo-medio); }
.carousel-dot.activo {
  background: var(--rojo);
  width: 28px;
  border-radius: 4px;
}

.aviso-vacío {
  text-align: center;
  padding: 60px 30px;
  background: var(--blanco);
  border: 2px dashed var(--borde-fuerte);
  border-radius: var(--radio);
  color: var(--texto-suave);
  font-size: 0.95rem;
}

.loader-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--borde);
  border-top-color: var(--rojo);
  border-radius: 50%;
  margin: 50px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   9. RECURSOS DIGITALES
   ============================================================ */
.tabs-recursos {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 44px;
  border-bottom: 2px solid var(--borde);
}

.tab-btn {
  position: relative;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--texto-suave);
  background: transparent;
  transition: color var(--trans-fast);
  letter-spacing: 0.02em;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 3px;
  background: var(--rojo);
  transform: scaleX(0);
  transition: transform var(--trans);
}
.tab-btn:hover { color: var(--rojo); }
.tab-btn.activo {
  color: var(--rojo);
}
.tab-btn.activo::after { transform: scaleX(1); }

.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.activo { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.recursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.recurso-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-xs);
}
.recurso-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--rojo);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--trans);
}
.recurso-card:hover {
  transform: translateY(-3px);
  border-color: var(--borde-fuerte);
  box-shadow: var(--sh-md);
}
.recurso-card:hover::before { transform: scaleY(1); }

.recurso-icono {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radio-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--blanco);
  transition: all var(--trans-fast);
}
.recurso-card:hover .recurso-icono { transform: scale(1.05); }

.recurso-info { flex: 1; min-width: 0; }
.recurso-info .titulo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--texto);
  margin-bottom: 5px;
  line-height: 1.3;
}
.recurso-info .desc {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-bottom: 10px;
  line-height: 1.45;
}

.tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tipo-link     { background: var(--verde-suave); color: var(--verde); }
.tipo-descarga { background: var(--dorado-suave); color: var(--rojo-oscuro); }

.recursos-vacio {
  text-align: center;
  padding: 60px 30px;
  color: var(--texto-suave);
  font-size: 0.95rem;
  background: var(--blanco);
  border-radius: var(--radio);
  border: 1px dashed var(--borde-fuerte);
}

/* ============================================================
   10. GALERÍA — Masonry de eventos + Lightbox cinematográfico
   ============================================================ */

.galeria-vacia {
  text-align: center;
  padding: 60px 30px;
  color: var(--texto-suave);
  font-size: 0.95rem;
  background: var(--blanco);
  border: 1px dashed var(--borde-fuerte);
  border-radius: var(--radio);
}

/* ── Grid uniforme (cards iguales con aspect-ratio) ─────────
   Reemplaza el masonry por un grid simétrico donde todas las
   cards tienen la misma proporción 4:3 (ancho:alto). Más limpio,
   predecible, y el contenido se ve completo sin hacer scroll. */
.galeria-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Card de evento (uniforme) ──────────────────────────────
   Cada card tiene altura fija basada en aspect-ratio de la imagen
   (4:3) + ~70px del footer informativo.
   ────────────────────────────────────────────────────────── */
.evento-card {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--fondo-medio);
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform var(--trans), box-shadow var(--trans);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Las clases de altura ya no aplican (mantenidas como no-op
   por compatibilidad con el JS existente) */
.evento-card.altura-bajo,
.evento-card.altura-medio,
.evento-card.altura-alto { grid-row: auto; }

.evento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

/* Contenedor de las miniaturas en carrusel automático */
.evento-card-imgs {
  position: relative;
  aspect-ratio: 4 / 3;  /* ratio fijo: ancho:alto */
  overflow: hidden;
  background: #1a1d20;
  flex-shrink: 0;
}

.evento-mini {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 6s ease;
  pointer-events: none;
}
.evento-mini.activo {
  opacity: 1;
  transform: scale(1);
}

/* Overlay con texto "Ver galería" al hover */
.evento-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 163, 93, 0.847), rgba(201, 163, 93, 0.467));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--blanco);
  opacity: 0;
  transition: opacity var(--trans);
  pointer-events: none;
}
.evento-card-overlay i {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.evento-card-overlay span {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}
.evento-card:hover .evento-card-overlay {
  opacity: 1;
}
.evento-card:hover .evento-card-overlay i {
  transform: scale(1.1) rotate(8deg);
}
.evento-card:hover .evento-card-overlay span {
  opacity: 1;
  transform: translateY(0);
}

/* Footer informativo de la card */
.evento-card-info {
  padding: 14px 18px 16px;
  background: var(--blanco);
  border-top: 3px solid var(--dorado);
}
.evento-card-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--texto);
  margin: 0 0 4px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.evento-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--texto-suave);
  font-weight: 600;
}
.evento-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.evento-card-meta i { color: var(--rojo); font-size: 0.72rem; }

/* Card vacía (sin fotos) */
.evento-card.vacio {
  cursor: default;
}
.evento-card.vacio:hover { transform: none; }
.evento-card-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--texto-suave);
  background: var(--fondo);
}
.evento-card-empty i { font-size: 2rem; opacity: 0.4; }

/* ============================================================
   LIGHTBOX CINEMATOGRÁFICO
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  z-index: 300;
  padding: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#lightbox.abierto {
  display: flex;
  opacity: 1;
  animation: lbFadeIn 0.4s ease forwards;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Header del lightbox */
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  position: relative;
  z-index: 10;
}
.lightbox-titulo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lightbox-titulo-wrap h3 {
  color: var(--blanco);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lightbox-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--blanco);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}
.lightbox-close:hover {
  background: var(--alerta);
  border-color: var(--alerta);
  transform: rotate(90deg);
}

/* Stage central con imagen */
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 70px;
  position: relative;
  min-height: 0;
}

.lightbox-img-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radio-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
#lightbox-img.cargando {
  animation: lbZoom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: -1;
}
.lightbox-spinner > div {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--dorado);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--blanco);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  z-index: 5;
}
.lightbox-nav:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  transform: translateY(-50%) scale(1.06);
}
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

/* Footer con descripción y thumbs */
.lightbox-footer {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  padding: 16px 28px 18px;
  position: relative;
  z-index: 10;
}
.lightbox-desc {
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  margin: 0 0 14px;
  min-height: 1.4em;
  line-height: 1.4;
}
.lightbox-desc:empty { margin-bottom: 0; }

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 8px;
  justify-content: center;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
  flex: 0 0 70px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.5;
  cursor: pointer;
  transition: all var(--trans-fast);
  background: transparent;
  padding: 0;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: 0.85; }
.lb-thumb.activo {
  opacity: 1;
  border-color: var(--dorado);
  transform: scale(1.06);
}

/* Selector y carrusel viejos: ya no se usan, eliminados */

/* ============================================================
   11. CONTACTO
   ============================================================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 26px;
  margin-bottom: 60px;
}

.contacto-info-card {
  padding: 32px 28px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-top: 4px solid var(--rojo);
  border-radius: var(--radio);
  position: relative;
  box-shadow: var(--sh-sm);
}

.contacto-info-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rojo-oscuro);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--borde);
  letter-spacing: -0.005em;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--borde);
}
.info-item:last-child { border-bottom: none; }
.info-item i {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radio-sm);
  background: var(--rojo-suave);
  color: var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--trans-fast);
}
.info-item:hover i {
  background: var(--rojo);
  color: var(--blanco);
}
.info-item span,
.info-item a {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.5;
  padding-top: 8px;
  color: var(--texto);
}
.info-item a { color: var(--rojo); transition: color var(--trans-fast); }
.info-item a:hover { color: var(--rojo-oscuro); text-decoration: underline; }

.mapa-wrapper {
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--blanco);
  border: 1px solid var(--borde);
  box-shadow: var(--sh-sm);
  min-height: 380px;
}
.mapa-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  display: block;
}

/* Directorio */
.directorio-section {
  margin-top: 30px;
}

.directorio-section > h3 {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 36px;
  color: var(--rojo-oscuro);
  position: relative;
  padding-bottom: 14px;
}
.directorio-section > h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--dorado);
}

.directorio-depto {
  margin-bottom: 40px;
}

.depto-titulo {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blanco);
  background: var(--rojo-oscuro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 22px;
  border-radius: 3px;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 24px;
  border-left: 3px solid var(--dorado);
}

.directorio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.personal-card {
  flex: 0 1 230px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px 16px 20px;
  text-align: center;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-xs);
}
.personal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--trans);
}
.personal-card:hover {
  transform: translateY(-3px);
  border-color: var(--borde-fuerte);
  box-shadow: var(--sh-md);
}
.personal-card:hover::before { transform: scaleX(1); }

.personal-foto,
.personal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 14px;
  object-fit: cover;
  border: 2px solid var(--blanco);
  box-shadow: 0 0 0 1px var(--borde);
  transition: all var(--trans);
}
.personal-card:hover .personal-foto,
.personal-card:hover .personal-avatar {
  box-shadow: 0 0 0 2px var(--dorado);
}
.personal-avatar {
  background: var(--rojo-suave);
  color: var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}

.personal-nombre {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--texto);
  margin-bottom: 4px;
  line-height: 1.25;

  /* 1 sola línea */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.personal-cargo {
  font-size: 0.8rem;
  color: var(--texto-suave);
  margin-bottom: 4px;
  font-style: italic;
  line-height: 1.3;
}
.personal-asignatura {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 11px;
  background: var(--rojo-suave);
  color: var(--rojo);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.personal-asignatura i { font-size: 0.7rem; }

.personal-email {
  font-size: 0.75rem;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--borde);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.personal-email a { color: var(--rojo); }

/* ============================================================
   12. FOOTER INSTITUCIONAL (con Sitios de Interés integrados)
   ============================================================ */
#footer {
  background: var(--rojo-oscuro);
  color: rgba(255, 255, 255, 0.85);
  padding: 0;
  position: relative;
}

#footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--dorado);
}

.footer-main {
  padding: 44px 28px 36px;
  max-width: var(--max-content);
  margin: 0 auto;
}

/* ── Cabecera "Sitios de Interés" sobre fondo rojo ── */
.footer-sitios-header {
  text-align: center;
  margin-bottom: 28px;
}
.footer-sitios-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blanco);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}
.footer-sitios-divider {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--dorado);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ── Grid de sitios sobre fondo rojo ── */
.sitios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.sitio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radio);
  transition: all var(--trans-fast);
  text-decoration: none;
  color: var(--blanco);
}
.sitio-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--dorado);
  transform: translateY(-2px);
  color: var(--blanco);
}
.sitio-card:hover .sitio-arrow {
  opacity: 1;
  color: var(--dorado-vivo);
  transform: translate(2px, -2px);
}
.sitio-card:hover .sitio-icono {
  transform: scale(1.06);
}

.sitio-icono {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radio-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-size: 1rem;
  transition: transform var(--trans-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sitio-info {
  flex: 1;
  min-width: 0;
}
.sitio-nombre {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blanco);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sitio-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitio-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  opacity: 0.6;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

/* ── Vacío: si no hay sitios, ocultar la zona "main" ── */
.footer-main:has(#sitiosWrap:empty) {
  padding: 0;
}
.footer-main:has(#sitiosWrap:empty) .footer-sitios { display: none; }

/* ── Banda inferior (copyright + créditos) ── */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 28px;
  text-align: center;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.18);
}
.footer-bottom p { margin: 4px 0; opacity: 0.85; line-height: 1.5; }
.footer-bottom a { color: var(--dorado-vivo); font-weight: 600; }
.footer-bottom a:hover { color: var(--blanco); text-decoration: underline; }
.footer-sep { margin: 0 8px; opacity: 0.4; }

.footer-credits {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.footer-mail {
  word-break: break-all;
  white-space: nowrap;
}

/* ============================================================
   13. SCROLL TO TOP
   ============================================================ */
#scrollTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rojo);
  color: var(--blanco);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: var(--sh-md);
  border: 2px solid var(--blanco);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: all var(--trans);
}
#scrollTop.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
/* Ocultar cuando el footer entra en el viewport */
#scrollTop.over-footer {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
}
#scrollTop:hover {
  background: var(--rojo-oscuro);
  transform: translateY(-3px);
}

/* ============================================================
   14. ANIMACIONES DE ENTRADA AL SCROLL
   ============================================================ */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-aos="fade-up"]    { transform: translateY(30px); }
[data-aos="fade-down"]  { transform: translateY(-20px); }
[data-aos="zoom-in"]    { transform: scale(0.96); }

[data-aos].aos-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ============================================================
   15. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .nav-links { display: none; }
  .hamburger { display: block; }

  .header-inner { padding: 0 22px; }
  .logo-text .nombre { font-size: 0.95rem; }
  .logo-text .clave  { font-size: 0.7rem; }

  .gov-bar-left .gov-bar-extra { display: none; }

  .contacto-grid { grid-template-columns: 1fr; gap: 22px; }

  .section-banner-inner { padding: 0 22px; }
}

@media (max-width: 720px) {
  /* Ocultar gov-bar en mobile para liberar espacio */
  .gov-bar { display: none; }
  #header { top: 0; }
  .header-spacer { height: var(--header-h-sm); }

  :root { --header-h: var(--header-h-sm); }

  .header-inner { padding: 0 16px; height: var(--header-h-sm); gap: 12px; }
  #header.scrolled .header-inner { height: 56px; }
  .logo-area { gap: 10px; min-width: 0; flex: 1; }
  .logo-img-wrap { width: 44px; height: 44px; }
  #header.scrolled .logo-img-wrap { width: 40px; height: 40px; }
  .logo-divider { height: 32px; }
  .logo-text { min-width: 0; flex: 1; overflow: hidden; }
  .logo-text .nombre { font-size: 0.88rem; }
  .logo-text .clave  { display: none; }

  .contenedor { padding: 0 16px; }

  .section-banner { padding: 36px 0 24px; }
  .section-banner-inner { padding: 0 16px; gap: 12px; }
  .section-banner-icon { width: 52px; height: 52px; font-size: 1.15rem; }
  .section-banner h2 { font-size: 1.3rem; line-height: 1.2; padding-bottom: 12px; }
  .section-banner h2::after { width: 50px; }
  .section-banner-sub { font-size: 0.85rem; }

  .section-body { padding: 28px 0 50px; }

  .carousel-wrapper { width: 100%; border-radius: var(--radio); }
  .carousel-btn { width: 32px; height: 32px; font-size: 0.7rem; }
  .carousel-btn.prev { left: 8px; }
  .carousel-btn.next { right: 8px; }
  .carousel-dots { margin-top: 16px; gap: 6px; }
  .carousel-dot { width: 7px; height: 7px; }
  .carousel-dot.activo { width: 22px; }

  .recursos-grid { grid-template-columns: 1fr; gap: 14px; }
  .recurso-card { padding: 16px; gap: 12px; }
  .recurso-icono { width: 42px; height: 42px; font-size: 1.05rem; }
  .recurso-info { min-width: 0; }
  .recurso-info .titulo,
  .recurso-info .desc { word-break: break-word; }

  /* Tabs scrollables horizontalmente si hay muchas */
  .tabs-recursos {
    gap: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .tab-btn {
    padding: 11px 16px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Galería en mobile */
  .galeria-masonry {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .evento-card-info { padding: 10px 12px 12px; }
  .evento-card-titulo { font-size: 0.85rem; }
  .evento-card-meta { font-size: 0.7rem; gap: 8px; }

  .evento-card-overlay i { font-size: 1.2rem; width: 44px; height: 44px; }
  .evento-card-overlay span { font-size: 0.75rem; }

  /* Lightbox mobile */
  .lightbox-header { padding: 14px 16px; }
  .lightbox-titulo-wrap h3 { font-size: 0.95rem; }
  .lightbox-meta { font-size: 0.72rem; }

  .lightbox-stage { padding: 0 8px; }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.5);
  }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }

  .lightbox-footer { padding: 12px 16px 14px; }
  .lightbox-desc { font-size: 0.82rem; margin-bottom: 10px; }
  .lb-thumb { flex: 0 0 56px; height: 40px; }

  .contacto-grid { grid-template-columns: 1fr; gap: 18px; }
  .contacto-info-card { padding: 22px 18px; }
  .contacto-info-card h3 { font-size: 1.05rem; }
  .info-item { gap: 12px; }
  .info-item span,
  .info-item a {
    font-size: 0.85rem;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .mapa-wrapper, .mapa-wrapper iframe { min-height: 280px; }

  .directorio-grid { gap: 14px; }
  .personal-card { flex: 0 1 calc(50% - 7px); padding: 16px 10px 14px; min-width: 0; }
  .personal-foto, .personal-avatar { width: 60px; height: 60px; }
  .personal-nombre { font-size: 0.85rem; }
  .personal-cargo { font-size: 0.74rem; }
  .personal-asignatura { font-size: 0.66rem; padding: 3px 9px; }
  .personal-email { font-size: 0.7rem; }

  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  #lightbox { padding: 20px; }

  .footer-main { padding: 28px 16px 22px; }
  .footer-sitios-header { margin-bottom: 22px; }
  .footer-sitios-header h3 { font-size: 0.88rem; }
  .sitios-grid { grid-template-columns: 1fr; gap: 10px; }
  .sitio-card { padding: 12px 14px; gap: 12px; }
  .sitio-icono { width: 38px; height: 38px; font-size: 0.9rem; }
  .sitio-nombre { font-size: 0.88rem; }
  .sitio-desc { font-size: 0.74rem; }

  .footer-bottom {
    padding: 16px 16px 22px;
    font-size: 0.74rem;
  }
  .footer-bottom p { line-height: 1.55; }
  /* Ocultar info redundante (CCT, ciudad) en móvil para limpiar */
  .footer-sep-mobile-hide { display: none; }
  /* Apilar verticalmente nombre y email del desarrollador */
  .footer-credits {
    flex-direction: column;
    gap: 4px;
  }
  .footer-credits .footer-sep { display: none; }
  .footer-mail {
    font-size: 0.78rem;
    color: var(--dorado-vivo);
  }

  .nav-mobile-header { padding: 18px 18px 16px; }

  #scrollTop {
    width: 42px; height: 42px;
    bottom: 18px; right: 18px;
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .contenedor { padding: 0 12px; }

  .header-inner { padding: 0 12px; gap: 8px; }
  .logo-img-wrap { width: 38px; height: 38px; }
  .logo-divider { display: none; }
  .logo-text .nombre { font-size: 0.78rem; }
  .hamburger { width: 38px; height: 38px; }

  .section-banner { padding: 28px 0 20px; }
  .section-banner-inner { padding: 0 12px; gap: 10px; }
  .section-banner-icon { width: 46px; height: 46px; font-size: 1rem; }
  .section-banner h2 { font-size: 1.1rem; padding-bottom: 10px; }
  .section-banner h2::after { width: 40px; }
  .section-banner-sub { font-size: 0.78rem; }

  .galeria-masonry {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .evento-card-info { padding: 8px 10px 10px; }
  .evento-card-titulo { font-size: 0.78rem; }
  .evento-card-meta { font-size: 0.65rem; gap: 6px; }
  .lightbox-header { padding: 10px 12px; }
  .lightbox-titulo-wrap h3 { font-size: 0.85rem; }
  .lightbox-close { width: 38px; height: 38px; }
  .lightbox-footer { padding: 8px 10px 12px; }

  .directorio-grid { gap: 10px; }
  .personal-card { flex: 0 1 calc(50% - 5px); padding: 14px 8px 12px; }
  .personal-foto, .personal-avatar { width: 54px; height: 54px; }

  .recurso-card { padding: 14px; gap: 10px; }
  .recurso-icono { width: 38px; height: 38px; }

  .footer-main { padding: 22px 12px 18px; }
  .footer-bottom { padding: 12px; font-size: 0.7rem; }

  .nav-mobile { width: min(290px, 92vw); }
  .nav-mobile a { padding: 12px 14px; font-size: 0.92rem; }
}

/* ============================================================
   16. ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}

:focus-visible {
  outline: 2px solid var(--rojo);
  outline-offset: 3px;
  border-radius: 3px;
}