/**
 * Block style variants for core/heading.
 *
 * Brand-wide default treatment (no class needed) matches Apply Now's
 * .apply-section-heading; BOV pages opt into the Trajan-and-red-rule
 * look via the is-style-vmi-with-rule (and friends) variants.
 */

/* ------------------------------------------------------------------
 * Default (no .is-style-* class) — brand-wide section heading
 * mirroring sass/pages/apply-now/_sections.sass .apply-section-heading.
 * Scoped to .entry-content so it doesn't bleed into chrome (header,
 * megamenu, footer, etc.).
 * ------------------------------------------------------------------ */
:is(.entry-content, .editor-styles-wrapper) .wp-block-heading:where(:not([class*="is-style-"])) {
  font-family: "museo-sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 36px;
  color: #000;
  margin: 0 0 16px;
  -webkit-font-smoothing: antialiased;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-heading:where(:not([class*="is-style-"])):where(h1) { font-size: 42px; }
:is(.entry-content, .editor-styles-wrapper) .wp-block-heading:where(:not([class*="is-style-"])):where(h2) { font-size: 32px; }
:is(.entry-content, .editor-styles-wrapper) .wp-block-heading:where(:not([class*="is-style-"])):where(h3) { font-size: 26px; }
:is(.entry-content, .editor-styles-wrapper) .wp-block-heading:where(:not([class*="is-style-"])):where(h4) { font-size: 20px; }

/* ------------------------------------------------------------------
 * is-style-vmi-with-rule  ----  H1/H2/H3/H4 with a 120px red rule.
 * BOV section heading treatment. Picker label: "BOV section heading
 * (red rule)".
 * ------------------------------------------------------------------ */
.wp-block-heading.is-style-vmi-with-rule {
  font-family: "Trajan Pro", serif;
  font-weight: 400;
  color: #4F5872;
  letter-spacing: 0;
  line-height: 1.05;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  position: relative;
  padding-bottom: 16px;
}

.wp-block-heading.is-style-vmi-with-rule::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  background-color: #ae122a;
  margin-top: 16px;
}

/* No red rule under the "Committees" title in the membership sidebar
   — staging ships it without a rule even though the heading style is
   the with-rule variant. */
.bov-membership-committees .wp-block-heading.is-style-vmi-with-rule::after {
  display: none;
}

.wp-block-heading.is-style-vmi-with-rule:where(h1) { font-size: 42px; }
.wp-block-heading.is-style-vmi-with-rule:where(h2) { font-size: 32px; }
.wp-block-heading.is-style-vmi-with-rule:where(h3) { font-size: 26px; }
.wp-block-heading.is-style-vmi-with-rule:where(h4) { font-size: 20px; }

/* Center alignment via Gutenberg's standard text-align control still
   works (.has-text-align-center) — we just align the rule too. */
.wp-block-heading.is-style-vmi-with-rule.has-text-align-center::after {
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------------
 * is-style-vmi-centered-rules  ----  centered uppercase Trajan with
 * full-width gray hairline + 40%-wide Barracks Tan accent.
 * ------------------------------------------------------------------ */
.wp-block-heading.is-style-vmi-centered-rules {
  display: block;
  position: relative;
  width: 100%;
  font-family: "Trajan Pro", serif;
  font-weight: 400;
  color: #4F5872;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.05;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 16px;
  margin: 0 0 48px;
}

.wp-block-heading.is-style-vmi-centered-rules:where(h1) { font-size: 42px; }
.wp-block-heading.is-style-vmi-centered-rules:where(h2) { font-size: 38px; }
.wp-block-heading.is-style-vmi-centered-rules:where(h3) { font-size: 26px; }
.wp-block-heading.is-style-vmi-centered-rules:where(h4) { font-size: 20px; }

.wp-block-heading.is-style-vmi-centered-rules::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #BCBCBC;
}

.wp-block-heading.is-style-vmi-centered-rules::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background-color: #E0D3B4;
}

/* ------------------------------------------------------------------
 * is-style-vmi-plain  ----  27px Museo subhead (no rule). Used by
 * Post Announcements and similar lightweight section sub-headers.
 * ------------------------------------------------------------------ */
.wp-block-heading.is-style-vmi-plain {
  font-family: "museo-sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  color: #4F5872;
  letter-spacing: 0;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.wp-block-heading.is-style-vmi-plain:where(h1),
.wp-block-heading.is-style-vmi-plain:where(h2) { font-size: 27px; }
.wp-block-heading.is-style-vmi-plain:where(h3) { font-size: 22px; }
.wp-block-heading.is-style-vmi-plain:where(h4) { font-size: 18px; }

/* ------------------------------------------------------------------
 * is-style-apply-display : Trajan 54px display headline used on
 * Apply Now's Best Value section. Centered, dark coatee color,
 * 1.5 line-height, 880px max width. Reusable on any section that
 * wants the same display headline treatment.
 * ------------------------------------------------------------------ */
.wp-block-heading.is-style-apply-display {
  font-family: "Trajan Pro", serif;
  font-weight: 400;
  font-size: 54px;
  line-height: 1.5;
  letter-spacing: 0;
  color: #4F5872;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 1023px) {
  .wp-block-heading.is-style-apply-display { font-size: 40px; }
}

@media (max-width: 767px) {
  .wp-block-heading.is-style-apply-display { font-size: 32px; }
}

/* ------------------------------------------------------------------
 * is-style-apply-hero : Trajan 62px hero title used on Apply Now's
 * dark hero band. Tan ink on dark background; the band itself is
 * controlled by the parent group's native bg/border/padding.
 * ------------------------------------------------------------------ */
.wp-block-heading.is-style-apply-hero {
  font-family: "Trajan Pro", serif;
  font-weight: 400;
  font-size: 62px;
  line-height: normal;
  letter-spacing: 0.62px;
  color: #EFE9D9;
  /* Match the apply-header picture below: 1280px-centered inner box.
     Group provides bg + vertical padding; heading owns its own
     horizontal placement so its left edge aligns with the photo. */
  max-width: 1280px;
  margin: 0 auto;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 1023px) {
  .wp-block-heading.is-style-apply-hero { font-size: 48px; }
}

@media (max-width: 767px) {
  .wp-block-heading.is-style-apply-hero { font-size: 36px; }
}
