/* ==========================================================
   Newsroom Filter — change colours here to match your theme
   ========================================================== */
.nrf-nav,
.nrf-list {
	--nrf-text: #1a1a1a;
	--nrf-muted: #3a3a3a;
	--nrf-nav-bg: #f4f4f4;
	--nrf-border: #d6d6d6;
	--nrf-accent: #0b95f7;
	--nrf-media-bg: #d9d9d9;
	--nrf-title-lines: 3;
	color: var(--nrf-text);
	box-sizing: border-box;
}
.nrf-nav *,
.nrf-list * { box-sizing: border-box; }
.nrf-nav ul,
.nrf-list ul { list-style: none; margin: 0; padding: 0; }
.nrf-nav li,
.nrf-list li { margin: 0; padding: 0; }
.nrf-nav a,
.nrf-list a { color: inherit; text-decoration: none; box-shadow: none; }
.nrf-nav a:focus-visible,
.nrf-list a:focus-visible,
.nrf-type__toggle:focus-visible,
.nrf-topic__toggle:focus-visible { outline: 2px solid var(--nrf-accent); outline-offset: 3px; }

/* ---------------- [newsroom-nav] ---------------- */
.nrf-nav {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 48px;
	padding: 0 24px;
	background: var(--nrf-nav-bg);
	font-size: 14px;
	line-height: 1.3;
}

.nrf-type { position: relative; flex: 0 0 auto; }
.nrf-type__toggle,
.nrf-topic__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 14px 0;
	background: none;
	border: 0;
	border-radius: 0;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.nrf-type__toggle:hover,
.nrf-type__toggle:focus,
.nrf-topic__toggle:hover,
.nrf-topic__toggle:focus { background: none; color: inherit; }
.nrf-type__chev,
.nrf-topic__chev { flex: 0 0 auto; transition: transform .2s ease; }
.nrf-type.is-open .nrf-type__chev,
.nrf-topic.is-open .nrf-topic__chev { transform: rotate(180deg); }

/* Topic dropdown button is mobile-only */
.nrf-topic { flex: 1 1 auto; min-width: 0; }
.nrf-topic__toggle { display: none; }

.nrf-type__menu {
	position: absolute;
	top: 100%;
	left: -24px;
	z-index: 100;
	min-width: 230px;
	padding: 14px 24px 18px;
	background: #fff;
	border-top: 1px solid var(--nrf-border);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}
.nrf-type__menu[hidden] { display: none !important; }
.nrf-type__menu a { display: block; padding: 9px 0; font-size: 15px; }
.nrf-type__menu a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nrf-type__menu a.is-active { font-weight: 600; }

.nrf-divider { flex: 0 0 auto; width: 1px; height: 24px; background: var(--nrf-border); }

.nrf-topics {
	display: flex;
	flex: 1 1 auto;
	gap: 32px;
	min-width: 0;
	padding: 14px 0;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
}
.nrf-topics::-webkit-scrollbar { display: none; }
.nrf-topics a { display: inline-block; padding: 2px 0; }
.nrf-topics a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nrf-topics a.is-active { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------------- [newsroom-list] ---------------- */
.nrf-list { scroll-margin-top: 120px; transition: opacity .2s ease; }
.nrf-list.is-loading { opacity: .45; pointer-events: none; }

.nrf-list__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 56px;
}
.nrf-list .nrf-list__title { margin: 0; font-size: 32px; font-weight: 500; line-height: 1.2; }
.nrf-list__count { margin: 0; font-size: 16px; color: var(--nrf-muted); white-space: nowrap; }

.nrf-list__items { border-bottom: 1px solid var(--nrf-border); }

/* Card = 3 grid areas so the order can change per breakpoint:
   desktop: meta + content on the left, image on the right
   mobile:  meta → image → content */
.nrf-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "meta" "content";
	column-gap: 48px;
	align-items: start;
	padding: 56px 0;
	border-top: 1px solid var(--nrf-border);
}
.nrf-card.has-media {
	grid-template-columns: minmax(0, 1fr) minmax(220px, 350px);
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"meta    media"
		"content media";
}
.nrf-card__meta    { grid-area: meta; }
.nrf-card__content { grid-area: content; }
.nrf-card__media   { grid-area: media; }

.nrf-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.nrf-card__topic { font-size: 15px; font-weight: 500; }
.nrf-card__badge {
	display: inline-block;
	padding: 8px 11px;
	border: 1px solid var(--nrf-border);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
}

.nrf-card__date { display: block; margin: 20px 0 14px; font-size: 15px; color: var(--nrf-muted); }

.nrf-list .nrf-card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--nrf-title-lines);
	overflow: hidden;
	max-width: 900px;
	margin: 0 0 16px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
}
.nrf-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }

.nrf-card__more { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; }
.nrf-card__more svg { transition: transform .2s ease; }
.nrf-card__more:hover svg { transform: translateX(4px); }

.nrf-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--nrf-media-bg);
}
.nrf-card__media .nrf-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.nrf-card__media.is-video:not(.is-placeholder)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .18);
}
.nrf-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	transform: translate(-50%, -50%);
	transition: transform .2s ease;
}
.nrf-card__media:hover .nrf-card__play { transform: translate(-50%, -50%) scale(1.08); }

.nrf-list__empty { padding: 56px 0; border-top: 1px solid var(--nrf-border); font-size: 17px; }

/* Pagination */
.nrf-pagination { margin-top: 56px; }
.nrf-pagination ul { display: flex; flex-wrap: wrap; gap: 12px; }
.nrf-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 1px solid var(--nrf-text);
	font-size: 17px;
	transition: background-color .15s ease, color .15s ease;
}
.nrf-page:hover { background: var(--nrf-nav-bg); }
.nrf-page.is-active { background: var(--nrf-accent); border-color: var(--nrf-accent); color: #fff; }

/* ---------------- Responsive ---------------- */
@media (max-width: 767px) {
	/* Filter bar → two dropdowns: "Filter by Type ▾ | ALL TOPICS ▾" */
	.nrf-nav { gap: 24px; min-height: 56px; padding: 0 16px; font-size: 15px; }
	.nrf-type,
	.nrf-topic { position: static; flex: 0 1 auto; min-width: 0; }
	.nrf-type__toggle,
	.nrf-topic__toggle { display: inline-flex; max-width: 100%; padding: 17px 0; }
	.nrf-type__label,
	.nrf-topic__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.nrf-divider { height: 28px; }

	/* Both menus open as a full-width panel under the bar */
	.nrf-type__menu,
	.nrf-topic .nrf-topics {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 100;
		min-width: 0;
		max-height: 60vh;
		overflow-y: auto;
		padding: 10px 16px 16px;
		background: #fff;
		border-top: 1px solid var(--nrf-border);
		box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
	}
	.nrf-topic .nrf-topics { display: none; flex-direction: column; gap: 0; white-space: normal; }
	.nrf-topic.is-open .nrf-topics { display: flex; }
	.nrf-topic .nrf-topics a { display: block; padding: 10px 0; font-size: 15px; text-decoration: none; }
	.nrf-topic .nrf-topics a.is-active { font-weight: 600; }

	.nrf-list__head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 36px; }
	.nrf-list .nrf-list__title { font-size: 26px; }

	.nrf-card { padding: 28px 0 36px; }
	.nrf-card.has-media {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
		grid-template-areas: "meta" "media" "content";
	}
	.nrf-card__meta { gap: 16px; }
	.nrf-card__media { margin-top: 20px; aspect-ratio: 16 / 9; }
	.nrf-card__date { margin: 20px 0 10px; }
	.nrf-list .nrf-card__title { font-size: 22px; line-height: 1.3; margin-bottom: 20px; }
	.nrf-page { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.nrf-list,
	.nrf-type__chev,
	.nrf-topic__chev,
	.nrf-card__more svg,
	.nrf-card__play,
	.nrf-page { transition: none; }
}
