/* === CONTENEDOR GENERAL DEL LIGHTBOX === */
#slides-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === FONDO OSCURO === */
.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1;
}

/* === CONTENIDO PRINCIPAL === */
.lightbox-content {
  position: relative;
  z-index: 2;
  width: 96vw;
  max-width: 1600px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === slides DENTRO DEL LIGHTBOX === */
.lightbox-content .slides-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

#slides-lightbox .slides-wrapper {
  display: flex;
  height: 100%;
  transition: transform 1s ease-in-out;
}

#slides-lightbox .slides-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}

#slides-lightbox .slides-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* === TEXTO EN SLIDE === */
#slides-lightbox .slides-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 1.5rem;
  font-weight: 300;
  text-align: center;
  font-style: normal;
  pointer-events: none;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === BOTÓN DE CIERRE === */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 4px;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: black;
  font-weight: bold;
}

/* === BOTÓN DE PAUSA === */
.lightbox-pause {
  position: absolute;
  top: 1rem;
  right: 60px;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 4px;
  font-size: 1.4rem;
  font-weight: bold;
  color: black;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-pause.paused::after {
  content: '▶';
  font-size: 1.4rem;
  font-weight: bold;
  color: black;
}

/* === FLECHAS CUADRADAS === */
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  font-family: Arial, sans-serif;
  font-weight: 600;
  text-indent: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 4px;
  color: #000;
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 1);
}

.lightbox-nav.prev {
  left: -3rem;
}

.lightbox-nav.next {
  right: -3rem;
}

.lightbox-nav .nav-glyph {
  display: block;
  transform: translateY(-2px);
}

/* === RESPONSIVE === */
@media (max-width: 1680px) {
  .lightbox-nav.prev {
    left: 1rem;
  }
  .lightbox-nav.next {
    right: 1rem;
  }
}

@media (max-width: 768px) {
  .lightbox-content {
    width: 100vw;
    border-radius: 0;
  }

  .lightbox-nav.prev {
    left: 1rem;
  }

  .lightbox-nav.next {
    right: 1rem;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .lightbox-pause {
    top: 0.5rem;
    right: 3.5rem;
  }

  #slides-lightbox .slides-caption {
    font-size: 1.1rem;
    padding: 0.8rem;
  }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
  .lightbox-content {
    width: 98vw;
    aspect-ratio: auto;
    height: 94vh;
  }

  .lightbox-nav.prev {
    left: 1rem;
  }

  .lightbox-nav.next {
    right: 1rem;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .lightbox-pause {
    top: 0.5rem;
    right: 3.5rem;
  }

  #slides-lightbox .slides-slide img {
    object-fit: contain;
    max-height: 100%;
    max-width: 100%;
  }
}
