/**
 * Page-level spacing for jixaw-composed pages. The signature-theatre theme sets
 * blockGap to null (disabling WP's automatic spacing) AND adds margins to blocks
 * (e.g. .wp-block-group margin 20/30px, and similar on buttons), all at low
 * specificity. So we (a) restore flow spacing between blocks, and (b) strip those
 * stray margins inside the dark/light CTA callouts so the box fits its content.
 * Doubled / multi-class selectors raise specificity to reliably win the cascade.
 */

/* (a) Flow spacing between stacked blocks inside a composed container. */
.jixaw-flow.jixaw-flow > * + * {
  margin-block-start: 2rem;
}

/* The theme gives .wp-block-list a huge bottom margin (80/100px), which opens a
   gulf between a bullet list and the paragraph after it (client flagged it on the
   planned-giving page). Zero the list's own margins inside jixaw flows and let the
   2rem flow gap above govern spacing on both sides. */
.jixaw-flow .wp-block-list {
  margin-top: 0;
  margin-bottom: 0;
}

/* (b) CTA / quote callouts: remove inherited block margins so the box fits its
   content (no empty padding below the button), with controlled inner spacing. */
.jixaw-flow .wp-block-group.has-background > * {
  margin-block-start: 0;
  margin-block-end: 0;
}
.jixaw-flow .wp-block-group.has-background > * + * {
  margin-block-start: 1.25rem;
}
.jixaw-flow .wp-block-group.has-background .wp-block-buttons,
.jixaw-flow .wp-block-group.has-background .wp-block-button,
.jixaw-flow .wp-block-group.has-background .wp-block-button__link {
  margin: 0;
}

/* (c) No dead space above the first element of a card/callout/section — the theme
   gives headings a large top margin (and its splitting text-animation classes). */
.jixaw-flow .wp-block-group > :first-child,
.jixaw-flow .wp-block-column > :first-child {
  margin-block-start: 0;
}

/* (d) Buttons fit their content. Core sets .wp-block-button__link { height:100% },
   which stretches the pill inside a flex card; strip that and any stray margins. */
.jixaw-flow .wp-block-buttons,
.jixaw-flow .wp-block-button,
.jixaw-flow .wp-block-button__link {
  height: auto;
  margin: 0;
}
