/* Ocean Background Video (Simple) v0.1.11
   Consolidated CSS: base layout, bleed, poster fade, and vertical alignment
*/

/* Base layout & stacking */
.ofr-bgvideo-simple{
  position: relative;
  overflow: hidden;
  /* Fill parent height and allow inner content to align vertically */
  display: flex;
  flex-direction: column;
}
.ofr-bgv__media-wrap{
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}
.ofr-bgv__content{
  position: relative;
  z-index: 1;

  /* Make content an alignment frame that fills the block */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Poster as a real <img> (best LCP) */
.ofr-bgv__poster{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  pointer-events: none;
  display: block;
}

/* Video fills container */
.ofr-bgv__media{
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: cover;
}

/* Contain mode (affects both poster and video) */
.ofr-fit-contain .ofr-bgv__poster,
.ofr-fit-contain .ofr-bgv__media{
  object-fit: contain;
  background: #000;
}

/* Bleed past Bootstrap gutter (fixed 15px; keeps text on-grid) */
.ofr-bgvideo-simple.ofr-bleed .ofr-bgv__media-wrap{ left:-15px; right:-15px; }
.ofr-bgvideo-simple.ofr-bleed .ofr-bgv__content{ padding-left:15px; padding-right:15px; }

/* Fade poster away once the video is confirmed playing (JS adds .is-playing) */
.ofr-bgvideo-simple.is-playing .ofr-bgv__poster{
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}

/* Stop painting the CSS fallback background once playing */
.ofr-bgv__media-wrap.is-playing{
  background-image: none !important;
}

/* Content vertical alignment (Top / Middle / Bottom) */
.ofr-valign-top    .ofr-bgv__content{ justify-content:flex-start; }
.ofr-valign-middle .ofr-bgv__content{ justify-content:center; }
.ofr-valign-bottom .ofr-bgv__content{ justify-content:flex-end; }

/* Ensure WPBakery rows allow absolute positioning to fill */
.vc_row{ position: relative; }
