/**
 * PG5 Events: page-level spacing only (page 8; `lts-events-page` is the class on templates/page-events.html's <main>).
 * The whole page is post_content (seed 230), so every seam is `.lts-events-page .entry-content > ...`. The patterns own
 * everything inside their sections (the events sections' own rhythm is lts-events.css). Figma Review Events 210:5614
 * distances, set as rect distances (y values are the frame's; hero top = 121):
 *  - hero bottom 630 -> "Three ways" title text 741: 111.
 *  - "Three ways" title bottom 791 -> cards 850: 59.
 *  - cards bottom 1083 -> "Next up" title text 1219: 136.
 *  - SEE MORE bottom 2984 -> FAQ band top 3100: 116.
 *  - FAQ bottom 3658 -> "What should we teach next?" frame 3686: 28.
 *  - teach-next frame bottom 4304 -> newsletter card top 4370: 66 (the band carries 72 of its own top padding, reset here).
 *  - newsletter card bottom 4701 -> footer 4840: 139 (the band leaves 80).
 * Desktop only (width > 1024px); below it the parent's section gap (--kd-section-gap) and the patterns' own paddings apply
 * (derived: no tablet / mobile frames).
 */

@media (width > 1024px) {
	.lts-events-page .entry-content > .lts-hero-split + .lts-section-header {
		margin-block-start: 6.9375rem;
	}

	/* The section-header partial states its margins with !important (lts-section-header.css), so the page seam must too;
	   the extra class in the selector wins. */
	.lts-events-page
		.entry-content
		> .lts-section-header.kd-section-header.kd-section:has(
			+ .lts-sidebar-cards
		) {
		margin-block-end: 3.6875rem !important;
	}

	.lts-events-page .entry-content > .lts-sidebar-cards + .lts-events-next {
		margin-block-start: 8.5rem;
	}

	/* When "Upcoming" drops out (no event after "Next up": it is hide-when-empty, display none, and still the adjacent sibling), the
	   FAQ sits 116 under the "Next up" card instead: the same 116 the Upcoming section keeps under that card. */
	.lts-events-page .entry-content > .lts-events-upcoming + .lts-faq-band {
		margin-block-start: 7.25rem;
	}

	/* The Events FAQ band is 558 high in Figma, with 137 below the last row. The build's rows run about 5 taller above that
	   (the open row is 8 taller, P9 sets the answer at 16px against Figma's 15.2; the others are 1 shorter), so the band
	   comes out about 5 taller than 558: the seam to the next section is measured from the band's bottom edge. */
	.lts-events-page .entry-content > .lts-faq-band {
		padding-block-end: 8.5625rem; /* 137 */
	}

	.lts-events-page .entry-content > .lts-faq-band + .lts-split-circle {
		margin-block-start: 1.75rem;
	}

	.lts-events-page .entry-content > .lts-newsletter {
		padding-block: 4.125rem 8.6875rem; /* 66 / 139 */
	}
}

/* The parent's section gap (120) would sit on top of the band's own padding at every width, so it is reset everywhere; below
   1025 the band keeps its own paddings. */
.lts-events-page .entry-content > .lts-newsletter {
	margin-block-start: 0;
}
