.bkgmedia > .awrap{
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

/* --- Background Slider & Video Styles --- */

.bkgmedia-slider,
.bkgmedia-video {
  position: relative;
  z-index: 0;
  padding-block: var(--pad-block-2);
}

.bkg-slider-wrap,
.bkg-video-wrap {
  position: absolute;
  inset: 0; 
  z-index: -1; 
  overflow: hidden;
}

/* Base slide wrapper */
.bkg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out; 
}
.bkg-slide.active {
  opacity: 1;
}

/* Inner elements to fill the wrapper */
.bkg-slide-inner {
  width: 100%;
  height: 100%;
}

/* Base Video styling */
.bkg-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  pointer-events: none; 
}

/* Mobile Video Default State (Hidden on Desktop) */
.bkg-video-mob {
  display: none;
}

/* Image slide and single image styling */
.bkg-image,
.bkgmedia{
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-blend-mode: normal;
  background-image: var(--bg-desk);
}

/* --- Responsive Breakpoint (Matches JS breakpoint2: 900px) --- */
@media (max-width: 900px) {
  .bkg-image,
  .bkgmedia{
    background-image: var(--bg-mob);
    background-attachment: scroll;
  }
  
  /* Toggle Videos */
  .bkg-video-desk {
    display: none;
  }
  .bkg-video-mob {
    display: block;
  }
}

/* --- Full Screen Height Modifier --- */
.bkgmedia-fullheight {
  /* Fallback for older browsers */
  min-height: calc(100vh - 120px);
  /* Modern approach: perfectly fits mobile screens accounting for address bars */
  min-height: calc(100svh - 120px); 
  
  /* Use Flexbox to vertically center the inner text content */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Ensure the background wrappers stretch to the new tall height */
.bkgmedia-fullheight .bkg-slider-wrap,
.bkgmedia-fullheight .bkg-video-wrap{
  height: 100%;
}


.bkgmedia-sticky{
  /* Fallback for older browsers */
  min-height: calc(150vh - 120px);
  /* Modern approach: perfectly fits mobile screens accounting for address bars */
  min-height: calc(150svh - 120px); 
  background-attachment: scroll;
  overflow: visible;
}
.bkgmedia-sticky > .awrap{
  position: sticky;
}

@media (max-height: 799px), (max-width: 1149px) {
  .bkgmedia-fullheight {
    /* Fallback for older browsers */
    min-height: calc(100vh - 77px);
    /* Modern approach: perfectly fits mobile screens accounting for address bars */
    min-height: calc(100svh - 77px); 
  }
  .bkgmedia-sticky{
    /* Fallback for older browsers */
    min-height: calc(150vh - 77px);
    /* Modern approach: perfectly fits mobile screens accounting for address bars */
    min-height: calc(150svh - 77px); 
  }
}