/* ================================================================
   UNIVERSAL LIGHTBOX
   ================================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: lbFadeIn 0.25s ease forwards;
}

@keyframes lbFadeIn {
  to {
    opacity: 1;
  }
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.lightbox-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 96vw;
  max-height: 88vh;
  padding: 0 16px;
}

.lightbox-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  min-width: 0;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: transform 0.2s ease;
}

.lightbox-caption {
  margin-top: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 600px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.lightbox-counter {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  pointer-events: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  z-index: 3;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

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

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
}

.lightbox-prev,
.lightbox-next {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.lightbox-prev:hover {
  transform: scale(1.08);
}

.lightbox-next:hover {
  transform: scale(1.08);
}

/* Mobile lightbox */
@media (max-width: 768px) {
  .lightbox-row {
    gap: 10px;
    padding: 0 10px;
  }

  .lightbox-img {
    max-height: 72vh;
    border-radius: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

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

  .lightbox-caption {
    font-size: 14px;
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .lightbox-row {
    flex-wrap: wrap;
    align-content: center;
    gap: 12px;
    padding: 0 16px;
  }

  .lightbox-stage {
    order: 1;
    width: 100%;
  }

  .lightbox-prev,
  .lightbox-next {
    order: 2;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .lightbox-prev:hover,
  .lightbox-next:hover {
    transform: scale(1.05);
  }
}
