/**
 * News hub, Multiple layout: featured tiles, card grid and pagination.
 * Loaded after news.css (shared hub styles) when the News page layout is Multiple.
 */

.news-hub__featured-title {
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Featured block */
.news-hub__section-head {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.25rem;
}

.news-hub__section-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--amm-text-primary-color, #1a1a1a);
}

.news-hub__section-rule {
	flex: 1;
	height: 1px;
	background: #eee;
}

.news-hub__featured-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.news-hub__featured {
	margin: 0;
	min-width: 0;
}

.news-hub__featured-link {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	height: 100%;
	min-height: 260px;
	overflow: hidden;
	border-radius: var(--news-hub-media-radius);
	background: var(--news-hub-accent);
	color: #fff;
	text-decoration: none;
}

.news-hub__featured-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-hub__featured-link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--amm-palette-secondary-1, #808285);
	mix-blend-mode: multiply;
	pointer-events: none;
}

.news-hub__featured-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.5rem;
}

.news-hub__featured .news-hub__tag {
	margin: 0;
	padding: 0.15rem 0.75rem;
	border-radius: 999px;
	background: var(--amm-palette-secondary-2, #e6edaa);
	color: var(--news-hub-accent);
	font-size: 0.75rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.news-hub__featured-title {
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
}

.news-hub__featured-link:focus-visible {
	outline: 2px solid var(--news-hub-accent);
	outline-offset: 2px;
}

@media (min-width: 900px) {
	.news-hub__featured-grid {
		grid-template-columns: 3fr 2fr;
		grid-template-rows: 1fr 1fr;
	}

	.news-hub__featured--large {
		grid-row: 1 / span 2;
	}

	.news-hub__featured--large .news-hub__featured-link {
		min-height: 516px;
	}

	.news-hub__featured--large .news-hub__featured-title {
		font-size: 1.5rem;
	}

	/* Two posts: equal cards side by side. */
	.news-hub__featured-grid--count-2 {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
	}

	.news-hub__featured-grid--count-2 .news-hub__featured--large {
		grid-row: auto;
	}

	.news-hub__featured-grid--count-2 .news-hub__featured-link {
		min-height: 516px;
	}

	/* One post: a single full-width card. */
	.news-hub__featured-grid--count-1 {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}

	.news-hub__featured-grid--count-1 .news-hub__featured--large {
		grid-row: auto;
	}

	.news-hub__featured-grid--count-1 .news-hub__featured-link {
		min-height: 516px;
	}
}

/* Listing grid */
.news-hub__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.news-hub__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.news-hub__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.news-hub__card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	padding: 1rem;
	border: 1px solid #eee;
	border-radius: 8px;
	background: #fff;
	min-width: 0;
}

.news-hub__card-media {
	display: block;
	aspect-ratio: 382 / 217;
	overflow: hidden;
	border-radius: 8px;
}

.news-hub__card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-hub__card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0 0.5rem 0.5rem;
}

.news-hub__card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.news-hub__card-meta .news-hub__date {
	margin: 0;
	font-size: 0.875rem;
}

.news-hub__pill {
	padding: 0.15rem 0.75rem;
	border-radius: 999px;
	background: var(--amm-palette-secondary-2, #e6edaa);
	color: var(--news-hub-accent);
	font-size: 0.75rem;
}

.news-hub__card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.news-hub__card-title a {
	color: inherit;
	text-decoration: none;
}

.news-hub__card-title a:focus-visible {
	outline: 2px solid var(--news-hub-accent);
	outline-offset: 2px;
}

.news-hub__card-intro {
	margin: 0;
	color: var(--amm-text-secondary-color, #757575);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.news-hub__card .news-hub__read-more {
	margin-top: auto;
}

/* Pagination */
.news-hub__pagination {
	display: flex;
	justify-content: center;
	margin-top: clamp(2rem, 4vw, 3rem);
}

.news-hub__pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-hub__pagination a.page-numbers,
.news-hub__pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

.news-hub__pagination span.page-numbers.current {
	background: var(--news-hub-accent);
	color: #fff;
}

.news-hub__pagination a.page-numbers:focus-visible {
	outline: 2px solid var(--news-hub-accent);
	outline-offset: 2px;
}
