/*
 * News & Insights featured cards (prototype news.html "news-featured"). Pattern cmc/news-featured: a Query Loop of the
 * sticky posts; each card is a Cover using the post's featured image under the "Card scrim" gradient, its copy at the
 * bottom (category badge, title, a rule, date and "Read article"). 2/3 + 1/3 from 1024px, stacked below.
 * From 1024px the row is pulled 602px up into the hero band (news-hero.css): 570px cards leave 32px of band under them.
 * The title link's ::after covers the card (news-card.css), so the whole card is one link.
 */
.wp-block-group.is-style-news-featured {
	position: relative;
}

@media (width >= 1024px) {
	.wp-block-group.is-style-news-featured {
		margin-top: -602px;
		margin-bottom: 32px;
	}
}

.is-style-news-featured .news-featured__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

@media (width >= 1024px) {
	.is-style-news-featured .news-featured__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}
}

.is-style-news-featured .wp-block-cover.news-featured__card {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	height: 100%;
	min-height: 420px;
	padding: 20px;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--navy);
}

@media (width >= 1024px) {
	.is-style-news-featured .wp-block-cover.news-featured__card {
		min-height: 570px;
	}

	.is-style-news-featured .wp-block-post:first-child .wp-block-cover.news-featured__card {
		padding: 40px;
	}
}

/* photo and scrim under the copy (the prototype's -z-10 layers); the copy stays unpositioned so the title link's
   overlay is sized by the card */
.is-style-news-featured .news-featured__card > .wp-block-cover__image-background,
.is-style-news-featured .news-featured__card > .wp-block-cover__background {
	z-index: -1;
}

.is-style-news-featured .news-featured__card > .wp-block-cover__image-background {
	transition: transform 500ms var(--wp--custom--ease);
}

.is-style-news-featured .news-featured__card:is(:hover, :focus-within) > .wp-block-cover__image-background {
	transform: scale(1.05);
}

.is-style-news-featured .wp-block-cover.news-featured__card.has-custom-content-position > .wp-block-cover__inner-container {
	position: static;
	z-index: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	margin: 0;
	color: var(--wp--preset--color--white);
}

.is-style-news-featured .news-featured__card .news-card__title {
	color: var(--wp--preset--color--off-white);
	font-size: var(--wp--preset--font-size--text-4);
	font-weight: 600;
	line-height: 1.1;
}

.is-style-news-featured .wp-block-post:nth-child(n + 2) .news-featured__card .news-card__title {
	font-size: var(--wp--preset--font-size--text-6);
	line-height: 1.2;
}

.is-style-news-featured .news-featured__card .news-card__meta {
	align-items: flex-end;
	margin-top: 0;
	border-top-color: rgb(241 239 236 / 0.3); /* off-white at 30% */
}

.is-style-news-featured .news-featured__card .card-cta::after {
	width: 20px;
	height: 20px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E");
}

.is-style-news-featured .wp-block-post:nth-child(n + 2) .news-featured__card .card-cta::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
	.is-style-news-featured .news-featured__card > .wp-block-cover__image-background {
		transition: none;
	}
}
