/* Media + text row: 100px gap (desktop), 16:9 media, color scheme for background */
.media-text-row[hidden] {
  display: none !important;
}

.media-text-row {
  background-color: rgba(var(--color-background));
  color: rgba(var(--color-text));
  padding-block-start: var(--section-spacing-block-start, 56px);
  padding-block-end: var(--section-spacing-block-end, 56px);
}

.media-text-row__outer {
  min-width: 0;
}

.media-text-row__inner {
  min-width: 0;
  width: 100%;
}

.media-text-row__grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 100px;
  width: 100%;
}

.media-text-row--media-left .media-text-row__grid {
  flex-direction: row-reverse;
}

.media-text-row__intro {
  display: contents;
}

.media-text-row__text {
  flex: 1 1 0;
  min-width: 0;
  text-align: start;
}

.media-text-row__heading {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
  color: inherit;
}

.media-text-row__subheading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: inherit;
}

.media-text-row__heading.rte p,
.media-text-row__subheading.rte p {
  margin: 0;
}

.media-text-row__heading.rte p + p,
.media-text-row__subheading.rte p + p {
  margin-top: 12px;
}

.media-text-row__description {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--color-light-text, #0E1424);
}

.media-text-row__description :first-child {
  margin-top: 0;
}

.media-text-row__description :last-child {
  margin-bottom: 0;
}

.media-text-row__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.media-text-row__highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  min-width: 0;
  max-width: 280px;
  text-align: start;
  border-radius: 12px;
  background: #F9FAFB;
}

.media-text-row__highlight-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-text-row__highlight-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-text-row__highlight-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-text-row__highlight-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: inherit;
}

.media-text-row__highlight-subtitle {
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: #999999;
}

.media-text-row__media {
  flex: 0 1 auto;
  width: min(600px, 46%);
  min-width: 0;
}

.media-text-row__media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}

.media-text-row__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-text-row__media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-text-row__video,
.media-text-row__video .theme-video-media,
.media-text-row__video .theme-video-media__media,
.media-text-row__video .theme-video-media__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-text-row__video .theme-video-media__poster img,
.media-text-row__video .theme-video-media__poster svg,
.media-text-row__video .theme-video-media__media video,
.media-text-row__video .theme-video-media__media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-text-row__video .theme-video-media__play-button {
  display: none;
}

/* Custom play/pause — same behavior as overview-media-section */
.media-text-row__play-btn {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
  z-index: 2;
}

.media-text-row__play-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.media-text-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-text-row__icon svg {
  width: 24px;
  height: 24px;
}

.media-text-row__icon--play {
  display: none;
}

.media-text-row__icon--pause {
  display: flex;
}

.media-text-row__play-btn[data-state="paused"] {
  border: 2px solid #fff;
}

.media-text-row__play-btn[data-state="paused"] .media-text-row__icon--play {
  display: flex;
}

.media-text-row__play-btn[data-state="paused"] .media-text-row__icon--pause {
  display: none;
}

/* &lt;1310px: stack, center, media scales; typography unchanged */
@media (max-width: 991px) {
  .media-text-row__grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  /* 上图下文：移动端媒体在上、文案在下 */
  .media-text-row--mobile-media-first .media-text-row__media {
    order: -1;
  }

  .media-text-row__heading {
    font-size: 24px;
    line-height: 34px;
    margin-bottom: 16px;
  }

  .media-text-row__subheading {
    font-size: 18px;
    line-height: 26px;
    margin-bottom: 8px;
  }

  .media-text-row__description {
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 16px;
  }

  .media-text-row--media-left .media-text-row__grid {
    flex-direction: column;
  }

  .media-text-row__text {
    text-align: center;
    max-width: 640px;
  }

  .media-text-row__highlights {
    justify-content: center;
  }

  .media-text-row__highlight {
    width: calc(50% - 8px);
  } 

  .media-text-row__media {
    width: 100%;
    max-width: min(640px, 100%);
  }
}
