/* Lightbox Styles */
#lightbox {
  display: flex;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(23, 21, 18, 0.9); /* Using --bg color with opacity */
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
  border-radius: 14px; /* Matching --radius */
  transform: scale(0.8) translateY(30px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

#lightbox.active #lightbox-img {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#lightbox-close {
  position: absolute;
  top: clamp(20px, 5vw, 40px);
  right: clamp(20px, 5vw, 40px);
  color: #F1EDE5; /* Using --fg color */
  font-size: 3rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease, opacity 0.4s ease;
  opacity: 0;
}

#lightbox.active #lightbox-close {
  opacity: 1;
  transition-delay: 0.2s; /* Staggered entry for the close button */
}

#lightbox-close:hover {
  color: #E0703A; /* Using --accent color */
}

/* Prevent scrolling when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}
