.hf-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(8,8,8,0.92);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.hf-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.hf-lightbox__inner {
  position: relative;
  max-width: 94%;
  max-height: 94%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hf-lightbox img,
.hf-lightbox__img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  transition: transform .25s ease, opacity .25s ease;
  display: none;
}

.hf-lightbox__img.is-visible,
.hf-lightbox__video.is-visible {
  display: block;
}

.hf-lightbox__video {
  max-width: min(94vw, 960px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  display: none;
  transition: opacity .25s ease;
}

/* Стрелки */
.hf-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease;
  user-select: none;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.3);
}

.hf-lightbox__arrow--prev {
  left: 16px;
}

.hf-lightbox__arrow--next {
  right: 16px;
}

.hf-lightbox__arrow:hover {
  background: rgba(255,255,255,0.5);
}

/* Кнопка закрытия */
.hf-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 12;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background .18s ease, transform .18s;
}

.hf-lightbox__close:hover {
  background: rgba(255,255,255,0.5);
}

@media (max-width: 576px) {
  .hf-lightbox__arrow { width: 48px; height: 48px; }
}