/* Blocks Template Styles */

/* Main container — full-width so custom ACF blocks (hero, cta, stats,
 * switchback) can render edge-to-edge via their own breakout CSS
 * (width: 100vw; margin: calc(50% - 50vw)). Core WordPress blocks are
 * still individually constrained to 1200px by the per-class rules
 * below. This matches how the wrapper renders for posts using the same
 * template (e.g. the 2025 Market Report) — same template, same behavior.
 *
 * overflow-x: clip clips horizontal overflow from inner Bootstrap-style
 * .row elements (which use negative left/right margins that would
 * otherwise push past the viewport now that the wrapper is unconstrained).
 * "clip" (vs "hidden") preserves position:sticky inside descendants. */
body.page-template-blocks .blocks-wrapper {
  width: 100%;
  overflow-x: clip;
}

/* Core blocks containment */
body.page-template-blocks .blocks-wrapper article > .wp-block-paragraph,
body.page-template-blocks .blocks-wrapper article > .wp-block-group,
body.page-template-blocks .blocks-wrapper article > .wp-block-heading,
body.page-template-blocks .blocks-wrapper article > .wp-block-image,
body.page-template-blocks .blocks-wrapper article > .wp-block-quote,
body.page-template-blocks .blocks-wrapper article > .wp-block-list,
body.page-template-blocks .blocks-wrapper article > .wp-block-table,
body.page-template-blocks .blocks-wrapper article > .wp-block-code,
body.page-template-blocks .blocks-wrapper article > .wp-block-preformatted,
body.page-template-blocks .blocks-wrapper article > .wp-block-buttons,
body.page-template-blocks .blocks-wrapper article > .wp-block-cover,
body.page-template-blocks .blocks-wrapper article > .wp-block-gallery,
body.page-template-blocks .blocks-wrapper article > .gform_wrapper {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* Gravity Forms specific styling */
body.page-template-blocks .blocks-wrapper .gform_wrapper form {
  margin: 0 auto;
  max-width: 100%;
}

body.page-template-blocks .blocks-wrapper .gform_wrapper .gform_body {
  width: 100%;
}

body.page-template-blocks .blocks-wrapper .gform_wrapper .gform_fields {
  padding: 0;
}

/* Background handling for groups */
body.page-template-blocks .wp-block-group.has-background {
  padding: 2rem 0;
}

body.page-template-blocks .wp-block-group.has-background > * {
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}
