/* ===============================
   Beautiful Lightbox Styles
   =============================== */
/* Overlay */
#lightboxOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
#lightboxOverlay.visible {
  opacity: 1;
}

/* Container */
#lightboxContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-light);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.2);
}
#lightboxContainer.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-size: 1.75rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 1002;
}
.lightbox-close:hover {
  transform: rotate(90deg);
  color: var(--color-accent);
}

/* Image */
.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.lightbox-image.fade-in {
  opacity: 1;
}

/* Caption */
.lightbox-caption {
  margin-top: 0.75rem;
  color: var(--color-dark);
  font-size: 1rem;
  text-align: center;
  max-width: 90%;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: #fff;
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 1002;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--color-secondary);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-prev {
  left: 1.5rem;
}
.lightbox-next {
  right: 1.5rem;
}

/* Counter */
.lightbox-counter {
  margin-top: 0.5rem;
  color: var(--color-dark);
  font-size: 0.9rem;
  text-align: center;
}

/* Prevent text selection on controls */
.lightbox-prev,
.lightbox-next,
.lightbox-close {
  user-select: none;
}