.gallery-modal {
  display: none;
  opacity: 0;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  touch-action: manipulation;
  transition-property: overlay display opacity;
  transition-duration: 400ms;
  transition-behavior: allow-discrete;
  @media (orientation: landscape) and (max-width: 991px) {
    padding-top: 0;
  }
}
.gallery-modal.show {
  display: flex;
  align-items: center;
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
}

.gallery-modal-content {
  position: relative;
  display: flex;
  align-items: center;
  background-color: transparent;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1300px;
  height: 86svh;
}

.gallery-open {
  cursor: pointer;
}
.gallery-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  color: var(--bs-black);
  background-color: var(--bs-white);
  font-size: 35px;
  font-weight: bold;
  z-index: 1;
  border-radius: 50%;
  opacity: 0.8;
  transition: 0.6s ease;
  text-align: center;
  cursor: pointer;
}

.gallery-close:hover,
.gallery-close:focus {
  opacity: 1;
}

.gallery-slides {
  position: absolute;
  display: none;
  opacity: 0;
  transition-property: overlay display opacity;
  transition-duration: 400ms;
  transition-behavior: allow-discrete;
  img {
    display: block;
    max-height: 86dvh;
    margin: 0 auto;
    object-fit: contain;
    @media (orientation: landscape) and (max-width: 991px) {
      max-height: 100dvh;
    }
  }
}
.gallery-slides.show {
  display: block;
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
}

.gallery-prev,
.gallery-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 10px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  margin-top: -20px;
  color: var(--bs-black);
  background-color: var(--bs-white);
  font-weight: bold;
  font-size: 26px;
  transition: 0.6s ease;
  border-radius: 50%;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.8;
  text-decoration: none;
  text-align: center;
}
.gallery-prev::after,
.gallery-next::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 180px;
  top: -60px;
  left: 0;
}

.gallery-next {
  left: auto;
  right: 10px;
}

.gallery-prev:hover,
.gallery-next:hover {
  opacity: 1;
}

.numbertext {
  color: var(--bs-black);
  background-color: var(--bs-white);
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

@media (min-width: 1200px) {
  .gallery-prev,
  .gallery-next {
    width: 60px;
    height: 60px;
    line-height: 60px;
    margin-top: -30px;
  }
  .gallery-prev::after,
  .gallery-next::after {
    height: 300px;
    top: -120px;
  }
}