/**
 * Homepage — Latest stories grid
 *
 * @package Ncmaz_FSE_Child
 */

/* --- Latest stories (4-up) --- */

.ncmaz-home-stories__head {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: var(--wp--preset--spacing--10, 1.25rem) !important;
}

.ncmaz-home-stories__title {
	margin: 0 !important;
}

.ncmaz-home-stories__all {
	margin: 0 0 0.15rem !important;
	flex: 0 0 auto;
}

.ncmaz-home-stories__all a {
	font-family: var(--ncmaz-font-body, "new-rubrik-edge", sans-serif);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ncmaz-home-stories__all a:hover,
.ncmaz-home-stories__all a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ncmaz-home-latest-query {
	--nc-archive-card-image-radius: 2px;
}

.ncmaz-home-latest-query .wp-block-post-template {
	gap: clamp(1rem, 2vw, 1.35rem) !important;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive {
	gap: 0.65rem !important;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__media .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 2px;
	background: #e4e4e7;
	aspect-ratio: 16 / 10 !important;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__media .wp-block-post-featured-image img,
.ncmaz-home-latest-query .ncmaz-post-card-archive__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 2px !important;
	transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ncmaz-home-latest-query .ncmaz-post-card-archive:hover .ncmaz-post-card-archive__media img,
.ncmaz-home-latest-query .ncmaz-post-card-archive:focus-within .ncmaz-post-card-archive__media img {
	transform: scale(1.03);
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding-top: 0.1rem;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-date {
	font-size: 0.6875rem !important;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #52525b !important;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-title {
	font-family: var(--ncmaz-font-heading, "magistral-condensed", sans-serif) !important;
	font-weight: 700 !important;
	font-size: clamp(0.975rem, 1.2vw, 1.1rem) !important;
	line-height: 1.2 !important;
	text-wrap: balance;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-title a:hover,
.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-title a:focus-visible {
	color: #288aa5;
}

.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: var(--ncmaz-font-body, "new-rubrik-edge", sans-serif);
	font-size: 0.75rem;
	font-weight: 300;
	line-height: 1.45;
	color: #3a3a42;
}

@media (min-width: 782px) and (max-width: 1100px) {
	.ncmaz-home-latest-query .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

html.dark .ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-date {
	color: #a1a1aa !important;
}

html.dark .ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-excerpt {
	color: #a1a1aa;
}

@media (max-width: 781px) {
	.ncmaz-home-latest-query .wp-block-post-template {
		grid-template-columns: 1fr !important;
		gap: 1.5rem !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ncmaz-home-stories__all a,
	.ncmaz-home-latest-query .ncmaz-post-card-archive__media img,
	.ncmaz-home-latest-query .ncmaz-post-card-archive__body .wp-block-post-title a {
		transition: none;
	}

	.ncmaz-home-latest-query .ncmaz-post-card-archive:hover .ncmaz-post-card-archive__media img,
	.ncmaz-home-latest-query .ncmaz-post-card-archive:focus-within .ncmaz-post-card-archive__media img {
		transform: none;
	}
}
