/**
 * @file
 * WMD Solutions Base Theme - Background image/video block styles.
 *
 * Handles z-index stacking for any section with a full-bleed
 * background image or video with an overlay and content on top.
 *
 * Pattern:
 * .wmd-bg-section (position: relative)
 *   .wmd-bg-image or .wmd-bg-video  (z-index: 0, position: absolute)
 *   .wmd-bg-overlay                 (z-index: 1, position: absolute)
 *   .wmd-bg-content                 (z-index: 2, position: relative)
 *
 * Also supports MTT CorporatePlus class names for backwards compatibility.
 */

/* ======================================================
   SECTION WRAPPER
   ====================================================== */

.wmd-bg-section,
.background-image-block__section,
.background-video-block__section {
  position: relative;
  overflow: hidden;
  padding: 90px 0;
}

/* ======================================================
   BACKGROUND LAYER (image or video) — z-index: 0
   ====================================================== */

.wmd-bg-image,
.background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: 0;
}

.wmd-bg-image--fixed,
.background-image--attachment-fixed {
  background-attachment: fixed;
}

.wmd-bg-image--scroll,
.background-image--attachment-scroll {
  background-attachment: scroll;
}

.wmd-bg-video,
.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.wmd-bg-video-fallback,
.background-video-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: 0;
}

/* ======================================================
   OVERLAY — z-index: 1
   ====================================================== */

.wmd-bg-overlay,
.background-image-overlay,
.background-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ======================================================
   CONTENT — z-index: 2
   ====================================================== */

.wmd-bg-content,
.background-image-block__section .container,
.background-video-block__section .container,
.background-image-block__section > *:not(.background-image):not(.background-image-overlay),
.background-video-block__section > *:not(.background-video):not(.background-video-fallback):not(.background-video-overlay) {
  position: relative;
  z-index: 2;
}

/* ======================================================
   TYPOGRAPHY — light text on dark backgrounds
   ====================================================== */

.wmd-bg-section--light,
.region--light-typography {
  color: #ffffff;
}

.wmd-bg-section--light h1,
.wmd-bg-section--light h2,
.wmd-bg-section--light h3,
.wmd-bg-section--light h4,
.wmd-bg-section--light p,
.region--light-typography h1,
.region--light-typography h2,
.region--light-typography h3,
.region--light-typography p {
  color: #ffffff;
}

.wmd-bg-section--light a,
.region--light-typography a {
  color: rgba(255,255,255,0.85);
}

.wmd-bg-section--light a:hover,
.region--light-typography a:hover {
  color: #ffffff;
}
