/* Modern one-up property gallery with a thumbnail filmstrip. */
body.vg-gallery-open {
  overflow: hidden !important;
}

.galleryOverlay {
  width: 100%;
  height: 100%;
  padding: 0 !important;
  position: fixed;
  inset: 0;
  z-index: 9300 !important;
  background: rgba(5, 7, 10, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.galleryPopup {
  display: block;
  width: calc(100% - 32px);
  max-width: 1600px;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  max-height: 1000px;
  margin: 16px auto;
  padding: 66px 16px 16px;
  position: fixed;
  top: 0 !important;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 9301 !important;
  overflow: hidden;
  background: #0b0d10;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.6);
}

.galleryPopup .header {
  display: block;
  width: 100%;
  max-width: none;
  height: 64px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 10 !important;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 13, 16, 1) 0%, rgba(11, 13, 16, 0.9) 72%, rgba(11, 13, 16, 0) 100%);
}

.galleryPopup .header:before {
  content: "Property Gallery";
  position: absolute;
  top: 24px;
  left: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.galleryPopup .jqm_close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  position: absolute;
  top: 10px;
  right: 14px;
  bottom: auto;
  left: auto;
  z-index: 1;
  pointer-events: auto;
  color: #0b0d10;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  font-size: 23px !important;
  line-height: 1;
  text-align: center;
  text-shadow: none;
  text-transform: none;
  transform: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.galleryPopup .jqm_close:hover,
.galleryPopup .jqm_close:focus {
  color: #0b0d10;
  background: #fff;
  transform: scale(1.06);
}

.galleryPopup .jqm_close:after {
  content: none;
}

.vg-gallery-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  height: 100%;
}

.vg-gallery-stage {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #05070a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.galleryPopup img.vg-gallery-main {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  background: #05070a;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
}

.vg-gallery-nav {
  width: 52px;
  height: 52px;
  padding: 0;
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #fff;
  background: rgba(11, 13, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-size: 31px;
  font-weight: 300 !important;
  line-height: 1;
  transform: translateY(-50%);
  transition: background-color 160ms ease, transform 160ms ease;
}

.vg-gallery-nav:hover,
.vg-gallery-nav:focus {
  color: #fff;
  background: rgba(11, 13, 16, 0.95);
  transform: translateY(-50%) scale(1.05);
}

.vg-gallery-prev {
  left: 16px;
}

.vg-gallery-next {
  right: 16px;
}

.vg-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(11, 13, 16, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.vg-gallery-thumbs {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 2px 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.vg-gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}

.vg-gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.vg-gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.vg-gallery-thumb {
  flex: 0 0 118px;
  width: 118px;
  height: 82px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: center;
  background: #14171c;
  border: 2px solid transparent;
  border-radius: 10px;
  opacity: 0.58;
  box-shadow: none;
  transition: opacity 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.vg-gallery-thumb:hover,
.vg-gallery-thumb:focus {
  opacity: 0.9;
  background: #14171c;
  transform: translateY(-1px);
}

.vg-gallery-thumb.is-active {
  opacity: 1;
  border-color: #fff;
}

.galleryPopup .vg-gallery-thumb img {
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100% !important;
  margin: 0;
  object-fit: cover;
  background: #14171c;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media only screen and (max-width: 767px) {
  .galleryPopup {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 62px 8px 8px;
    border: 0;
    border-radius: 0;
  }

  .galleryPopup .header {
    height: 60px !important;
    top: 0;
    right: 0;
    bottom: auto !important;
    left: 0;
  }

  .galleryPopup .header:before {
    top: 22px;
    left: 14px;
    font-size: 11px;
  }

  .galleryPopup .jqm_close {
    display: flex;
    width: 40px;
    height: 40px !important;
    padding: 0 !important;
    position: absolute;
    top: 9px;
    right: 10px;
    bottom: auto;
    left: auto;
    font-size: 21px !important;
    transform: none;
  }

  .vg-gallery-shell {
    gap: 8px;
  }

  .vg-gallery-stage {
    border-radius: 10px;
  }

  .vg-gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 27px;
  }

  .vg-gallery-prev {
    left: 8px;
  }

  .vg-gallery-next {
    right: 8px;
  }

  .vg-gallery-count {
    right: 9px;
    bottom: 8px;
  }

  .vg-gallery-thumbs {
    gap: 7px;
    padding-bottom: 3px;
  }

  .vg-gallery-thumb {
    flex-basis: 82px;
    width: 82px;
    height: 58px;
    border-radius: 8px;
  }
}
