/* =========================================================================
   News listing — the /news/ hub (home.php) and the category archives
   (archive.php), both drawing includes/news-listing.php.
   Scoped to .nw — mobile-first, min-width media queries only.
   Tokens mirror home.css / sector-page.css (Billi Brand Book 2026, with the
   sharper corners agreed after the client review of 27 Aug 2026).
   ========================================================================= */

.nw {
	/* Billi Brand Book 2026 palette */
	--nw-navy: #181d46;      /* Billi Blue — signature colour */
	--nw-lightblue: #90cdeb; /* button hover / accents on navy */
	--nw-grey: #eaeaea;      /* borders, rules */
	--nw-band-grey: #f5f5f5;
	--nw-band-blue: #f1f5f5; /* Green Grey */
	--nw-text: #000;
	--nw-muted: #75757b;
	--nw-gutter: 20px;

	font-family: 'FFDINStd', sans-serif;
	color: var(--nw-text);
	line-height: 1.5;
}

@media (min-width: 900px) {
	.nw { --nw-gutter: 40px; }
}

.nw *,
.nw *::before,
.nw *::after { box-sizing: border-box; }

/* framework.css sets a global `img { width: 100%; max-width: 100% }`. A scoped
   max-width does NOT undo it — the property you do not declare still comes
   from the global rule — so width has to be reset explicitly or every picture
   upscales to its column. */
.nw img {
	max-width: 100%;
	width: auto;
	height: auto;
	display: block;
}

.nw-container {
	width: 100%;
	max-width: 1436px; /* 1356px content + 2 × 40px */
	margin: 0 auto;
	padding-left: var(--nw-gutter);
	padding-right: var(--nw-gutter);
}

.nw-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}


/* ---- Buttons ------------------------------------------------------------
   css/desktop.css:349 carries a global `a:hover { opacity: 0.7 }` that fades
   whole buttons theme-wide, so every button here has to opt out explicitly.
   --nw-navy is also the same hex as the brand blue, so "darken on hover" is a
   no-op: these invert instead. */

.nw .nw-btn {
	display: inline-block;
	padding: 13px 28px;
	border: 0;
	border-radius: 2px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nw .nw-btn:hover,
.nw .nw-btn:focus-visible { opacity: 1; }

.nw .nw-btn--blue { background: var(--nw-navy); color: #fff; }

.nw .nw-btn--blue:hover,
.nw .nw-btn--blue:focus-visible {
	background: #fff;
	color: var(--nw-navy);
	box-shadow: inset 0 0 0 1px var(--nw-navy);
}

/* On the navy CTA panel. */
.nw .nw-btn--light { background: var(--nw-lightblue); color: var(--nw-navy); }

.nw .nw-btn--light:hover,
.nw .nw-btn--light:focus-visible {
	background: #fff;
	color: var(--nw-navy);
	box-shadow: none;
}

.nw .nw-btn--ghost {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nw .nw-btn--ghost:hover,
.nw .nw-btn--ghost:focus-visible {
	background: #fff;
	color: var(--nw-navy);
	box-shadow: none;
}


/* ---- Hero ---------------------------------------------------------------
   Typographic rather than a photograph: the listing's own cards carry the
   photography, and a banner above them competed with the featured card. */

.nw-hero {
	background: var(--nw-navy);
	color: #fff;
	padding: 44px 0 40px;
}

@media (min-width: 900px) {
	.nw-hero { padding: 72px 0 64px; }
}

.nw-hero__eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nw-lightblue);
}

/* The title is an h1, so typography.css sets it in DM Serif Display at 400.
   No font-weight here: the serif has no bold cut, and the 600 this rule
   carried from the DIN era made browsers synthesise one. */
.nw-hero__heading {
	margin: 0;
	font-size: 32px;
	line-height: 1.12;
	color: #fff;
}

@media (min-width: 900px) {
	.nw-hero__heading { font-size: 52px; }
}

.nw-hero__intro {
	margin: 16px 0 0;
	max-width: 62ch;
	font-size: 17px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}


/* ---- Featured ----------------------------------------------------------- */

.nw-featured { padding: 32px 0 0; }

@media (min-width: 900px) {
	.nw-featured { padding: 56px 0 0; }
}

.nw .nw-feature__link {
	display: grid;
	gap: 20px;
	text-decoration: none;
	color: inherit;
	opacity: 1;
}

.nw .nw-feature__link:hover { opacity: 1; }

@media (min-width: 900px) {
	.nw .nw-feature__link {
		grid-template-columns: 1.15fr 1fr;
		gap: 48px;
		align-items: center;
	}
}

.nw-feature__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	background: var(--nw-band-blue);
	/* Grid items default to min-width:auto, which lets a wide picture push the
	   track past the viewport on narrow screens. */
	min-width: 0;
}

.nw-feature__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.nw .nw-feature__link:hover .nw-feature__media img { transform: scale(1.03); }

.nw-feature__body { min-width: 0; }

.nw-feature__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 400;
	color: var(--nw-muted);
}

.nw-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 2px;
	background: var(--nw-navy);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}

.nw-feature__title {
	margin: 0;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	color: var(--nw-navy);
}

@media (min-width: 900px) {
	.nw-feature__title { font-size: 34px; }
}

/* The whole card is a link and the theme sets `a { font-weight: 600 }`
   globally, so the summary inherits semi-bold without this. */
.nw-feature__text {
	margin: 14px 0 0;
	max-width: 56ch;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--nw-muted);
}

.nw-feature__more {
	display: inline-block;
	margin-top: 18px;
	font-size: 15px;
	font-weight: 600;
	color: var(--nw-navy);
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}


/* ---- Filters ------------------------------------------------------------ */

.nw-filters { padding: 32px 0 0; }

@media (min-width: 900px) {
	.nw-filters { padding: 56px 0 0; }
}

.nw-filters__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--nw-grey);
}

.nw .nw-chip {
	display: inline-block;
	padding: 9px 16px;
	border-radius: 2px;
	background: var(--nw-band-grey);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--nw-navy);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nw .nw-chip:hover,
.nw .nw-chip:focus-visible {
	opacity: 1;
	background: var(--nw-lightblue);
	color: var(--nw-navy);
}

.nw .nw-chip.is-active {
	background: var(--nw-navy);
	color: #fff;
}


/* ---- Card grid ---------------------------------------------------------- */

.nw-list { padding: 32px 0 56px; }

@media (min-width: 900px) {
	.nw-list { padding: 48px 0 88px; }
}

.nw-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px 24px;
}

@media (min-width: 640px) {
	.nw-cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
	.nw-cards { grid-template-columns: repeat(3, 1fr); gap: 44px 32px; }
}

.nw-card { min-width: 0; }

.nw .nw-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.nw .nw-card__link:hover { opacity: 1; }

.nw-card__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
	background: var(--nw-band-blue);
}

.nw-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.nw .nw-card__link:hover .nw-card__media img { transform: scale(1.03); }

/* 67 of the 377 published posts have no featured image. A typographic tile
   rather than a placeholder graphic — hand-authored icon paths have shipped
   broken here twice, and a wordmark would repeat down the grid. */
.nw-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 16px;
	background: var(--nw-navy);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--nw-lightblue);
}

.nw-fallback--feature { font-size: 22px; }

.nw-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	margin: 14px 0 0;
	font-size: 13px;
	font-weight: 400;
	color: var(--nw-muted);
}

.nw-card__cat {
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nw-navy);
}

.nw-card__title {
	margin: 8px 0 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--nw-navy);
}

.nw-card__text {
	margin: 8px 0 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--nw-muted);
}


/* ---- Pagination --------------------------------------------------------- */

.nw-pagination { margin-top: 48px; }

.nw-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-pagination__list li { margin: 0; }

.nw .nw-pagination__list .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 2px;
	background: var(--nw-band-grey);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--nw-navy);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nw .nw-pagination__list a.page-numbers:hover,
.nw .nw-pagination__list a.page-numbers:focus-visible {
	opacity: 1;
	background: var(--nw-lightblue);
	color: var(--nw-navy);
}

.nw .nw-pagination__list .page-numbers.current {
	background: var(--nw-navy);
	color: #fff;
}

.nw .nw-pagination__list .page-numbers.dots {
	background: transparent;
	color: var(--nw-muted);
}

/* The prev/next words are noise beside numbers on a phone; the arrows carry
   the meaning. */
.nw-pagination__word { display: none; }

@media (min-width: 640px) {
	.nw-pagination__word { display: inline; }
}


/* ---- Empty state -------------------------------------------------------- */

.nw-empty {
	padding: 48px 0;
	text-align: center;
}

.nw-empty__heading {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--nw-navy);
}

.nw-empty__text {
	margin: 0 0 24px;
	font-size: 16px;
	color: var(--nw-muted);
}


/* ---- Talk to us ---------------------------------------------------------
   The same panel the article template ends on. */

.nw-cta { padding: 0 0 64px; }

@media (min-width: 900px) {
	.nw-cta { padding: 0 0 96px; }
}

.nw-cta__panel {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 32px 24px;
	border-radius: 4px;
	background: var(--nw-navy);
	color: #fff;
}

@media (min-width: 900px) {
	.nw-cta__panel {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 40px;
	}
}

.nw-cta__heading {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
}

.nw-cta__text {
	margin: 0;
	max-width: 52ch;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

.nw-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

@media (min-width: 900px) {
	.nw-cta__actions { flex: 0 0 auto; }
}
