/*
 * News listing (template-news.php): the newsroom pieces on top of the blog
 * listing design (blog-post.css + blog-listing.css). Scoped to
 * body.edge-news-listing so nothing reaches the Blogs or Case Studies pages.
 */

/* ---- Latest News: lead story + headlines -------------------------------- */
body.edge-news-listing .nl-top {
	padding: 80px 0;
	background: #fff;
}

body.edge-news-listing .nl-top__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: 40px;
	align-items: stretch;
}

body.edge-news-listing .nl-lead {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(116, 131, 152, 0.2);
	border-radius: 20px;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.edge-news-listing .nl-lead:hover {
	transform: translateY(-3px);
	box-shadow: 0 22px 44px -28px rgba(10, 22, 40, 0.35);
}

body.edge-news-listing .nl-lead__thumb {
	display: block;
	aspect-ratio: 16 / 8;
	overflow: hidden;
	background: #dfe4ec;
}

body.edge-news-listing .nl-lead__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

body.edge-news-listing .nl-lead:hover .nl-lead__thumb img {
	transform: scale(1.03);
}

body.edge-news-listing .nl-lead__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px 30px 30px;
}

body.edge-news-listing .nl-lead__title {
	margin: 0;
	font-family: var(--blog-display);
	font-size: 28px;
	line-height: 1.25;
	letter-spacing: -0.4px;
}

body.edge-news-listing .nl-lead__title a {
	color: var(--blog-ink);
	text-decoration: none;
}

body.edge-news-listing .nl-lead__title a:hover {
	color: var(--blog-orange);
}

body.edge-news-listing .nl-lead__excerpt {
	margin: 0;
	font-size: 16px;
	line-height: 1.65;
	color: var(--blog-muted);
}

body.edge-news-listing .nl-read {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	margin-top: 4px;
	font-size: 15px;
	font-weight: 600;
	color: var(--blog-orange);
	text-decoration: none;
}

body.edge-news-listing .nl-read:hover .blog-arrow {
	transform: translateX(4px);
}

body.edge-news-listing .nl-read .blog-arrow {
	transition: transform 0.2s ease;
}

/* Dateline: the date first, newsroom style, then the category. */
body.edge-news-listing .nl-dateline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--blog-orange);
}

body.edge-news-listing .nl-dateline > * + * {
	position: relative;
	padding-left: 14px;
	color: var(--blog-muted);
	text-decoration: none;
}

body.edge-news-listing .nl-dateline > * + *::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 4px;
	height: 4px;
	margin-top: -2px;
	border-radius: 50%;
	background: currentColor;
}

body.edge-news-listing .nl-headlines {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 6px 26px;
	list-style: none;
	border-radius: 20px;
	background: var(--blog-panel);
}

body.edge-news-listing .nl-headlines li + li {
	border-top: 1px solid rgba(116, 131, 152, 0.22);
}

body.edge-news-listing .nl-headline {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	padding: 20px 0;
	color: var(--blog-ink);
	text-decoration: none;
}

body.edge-news-listing .nl-headline__thumb {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 12px;
	background: #dfe4ec;
}

body.edge-news-listing .nl-headline__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

body.edge-news-listing .nl-headline__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

body.edge-news-listing .nl-headline__text .nl-dateline {
	font-size: 12px;
}

body.edge-news-listing .nl-headline__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: var(--blog-display);
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
	transition: color 0.18s ease;
}

body.edge-news-listing .nl-headline:hover .nl-headline__title {
	color: var(--blog-orange);
}

/* ---- All News: filters + grid ------------------------------------------- */
body.edge-news-listing .nl-count {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--blog-muted);
}

body.edge-news-listing .nl-filters .nl-filter {
	padding: 11px 22px;
	border: 1px solid var(--blog-orange);
	border-radius: 100px;
	background: #fff;
	font-family: var(--blog-font);
	font-size: 15px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--blog-ink);
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body.edge-news-listing .nl-filters .nl-filter:hover {
	transform: translateY(-2px);
}

body.edge-news-listing .nl-filters .nl-filter[aria-pressed='true'] {
	background: var(--blog-orange);
	color: #fff;
}

body.edge-news-listing .nl-filters .nl-filter:focus-visible {
	outline: 2px solid var(--blog-ink);
	outline-offset: 2px;
}

/* The wrapper only carries the filter data; the card stays the grid item. */
body.edge-news-listing .nl-item {
	display: contents;
}

body.edge-news-listing .nl-item[hidden] {
	display: none;
}

body.edge-news-listing .nl-empty {
	margin: 24px 0 0;
	font-size: 16px;
	color: var(--blog-muted);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1000px) {
	body.edge-news-listing .nl-top {
		padding: 56px 0;
	}

	body.edge-news-listing .nl-top__layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	body.edge-news-listing .nl-lead__title {
		font-size: 24px;
	}
}

@media (max-width: 700px) {
	body.edge-news-listing .nl-lead__body {
		padding: 22px 20px 24px;
	}

	body.edge-news-listing .nl-lead__title {
		font-size: 21px;
	}

	body.edge-news-listing .nl-headlines {
		padding: 4px 18px;
	}

	body.edge-news-listing .nl-headline {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 14px;
		padding: 16px 0;
	}

	body.edge-news-listing .nl-headline__title {
		font-size: 15px;
	}

	body.edge-news-listing .nl-filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-right: -20px;
		padding-right: 20px;
		scrollbar-width: none;
	}

	body.edge-news-listing .nl-filters::-webkit-scrollbar {
		display: none;
	}

	body.edge-news-listing .nl-filters .nl-filter {
		flex: none;
	}
}
