/* core/group, style "blog-featured": navy intro of the Blog page. Eyebrow + H1, then a Query Loop of the 3 latest posts:
   the first as a large photo card (text over the photo), the other two as photo | text rows; triangles bottom right.
   Card basics are shared with the listing (base.css). Figma: Event Structures Blog › Hero 7026:22982 */

.wp-block-group.is-style-blog-featured {
	padding-block: 1.3125rem 2.375rem;
}

.wp-block-group.is-style-blog-featured::after {
	right: -8.625rem;
}

/* title only (category archives): no triangles */
.wp-block-group.is-style-blog-featured:not(:has(.wp-block-query))::after {
	content: none;
}

.wp-block-group.is-style-blog-featured > .wp-block-query {
	margin-block-start: 1.6875rem;
}

.wp-block-group.is-style-blog-featured .wp-block-post-template {
	gap: 1.25rem;
}

/* posts 2 and 3: photo | text, each half; the text half is square (Figma 640 × 322) */
.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) {
	flex-direction: row;
}

.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) > * {
	flex: 1 1 0;
	min-inline-size: 0;
}

.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) .wp-block-post-featured-image {
	aspect-ratio: auto;
}

.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) > .wp-block-group {
	aspect-ratio: 1;
	padding: 1.875rem;
}

/* post 1: two rows tall, photo fills the card, text over a dark fade at the bottom */
.wp-block-group.is-style-blog-featured .wp-block-post:first-child {
	grid-row: span 2;
	justify-content: flex-end;
	color: var(--wp--preset--color--base);
}

/* photo and fade sit under the text (z-index -1 inside the card, an isolated stacking context: base.css) */
.wp-block-group.is-style-blog-featured .wp-block-post:first-child .wp-block-post-featured-image {
	position: absolute;
	z-index: -1;
	inset: 0;
	aspect-ratio: auto;
}

/* Figma: a dark fade + 5px blur over the bottom half; the mask fades the blur in, so it has no hard top edge */
.wp-block-group.is-style-blog-featured .wp-block-post:first-child::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 50.5% 0 0;
	background: linear-gradient(11.32deg, rgb(0 0 0 / 0.85) 24.87%, transparent 69.61%);
	backdrop-filter: blur(5px);
	mask-image: linear-gradient(to top, black 55%, transparent);
	pointer-events: none;
}

.wp-block-group.is-style-blog-featured .wp-block-post:first-child > .wp-block-group {
	flex: none;
	gap: 0.8125rem;
	padding: 2.75rem;
}

.wp-block-group.is-style-blog-featured .wp-block-post:first-child .wp-block-post-terms a {
	background: var(--wp--preset--color--primary);
}

/* Figma: Karbon SemiBold, one step up from the other cards (re-pointing the preset the title's class reads) */
.wp-block-group.is-style-blog-featured .wp-block-post:first-child .wp-block-post-title {
	--wp--preset--font-size--text-8: var(--wp--preset--font-size--text-7);
	--wp--preset--font-family--heading: var(--wp--preset--font-family--body);
}

.wp-block-group.is-style-blog-featured .wp-block-post:first-child > .wp-block-group > .wp-block-group:last-child {
	border-block-start-color: color-mix(in srgb, currentColor 25%, transparent);
}

@media (width <= 782px) {
	.wp-block-group.is-style-blog-featured {
		padding-block: 1.875rem;
	}

	.wp-block-group.is-style-blog-featured .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
	}

	.wp-block-group.is-style-blog-featured .wp-block-post:first-child {
		grid-row: auto;
		min-block-size: 31.25rem;
	}

	.wp-block-group.is-style-blog-featured .wp-block-post:first-child > .wp-block-group {
		padding: 1.5625rem;
	}

	.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) {
		flex-direction: column;
	}

	.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) .wp-block-post-featured-image {
		flex: none;
		aspect-ratio: 658 / 389;
	}

	.wp-block-group.is-style-blog-featured .wp-block-post:not(:first-child) > .wp-block-group {
		flex: 1;
		aspect-ratio: auto;
		padding: 1.25rem 1.5625rem;
	}
}
