/*
 * 50/50 Content & Media layout.
 * Olive content column + cover image that grows with the text.
 * Outer-edge pad on the text side matches --fx-content-pad-x.
 * Typography tokens live in shared.css.
 */

.fx-section--content-media {
  --fx-content-media-pad-y: var(--fx-section-pad);
  --fx-content-media-title-size: 2.5rem;
  --fx-content-media-body-size: 1.125rem;
  --fx-content-media-gap: clamp(1.5rem, 3vw, 3rem);
  --fx-content-media-media-min-h: 16rem;
  /*
   * Figma Outdoor Spaces frame 1920: image at x=1065 to edge.
   * Content 1065/1920 = 55.46875%; media 855/1920 = 44.53125%.
   */
  --fx-content-media-content-w: 55.46875%;
  --fx-content-media-media-w: 44.53125%;
  padding: 0;
  background-color: var(--fx-color-olive);
  color: #ffffff;
  overflow: hidden;
}

.fx-content-media__layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
}

.fx-content-media__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  /*
   * Stacked: half pad between image and text; full pad before the next section.
   * Desktop side-by-side overrides restore equal top/bottom.
   */
  padding: calc(var(--fx-content-media-pad-y) / 2) var(--fx-content-pad-x) var(--fx-content-media-pad-y);
}

.fx-content-media__body {
  color: #ffffff;
}

/* Ratio uppercase / light weight on headings: reset to Figma */
.fx-section--content-media .fx-content-media__body h1,
.fx-section--content-media .fx-content-media__body h2,
.fx-section--content-media .fx-content-media__body h3 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-family: var(--fx-font-display);
  font-size: var(--fx-content-media-title-size);
  font-style: normal;
  font-weight: 400;
  line-height: 0.89;
  letter-spacing: 0.01em;
  text-transform: none;
}

.fx-section--content-media .fx-content-media__body h3 {
  font-size: calc(var(--fx-content-media-title-size) * 0.7);
}

.fx-section--content-media .fx-content-media__body p {
  margin: 0 0 1.25rem;
  color: #ffffff;
  font-family: var(--fx-font-intro);
  font-size: var(--fx-content-media-body-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: 0.01em;
  text-transform: none;
}

.fx-section--content-media .fx-content-media__body ul,
.fx-section--content-media .fx-content-media__body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25em;
  color: #ffffff;
  font-family: var(--fx-font-intro);
  font-size: var(--fx-content-media-body-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: 0.01em;
}

.fx-section--content-media .fx-content-media__body li {
  margin: 0 0 0.5rem;
}

.fx-section--content-media .fx-content-media__body li:last-child {
  margin-bottom: 0;
}

.fx-content-media__body > :last-child {
  margin-bottom: 0;
}

.fx-content-media__body a:not(.fx-section__button) {
  color: inherit;
  text-decoration: underline;
}

.fx-content-media__body .fx-section__button {
  margin-top: 2rem;
}

/* Button wrap/max-width come from shared.css; keep full-width of the text column */
.fx-section--content-media .fx-content-media__body a.fx-section__button,
.fx-section--content-media .fx-content-media__body p a.fx-section__button {
  max-width: 100%;
}

.fx-content-media__media {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  overflow: hidden;
  min-height: var(--fx-content-media-media-min-h);
  aspect-ratio: 16 / 10;
  background-color: var(--fx-color-olive-dark);
}

/*
 * Beat shared `.fx-section img { height: auto }` so cover fills the column
 * as the content column grows.
 */
.fx-section--content-media .fx-content-media__img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.fx-content-media__scrub {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Stacked: image always above content (left/right only applies on desktop). */
.fx-content-media__media {
  order: -1;
}

@media (min-width: 768px) {
  .fx-section--content-media {
    --fx-content-media-title-size: 3.75rem;
    --fx-content-media-body-size: 1.5rem;
    --fx-content-media-media-min-h: 20rem;
  }
}

@media (min-width: 1024px) {
  .fx-section--content-media {
    --fx-content-media-title-size: 4.6875rem;
    --fx-content-media-body-size: 1.875rem;
  }

  .fx-content-media__layout {
    flex-direction: row;
  }

  .fx-content-media--media-left .fx-content-media__layout {
    flex-direction: row-reverse;
  }

  /* Figma split (not equal halves): content ~55.5%, media ~44.5% of the frame */
  .fx-content-media__content {
    flex: 1 1 var(--fx-content-media-content-w);
    width: var(--fx-content-media-content-w);
    max-width: var(--fx-content-media-content-w);
    min-width: 0;
  }

  .fx-content-media__media {
    order: 0;
    flex: 0 0 var(--fx-content-media-media-w);
    width: var(--fx-content-media-media-w);
    max-width: var(--fx-content-media-media-w);
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    align-self: stretch;
  }

  /* Outer-edge pad on the text side only; inner gap toward the media */
  .fx-content-media--media-right .fx-content-media__content {
    padding: var(--fx-content-media-pad-y) var(--fx-content-media-gap) var(--fx-content-media-pad-y) var(--fx-content-pad-x);
  }

  .fx-content-media--media-left .fx-content-media__content {
    padding: var(--fx-content-media-pad-y) var(--fx-content-pad-x) var(--fx-content-media-pad-y) var(--fx-content-media-gap);
  }
  
  .fx-numbered-media__lead {
  flex-direction: row;
  }
}

@media (min-width: 1400px) {
  .fx-section--content-media {
    --fx-content-media-pad-y: 6rem;
  }
}

@media (max-width: 767px) {
  .fx-section--content-media {
    --fx-content-media-title-size: 2rem;
    --fx-content-media-body-size: 1rem;
  }

  .fx-section--content-media .fx-content-media__body p,
  .fx-section--content-media .fx-content-media__body ul,
  .fx-section--content-media .fx-content-media__body ol {
    line-height: 1.4;
  }
}


/*
 * Definition-style service tables inside WYSIWYG content.
 * Hairlines + display labels; overrides Ratio theme table borders (modules.css).
 */
.fx-section--content-media .fx-content-media__body table {
  width: 100%;
  max-width: 100%;
  margin: 2rem 0 0;
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  background: transparent;
  color: #ffffff;
  font-family: var(--fx-font-intro);
  font-size: var(--fx-content-media-body-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: 0.01em;
  text-align: left;
  text-transform: none;
  table-layout: fixed;
}

.fx-section--content-media .fx-content-media__body table thead tr,
.fx-section--content-media .fx-content-media__body table tbody tr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
}

.fx-section--content-media .fx-content-media__body table tbody tr:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.fx-section--content-media .fx-content-media__body table th,
.fx-section--content-media .fx-content-media__body table td {
  width: auto;
  border: none;
  background: transparent;
  color: #ffffff;
  font: inherit;
  text-align: left;
  vertical-align: top;
  padding: 1.15rem 1.75rem 1.15rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.fx-section--content-media .fx-content-media__body table th:last-child,
.fx-section--content-media .fx-content-media__body table td:last-child {
  padding-right: 0;
}

.fx-section--content-media .fx-content-media__body table td:first-child,
.fx-section--content-media .fx-content-media__body table th:first-child {
  width: 36%;
  padding-right: 1.75rem;
  color: #fff;
  font-family: var(--fx-font-display);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.12em;
}

.fx-section--content-media .fx-content-media__body table td:last-child,
.fx-section--content-media .fx-content-media__body table th:last-child {
  width: 64%;
  font-size: 0.8em;
}

.fx-section--content-media .fx-content-media__body table td:first-child strong,
.fx-section--content-media .fx-content-media__body table th:first-child strong {
  color: inherit;
  font-weight: inherit;
}

@media (max-width: 767px) {
  .fx-section--content-media .fx-content-media__body table {
    line-height: 1.4;
  }

  /* Stack label + description so the two-column table stays readable */
  .fx-section--content-media .fx-content-media__body table,
  .fx-section--content-media .fx-content-media__body table tbody,
  .fx-section--content-media .fx-content-media__body table tr,
  .fx-section--content-media .fx-content-media__body table th,
  .fx-section--content-media .fx-content-media__body table td {
    display: block;
    width: 100%;
  }

  .fx-section--content-media .fx-content-media__body table td:first-child,
  .fx-section--content-media .fx-content-media__body table th:first-child,
  .fx-section--content-media .fx-content-media__body table td:last-child,
  .fx-section--content-media .fx-content-media__body table th:last-child {
    width: 100%;
    padding-right: 0;
  }

  .fx-section--content-media .fx-content-media__body table td:first-child,
  .fx-section--content-media .fx-content-media__body table th:first-child {
    padding-top: 1rem;
    padding-bottom: 0.4rem;
    font-size: 0.78em;
    letter-spacing: 0.1em;
  }

  .fx-section--content-media .fx-content-media__body table td:last-child,
  .fx-section--content-media .fx-content-media__body table th:last-child {
    padding-top: 0;
    padding-bottom: 1rem;
  }
}
