/* stop default space at top of page */
.wp-site-blocks > *:where(:not(header):not(footer)) {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}


/* custom class to stop gaps between block */
.no-gap { margin: 0 !important; }
.no-gap + .no-gap { margin-top: 0 !important; }



/* Remove top margin before footer */
:where(.wp-site-blocks) > footer.wp-block-template-part {
  margin-block-start: 0 !important;
}


/* 1) Let full-width blocks bleed to the viewport edges */
.entry-content.has-global-padding > .alignfull,
.wp-block-post-content.has-global-padding > .alignfull {
  max-width: 100vw;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 2) Remove the wrapper's side padding only on pages where
      there is a direct child .alignfull block */
@supports selector(:has(*)) {
  .entry-content.has-global-padding:has(> .alignfull),
  .wp-block-post-content.has-global-padding:has(> .alignfull) {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Fallback if :has() isn’t available in some browsers:
   (uncomment to remove padding always on post content)
   .entry-content.has-global-padding,
   .wp-block-post-content.has-global-padding { padding-left:0; padding-right:0; }
*/
