.star-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(8, 15, 32, 0.88);
}

.star-lightbox.is-open {
  display: flex;
}

.star-lightbox__backdrop {
  position: absolute;
  inset: 0;
}

.star-lightbox__dialog {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.star-lightbox__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #0f1728;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.star-lightbox__img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #0f1728;
}

.star-lightbox__caption {
  margin: 0;
  padding: 0 8px;
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.star-lightbox__caption[hidden] {
  display: none;
}

.star-lightbox__close,
.star-lightbox__nav {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.star-lightbox__close:hover,
.star-lightbox__close:focus-visible,
.star-lightbox__nav:hover,
.star-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.star-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 46px;
  height: 46px;
  font-size: 30px;
}

.star-lightbox__close:hover,
.star-lightbox__close:focus-visible {
  transform: scale(1.04);
}

.star-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  font-size: 30px;
  transform: translateY(-50%);
}

.star-lightbox__nav:hover,
.star-lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.star-lightbox__nav--prev {
  left: 14px;
}

.star-lightbox__nav--next {
  right: 14px;
}

.wp-block-gallery img,
.wp-block-image img,
.blocks-gallery-item img,
.gallery img,
.wp-caption img,
.elementor-gallery-item img,
.elementor-image-gallery img,
.elementor-widget-image img,
figure img {
  cursor: zoom-in;
}

@media (max-width: 767px) {
  .star-lightbox {
    padding: 16px;
  }

  .star-lightbox__dialog {
    width: min(100vw - 16px, 100%);
  }

  .star-lightbox__img {
    max-height: calc(100vh - 120px);
  }

  .star-lightbox__caption {
    font-size: 14px;
  }

  .star-lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .star-lightbox__nav--prev {
    left: 10px;
  }

  .star-lightbox__nav--next {
    right: 10px;
  }
}
