/*
 * additions.css
 *
 * Styles added after handover. The original SCSS source for main.min.css was
 * not included in the files handed over, so new styles live here and are
 * enqueued after main.min.css in functions.php. If the SCSS source is
 * recovered, fold these rules back into lib/styles/scss and delete this file.
 */

/* ---------------------------------------------------------------
 * Construction module
 * --------------------------------------------------------------- */

.construction .construction-video {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.construction .construction-video__player {
  display: block;
  width: 100%;
  height: auto;
}

.construction .construction-video__embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}

.construction .construction-video__embed iframe,
.construction .construction-video__embed object,
.construction .construction-video__embed embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.construction .construction-image {
  position: relative;
  width: 100%;
}

.construction .construction-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Space between the stacked image and video at mobile */
.construction .construction-col + .construction-col {
  margin-top: 2em;
}

@media (min-width: 1024px) {
  .construction .construction-col + .construction-col {
    margin-top: 0;
  }
}

/* Keep the caption clear of native video controls */
.construction .construction-video .caption {
  bottom: 50px;
}

/* ---------------------------------------------------------------
 * Footer logos: five-across at desktop
 *
 * The markup uses col-6 col-lg-3, which leaves a fifth logo orphaned on
 * its own row. When there are exactly five, split the row into fifths.
 * --------------------------------------------------------------- */

@media (min-width: 1024px) {
  .logo-block .row > .logo-wrapper:first-child:nth-last-child(5),
  .logo-block .row > .logo-wrapper:first-child:nth-last-child(5) ~ .logo-wrapper {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* ---------------------------------------------------------------
 * Hero green overlay
 *
 * Optional tint in the brand green (#172917) over the hero image, toggled
 * per module by the Green Overlay switch in ACF. The strength comes from
 * the Overlay Opacity slider as an inline style; the value below is the
 * fallback if that slider is ever empty.
 *
 * The div sits first inside .hero-image so it paints above the image
 * (which is not positioned) but below the headings, caption and scroll
 * prompt, all of which are positioned and come later in the markup.
 * --------------------------------------------------------------- */

.hero-wrap .hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(23, 41, 23, 0.25);
  pointer-events: none;
}

/* ---------------------------------------------------------------
 * Full bleed image: fit to width on mobile
 *
 * By default these images are set to 60vh tall with auto width inside a
 * horizontally scrollable container, so on a phone you swipe sideways to
 * see the rest of the shot. Setting Mobile Display to "Fit To Width" on
 * the module swaps that for the whole image at viewport width, which is
 * shorter but needs no scrolling.
 * --------------------------------------------------------------- */

@media (max-width: 767px) {
  .fullbleed-image-container.mobile-fit {
    overflow-x: visible;
    white-space: normal;
  }

  .fullbleed-image-container.mobile-fit img.fullbleed {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}
