/* =====================================================
   VARIABLES Y ESTILOS GLOBALES
====================================================== */
:root {
  --gold: #be9d31;
  --gold-dark: #d8b74b;
  --gold-light: #dfc56e;
  --gold-lighter: #e7dfc2;
  --dark-bg: #000;/*#121212;*/
  --dark-less: #1E1E1E;
  --accent-red: #8B3A3A;
  --accent-green: #3A623D;
}

body {
  background-color: var(--dark-bg);
  color: #E0E0E0;
  font-family: 'Lato', sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* =====================================================
 TIPOGRAFÍA: TÍTULOS Y LINKS
====================================================== */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
}

.nav-link {
  font-family: 'Cinzel', serif;
  color: var(--dark-bg);
  transition: all 0.3s ease;
  font-size: 1.3rem;
  font-weight: 700;
}

/* nav-link in medium size devices */
@media (max-width: 1200px) {
  .nav-link {
    font-size: 1.1rem;
  }
}


.nav-link.active {
  color: #fff  !important;
  text-shadow: 0 0 5px var(--gold);
}

.nav-link:hover {
  color: #fff !important;
  text-shadow: 0 0 5px var(--gold);
}

/* =====================================================
 LOADER DE INICIO
====================================================== */
/* Cubrir toda la pantalla */
#loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #fff;           /* O el color de fondo de tu sitio */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Un spinner sencillo */
.spinner {
  width: 6rem; height: 6rem;
  /* border: 4px solid rgba(0,0,0,0.1);
  border-top-color: #be9d31;
  border-radius: 50%; */
  animation: spin 3s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* =====================================================
 BORDES DECORATIVOS MESOAMERICANOS
====================================================== */
.mesoamerican-border {
  position: fixed;
  height: 100%;
  width: 30px;
  background-image: url('https://bigbangmex.unam.mx/static/img/barra_lateral_transparente-min.png');
  background-repeat: repeat-y;
  background-size: 30px auto;
  z-index: 1018;
}

.mesoamerican-border.left {
  left: 0;
  top: 0;
}

.mesoamerican-border.right {
  right: 0;
  top: 0;
  transform: scaleX(-1);
}

/* =====================================================
 NAVBAR Y ELEMENTOS RELACIONADOS
====================================================== */
.navbar {
  background-color: var(--gold) !important;
  border-bottom: 1px solid var(--gold);
  min-height: 50px; /* Ajuste base para móvil */
  padding-top: 0;
  padding-bottom: 0;
}

.navbar .container,
.navbar .container-fluid {
  padding-left: 0;
}

.navbar-brand.navbar-banner-container {
  padding-left: 0;
  margin-left: 0;
}

.navbar-brand img {
  max-height: 76px;
}

.navbar-toggler {
  position: relative;
  z-index: 1025;
}

.navbar-banner-container {
  margin: 0;
  padding: 0;
  z-index: 1020;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.navbar-banner {
  height: 80%;
  width: auto;
  object-fit: cover;
  object-position: left;
  margin: 8px;
  padding: 0;
}

/* Para móviles */
@media (max-width: 991px) {
  .navbar-banner {
    margin: 0px;
  }
}

/* =====================================================
 SEGUNDO NAVBAR
====================================================== */
.second-navbar {
  height: 60px !important;
  min-height: 50px;
  background-color: var(--gold-dark) !important;
  border-bottom: 1px solid var(--gold);
  padding: 0;
  margin-top: -1px; /* Para eliminar espacio entre navbars */
  position: sticky;
  top: 77px;
  z-index: 1018;
}
/* On mobile second_navbar as 76px height */
@media (max-width: 991px) {
  .second-navbar {
    height: 70px !important;
  }
}

.second-navbar .navbar-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.second-navbar .nav-item {
  margin: 2px 0;
}

.second-navbar .nav-link {
  padding: 8px 15px;
  font-size: 1.1rem;
  color: var(--dark-bg) !important;
  font-weight: 600;
}

.second-navbar .nav-link:hover {
  color: #fff !important;
  text-shadow: 0 0 5px var(--gold);
}

.second-navbar .nav-link.active {
  color: #fff !important;
  text-shadow: 0 0 18px var(--gold);
}

/* =====================================================
 CONTENEDORES Y TÍTULOS
====================================================== */
.container {
  padding-left: 35px;
  padding-right: 35px;
}

.title-container {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.presentacion-title {
  margin: 2rem 0 -0.9rem;
  font-size: 2.2rem;
  letter-spacing: 3px;
  position: relative;
}

.presentacion-title:after {
  content: "";
  display: block;
  margin: 10px auto;
}

.presentacion-subtitle{
  font-size: 1.8rem;
  margin: 0.5rem 0;
  text-align: center;
}

.decorative-divider {
  height: 40px;
  background-image: url('../img/cintillo_titulos_2.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: 40px 40px;
  margin: 0 auto 25px auto;
}

/* =====================================================
 FOOTER
====================================================== */
.pies-caminando {
  max-width: 120px;
  opacity: 0.8;
  margin: 0 10px;
  cursor: pointer;
  transition: transform 0.4s ease-in-out;
}

.pies-caminando:hover {
  transform: scale(1.1);
}

/* Agregar animación de palpitar */
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes pulseColor{
/* Add a beat and a change of color */
  0%   { transform: scale(1); color: var(--gold); }
  50%  { transform: scale(1.03); color: var(--gold-lighter); }
  100% { transform: scale(1); color: var(--gold); }
}

.pies-caminando.siguiente {
  animation: pulse 3s infinite;
}

.avanzar-text {
  color: #a50407;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 8px;
  animation: pulse 3s infinite;
  text-align: center;
  text-transform: none;
}

.regresar-text {
  color: #a50407;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 8px;
  text-align: center;
  text-transform: none;
}

.enlace_avanzar {
  text-decoration: none;
}

/* This removes the underline from the link containing the footprints and text */
.d-flex a.text-center {
  text-decoration: none;
}

.footer {
  font-family: 'Cinzel', serif;
  margin-top: 50px;
  border-top: 1px solid #696969;
}

.footer a {
  text-decoration: none;
}

/* =====================================================
 ANIMACIONES GENERALES
====================================================== */
.fade-in-bottom {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  will-change: opacity, transform;
}

.fade-in-bottom.visible {
  opacity: 1;
  transform: translateY(0);
}

.animated-line,
.animated-sentence {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  display: block;
  margin-bottom: 0.5em;
}

.animated-sentence {
  display: inline-block;
  margin-right: 4px;
}

.animated-line.visible,
.animated-sentence.visible {
  opacity: 1;
  transform: translateY(0);
}

.line-container,
.sentence-container {
  overflow: visible;
}

.content-card-image img.fade-in-bottom {
  transform: translateY(30px) scale(0.95);
  transition: opacity 1.3s ease, transform 1.3s ease;
}

.content-card-image img.fade-in-bottom.visible {
  transform: translateY(0) scale(1);
}

/* Special animation for titles */
.title-container.fade-in-bottom,
.presentacion-title.fade-in-bottom {
  transition-delay: 0s !important;
  transition-duration: 0.8s !important;
  z-index: 10;
}

/* =====================================================
 TARJETAS DE CONTENIDO
====================================================== */
.content-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  border-radius: 8px;
  padding: 25px;
}

.content-card-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  border-radius: 8px;
  padding: 25px;
}

.content-card-image-sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
  position: sticky;
  top: calc(50vh - 250px);
}

.content-card p {
  line-height: 1.8;
  margin: 1.2rem 0;
  font-size: 1.4rem;
  text-align: left;
}

.content-card p a {
  color: var(--gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

.content-card p a:hover {
  color: #dad5bf;
  transform: scale(1.05);
}

.artifact-img {
  border: 2px solid var(--gold);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.artifact-img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.manuscript-img {
  max-width: 100%;
  border-radius: 4px;
}

/* =====================================================
 BOTONES DE NAVEGACIÓN DE IMÁGENES
====================================================== */
.image-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
}

.image-nav-btn {
  background-color: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
}

.image-nav-btn:hover,
.image-nav-btn.active {
  background-color: var(--gold);
  color: var(--dark-bg);
}

/* =====================================================
 ENLACES INTERNOS DEL TEXTO
====================================================== */
.inner-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  /* animation: pulseColor 2s infinite ease-in-out; */

}

.inner-link:hover,
.inner-link.active {
  color: #dad5bf;
  text-shadow: 0 0 5px var(--gold);
  text-decoration: underline;
}

/* =====================================================
 CONTENEDOR DE IMÁGENES Y ESTILO STICKY
====================================================== */
.image-container {
  position: relative;
  width: 100%;
  min-height: 300px;
  margin-bottom: 15px;
}

.manuscript-img-sticky {
  max-width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.8s ease;
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
}

.manuscript-img-sticky.active {
  opacity: 1;
  position: relative;
  z-index: 2;
  height: 400px;
  object-fit: contain;
}

.manuscript-img-sticky.hidden {
  opacity: 0;
  z-index: 1;
  pointer-events: none !important;
}

/* =====================================================
 SEPARADOR PARA MOBILE NAV
====================================================== */
.separator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.separator::before,
.separator::after {
  content: "";
  display: block;
  height: 2px;
  background-color: #a50407;
  width: 30px;
  margin: 0 8px;
}

.circle {
  width: 10px;
  height: 10px;
  background-color: #a50407;
  border-radius: 50%;
}

/* =====================================================
 MOBILE MODAL
====================================================== */
.mobile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1050;
}

.mobile-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-modal-content {
  position: relative;
  background-color: #121212;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 90%;
  max-height: 80vh;
  overflow: hidden;
  text-align: center;
}

.mobile-modal-image-container {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-modal-image-container img,
.mobile-modal-image-container video {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 4px;
}

@keyframes closeBeat {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.mobile-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  color: #b1b1b1;
  cursor: pointer;
  animation: closeBeat 3s infinite ease-in-out;
  z-index: 1060;
}

/* =====================================================
 ESTILOS PARA VÍDEOS DENTRO DE manuscript-img-sticky
====================================================== */
.manuscript-img-sticky.hidden video {
  display: none;
}

.manuscript-img-sticky.active video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =====================================================
 SVG INTERACTIVO Y hoverable-group
====================================================== */
.hoverable-group {
  cursor: pointer;
}

.hoverable-group .static-rect {
  fill: transparent;
  fill-opacity: 1;
}

.hoverable-group .highlight-path {
  fill: #be9d31;
  transition: fill 0.3s ease;
}

.hoverable-group:hover .highlight-path {
  fill: var(--gold-light) !important;
}

.hoverable-group:hover .highlight-path.navbar {
  fill: #fff !important;
}

.hoverable-group.active .highlight-path.navbar {
  fill: #fff !important;
}

.svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 300px;
  max-height: 560px;
  overflow: visible;
  margin: 0 auto;
}

.svg-container svg {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  overflow: visible;
}

.svg-label {
  font-family: 'Cinzel', serif;
  fill: #e7d393;
  font-size: 14px;
  font-weight: bold;
  text-anchor: middle;
  pointer-events: none;
  transition: fill 0.3s ease, font-size 0.3s ease;
  dominant-baseline: middle;
}

.hoverable-group:hover .svg-label {
  fill: #dfc56e;
  font-size: 16px;
  text-shadow: 0 0 5px #be9d31;
}

.hoverable-group.active .svg-label {
  fill: #dbd7ca;
  font-size: 22px;
  text-shadow: 0 0 5px #be9d31;
}

.svg-label-culturas{
  font-family: 'Cinzel', serif;
  fill: #e7d393;
  font-size: 34px;
  font-weight: bold;
  text-anchor: middle;
  pointer-events: none;
  transition: fill 0.3s ease, font-size 0.3s ease;
  dominant-baseline: middle;
}

.hoverable-group:hover .svg-label-culturas {
  fill: #dfc56e;
  font-size: 40px;
  text-shadow: 0 0 5px #be9d31;
}

.hoverable-group.active .svg-label-culturas {
  fill: #dbd7ca;
  font-size: 40px;
  text-shadow: 0 0 5px #be9d31;
}


/* =====================================================
 MEDIA QUERIES
====================================================== */

/* ----------------------------------------
 Accesibilidad: usuarios con preferencia de reducir animaciones
---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in-bottom,
  .animated-line,
  .animated-sentence {
      transition: opacity 0.5s ease;
      transform: none;
  }
  .fade-in-bottom.visible,
  .animated-line.visible,
  .animated-sentence.visible {
      transform: none;
  }
}

/* ----------------------------------------
 Escritorio grande (min-width: 992px)
---------------------------------------- */
@media (min-width: 992px) {
  .navbar-brand.navbar-banner-container {
      position: absolute;
      left: 0;
  }
  .navbar-nav {
      margin-left: auto;
  }
  .navbar-menu-container {
      position: static;
      border-bottom: none !important;
  }
  .navbar {
      height: 77px;
  }
  .mesoamerican-border.left {
      z-index: 1018;
  }

  /* nav-footprints: versión desktop centrado vertical */
  .nav-footprints {
      position: absolute;
      top: 50%;
      left: 0;
      padding: 0 80px;
      width: 100%;
      transform: translateY(-50%);
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
  }
  .nav-footprints a {
      pointer-events: auto;
      text-decoration: none;
  }

  /* nav-footprints-bottom: versión desktop flujo normal */
  .nav-footprints-bottom {
      position: relative;
      padding: 0 80px;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  .nav-footprints-bottom a {
      text-decoration: none;
  }

  /* SVG container relativo para posicionar hijos absolutos */
  .svg-container {
      position: relative;
  }
}

/* ----------------------------------------
 Intermedio (min-width: 769px)
---------------------------------------- */
@media (min-width: 769px) {
  .navbar-brand.navbar-banner-container {
      left: 30px;
  }
}

/* ----------------------------------------
 Tablet y móviles grandes (max-width: 991px)
---------------------------------------- */
@media (max-width: 991px) {
  /* Ajustes de navbar */
  .navbar-brand.navbar-banner-container {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1021;
  }
  .navbar-toggler {
      margin-left: auto;
      margin-right: 15px;
  }
  .navbar-menu-container {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      padding: 10px 0;
      border-top: 1px solid rgba(212, 175, 55, 0.3);
      background-color: var(--gold);
  }
  .navbar-nav {
      text-align: center;
      padding: 0 20px;
  }
  .navbar-nav .nav-item {
      margin: 8px 0;
  }
  .navbar-nav .nav-link {
      display: inline-block;
      padding: 8px 0;
  }

  /* Contenedores y títulos */
  .presentacion-title {
      font-size: 2.1rem;
  }
  .presentacion-subtitle {
      font-size: 1.5rem;
  }
  .content-card p {
      text-align: center;
  }
  .mesoamerican-border {
      width: 20px;
      background-size: 20px auto;
      opacity: 0.6;
  }
  .container {
      padding-left: 25px;
      padding-right: 25px;
  }
  .content-card-image {
      position: relative;
      top: auto;
  }

  /* Footer móvil */
  .pies-caminando {
      max-width: 90px;
  }

  /* Animaciones pulso en mobile */
  .inner-link {
      display: inline-block;
      animation: pulseColor 2s infinite ease-in-out;
      animation-delay: 3s;
  }
  .nav-pulse {
      display: inline-block;
      /* animation: pulse 2s infinite linear; */
      animation-delay: 3s;
  }

  /* Mobile nav: Versión 1 */
  .mobile-nav {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
  }
  .mobile-nav a.enlace_avanzar {
      order: 1;
  }
  .mobile-nav a.enlace_regresar {
      order: 2;
  }
  .mobile-nav > a:first-of-type {
      order: 1;
  }
  .separator {
      order: 2;
  }
  .mobile-nav > a:last-of-type {
      order: 3;
  }

  /* Menú móvil con mini‑mapa */
  .navbar-menu-container .navbar-nav {
      display: none;
  }
  .navbar-menu-container .map-menu-container {
      display: block;
      padding: 1rem;
      text-align: center;
  }
  .navbar-menu-container .map-menu-container svg {
      width: 80%;
      height: auto;
      max-width: 300px;
  }
  .map-menu-container .hoverable-group.active .highlight-path {
      fill: var(--gold-lighter) !important;
  }
}

/* ----------------------------------------
 Móviles pequeños (max-width: 768px)
---------------------------------------- */
@media (max-width: 768px) {
  .navbar-brand.navbar-banner-container {
      left: 20px;
  }
  .navbar-banner {
      height: 50px;
      max-width: 80%;
      object-fit: contain;
  }
  .navbar-nav .nav-item.second {
      margin: -10px 0;
  }
  .mesoamerican-border {
      width: 20px;
      background-size: 20px auto;
  }
  .container {
      padding-left: 25px;
      padding-right: 25px;
  }
  .image-nav-btn {
      padding: 4px 8px;
      font-size: 0.8rem;
  }
  .svg-container {
      height: calc(100vh - 150px);
      min-height: 300px;
  }
  .svg-label {
      font-size: 12px;
  }
  .svg-label-navbar {
      font-size: 18px;
  }
  .hoverable-group:hover .svg-label {
      font-size: 12px;
  }
  .hoverable-group:hover .svg-label-navbar {
      font-size: 20px;
  }

  .svg-label-culturas {
      font-size: 40px;
  }
  /* .svg-label-navbar-culturas {
      font-size: 20px;
  } */
  .hoverable-group:hover .svg-label-culturas {
      font-size: 50px;
  }
  /* .hoverable-group:hover .svg-label-navbar-culturas {
      font-size: 22px;
  } */


}

/* ----------------------------------------
 Extra pequeños (max-width: 576px)
---------------------------------------- */
@media (max-width: 576px) {
  .svg-container {
      height: calc(100vh - 120px);
      min-height: 250px;
  }
}


.textual-cite {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  text-align: center !important;
  font-style: italic;
}


/* Cubos que girar automaticamente */
.scene {
  width: 300px;
  height: 300px;
  perspective: 800px;
  margin: 50px auto;
  position: relative;
}
.scene:hover {
  cursor: grabbing;
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* On mobile, escene is width 220px */
@media (max-width: 991px) {
  .scene {
    width: 220px;
    height: 220px;
  }
}

.progress-bar-container {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  z-index: 10;
}
.progress-bar {
  width: 100%;
  height: 100%;
  background-color: #858585;
  animation: progress 8s linear infinite;
}
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: flip 8s infinite ease-in-out;
}
.scene.hovering .cube,
.scene.touching .cube {
  animation-play-state: paused;
}
.scene.hovering .progress-bar,
.scene.touching .progress-bar {
  animation-play-state: paused;
}
.cube__face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.cube__face img {
  max-height: 100%;
  height: auto;
  width: auto;
}
.cube__face--front {
  transform: translateZ(150px);
}
.cube__face--bottom {
  transform: rotateX(-90deg) translateZ(150px);
}
@keyframes flip {
  0%, 25% {
    transform: rotateX(0deg);
  }
  35%, 65% {
    transform: rotateX(90deg);
  }
  75%, 100% {
    transform: rotateX(0deg);
  }
}
@keyframes progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

    /* ----- Slideshow Continuo ----- */
    .slideshow {
      width: 80%;
      height: 80%;
      position: relative;
      overflow: hidden;
      touch-action: none;
      margin: 0 auto;
    }
    .slideshow:hover {
      cursor: grabbing;
      transform: scale(1.02);
      transition: transform 0.3s ease;
    }
    .slideshow img {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      max-width: 100%;
      max-height: 100%;
      height: auto;
      width: auto;
      object-fit: contain;
      opacity: 0;
      transition: opacity 1s ease-in-out;
    }
    .slideshow img.active { opacity: 1; }
    .slide-progress-container {
      position: absolute;
      bottom: 0; left: 0;
      width: 100%; height: 4px;
      background-color: rgba(255,255,255,0.3);
      overflow: hidden;
      z-index: 10;
    }
    .slide-progress {
      width: 100%;
      height: 100%;
      background-color: #858585;
      transform-origin: left;
      animation: slideProgress 5s linear infinite;
    }
    @keyframes slideProgress {
      0% { transform: scaleX(0); }
      100% { transform: scaleX(1); }
    }

    /* ----- Ajustes para móvil ----- */
    @media (max-width: 768px) {
      .slideshow {
        width: 100%;
        aspect-ratio: 16/9;
      }
      .slideshow img {
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
      }
      .slide-progress-container {
        bottom: 0;
      }
    }

    .second-navbar {
      transition: transform 0.3s ease;
    }
    
    .second-navbar.hidden {
      transform: translateY(-100%);
    }