/* --------------------------------------------------------------------------------------------
   Section rhythm (staging, 2026-09-27). Every full-width section block opens and closes with the
   same space: 5rem (3.5rem on phones) between its edge and its content. The audit of the main-
   menu pages found 130–277px instead, from section padding stacked with a heading's 64px top
   margin and a last paragraph's bottom margin. Rules are per block so each block keeps its own
   internal layout; the edges are what change.
   ----------------------------------------------------------------------------------------- */

/* The first heading in a section doesn't add its page-flow top margin to the section padding,
   and the last paragraph doesn't add its bottom margin. */
.entry-content section.alignfull :is(h1, h2, h3):first-child,
.entry-content .alignfull :is(.cards__header, .tabs-block__tabs-nav, .video-section__wrapper, .featured-content__content) > :is(h1, h2, h3):first-child {
  margin-top: 0;
}
.entry-content .alignfull :is(p, ul, ol):last-child {
  margin-bottom: 0;
}

/* Covers (signup and banner sections): spacer blocks inside do the job of the padding, so they
   go and the padding is the same 5rem. */
.entry-content .wp-block-cover.alignfull {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.entry-content .wp-block-cover__inner-container > .wp-block-spacer {
  display: none;
}

/* Tabs (Advising, Values-Based Giving, Donor Intent): was 150px above and 130px below. */
.entry-content .tabs-block .tabs-block__tabs-nav,
.entry-content .tabs-block .tabs-block__tabs-content {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Panels (Advising): was 100px above and 150px below. */
.entry-content section.panels-block.alignfull {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.entry-content section.panels-block .panels-block__title {
  margin-top: 0;
}

/* Card listing (Donor Intent): the header's own 150px on top of the section's 50px. */
.entry-content section.cards__wrapper.alignfull {
  padding-top: calc(5rem - 30px); /* the cards keep their 30px top and bottom margins */
  padding-bottom: calc(5rem - 30px);
}
.entry-content section.cards__wrapper .cards__header {
  padding-top: 0;
}
.entry-content section.cards__wrapper .cards__title {
  margin-top: 0;
}

/* Featured content ("Policy Primer"): the title's 64px top margin. */
.entry-content section.featured-content.alignfull {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.entry-content section.featured-content h2 {
  margin-top: 0;
}

/* Video section: was 100px each side plus the heading's 64px. */
.entry-content .video-section .video-section__wrapper {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.entry-content .video-section .video-section__wrapper h2 {
  margin-top: 0;
}

/* Team cards (Leadership & Staff): was 45px above and 100px + a 60px card margin below. */
.entry-content section.team-cards.alignfull {
  padding-top: 3rem;
  padding-bottom: calc(5rem - 60px);
}

/* Testimonial: the quote's last paragraph margin. */
.entry-content .testimonial .testimonial__quote > :last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 767px) {
  .entry-content .tabs-block .tabs-block__tabs-nav,
  .entry-content .tabs-block .tabs-block__tabs-content,
  .entry-content section.panels-block.alignfull,
  .entry-content section.featured-content.alignfull,
  .entry-content .video-section .video-section__wrapper,
  .entry-content .wp-block-cover.alignfull {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .entry-content section.cards__wrapper.alignfull {
    padding-top: calc(3.5rem - 30px);
    padding-bottom: calc(3.5rem - 30px);
  }
  .entry-content section.team-cards.alignfull {
    padding-bottom: 1rem;
  }
}
