/* ========================================
   Lightbox — Overlay, Animations
   ======================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: #000000dd;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxIn 0.2s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:active {
  background: rgba(255,255,255,0.4);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

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

.lightbox-prev:active,
.lightbox-next:active {
  background: rgba(255,255,255,0.35);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.2;
  cursor: default;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-img,
.lightbox-video {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  object-fit: contain;
  animation: lightboxZoom 0.25s ease;
}

@keyframes lightboxZoom {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
  color: white;
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
  line-height: 1.4;
  opacity: 0.9;
}

.lightbox-caption:empty {
  display: none;
}

/* ---- Desktop ---- */
@media (min-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    width: 56px;
    height: 56px;
    font-size: 32px;
  }

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

/* Small screens: smaller arrows */
@media (max-width: 480px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

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