/* Full-bleed container */
.wp-site-blocks .hero-carousel.alignfull,
.is-layout-constrained .hero-carousel.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

/* Kill extra top/bottom spacing that comes from block gap and page padding */
:is(.wp-site-blocks, .is-layout-constrained) > .alignfull.hero-carousel {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.has-global-padding .alignfull.hero-carousel {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Base carousel */
.hero-carousel { position: relative; }
.hero-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}
.hero-carousel__track::-webkit-scrollbar { display: none; }

.hero-carousel__slide {
  flex: 0 0 100vw;           /* exactly one viewport width */
  scroll-snap-align: start;
  position: relative;
  margin: 0;                 /* cancel any Group default margins */
}
.hero-carousel__slide .wp-block-cover {
  min-height: 70vh;
  margin: 0;
  padding: 0;
}

/* Arrows, centred vertically and spaced from edges */
.hero-carousel__nav {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;   /* full height to centre items */
  display: flex;
  align-items: center;                     /* vertical centring */
  justify-content: space-between;
  pointer-events: none;
  padding: 0 clamp(8px, 2vw, 24px);
}
.hero-carousel__nav button {
  pointer-events: auto;
  border: 0;
  background: color-mix(in srgb, #000 30%, transparent);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Prevent horizontal scrollbars caused by full-bleed */
html, body, .wp-site-blocks { overflow-x: hidden; }

/* Remove the theme’s top padding above the first full-bleed block */
.wp-site-blocks > .wp-block-group.alignfull.has-global-padding:first-child {
  padding-top: 0 !important;
}

/* The post content wrapper also adds padding */
.entry-content.alignfull.has-global-padding {
  padding-top: 0 !important;
}

/* Make sure the hero itself doesn’t add any extra margin */
.alignfull.hero-carousel {
  margin-top: 0 !important;
}

/* If a top wrapper still injects inline padding, neutralise it specifically */
.wp-site-blocks > .wp-block-group.alignfull.has-global-padding[style*="padding-top"] {
  padding-top: 0 !important;
}

/* Optional safety net: if spacing tokens vary, pull the hero up by that amount
   Uncomment if you still see a gap */

.alignfull.hero-carousel {
  margin-top: calc(-1 * var(--wp--preset--spacing--60)) !important;
}

/* Home only: remove the header-to-content gap above the hero */
.home main#wp--skip-link--target.wp-block-group.has-global-padding,
.home main#wp--skip-link--target[style*="margin-top"] {
  margin-top: 0 !important;
}

/* Home only: remove top padding on the first full-width wrapper inside <main> */
.home main#wp--skip-link--target > .wp-block-group.alignfull.has-global-padding,
.home main#wp--skip-link--target > .wp-block-group.alignfull.has-global-padding[style*="padding-top"] {
  padding-top: 0 !important;
}

/* Belt and braces: ensure the post content wrapper doesn't add extra space */
.home .wp-block-post-content.alignfull.has-global-padding {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* If any block gap tries to add a first-child margin, cancel it for the hero */
.home .wp-block-post-content > *:first-child {
  margin-top: 0 !important;
}