/* Premium inline video — Our Mission tabbed block */

/* Override theme 95vh trap; contain section within normal document flow */
.section__tabbed-content--with-inline-video {
  min-height: unset !important;
  height: auto !important;
  display: block;
  overflow: hidden;
}

.section__tabbed-content--with-inline-video .tabbed-content__inner {
  height: auto !important;
  min-height: 0;
  overflow: hidden;
  padding-right: var(--section-padding-inline);
  box-sizing: border-box;
}

.section__tabbed-content--with-inline-video .tabbed-content__row {
  flex: none;
  min-height: 0;
  width: 100%;
}

/* Mission copy stays inside bordered frame */
.section__tabbed-content--with-inline-video .tabbed-content__left {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.section__tabbed-content--with-inline-video .tabbed-content__text-panel,
.section__tabbed-content--with-inline-video .tabbed-content__body.rte {
  min-width: 0;
  max-width: 100%;
}

.section__tabbed-content--with-inline-video .tabbed-content__body.rte p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.section__tabbed-content--with-inline-video .tabbed-content__right,
.section__tabbed-content--with-inline-video .tabbed-content__media-panel {
  padding: 0;
  margin: 0;
  min-width: 0;
}

.section__tabbed-content--with-inline-video .tabbed-content__media-wrap {
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #000;
  width: 100%;
  position: relative;
}

.tabbed-content__media-wrap .inline-video-section--media-slot {
  padding: 0;
  margin: 0;
  width: 100%;
  background: #000;
}

.tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #000;
}

.tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  pointer-events: none;
  background: #000;
  max-width: none;
  transform: translate(-50%, -50%);
}

/* —— Mobile: stacked layout, square video block —— */
@media (max-width: 1023px) {
  .section__tabbed-content--with-inline-video .tabbed-content__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__right {
    width: 100%;
    display: block;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__media-panel {
    display: block !important;
    width: 100%;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__media-wrap {
    container-type: normal;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot {
    height: auto;
    position: relative;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__frame {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__iframe {
    width: 100%;
    height: 100%;
    min-width: 177.78%;
    min-height: 177.78%;
  }
}

/* —— Desktop: side-by-side; text height drives row; video fills right column —— */
@media (min-width: 1024px) {
  .section__tabbed-content--with-inline-video .tabbed-content__inner {
    container-type: normal;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__row {
    flex-direction: row;
    align-items: stretch;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    min-height: 0;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__left {
    flex: 0 1 65%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: clamp(0.5rem, 2vw, 1.5rem);
    box-sizing: border-box;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__right {
    flex: 0 1 35%;
    align-self: stretch;
    display: flex;
    min-height: 0;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__media-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
  }

  .section__tabbed-content--with-inline-video .tabbed-content__media-wrap {
    container-type: size;
    container-name: mission-video;
    flex: 1;
    height: 100%;
    min-height: 280px;
    position: relative;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .tabbed-content__media-wrap .inline-video-section--media-slot .inline-video-section__iframe {
    height: 120%;
    width: max(100%, calc(100cqh * 16 / 9));
    min-width: 100%;
    min-height: 0;
  }
}

/* Standalone inline video block (if used elsewhere) */
.inline-video-section:not(.inline-video-section--media-slot) {
  padding: clamp(40px, 7vw, 96px) 16px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.inline-video-section:not(.inline-video-section--media-slot) .inline-video-section__container {
  width: min(100%, 1000px);
  margin: 0 auto;
}

.inline-video-section:not(.inline-video-section--media-slot) .inline-video-section__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}

.inline-video-section:not(.inline-video-section--media-slot) .inline-video-section__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  max-width: none;
  border: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
