/* ==========================================================================
   Blog page: "Alle blogartikelen" (hec_blog_list() in includes/devices.php,
   2026-10-15). Compact horizontal cards on the dark band, site palette (dark
   green, lime accent, light text). Mobile first, prefix hg-blog / hg-bcard.
   ========================================================================== */
.hg-blog {
	--hg-dark: var(--e-global-color-sxdark, #0A1D16);
	--hg-dark2: var(--e-global-color-sxdark2, #0E2A20);
	--hg-surface: var(--e-global-color-sxsurface, #133227);
	--hg-border-d: var(--e-global-color-sxborderd, #24473A);
	--hg-text-d: var(--e-global-color-sxtextd, #F3F7F4);
	--hg-muted-d: var(--e-global-color-sxmutedd, #A7B9B0);
	--hg-accent: var(--e-global-color-accent, #BDF967);
	width: 100%;
	color: var(--hg-text-d);
	font-family: var(--f-body, "Inter", sans-serif);
}

/* Header: title left, number of articles right. */
.hg-blog__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	margin: 0 0 20px;
	padding-top: 28px;
	border-top: 1px solid var(--hg-border-d);
}
.hg-blog .hg-blog__title { margin: 0; color: var(--hg-text-d); font-family: "Outfit", "Outfit Fallback", sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.hg-blog .hg-blog__count { margin: 0; color: var(--hg-muted-d); font-size: 15px; font-weight: 500; }
.hg-blog__empty { margin: 0; color: var(--hg-muted-d); }

/* Grid: 1 column on a phone, 2 on a computer. */
.hg-blog__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hg-blog__item { margin: 0; }

/* Card: picture left, text right; the whole card is the link. */
.hg-blog a.hg-bcard {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 10px;
	border: 1px solid color-mix(in srgb, var(--hg-accent) 28%, transparent);
	border-radius: 16px;
	background: var(--hg-dark2);
	color: var(--hg-text-d);
	text-decoration: none;
	box-sizing: border-box;
	transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.hg-blog a.hg-bcard:hover { border-color: var(--hg-accent); background: var(--hg-surface); color: var(--hg-text-d); transform: translateY(-2px); }
.hg-blog a.hg-bcard:focus-visible { outline: 2px solid var(--hg-accent); outline-offset: 3px; }
.hg-bcard__media {
	flex: none;
	width: 112px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: var(--hg-surface);
}
.hg-blog .hg-bcard__media img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; object-fit: cover; object-position: center; }
.hg-bcard__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-width: 0; }
.hg-bcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hg-bcard__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--hg-accent) 16%, transparent);
	color: var(--hg-accent);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}
.hg-bcard__date { color: var(--hg-muted-d); font-size: 13px; line-height: 1.4; }
.hg-blog .hg-bcard__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--hg-text-d);
	font-family: "Outfit", "Outfit Fallback", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

@media (min-width: 768px) {
	.hg-blog__head { margin-bottom: 24px; padding-top: 36px; }
	.hg-blog .hg-blog__title { font-size: 30px; }
	.hg-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.hg-blog a.hg-bcard { gap: 18px; padding: 12px; }
	.hg-bcard__media { width: 176px; aspect-ratio: 16 / 10; border-radius: 12px; }
	.hg-blog .hg-bcard__title { font-size: 17px; -webkit-line-clamp: 2; }
}
@media (min-width: 1100px) {
	.hg-blog__grid { gap: 20px; }
	.hg-blog .hg-bcard__title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.hg-blog a.hg-bcard { transition: none; }
	.hg-blog a.hg-bcard:hover { transform: none; }
}

/* ---- Selected card and preview of the article under the grid ---- */
.hg-blog a.hg-bcard.is-active { border-color: var(--hg-accent); background: var(--hg-surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--hg-accent) 55%, transparent); }
.hg-blog--loading .hg-post-slot { opacity: 0.5; transition: opacity 0.15s ease; }
.hg-post-slot { scroll-margin-top: 96px; }
.hg-blog { scroll-margin-top: 96px; }
.hg-post {
	margin-top: 28px;
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--hg-accent) 35%, transparent);
	border-radius: 20px;
	background: var(--hg-dark2);
	animation: hg-post-in 0.3s ease;
}
@keyframes hg-post-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hg-post__image { max-height: 400px; margin: 0; aspect-ratio: 16 / 7; overflow: hidden; background: var(--hg-surface); }
.hg-blog .hg-post__image img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; object-fit: cover; }
.hg-post__inner { max-width: 760px; margin-inline: auto; padding: 22px 16px 26px; }
.hg-post__inner > .hg-bcard__meta { margin: 0 0 10px; }
.hg-blog .hg-post__title { margin: 0 0 18px; color: var(--hg-text-d); font-family: "Outfit", "Outfit Fallback", sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.hg-post__title:focus { outline: none; }
.hg-post__body { color: var(--hg-muted-d); font-size: 16px; line-height: 1.75; }
.hg-blog .hg-post__body > * + * { margin-top: 1em; }
.hg-blog .hg-post__body p { margin-bottom: 0; }
.hg-post__body strong { color: var(--hg-text-d); }
.hg-blog .hg-post__body a { color: var(--hg-accent); text-decoration: underline; text-underline-offset: 2px; }
.hg-blog .hg-post__body :is(ul, ol) { margin-bottom: 0; padding-inline-start: 1.3em; }
.hg-post__body li + li { margin-top: 6px; }
.hg-post__body li::marker { color: var(--hg-accent); }
.hg-blog .hg-post__body .hg-post__h { margin: 1.6em 0 0.4em; color: var(--hg-text-d); font-family: "Outfit", "Outfit Fallback", sans-serif; font-size: 21px; font-weight: 700; line-height: 1.25; }
.hg-blog .hg-post__body .hg-post__sub { margin: 1.3em 0 0.3em; color: var(--hg-text-d); font-family: "Outfit", "Outfit Fallback", sans-serif; font-size: 17px; font-weight: 700; line-height: 1.3; }
.hg-post__body figure { margin: 1.4em 0; }
.hg-blog .hg-post__body img { display: block; max-width: 100%; height: auto; border: 1px solid var(--hg-border-d); border-radius: 12px; }
.hg-post__body figcaption { margin-top: 8px; color: var(--hg-muted-d); font-size: 14px; }
.hg-post__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.hg-post__body :is(th, td) { padding: 8px 10px; border: 1px solid var(--hg-border-d); text-align: left; }
.hg-post__more { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--hg-border-d); }
.hg-blog a.hg-post__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 54px;
	padding: 14px 34px;
	border-radius: 999px;
	background: var(--hg-accent);
	color: var(--hg-dark);
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s ease;
}
.hg-blog a.hg-post__btn:hover { background: var(--e-global-color-sxaccenth, #AAE84F); color: var(--hg-dark); }
.hg-blog a.hg-post__back { align-self: center; color: var(--hg-text-d); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hg-blog a.hg-post__back:hover { color: var(--hg-accent); }
.hg-blog :is(a.hg-post__btn, a.hg-post__back, .hg-post__body a):focus-visible { outline: 2px solid var(--hg-accent); outline-offset: 3px; }
@media (min-width: 768px) {
	.hg-post__inner { padding: 32px 32px 36px; }
	.hg-blog .hg-post__title { font-size: 30px; }
	.hg-post__body { font-size: 17px; }
	.hg-post__more { flex-direction: row; align-items: center; justify-content: space-between; }
	.hg-blog a.hg-post__back { align-self: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.hg-post { animation: none; }
}
