/* Compact inner-page titles: retain the background behind the site header,
   but reserve space only for the title below it. Covers legacy heroes too. */
.container-fluid.hero-header {
  min-height: 0;
  height: auto;
  margin-top: -170px;
  padding-top: 170px;
  padding-bottom: 0 !important;
  /* A translucent border exposes the background outside the overlay. */
  border-bottom: 0;
}
.container-fluid.hero-header > .container {
  padding-top: 22px !important;
  padding-bottom: 22px !important;
  position: relative;
  z-index: 2;
}
.container-fluid.hero-header h1 {
  font-size: clamp(26px, 2.4vw, 38px) !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  text-align: center;
  animation: none !important;
  overflow-wrap: anywhere;
}
.container-fluid.hero-header.hero-light-overlay h1 {
  color: #0f2d57;
  text-shadow: none;
}
.container-fluid.hero-header .page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
/* Older standalone templates use the same compact presentation. */
.container-fluid.hero-header nav[aria-label="breadcrumb"],
.container-fluid.hero-header .hazard-icon-wrap {
  display: none !important;
}
/* Tighten only the first content section, leaving card and form spacing intact. */
.hero-header ~ :is(.internal-page-section, .hazard-content-section, .did-page, .dd1-page, .nb-pg) {
  padding-top: 24px !important;
}
@media (max-width: 1250px) {
  .container-fluid.hero-header {
    margin-top: -46px !important;
    padding-top: 46px !important;
  }
  .container-fluid.hero-header > .container {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
  .container-fluid.hero-header h1 {
    font-size: clamp(24px, 3.5vw, 32px) !important;
  }
  .hero-header ~ :is(.internal-page-section, .hazard-content-section, .did-page, .dd1-page, .nb-pg) {
    padding-top: 16px !important;
  }
}

/* Keep the title above the background overlay. */
.hero-header .container { position: relative; z-index: 10 !important; }
