/* 🌌 Glassmorphic Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

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

/* ✨ Dynamic Image styling and entry micro-animation */
.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(110, 207, 192, 0.15);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

/* ❌ Close Button with scale transitions */
.lightbox-close {
  position: absolute;
  top: -52px;
  right: 0;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 38px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.2s;
  padding: 8px;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
  color: var(--seafoam);
}

/* 🏹 Navigation Slide Controls */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 31, 29, 0.55);
  border: 1px solid rgba(110, 207, 192, 0.18);
  color: var(--seafoam);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  z-index: 10002;
}

.lightbox-nav:hover {
  background: var(--seafoam);
  color: var(--teal-deep);
  border-color: var(--seafoam);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 20px rgba(110, 207, 192, 0.45);
}

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

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

/* 🏷️ Elegant Caption label */
.lightbox-caption {
  margin-top: 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--cream-warm);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  opacity: 0.95;
  text-align: center;
}

/* 📱 Responsive Adjustments */
@media (max-width: 1024px) {
  .lightbox-nav.prev { left: 16px; }
  .lightbox-nav.next { right: 16px; }
  .lightbox-close { right: 16px; top: 16px; position: fixed; z-index: 10003; }
  .lightbox-image { max-height: 65vh; }
}
