/**
 * Mijn Heeze Nieuws — front-end styling
 * Bewust neutraal en zelfstandig, zodat het in elk thema netjes oogt.
 */

.mhn {
	--mhn-accent: #1d5fb8;
	--mhn-ink: #1a1a1e;
	--mhn-muted: #6a6f78;
	--mhn-line: #e6e7ea;
	--mhn-card: #ffffff;
	--mhn-radius: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--mhn-ink);
	box-sizing: border-box;
	max-width: 100%;
}

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

.mhn__heading {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--mhn-accent);
	display: inline-block;
}

/* ---- Lijst-container ---- */
.mhn__list {
	display: grid;
	gap: 1.25rem;
}

.mhn--grid.mhn--cols-2 .mhn__list { grid-template-columns: repeat(2, 1fr); }
.mhn--grid.mhn--cols-3 .mhn__list { grid-template-columns: repeat(3, 1fr); }
.mhn--grid.mhn--cols-4 .mhn__list { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.mhn--grid .mhn__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.mhn--grid .mhn__list { grid-template-columns: 1fr; }
}

/* ---- Kaart ---- */
.mhn__card {
	background: var(--mhn-card);
	border: 1px solid var(--mhn-line);
	border-radius: var(--mhn-radius);
	overflow: hidden;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.mhn__card:hover {
	box-shadow: 0 10px 28px rgba(20, 24, 40, 0.12);
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--mhn-accent) 30%, var(--mhn-line));
}

.mhn__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.mhn__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f1f2f4;
}

.mhn__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.mhn__card:hover .mhn__img {
	transform: scale(1.04);
}

.mhn__body {
	padding: 0.95rem 1.05rem 1.1rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.mhn__meta {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-bottom: 0.5rem;
}

.mhn__cat {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mhn-accent);
	background: color-mix(in srgb, var(--mhn-accent) 10%, #fff);
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
}

.mhn__date {
	font-size: 0.78rem;
	color: var(--mhn-muted);
}

.mhn__title {
	font-size: 1.05rem;
	line-height: 1.3;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--mhn-ink);
	text-wrap: pretty;
}

.mhn__excerpt {
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--mhn-muted);
	margin: 0 0 0.85rem;
}

.mhn__more {
	margin-top: auto;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--mhn-accent);
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.mhn__more::after {
	content: "→";
	transition: transform 0.18s ease;
}

.mhn__card:hover .mhn__more::after {
	transform: translateX(3px);
}

/* ---- Lijst-variant ---- */
.mhn--lijst .mhn__list {
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

.mhn--lijst .mhn__link {
	flex-direction: row;
	align-items: stretch;
}

.mhn--lijst .mhn__media {
	flex: 0 0 34%;
	max-width: 220px;
	aspect-ratio: 4 / 3;
}

.mhn--lijst .mhn__body {
	justify-content: center;
}

@media (max-width: 560px) {
	.mhn--lijst .mhn__link { flex-direction: column; }
	.mhn--lijst .mhn__media { flex-basis: auto; max-width: none; aspect-ratio: 16 / 9; }
}

/* ---- Compact-variant ---- */
.mhn--compact .mhn__list {
	grid-template-columns: 1fr;
	gap: 0;
}

.mhn--compact .mhn__card {
	border: none;
	border-bottom: 1px solid var(--mhn-line);
	border-radius: 0;
	background: transparent;
}

.mhn--compact .mhn__card:hover {
	box-shadow: none;
	transform: none;
	background: color-mix(in srgb, var(--mhn-accent) 4%, #fff);
}

.mhn--compact .mhn__link {
	flex-direction: row;
	align-items: center;
	gap: 0.8rem;
	padding: 0.65rem 0.4rem;
}

.mhn--compact .mhn__media {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	aspect-ratio: 1;
	border-radius: 8px;
}

.mhn--compact .mhn__body {
	padding: 0;
}

.mhn--compact .mhn__title {
	font-size: 0.95rem;
	margin: 0.1rem 0 0;
}

.mhn--compact .mhn__more {
	display: none;
}

/* ---- Voettekst ---- */
.mhn__footer {
	margin-top: 1.3rem;
	text-align: center;
}

.mhn__source {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background: var(--mhn-accent);
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	transition: filter 0.18s ease;
}

.mhn__source:hover {
	filter: brightness(0.92);
}

/* ---- Status ---- */
.mhn--error,
.mhn--empty {
	padding: 1rem 1.2rem;
	border: 1px dashed var(--mhn-line);
	border-radius: var(--mhn-radius);
	color: var(--mhn-muted);
	font-size: 0.9rem;
}
