/*
 * Kadence's full alignment uses 100vw, which includes the browser scrollbar
 * while the Homepage wrapper uses the available layout width. Keep the
 * full-bleed section backgrounds aligned to that wrapper without
 * changing each section's internal Kadence max-width.
 */
:is(
  .kb-row-layout-idforgehero,
  .kb-row-layout-idforge-who-section,
  .kb-row-layout-idforge-method-section,
  .kb-row-layout-idforge-training-section,
  .kb-row-layout-idforge-coaching-section,
  .kb-row-layout-idforge-house-section
) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Gutenberg adds a constrained wrapper around top-level blocks. Limit this
 * correction to the six Homepage sections and let their saved Kadence
 * padding and internal max-width values remain authoritative. */
.editor-styles-wrapper .is-root-container
  > [data-type="kadence/rowlayout"]:has(
    :is(
      .kb-row-id-forgehero,
      .kb-row-id-forge-who-section,
      .kb-row-id-forge-method-section,
      .kb-row-id-forge-training-section,
      .kb-row-id-forge-coaching-section,
      .kb-row-id-forge-house-section
    )
  ),
.editor-styles-wrapper .is-root-container
  > :is(
    .kb-row-id-forgehero,
    .kb-row-id-forge-who-section,
    .kb-row-id-forge-method-section,
    .kb-row-id-forge-training-section,
    .kb-row-id-forge-coaching-section,
    .kb-row-id-forge-house-section
  ) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.editor-styles-wrapper
  :is(
    .kb-row-id-forge-who-section,
    .kb-row-id-forge-method-section,
    .kb-row-id-forge-training-section,
    .kb-row-id-forge-coaching-section,
    .kb-row-id-forge-house-section
  )
  .wp-block-kadence-rowlayout {
  box-sizing: border-box;
  width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Kadence Advanced Heading has no intrinsic-width control. Keep the shared
 * native eyebrow settings compact and optically centered in frontend/editor. */
.forge-eyebrow-standard {
  box-sizing: border-box;
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
}

.forge-eyebrow-centered {
  margin-right: auto !important;
  margin-left: auto !important;
}

.editor-styles-wrapper
  [data-type="kadence/advancedheading"]:has(.forge-eyebrow-standard) {
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0;
  align-self: flex-start;
}

.editor-styles-wrapper
  [data-type="kadence/advancedheading"]:has(.forge-eyebrow-centered) {
  align-self: center;
  margin-right: auto !important;
  margin-left: auto !important;
}
