/* Fondo del lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
}

/* Imagen ampliada (sin bordes blancos ni cambio de tamaño) */
.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-overlay.active img {
  opacity: 1;
  transform: scale(1);
}

/* Botón de cierre */
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* Flechas de navegación */
.nav-arrow {
  position: absolute;
  top: 50%;
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}

.nav-arrow:hover {
  opacity: 0.7;
}

.nav-arrow.prev {
  left: 40px;
}

.nav-arrow.next {
  right: 40px;
}

.image-box {
  display: inline-block;
  margin: 10px;
}

.image-box figcaption {
  margin-top: 20px;
  font-size: 16px;
  color: #333;
}
.images-container {
  display: flex;
  justify-content: center;
  align-items: normal;
  flex-wrap: wrap; /* permite que se ajusten si la pantalla es pequeña */
  gap: 30px; /* espacio entre imágenes */
}

.images-container figure {
  text-align: center;
  margin: 0;
}

.images-container figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: #333;
}


@media (max-width: 768px) {
  .lightbox-overlay img {
    max-width: 95%;
    max-height: 80vh;
  }
}