/* =============================================
   Property Gallery - Video Thumbnail Styles
   ============================================= */

.play-btn {
  --size: 60px;
  --circle-color: #A58D64;
  --border-color: #A58D64;
  --border-color-alt: #A58D64;

  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 4px solid transparent;
  background: var(--circle-color);
  cursor: pointer;
  outline: none;
  padding: 0;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.1s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer ring */
.play-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--border-color-alt);
  opacity: 1;
  transition: opacity 0.1s ease;
}

/* Hover: scale up, outer ring fades */
.play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.play-btn:hover::before {
  opacity: 0;
}

/* Icon inside play button */
.play-btn i {
  color: #ffffff;
  font-size: 22px;
  position: relative;
  left: 2px;
}

@media screen and (max-width: 768px) {
  .play-btn {
    --size: 50px;
  }
  .play-btn i {
    font-size: 18px;
  }
}

/* =============================================
   Video image tint overlay
   ============================================= */

.video-image-tint {
  position: relative;
  display: block;
  z-index: 1;
  overflow: hidden;
}

.video-image-tint::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(43, 58, 85, 0.6);
  pointer-events: none;
  z-index: 1;
}

.video-image-tint img {
  position: relative;
  z-index: 0;
  display: block;
}

/* =============================================
   Swiper gallery slide positioning
   ============================================= */

.property-gallery .swiper-slide {
  position: relative;
}

.section.is-gallery {
  padding: 0;
  padding-top: 8px !important;
}

/* =============================================
   nanogallery2 Lightbox - Mobile Video Fix
   ============================================= */

/*
 * On mobile, always keep the prev/next navigation arrows visible.
 * nanogallery2 hides them via inline opacity:0 after viewerHideToolsDelay —
 * on a small screen with a video playing the user needs them accessible at
 * all times without having to tap first.
 * Also hide the fullscreen button on mobile — it is not useful when videos
 * play inline and it clutters the small toolbar area.
 */
@media screen and (max-width: 1024px) {
    .nGY2ViewerContainer .nGY2ViewerAreaPrevious,
    .nGY2ViewerContainer .nGY2ViewerAreaNext {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Hide fullscreen button and slide counter (e.g. 1/8) on mobile */
    .nGY2ViewerContainer .fullscreenButton,
    .nGY2ViewerContainer .setFullscreenButton,
    .nGY2ViewerContainer .pageCounter {
        display: none !important;
    }
}

/*
 * When a video is paused (JS adds .ngy2-video-paused to .nGY2ViewerContainer),
 * force all toolbar elements visible so the user can tap prev/next or close.
 */
.nGY2ViewerContainer.ngy2-video-paused .nGY2ViewerAreaPrevious,
.nGY2ViewerContainer.ngy2-video-paused .nGY2ViewerAreaNext,
.nGY2ViewerContainer.ngy2-video-paused .nGY2ViewerToolsTopLeft,
.nGY2ViewerContainer.ngy2-video-paused .nGY2ViewerToolsTopRight {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* =============================================
   Central play/pause overlay button
   Shown in the middle of the video when paused,
   hidden while playing so it doesn't obstruct.
   ============================================= */

.ngy2-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    /* Hidden while playing — JS toggles the class */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* Visible when paused */
.ngy2-video-overlay.ngy2-paused {
    opacity: 1;
    pointer-events: auto;
}

/* Hidden when playing */
.ngy2-video-overlay.ngy2-playing {
    opacity: 0;
    pointer-events: none;
}

/* Match nanogallery2's default styling */
.ngy2-play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, background 0.12s ease;
    cursor: pointer;
}

.ngy2-play-pause-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.7);
}

.ngy2-play-pause-btn i {
    color: #ffffff;
    font-size: 30px;
    /* Optical centering — play icon is slightly right-heavy */
    position: relative;
    left: 2px;
}

@media screen and (max-width: 768px) {
    .ngy2-play-pause-btn {
        width: 60px;
        height: 60px;
    }
    .ngy2-play-pause-btn i {
        font-size: 24px;
    }
    
    /* Hide the nanogallery2 play/pause overlay button on mobile
       so it doesn't cover the browser's native play controls */
    .ngy2-video-overlay {
        display: none !important;
    }
}

/* =============================================
   nanogallery2 Lightbox - Video Sizing Fix
   ============================================= */

/* Give the media pan a positioning context so the video
   can be placed absolutely within it, bypassing the
   library's hardcoded 90%×90% inner container entirely */
.nGY2ViewerContainer .nGY2ViewerMediaPan {
  position: relative;
  overflow: hidden;
}

/* Images, self-hosted videos and iframes: fill the full media pan,
   centred and letterboxed (contain) — no cropping at sides */
.nGY2ViewerContainer img.nGY2ViewerMedia,
.nGY2ViewerContainer video.nGY2ViewerMedia,
.nGY2ViewerContainer iframe.nGY2ViewerMedia {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000;
  border: none;
  margin: 0 !important;
}
