/**
 * Homestead What's New section (homepage + /news/ archive).
 */

.homestead-news {
	--homestead-news-radius: 0;
	--homestead-news-shadow: 0 10px 28px rgba(49, 49, 49, 0.1);
	--homestead-news-featured-bg: var(--homestead-stone, #8e9188);
	--homestead-news-card-bg: var(--homestead-warm-linen, #e7ded1);
	--homestead-news-card-border: color-mix(in srgb, var(--homestead-stone, #8e9188) 40%, transparent);
	--homestead-news-date-bg: var(--homestead-warm-linen, #e7ded1);
	--homestead-news-date-fg: var(--wp--preset--color--heading, #000000);
	--homestead-news-more: var(--homestead-stone-dark, #6f7566);
	--homestead-olive-cta: var(--homestead-cta-bg);
	--homestead-olive-cta-hover: var(--homestead-cta-bg-hover);
	--homestead-content-width: 1440px;

	position: relative;
	isolation: isolate;
	scroll-margin-top: 6rem;
	padding-block: clamp(3rem, 6vw, 5rem);
	background-color: var(--homestead-cream, #f5f1e8);
}

.homestead-news__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--homestead-content-width);
	margin-inline: auto;
	padding-inline: clamp(1rem, 2.5vw, 2rem);
	box-sizing: border-box;
}

.homestead-news__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.homestead-news__intro {
	flex: 1 1 16rem;
	min-width: 0;
	max-width: 42rem;
}

.homestead-news__title {
	margin: 0;
	color: var(--wp--preset--color--heading, #000000);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.25rem, 4.5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.homestead-news__lede {
	margin: 0.75rem 0 0;
	color: var(--wp--preset--color--body, #313131);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--homestead-body-size, 1rem);
	font-weight: 400;
	line-height: var(--homestead-body-line, 1.6);
}

.homestead-news__view-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.55rem 1.35rem;
	border-radius: var(--homestead-news-radius);
	background-color: var(--homestead-olive-cta);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.homestead-news__view-all:hover,
.homestead-news__view-all:focus-visible {
	background-color: var(--homestead-olive-cta-hover);
	color: #ffffff;
	text-decoration: none;
}

.homestead-news__view-all:focus-visible {
	outline: 2px solid var(--homestead-olive-cta-hover);
	outline-offset: 3px;
}

.homestead-news__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
	align-items: stretch;
}

.homestead-news__primary,
.homestead-news__secondary {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.homestead-news__secondary {
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.homestead-news__primary .homestead-news-card,
.homestead-news__secondary .homestead-news-card {
	flex: 1 1 auto;
}

.homestead-news__empty {
	margin: 0;
	color: var(--wp--preset--color--body, #313131);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* Shared card */

.homestead-news-card {
	position: relative;
	isolation: isolate;
	display: flex;
	overflow: hidden;
	margin: 0;
	border-radius: var(--homestead-news-radius);
	box-shadow: var(--homestead-news-shadow);
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.homestead-news-card:hover,
.homestead-news-card:focus-within {
	box-shadow: 0 12px 32px rgba(49, 49, 49, 0.14);
}

.homestead-news-card__media {
	margin: 0;
	overflow: hidden;
	line-height: 0;
	background-color: var(--homestead-warm-linen, #e7ded1);
}

.homestead-news-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.35s ease;
}

.homestead-news-card:hover .homestead-news-card__image,
.homestead-news-card:focus-within .homestead-news-card__image {
	transform: scale(1.03);
}

.homestead-news-card__image--placeholder {
	min-height: 12rem;
	background: linear-gradient(
		135deg,
		var(--homestead-warm-linen, #e7ded1) 0%,
		var(--homestead-soft-gray, #b9b8b3) 100%
	);
}

.homestead-news-card__body {
	display: flex;
	box-sizing: border-box;
}

.homestead-news-card__date {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 3.15rem;
	padding: 0.55rem 0.4rem;
	border-radius: var(--homestead-news-radius);
	background-color: var(--homestead-news-date-bg);
	color: var(--homestead-news-date-fg);
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
}

.homestead-news-card__date-month,
.homestead-news-card__date-year {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.homestead-news-card__date-day {
	margin: 0.2rem 0;
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.homestead-news-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.homestead-news-card__permalink {
	color: inherit;
	text-decoration: none;
}

.homestead-news-card__permalink::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.homestead-news-card__permalink:focus-visible {
	outline: none;
}

.homestead-news-card:focus-within {
	outline: 2px solid var(--homestead-stone-dark, #6f7566);
	outline-offset: 3px;
}

.homestead-news-card__excerpt {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 400;
	line-height: 1.55;
}

.homestead-news-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.homestead-news-card__more-arrow {
	transition: transform 0.2s ease;
}

.homestead-news-card:hover .homestead-news-card__more-arrow,
.homestead-news-card:focus-within .homestead-news-card__more-arrow {
	transform: translateX(0.2rem);
}

/* Large featured card */

.homestead-news-card--large {
	flex-direction: column;
	height: 100%;
	background-color: var(--homestead-news-featured-bg);
	color: #ffffff;
}

.homestead-news-card--large .homestead-news-card__media {
	flex: 1 1 auto;
	min-height: 14rem;
	aspect-ratio: 16 / 10;
}

.homestead-news-card--large .homestead-news-card__body {
	flex: 0 0 auto;
	align-items: stretch;
	gap: 1.15rem;
	padding: clamp(1.15rem, 2.2vw, 1.6rem) clamp(1.15rem, 2.2vw, 1.75rem);
}

.homestead-news-card--large .homestead-news-card__date {
	align-self: center;
	background-color: color-mix(in srgb, #ffffff 88%, transparent);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--large .homestead-news-card__rule {
	flex: 0 0 1px;
	align-self: stretch;
	width: 1px;
	background-color: rgba(255, 255, 255, 0.35);
}

.homestead-news-card--large .homestead-news-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
	flex: 1 1 auto;
}

.homestead-news-card--large .homestead-news-card__title {
	font-size: clamp(1.35rem, 2.2vw, 1.85rem);
	color: #ffffff;
}

.homestead-news-card--large .homestead-news-card__excerpt {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
}

.homestead-news-card--large .homestead-news-card__more {
	color: #ffffff;
}

/* Small stacked cards */

.homestead-news-card--small {
	flex-direction: row;
	min-height: 0;
	border: 1px solid var(--homestead-news-card-border);
	background-color: var(--homestead-news-card-bg);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--small .homestead-news-card__media {
	flex: 0 0 46%;
	align-self: stretch;
	min-height: 11rem;
}

.homestead-news-card--small .homestead-news-card__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: clamp(0.9rem, 1.8vw, 1.2rem);
}

.homestead-news-card--small .homestead-news-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	height: 100%;
	min-width: 0;
}

.homestead-news-card--small .homestead-news-card__topline {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
}

.homestead-news-card--small .homestead-news-card__date {
	min-width: 2.75rem;
	padding: 0.45rem 0.3rem;
}

.homestead-news-card--small .homestead-news-card__date-day {
	font-size: 1.3rem;
}

.homestead-news-card--small .homestead-news-card__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: clamp(1.05rem, 1.5vw, 1.3rem);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--small .homestead-news-card__excerpt {
	color: var(--wp--preset--color--body, #313131);
	font-size: 0.9375rem;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.homestead-news-card--small .homestead-news-card__more {
	color: var(--homestead-news-more);
}

@media (max-width: 960px) {
	.homestead-news__layout {
		grid-template-columns: 1fr;
	}

	.homestead-news-card--large .homestead-news-card__media {
		aspect-ratio: 16 / 9;
		min-height: 12rem;
	}

	.homestead-news-card--small {
		min-height: 12rem;
	}
}

@media (max-width: 640px) {
	.homestead-news {
		scroll-margin-top: 5rem;
	}

	.homestead-news__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.homestead-news-card--small {
		flex-direction: column;
	}

	.homestead-news-card--small .homestead-news-card__media {
		flex-basis: auto;
		width: 100%;
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.homestead-news-card--large .homestead-news-card__body {
		flex-wrap: wrap;
	}

	.homestead-news-card--large .homestead-news-card__rule {
		display: none;
	}

	.homestead-news-card--large .homestead-news-card__date {
		align-self: flex-start;
	}

	.homestead-news-card--large .homestead-news-card__copy {
		flex: 1 1 100%;
	}
}

/* What's New archive (/news/) */

.homestead-news--archive {
	padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}

.homestead-news--archive .homestead-news__inner {
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 3vw, 2.25rem);
}

.homestead-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Horizontal featured card */

.homestead-news-card--featured {
	flex-direction: row;
	align-items: stretch;
	background-color: var(--homestead-news-featured-bg);
	color: #ffffff;
}

.homestead-news-card--featured .homestead-news-card__media {
	flex: 0 0 42%;
	width: 42%;
	max-width: 42%;
	min-width: 0;
	aspect-ratio: 1 / 1;
	align-self: center;
}

.homestead-news-card--featured .homestead-news-card__body {
	flex: 1 1 auto;
	min-width: 0;
	align-items: stretch;
	padding: clamp(1.35rem, 2.5vw, 2rem);
}

.homestead-news-card--featured .homestead-news-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	min-width: 0;
	width: 100%;
	height: 100%;
}

.homestead-news-card--featured .homestead-news-card__date {
	align-self: flex-start;
	background-color: color-mix(in srgb, #ffffff 88%, transparent);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--featured .homestead-news-card__title {
	font-size: clamp(1.45rem, 2.4vw, 2.1rem);
	color: #ffffff;
}

.homestead-news-card--featured .homestead-news-card__excerpt {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
}

.homestead-news-card--featured .homestead-news-card__more {
	color: #ffffff;
}

/* Vertical grid cards */

.homestead-news-card--grid {
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--homestead-news-card-border);
	background-color: var(--homestead-news-card-bg);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--grid .homestead-news-card__media {
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 16 / 10;
	min-height: 0;
}

.homestead-news-card--grid .homestead-news-card__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: clamp(0.95rem, 1.8vw, 1.25rem);
}

.homestead-news-card--grid .homestead-news-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	height: 100%;
	min-width: 0;
}

.homestead-news-card--grid .homestead-news-card__topline {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
}

.homestead-news-card--grid .homestead-news-card__date {
	min-width: 2.75rem;
	padding: 0.45rem 0.3rem;
}

.homestead-news-card--grid .homestead-news-card__date-day {
	font-size: 1.3rem;
}

.homestead-news-card--grid .homestead-news-card__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: clamp(1.05rem, 1.5vw, 1.3rem);
	color: var(--wp--preset--color--heading, #000000);
}

.homestead-news-card--grid .homestead-news-card__excerpt {
	color: var(--wp--preset--color--body, #313131);
	font-size: 0.9375rem;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.homestead-news-card--grid .homestead-news-card__more {
	color: var(--homestead-news-more);
}

/* Archive pagination */

.homestead-news-pagination,
.homestead-news--archive .navigation.pagination {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0.5rem 0 0;
}

.homestead-news-pagination .nav-links,
.homestead-news--archive .navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
}

.homestead-news-pagination .page-numbers,
.homestead-news--archive .navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--homestead-stone, #8e9188) 50%, transparent);
	border-radius: var(--homestead-news-radius);
	background-color: var(--homestead-news-card-bg);
	color: var(--wp--preset--color--body, #313131);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-sizing: border-box;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.homestead-news-pagination .page-numbers.prev,
.homestead-news-pagination .page-numbers.next,
.homestead-news--archive .navigation.pagination .page-numbers.prev,
.homestead-news--archive .navigation.pagination .page-numbers.next {
	min-width: 0;
	padding-inline: 0.9rem;
}

.homestead-news-pagination .page-numbers:hover,
.homestead-news-pagination .page-numbers:focus-visible,
.homestead-news--archive .navigation.pagination .page-numbers:hover,
.homestead-news--archive .navigation.pagination .page-numbers:focus-visible {
	border-color: var(--homestead-olive-cta);
	color: var(--homestead-olive-cta);
	text-decoration: none;
}

.homestead-news-pagination .page-numbers:focus-visible,
.homestead-news--archive .navigation.pagination .page-numbers:focus-visible {
	outline: 2px solid var(--homestead-olive-cta);
	outline-offset: 3px;
}

.homestead-news-pagination .page-numbers.current,
.homestead-news--archive .navigation.pagination .page-numbers.current {
	border-color: var(--homestead-olive-cta);
	background-color: var(--homestead-olive-cta);
	color: #ffffff;
}

.homestead-news-pagination .page-numbers.dots,
.homestead-news--archive .navigation.pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: 1.5rem;
	padding-inline: 0.25rem;
}

@media (max-width: 960px) {
	.homestead-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.homestead-news-card--featured {
		flex-direction: column;
	}

	.homestead-news-card--featured .homestead-news-card__media {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
		aspect-ratio: 1 / 1;
		align-self: stretch;
	}
}

@media (max-width: 640px) {
	.homestead-news__grid {
		grid-template-columns: 1fr;
	}

	.homestead-news-pagination .nav-links,
	.homestead-news--archive .navigation.pagination .nav-links {
		gap: 0.4rem;
	}

	.homestead-news-pagination .page-numbers,
	.homestead-news--archive .navigation.pagination .page-numbers {
		min-width: 2.25rem;
		min-height: 2.25rem;
		font-size: 0.875rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.homestead-news__view-all,
	.homestead-news-card,
	.homestead-news-card__image,
	.homestead-news-card__more-arrow,
	.homestead-news-pagination .page-numbers,
	.homestead-news--archive .navigation.pagination .page-numbers {
		transition: none;
	}

	.homestead-news-card:hover .homestead-news-card__image,
	.homestead-news-card:focus-within .homestead-news-card__image {
		transform: none;
	}

	.homestead-news-card:hover .homestead-news-card__more-arrow,
	.homestead-news-card:focus-within .homestead-news-card__more-arrow {
		transform: none;
	}
}
