/**
 * Block editor content rhythm
 * Top-level Gutenberg blocks are wrapper elements — reset + base typography
 * do not space them apart, so we establish vertical flow here.
 */

.entry-content,
.blog-content.entry-content {
	--entry-block-gap: clamp(1.25rem, 2.5vw, 1.75rem);
	--entry-section-gap: clamp(2rem, 4vw, 3rem);
}

/* Collapse per-element margins; stack blocks with a consistent top offset. */
.entry-content > *,
.blog-content.entry-content > *,
.entry-content .wp-block-column > *,
.entry-content .wp-block-group.is-layout-flow > *,
.entry-content .wp-block-group__inner-container > * {
	margin-top: 0;
	margin-bottom: 0;
}

.entry-content > * + *,
.blog-content.entry-content > * + *,
.entry-content .wp-block-column > * + *,
.entry-content .wp-block-group.is-layout-flow > * + *,
.entry-content .wp-block-group__inner-container > * + * {
	margin-block-start: var(--entry-block-gap);
}

/* Section-level blocks get extra breathing room. */
.entry-content > * + :is(h2, h3),
.blog-content.entry-content > * + :is(h2, h3),
.entry-content > * + .wp-block-columns,
.entry-content > * + .wp-block-group,
.entry-content > * + .wp-block-cover,
.entry-content > * + .mtp-ph-post-feed,
.entry-content > * + .mtp-ph-callout,
.entry-content .wp-block-column > * + :is(h2, h3) {
	margin-block-start: var(--entry-section-gap);
}

.entry-content > * + h3,
.blog-content.entry-content > * + h3,
.entry-content .wp-block-column > * + h3 {
	margin-block-start: calc(var(--entry-section-gap) * 0.75);
}

/* Page title → content */
.page-header {
	margin-bottom: var(--entry-section-gap);
}

.page-header .page-title {
	margin-bottom: 0;
}

/* Paragraphs inside blocks inherit flow spacing; avoid doubling with base p margins. */
.entry-content > .wp-block-paragraph p,
.entry-content .wp-block-column .wp-block-paragraph p {
	margin-bottom: 0;
}

/* ---------- Gutenberg buttons ---------- */
/* base.css sets all links to dark text on hover — keep button labels readable. */
.wp-block-button__link,
.wp-block-button__link:visited {
	color: var(--brand-white);
	text-decoration: none;
	transition: filter 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-block-button__link:active {
	color: var(--brand-white);
	text-decoration: none;
	filter: brightness(1.08);
}

.wp-block-button__link:focus-visible {
	outline: 2px solid var(--brand-mint);
	outline-offset: 2px;
}
