/* =====================================================================
   lightbox.css — полноэкранный просмотр галереи (без библиотек)
   ===================================================================== */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 20, 16, 0.94);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
  touch-action: pan-y;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__stage {
  position: relative; max-width: 92vw; max-height: 82vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox__img {
  max-width: 92vw; max-height: 78vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: var(--bg-alt);
  transform: scale(.96); opacity: 0; transition: transform var(--t), opacity var(--t);
}
.lightbox.is-open .lightbox__img { transform: scale(1); opacity: 1; }
.lightbox__caption {
  margin-top: 16px; color: rgba(255,255,255,.9);
  font-size: 0.95rem; text-align: center; max-width: 640px;
}
.lightbox__counter { color: rgba(255,255,255,.55); font-size: 0.82rem; margin-top: 6px; letter-spacing: .05em; }

/* Кнопки управления */
.lb-btn {
  position: absolute; z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), transform var(--t-fast);
  backdrop-filter: blur(4px);
}
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn:active { transform: scale(.92); }
.lb-btn svg { width: 22px; height: 22px; }

.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-prev:active, .lb-next:active { transform: translateY(-50%) scale(.92); }

@media (max-width: 768px) {
  .lb-btn { width: 44px; height: 44px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-close { top: 14px; right: 14px; }
  .lightbox__img { max-height: 70vh; }
}
