.gallery-img {
  cursor: pointer;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.gallery-lightbox.open {
  display: block;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 13, .72);
  backdrop-filter: blur(6px);
}

.gallery-lightbox-window {
  position: relative;
  z-index: 1;
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
  animation: lightboxIn .18s ease both;
}

.gallery-lightbox-window img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0f3d2e;
  display: block;
}

.gallery-lightbox-info {
  padding: 20px 24px 24px;
}

.gallery-lightbox-info h2 {
  margin: 0 0 8px;
  color: #153327;
}

.gallery-lightbox-info p {
  margin: 0;
  color: #66756d;
  white-space: pre-line;
  line-height: 1.5;
}

.gallery-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #153327;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.gallery-lightbox-close:hover {
  background: white;
}

body.lightbox-open {
  overflow: hidden;
}

@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 620px) {
  .gallery-lightbox-window {
    width: calc(100vw - 18px);
    margin: 9px auto;
    border-radius: 18px;
  }

  .gallery-lightbox-info {
    padding: 16px;
  }

  .gallery-lightbox-window img {
    max-height: 62vh;
  }
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(8, 20, 15, .78);
  backdrop-filter: blur(7px);

  padding: 24px;
}

.lightbox-overlay.show {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-box {
  width: min(1100px, 92vw);
  max-height: 90vh;

  background: white;
  border-radius: 22px;
  overflow: hidden;

  box-shadow: 0 25px 80px rgba(0,0,0,.45);
}

.lightbox-box img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #10251d;
}

.lightbox-caption {
  padding: 18px 22px;
  color: #153327;
}

.lightbox-caption strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.lightbox-caption p {
  margin: 0 0 8px;
  color: #66756d;
}

#lightboxCounter {
  font-size: .9rem;
  color: #66756d;
}

.lightbox-close,
.lightbox-arrow {
  position: fixed;
  border: 0;
  cursor: pointer;

  background: rgba(255,255,255,.92);
  color: #153327;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.lightbox-close {
  top: 24px;
  right: 24px;

  width: 46px;
  height: 46px;

  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);

  width: 54px;
  height: 70px;

  border-radius: 18px;
  font-size: 3rem;
  line-height: 1;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: #d99a28;
  color: #1c160b;
}

@media (max-width: 700px) {
  .lightbox-overlay {
    padding: 12px;
  }

  .lightbox-box {
    width: 96vw;
  }

  .lightbox-arrow {
    width: 44px;
    height: 58px;
    font-size: 2.3rem;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}