/**
 * LIGHTBOX — Powiększanie zdjęć po kliknięciu
 */

/* ── Overlay ── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;

  /* Stan zamknięty */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;

  cursor: zoom-out;
}

.lb-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Kontener zdjęcia ── */
.lb-img-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

/* ── Zdjęcie ── */
.lb-img {
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;

  /* Animacja wejścia */
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.lb-overlay.is-open .lb-img {
  opacity: 1;
  transform: scale(1);
}

/* ── Podpis ── */
.lb-caption {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: var(--space-4);
  text-align: center;
  max-width: 80vw;
}

/* ── Przycisk zamknięcia ── */
.lb-close {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 901;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--palette-white);
}

/* ── Strzałki nawigacji ── */
.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 901;
  user-select: none;
}

.lb-prev { left: var(--space-4); }
.lb-next { right: var(--space-4); }

.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--palette-white);
}

/* Kursor zoom-in na zdjęciach w portfolio */
.portfolio-item {
  cursor: zoom-in;
}

/* ── Mobile ── */
@media (max-width: 540px) {
  .lb-prev { left: var(--space-2); }
  .lb-next { right: var(--space-2); }

  .lb-prev,
  .lb-next {
    width: 36px;
    height: 52px;
    font-size: 1.4rem;
  }

  .lb-close {
    top: var(--space-3);
    right: var(--space-3);
  }

  .lb-img {
    max-height: 78vh;
  }
}
