.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-2xl);
}

.lightbox-image-container {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  animation: lightboxZoom 0.4s ease-out;
}

@keyframes lightboxZoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 30px;
}

.lightbox-nav.next {
  right: 30px;
}

.lightbox-info {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
}

.lightbox-caption {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.lightbox-counter {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
}

.lightbox-thumbnails {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  max-width: 600px;
  overflow-x: auto;
  padding: 10px;
  scrollbar-width: none;
}

.lightbox-thumbnails::-webkit-scrollbar {
  display: none;
}

.lightbox-thumb {
  appearance: none;
  background: transparent;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: 2px solid transparent;
  padding: 0;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--color-gold);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .lightbox-backdrop,
  .lightbox-close,
  .lightbox-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .lightbox,
  .lightbox-image-container {
    transition: none;
    animation: none;
  }

  .lightbox-nav:hover {
    transform: translateY(-50%);
  }
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 45px;
    height: 45px;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }

  .lightbox-thumbnails {
    display: none;
  }
}
