/* ==========================================================================
   Page hero - the page title written over the .wrapper.row5 banner.
   Shared by testing-facilities.html and quality-assurance-plan.html.
   Mirrors the .pd-hero behaviour in css/pipe-dimensions-page.css.
   ========================================================================== */

.pg-hero {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  /* Clicks pass through to the slider controls underneath. */
  pointer-events: none;
  background: linear-gradient(90deg, rgba(1, 18, 35, 0.92) 0%,
      rgba(1, 22, 43, 0.78) 50%, rgba(1, 22, 43, 0.3) 100%);
  color: #fff;
}

/* .wrapper.row5 * forces max-width:none on every descendant, so the shell
   width has to be reasserted with matching weight. */
.wrapper.row5 .pg-hero__inner {
  width: 92%;
  max-width: 1180px !important;
  margin: 0 auto;
}

/* The global sheet capitalizes and recolours every bare h1, so this one
   restates its own casing, colour and family. */
.wrapper.row5 .pg-hero h1 {
  max-width: 820px;
  margin: 0;
  padding: 0 0 12px;
  color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 3.6vw, 46px);
  font-weight: bold;
  line-height: 1.08;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  background: none;
  border: 0;
}

/* Red rule under the title, matching the section headings on these pages. */
.wrapper.row5 .pg-hero h1::after {
  content: "";
  display: block;
  width: 84px;
  height: 3px;
  margin-top: 14px;
  background: #df1d2f;
}

/* Above this width the slide list is pushed down 120px to clear the fixed
   header (see .rslides in css/style.css), so the overlay follows it. */
@media screen and (min-width: 1199px) {
  .pg-hero {
    margin-top: 120px;
  }
}

/* On small screens the banner is shorter than the title needs, so the hero
   drops out of the overlay and stacks under the banner instead. */
@media screen and (max-width: 900px) {
  .wrapper.row5 .pg-hero {
    position: static;
    display: block;
    padding: 22px 0 26px;
    pointer-events: auto;
    background: #06305c;
  }

  .wrapper.row5 .pg-hero h1 {
    padding-bottom: 0;
  }
}
