/*
 * ITB Child Theme Vertical Spacing 1.0.0
 * Scoped refinement of whitespace verified in mobile/desktop screenshots.
 * No content or layout order changes. Remove this stylesheet enqueue to restore original spacing.
 */

/* Empty featured-widgets spacer: editor block contains no visible content. */
body.home main#main > section#block-53 {
  display: none !important;
}

/* Home: give sections a consistent, calmer vertical rhythm without
 * changing the featured images, card sizes or section ordering. */
@media (min-width: 768px) {
  body.home #block-52,
  body.home #block-37,
  body.home #block-46,
  body.home #block-29,
  body.home #block-48 { padding-block: 22px !important; }

  body.home #block-37 .wp-block-buttons { margin-block: 22px !important; }
  body.home #block-37 #pr-block .wp-block-buttons { margin: 12px 0 !important; }

  body.home section.topics,
  body.home section.new-items { padding-block: 30px !important; }
}

@media (max-width: 767.98px) {
  body.home #block-52,
  body.home #block-37,
  body.home #block-46,
  body.home #block-29,
  body.home #block-48 { padding-block: 17px !important; }

  body.home #block-52 > .wp-block-columns,
  body.home #block-37 > .wp-block-columns {
    gap: 18px !important;
    margin-bottom: 0 !important;
  }

  body.home #block-52 figure.wp-block-image {
    margin-bottom: 16px !important;
  }

  body.home #block-37 .wp-block-buttons {
    margin-block: 18px !important;
  }

  body.home #block-37 #pr-block {
    gap: 16px !important;
    margin-bottom: 0 !important;
  }

  body.home #block-37 #pr-block > .wp-block-column {
    padding-block: 8px !important;
    margin-bottom: 0 !important;
  }

  body.home #block-37 #pr-block .wp-block-buttons {
    margin: 12px 0 8px !important;
  }

  body.home #block-46 .wp-block-separator {
    margin-block: 13px !important;
  }

  body.home section.topics,
  body.home section.new-items { padding-block: 22px !important; }
}

/* Generic informational pages:
 * Existing theme applies 38/48px before nearly every H2 and 12/14px
 * inside it. This is excessive for legal, FAQ and short text sections.
 * Bespoke Works, products, news, category archives are intentionally exempt.
 */
@media (min-width: 768px) {
  body.page main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2 {
    margin-top: 34px !important;
    margin-bottom: 18px !important;
    padding-block: 10px !important;
  }
  body.page main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h3 {
    margin-top: 28px !important;
    margin-bottom: 14px !important;
  }
  body > footer { margin-top: 44px !important; }
}
@media (max-width: 767.98px) {
  body.page main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2 {
    margin-top: 27px !important;
    margin-bottom: 16px !important;
    padding-block: 8px !important;
  }
  body.page main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h3 {
    margin-top: 22px !important;
    margin-bottom: 12px !important;
  }
  body > footer { margin-top: 34px !important; }
}

/* Legal/privacy pages are labelled sections, not editorial chapters:
 * compact the repeated heading-to-value rhythm without shrinking text. */
@media (min-width: 768px) {
  body.page-id-109 main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2,
  body.page-id-11006 main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2 {
    margin-top: 26px !important;
    margin-bottom: 12px !important;
    padding-block: 7px !important;
  }
}
@media (max-width: 767.98px) {
  body.page-id-109 main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2,
  body.page-id-11006 main#content > article:not(.article-item):not(.post-5940):not(.post-10177):not(.post-10249) > .entry-content > h2 {
    margin-top: 22px !important;
    margin-bottom: 11px !important;
    padding-block: 6px !important;
  }
}

/* Origins: keep the original photos and creator biographies, reduce only
 * repeated default Gutenberg block padding/gaps and excessive button margins. */
body.page-id-8464 .entry-content .wp-block-columns.has-background {
  gap: 20px !important;
  margin-bottom: 18px !important;
}
body.page-id-8464 .entry-content .wp-block-buttons {
  margin-block: 18px !important;
}
@media (max-width: 767.98px) {
  body.page-id-8464 .entry-content .wp-block-columns.has-background {
    gap: 18px !important;
  }
}

/* Preserve button hit areas, product cards, checkout layout and image geometry. */
