/* ============================================================
   LIGHTBOX — Project image gallery slider
   ============================================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Inner container ── */
.lightbox {
  position: relative;
  width: 100%;
  max-width: 960px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

/* ── Close button ── */
.lightbox__close {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-2);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--t-fast);
  z-index: 1;
}

.lightbox__close:hover {
  color: var(--color-text-primary);
  border-color: var(--color-accent);
}

/* ── Image stage ── */
.lightbox__stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.lightbox__img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  transition: opacity var(--t-fast);
}

.lightbox__img.transitioning { opacity: 0; }

/* ── Nav arrows ── */
.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-2);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(4px);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--t-fast);
  z-index: 1;
}

.lightbox__arrow:hover {
  color: var(--color-text-primary);
  border-color: var(--color-accent);
  background: var(--color-surface);
}

.lightbox__arrow--prev { left: var(--space-3); }
.lightbox__arrow--next { right: var(--space-3); }

/* ── Caption ── */
.lightbox__caption {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ── Dot indicators ── */
.lightbox__dots {
  display: flex;
  gap: var(--space-2);
}

.lightbox__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border-2);
  transition: all var(--t-fast);
  cursor: pointer;
  border: none;
  padding: 0;
}

.lightbox__dot.active {
  background: var(--color-accent);
  width: 20px;
}

/* ── Counter ── */
.lightbox__counter {
  position: fixed;
  top: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .lightbox { padding: var(--space-4); }
  .lightbox__img { max-height: 55vh; }
  .lightbox__arrow { width: 36px; height: 36px; font-size: 0.9rem; }
}
