/* ===== sl-rhythm: even vertical spacing between homepage blocks (CSS only) ===== */

/* Rhythm: space between the visible edges of consecutive blocks */
.path-frontpage main {
  --sl-rhythm: 3rem;   /* 48px phones and tablets */
}
@media (min-width: 768px) {
  .path-frontpage main {
    --sl-rhythm: 4rem; /* 64px desktop */
  }
}

/* Every top-level block: one bottom margin, no top margin */
.path-frontpage main .region > .block {
  margin-top: 0 !important;
  margin-bottom: var(--sl-rhythm) !important;
}

/* Zero-height anchor block (#about target) must not add a second gap */
.path-frontpage main #block-olivero-aboutanchor {
  margin-bottom: 0 !important;
}

/* Remove the extra padding where the two content regions meet */
.path-frontpage main .region--content-above {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
.path-frontpage main .region--content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Strip margins that leak out through the top edge of each block */
.path-frontpage main .region > .block > :first-child,
.path-frontpage main .region > .block > :first-child > :first-child,
.path-frontpage main .region > .block > :first-child > :first-child > :first-child,
.path-frontpage main .region > .block > :first-child > :first-child > :first-child > :first-child,
.path-frontpage main .region > .block > :first-child > :first-child > :first-child > :first-child > :first-child,
.path-frontpage main .region > .block > :first-child > :first-child > :first-child > :first-child > :first-child > :first-child {
  margin-top: 0 !important;
}

/* Strip margins that leak out through the bottom edge of each block */
.path-frontpage main .region > .block > :last-child,
.path-frontpage main .region > .block > :last-child > :last-child,
.path-frontpage main .region > .block > :last-child > :last-child > :last-child,
.path-frontpage main .region > .block > :last-child > :last-child > :last-child > :last-child,
.path-frontpage main .region > .block > :last-child > :last-child > :last-child > :last-child > :last-child,
.path-frontpage main .region > .block > :last-child > :last-child > :last-child > :last-child > :last-child > :last-child {
  margin-bottom: 0 !important;
}

/* Short quote blocks: view grid gap (36px) and blockquote margins */
.path-frontpage main .view-short-quote {
  row-gap: 0 !important;
}
.path-frontpage main .view-short-quote blockquote {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Top button row: spacing between wrapped rows via gap, not a trailing button margin */
.path-frontpage main #block-olivero-slbuttoncode .sl-button-row {
  row-gap: 20px;
}
.path-frontpage main #block-olivero-slbuttoncode .sl-button {
  margin-bottom: 0 !important;
}

/* About Us page body: remove leading heading margin and trailing layout margin */
.path-frontpage main #block-olivero-content .layout--onecol {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.path-frontpage main #block-olivero-content .layout--onecol > .layout__region > .block:first-child .text-content > :first-child {
  margin-top: 0 !important;
}

/* What's New panel: hide the empty <p>&nbsp;</p> at the end of the view footer
   so bottom inner space matches top (15px phone, 18px desktop) */
.sl-flow .sl-flow__news .view-footer > p:last-child {
  display: none;
}

/* Centered headings (.center): .center sets a 50% box with left-aligned text,
   which wraps short headings like "Special Features:" off-center on phones */
.path-frontpage main :is(h1, h2, h3).center {
  width: auto !important;
  max-width: 100% !important;
  text-align: center;
  text-wrap: balance;
}
