/* Project detail page — consistent vertical rhythm between body sections.
   The Labrix case-study components carry mismatched margins (section boxes use
   margin-top:60px, cards add margin-bottom:40px, quotes/rich-text have neither),
   which produces uneven gaps once they are mixed as StreamField blocks. We let a
   uniform wrapper margin own the spacing and neutralise the components' own offsets.
   Scoped to .case-study-entry so nothing else is affected. */

.case-study-entry > div[class*="block-"],
.case-study-entry > h2,
.case-study-entry > .project-cta {
  margin-top: 60px;
}

/* Collaborators body hugs its heading (heading already opens the section). */
.case-study-entry > .project-collaborators {
  margin-top: 0;
}

.case-study-entry > div[class*="block-"]:first-child {
  margin-top: 0;
}

/* These already provide their own top offset — zero it so the wrapper controls
   the gap (avoids 60+60 doubling / margin-collapse surprises). */
.case-study-entry .empowering-agriculture-box,
.case-study-entry .field-trials-box,
.case-study-entry .shaping-future-box {
  margin-top: 0;
}

/* The last stacked card shouldn't trail extra space before the next section. */
.case-study-entry .empowering-box:last-child {
  margin-bottom: 0;
}

@media only screen and (max-width: 991px) {
  .case-study-entry > div[class*="block-"],
  .case-study-entry > h2,
  .case-study-entry > .project-cta {
    margin-top: 40px;
  }
}
