/* Lightbox – image modal for experience cards */

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

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* Image */
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* Close button */
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Navigation arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox.has-gallery .lightbox-prev,
.lightbox.has-gallery .lightbox-next {
  display: flex;
}

/* Counter */
.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  display: none;
}

.lightbox.has-gallery .lightbox-counter {
  display: block;
}

/* Clickable images inside cards */
.exp-card .card-slider-img,
.exp-card .card-media > img {
  cursor: pointer;
}

/* Body scroll lock */
body.lightbox-open {
  overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .lightbox-img {
    max-width: 96vw;
    max-height: 80vh;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 10px;
    right: 12px;
  }
}
