/* =========================================================
   Section: Media (video card with overlay) — 2026
   Figma source: 1844:6012
   ───────────────────────────────────────────────────────── */

.lp26-media {
  position: relative;
  background-color: var(--rg-olive-2);
  padding: 100px var(--rg-space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #eff1ef;
}

img.lp26-media__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.lp26-media__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  height: 675px;
  background-color: var(--rg-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.lp26-media__video,
img.lp26-media__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

/* Click-to-play affordance on the poster card */
.lp26-media__card.video-item {
  cursor: pointer;
}
.lp26-media__card.video-item:focus-visible {
  outline: 2px solid var(--rg-white);
  outline-offset: 2px;
}

/* Fullscreen video popup — mirrors homepage video-block-2 pattern
   (see assets/css/desktop/homepage-template-2.css). White wrapper sits on
   top of the dim popup so only the iframe and close button are visible. */
.lp26-media .video-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: default;
}
.lp26-media .video-popup.is-open {
  display: block;
}
.lp26-media .video-popup-iframe-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--rg-white);
}
.lp26-media .video-popup iframe,
.lp26-media .video-popup video {
  width: 100%;
  height: 100%;
  max-width: 1024px;
  max-height: 648px;
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  padding-left: var(--rg-space-4);
  padding-right: var(--rg-space-4);
  z-index: 9999;
  border: 0;
}
.lp26-media .video-popup-close {
  position: absolute;
  top: var(--rg-space-4);
  right: var(--rg-space-4);
  width: var(--rg-space-8);   /* 48 */
  height: var(--rg-space-8);  /* 48 */
  background: var(--rg-black);
  color: var(--rg-white);
  border: none;
  font-size: var(--rg-fs-h4); /* 24 */
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
  padding: 0;
  transition: all 0.5s;
}
.lp26-media .video-popup-close:hover {
  opacity: 0.7;
  background-color: var(--rg-black);
}
.lp26-media .video-popup-close:focus {
  outline: none;
}

.lp26-media__overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--rg-space-6);
  padding: var(--rg-space-6);
  height: 200px;
  width: 100%;
  justify-content: flex-end;
  /* Backdrop-blurred gradient: transparent top → black bottom */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: var(--rg-white);
}

.lp26-media__overlay-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--rg-white);
  border: 5.091px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4.9px);
  -webkit-backdrop-filter: blur(4.9px);
}

img.lp26-media__overlay-icon-img {
  width: 30px;
  height: 30px;
  display: block;
}

.lp26-media__overlay-text {
  display: flex;
  flex-direction: column;
  gap: var(--rg-space-2);
  width: 100%;
}

.lp26-media__title {
  margin: 0;
  font-family: var(--rg-font-body);
  font-weight: 500;
  font-size: var(--rg-fs-h4);   /* 24 */
  line-height: var(--rg-lh-h4); /* 24 */
  letter-spacing: 0;
  color: var(--rg-white);
}

.lp26-media__subtitle {
  margin: 0;
  font-family: var(--rg-font-body);
  font-weight: 400;
  font-size: var(--rg-fs-b2);   /* 14 */
  line-height: var(--rg-lh-b2); /* 20 */
  letter-spacing: var(--rg-ls-body);
  color: var(--rg-white);
}

/* ─────────────────────────────────────────────────────────
   Mobile — Figma 1903:3409
   Card switches from a fixed-height portrait crop to a
   16:9 landscape capped at 358×201.375 (matches desktop image).
   Overlay shrinks to a compact bottom strip.
   ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .lp26-media {
        padding: 60px var(--rg-space-4);
    }

    .lp26-media__card {
        max-width: 358px;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 201.375px;
    }

    .lp26-media__overlay {
        height: 104px;
        padding: var(--rg-space-2);
        gap: 9.547px;
    }

    .lp26-media__overlay-icon {
        width: 16.707px;
        height: 16.707px;
        border-width: 1.519px;
    }

    img.lp26-media__overlay-icon-img {
        width: 8.972px;
        height: 8.972px;
    }

    .lp26-media__overlay-text {
        gap: 2.387px;
    }

    .lp26-media__title {
        /* Body/B1/Medium = 16/24 ls -0.5 */
        font-size: var(--rg-fs-b1);
        line-height: var(--rg-lh-b1);
        letter-spacing: var(--rg-ls-body);
    }

    .lp26-media__subtitle {
        /* Body/B3/Regular = 12/16 ls -0.2 */
        font-size: 12px;
        line-height: 16px;
        letter-spacing: -0.2px;
    }
}
