/* ===========================================
   LIGHTBOX STYLES
   =========================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* Content container */
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: lightbox-zoom-in 0.3s ease;
}

@keyframes lightbox-zoom-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-caption {
  margin-top: 16px;
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* Navigation buttons */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 28px;
  height: 28px;
}

/* Focus styles */
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
  }

  .lightbox-content {
    max-width: 95vw;
  }

  .lightbox-caption {
    font-size: 0.85rem;
    padding-inline: 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lightbox-content img {
    animation: none;
  }
}
