/* ==========================================================================
   PAGE HEADER
   Compact hero for interior pages (Solutions hubs, service detail pages,
   About, etc). Lighter than the homepage .hero-section - no starfield, no
   min-height:100vh - but shares its type scale and breathes the same on
   both the light base and a .dark-band section.
   ========================================================================== */

.page-header {
  position: relative;
  padding: clamp(3.5rem, 9vw, 5.5rem) var(--space-md) clamp(2.75rem, 7vw, 4rem);
  overflow: hidden;
}

/* Below ~600px the fixed .site-header pill renders at a flat ~82px
   regardless of content (logo + "Free Audit" button, no nav row) - taller
   than the 9vw-scaled padding-top above provides at these widths, which let
   the pill overlap the breadcrumb/eyebrow. Reserve fixed clearance instead
   of the fluid clamp for this range. */
@media (max-width: 599px) {
  .page-header {
    padding-top: 7.5rem;
  }
}

.page-header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
}

.page-breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-lg);
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-tertiary);
}

.page-breadcrumb a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-breadcrumb a:hover {
  color: var(--color-accent-text);
}

.page-breadcrumb .sep {
  opacity: 0.5;
}

.page-header-title {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-display);
  color: var(--color-text-primary);
  max-width: 18ch;
  margin: 0 0 var(--space-lg);
}

.page-header-title em,
.page-header-title .accent-word {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent-display);
}

.page-header-subtitle {
  font-size: var(--font-size-md);
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0;
}

/* wp:term-description (the generic category.html fallback) renders an empty
   wrapper when a category has no description set in Settings - collapse it
   rather than leaving a blank gap between the title and the buttons below. */
/* Action row under the subtitle (404, and any header that carries CTAs) */
.page-header-inner .wp-block-buttons {
  margin-top: var(--space-xl);
}

.page-header-subtitle:empty {
  display: none;
}

.page-header-actions {
  margin-top: var(--space-xl);
}

/* Wide two-thirds layout for headers that pair the intro copy with a stat
   strip or short list to the right */
.page-header-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: end;
}

@media (max-width: 782px) {
  .page-header-split {
    grid-template-columns: 1fr;
  }
}

/* A page hero that runs straight into a tinted band (the sage two-column
   sections) gets a strip (--band-gap) of page background between them. Next to a
   white section the gap would be invisible, so it's only added here. */
.page-header:has(+ .two-column-section) {
  margin-bottom: var(--band-gap);
}
