/* XMS v1.3.92 — edge-to-edge uncropped video with moving full-width backdrop.
   Overrides historical floating-header and cover-video declarations without
   changing any saved page-builder content or WordPress menu settings. */

/* Keep the white header BAR full width and flush with the first pixel of the
   website. WordPress's own logged-in admin toolbar remains visible above it. */
body.xms-theme .xms-site-header,
body.xms-theme.xms-sticky .xms-site-header,
body.xms-theme.xms-transparent .xms-site-header,
body.xms-theme.xms-home-study.xms-has-home-video .xms-site-header {
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
/* Preserve the admin-bar offset only for a STICKY header. */
body.xms-theme.xms-sticky .xms-site-header { position: sticky !important; top: 0 !important; }
body.admin-bar.xms-theme.xms-sticky .xms-site-header { top: 32px !important; }
@media (max-width: 782px) {
  body.admin-bar.xms-theme.xms-sticky .xms-site-header { top: 46px !important; }
}

/* Align logo, menu and MICE mark with the same adjustable page-width grid as
   the homepage section cards; allow the full-width BAR to extend beyond it. */
body.xms-theme .xms-site-header .xms-header-inner,
body.xms-theme .xms-site-header .xms-header-inner.xms-container {
  width: min(calc(100% - 32px), var(--xms-page-width, 1340px)) !important;
  max-width: var(--xms-page-width, 1340px) !important;
  margin-inline: auto !important;
  padding: 0 clamp(15px, 1.85vw, 26px) !important;
  min-height: 80px !important;
}
@media (max-width: 1240px) {
  body.xms-theme .xms-site-header .xms-header-inner,
  body.xms-theme .xms-site-header .xms-header-inner.xms-container { min-height: 74px !important; }
}
@media (max-width: 767px) {
  body.xms-theme .xms-site-header .xms-header-inner,
  body.xms-theme .xms-site-header .xms-header-inner.xms-container {
    min-height: 66px !important;
    width: calc(100% - 20px) !important;
    padding-inline: 11px !important;
  }
}

/* Eliminate the white/gray strip that previously preceded the video. The
   following homepage cards still retain their normal vertical grid gap. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video {
  grid-column: 1 / -1 !important;
  width: 100vw !important;
  max-width: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  /* Compact desktop banner with source text and logo fully visible. */
  --xms-video-h: clamp(275px, 34vw, 510px);
  height: var(--xms-video-h) !important;
  min-height: 0 !important;
  background: #bfc0c6 !important;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame {
  background: #bfc0c6 var(--xms-video-poster) center center / cover no-repeat !important;
}
/* Important: preserve all source-frame text and logos near its edges. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame video.xms-top-video-native {
  inset: 0 auto 0 50% !important;
  width: min(100%, calc(var(--xms-video-h) * 1.77777778)) !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  background: transparent !important;
  transform: translateX(-50%) !important;
}
/* YouTube fallback: no enlarged 16:9 "cover" iframe that cuts off titles. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame iframe.xms-top-video-embed {
  inset: 0 auto 0 50% !important;
  left: 50% !important;
  top: 0 !important;
  width: min(100%, calc(var(--xms-video-h) * 1.77777778)) !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 16 / 9 !important;
  transform: translateX(-50%) !important;
}
/* Still image follows the same full-frame fit if autoplay is blocked. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-fallback {
  background-size: contain !important;
  background-color: #bfc0c6 !important;
}
@media (max-width: 1024px) {
  body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video {
    --xms-video-h: clamp(250px, 43vw, 425px);
  }
}
@media (max-width: 700px) {
  body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video {
    --xms-video-h: clamp(206px, 55vw, 315px);
  }
}
@media (max-width: 480px) {
  body.xms-theme.xms-home-study.xms-has-home-video .xms-main > .xms-top-video {
    --xms-video-h: clamp(188px, 56.25vw, 260px);
  }
}

/* v1.3.92: The original video is still shown at its complete native aspect
   ratio. A low-resolution, softly blurred moving extension from that SAME
   video fills the side gutters on ultrawide screens. This avoids blank gray
   bars and preserves every title/graphic without geometric distortion. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame .xms-top-video-edge-canvas {
  display: block;
  position: absolute;
  z-index: 0;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  top: -24px;
  left: -24px;
  max-width: none;
  opacity: 0;
  filter: blur(18px) saturate(.68);
  pointer-events: none;
  transition: opacity .5s ease;
}
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-is-playing .xms-top-video-edge-canvas {
  opacity: 1;
}
/* Foreground must be stacked above the dynamic full-width extension. */
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame video.xms-top-video-native,
body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-frame iframe.xms-top-video-embed {
  z-index: 1 !important;
}
/* Hide the backdrop canvas when animations are not requested. */
@media (prefers-reduced-motion: reduce) {
  body.xms-theme.xms-home-study.xms-has-home-video .xms-top-video-edge-canvas { display: none !important; }
}
