/* Галерея /photo: полноэкранный просмотр */
.photo-lightbox-item {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.photo-lightbox-item:hover {
  opacity: 0.92;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0.75rem 0.75rem;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
  transition: none !important;
}

.photo-lightbox__close,
.photo-lightbox__prev,
.photo-lightbox__next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.photo-lightbox__close:hover,
.photo-lightbox__prev:hover,
.photo-lightbox__next:hover,
.photo-lightbox__close:focus-visible,
.photo-lightbox__prev:focus-visible,
.photo-lightbox__next:focus-visible {
  background: rgba(50, 50, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  outline: none;
}

.photo-lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.5rem;
  font-weight: 300;
}

.photo-lightbox__prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.photo-lightbox__next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 575.98px) {
  .photo-lightbox__prev {
    left: 0.35rem;
    width: 2.35rem;
    height: 2.35rem;
  }

  .photo-lightbox__next {
    right: 0.35rem;
    width: 2.35rem;
    height: 2.35rem;
  }
}

.photo-lightbox__caption {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 36rem);
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

body.photo-lightbox-open {
  overflow: hidden;
}
