.pub-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10060;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
  box-sizing: border-box;
}

.pub-lightbox.is-open {
  display: flex;
}

.pub-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.pub-lightbox__inner {
  position: relative;
  z-index: 1;
  width: min(1400px, 100%);
  max-height: 94vh;
  padding: 0 56px;
  box-sizing: border-box;
}

.pub-lightbox__close {
  position: absolute;
  top: -8px;
  right: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.pub-lightbox-swiper {
  width: 100%;
  overflow: hidden;
}

.pub-lightbox.is-zoomed .pub-lightbox-swiper {
  overflow: auto;
  max-height: 90vh;
}

.pub-lightbox-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.pub-zoom-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.pub-lightbox-swiper img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
  transition: max-width 0.2s ease, max-height 0.2s ease;
}

.pub-zoom-wrap.is-zoomed img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  max-width: 220vw;
}

.pub-zoom-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pub-zoom-wrap:hover .pub-zoom-btn,
.pub-zoom-wrap:focus-within .pub-zoom-btn {
  opacity: 1;
  pointer-events: auto;
}

.pub-zoom-wrap.is-zoomed .pub-zoom-btn {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.pub-zoom-icon {
  width: 32px;
  height: 32px;
  display: block;
}

.pub-lightbox .swiper-button-prev,
.pub-lightbox .swiper-button-next {
  color: #fff;
  width: 44px;
  height: 44px;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
}

.pub-lightbox .swiper-button-prev::after,
.pub-lightbox .swiper-button-next::after {
  font-size: 18px;
  font-weight: 700;
}

.pub-lightbox .swiper-button-prev {
  left: 0;
}

.pub-lightbox .swiper-button-next {
  right: 0;
}

.publications_items .pub-open {
  display: block;
  cursor: pointer;
}

body.pub-lightbox-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .pub-lightbox {
    padding: 16px 48px;
  }

  .pub-lightbox__inner {
    padding: 0 40px;
  }

  .pub-lightbox-swiper img {
    max-height: 78vh;
  }

  .pub-zoom-btn {
    opacity: 1;
    pointer-events: auto;
    width: 52px;
    height: 52px;
  }
}
