/* ==========================================================================
   Weblog Moneywise – schone moderne huisstijl (vanilla CSS)
   ========================================================================== */

@font-face {
	font-family: 'Branding';
	src: url('/fonts/Branding-Semilight.woff2') format('woff2');
	font-weight: 300;
	font-display: swap;
}
@font-face {
	font-family: 'Branding';
	src: url('/fonts/Branding-Medium.woff2') format('woff2');
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: 'Branding';
	src: url('/fonts/Branding-Semibold.woff2') format('woff2');
	font-weight: 700;
	font-display: swap;
}

:root {
	--blue: #0077C8;
	--blue-dark: #005a99;
	--accent: #00ACED;
	--navy: #003366;
	--green: #72B533;
	--ink: #16222e;
	--muted: #5b6b7a;
	--line: #e3e9ef;
	--bg: #ffffff;
	--bg-soft: #eef4f9;
	--white: #fff;
	--radius: 14px;
	--radius-sm: 9px;
	--shadow: 0 10px 30px rgba(16, 42, 67, .08);
	--shadow-hover: 0 16px 40px rgba(16, 42, 67, .14);
	--maxw: 1200px;
	--font: 'Branding', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-weight: 300;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	font-size: 17px;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.22; color: var(--navy); margin: 0 0 .5em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
	position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
	padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; border: 0; cursor: pointer; font-family: inherit;
	font-weight: 500; font-size: 16px; padding: 12px 22px; border-radius: 999px;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; box-shadow: var(--shadow); }
.btn-secondary { background: var(--bg-soft); color: var(--navy); }
.btn-secondary:hover { background: #e1ebf3; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; }
.contact-actions .btn { position: relative; display: flex; align-items: center; justify-content: center; }
.contact-actions .btn svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }

.tag {
	display: inline-block; align-self: flex-start; width: fit-content;
	font-size: 12px; font-weight: 500; letter-spacing: .04em;
	text-transform: uppercase; color: var(--blue); background: var(--bg-soft);
	padding: 4px 10px; border-radius: 999px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 50; background: var(--white);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-tag {
	font-weight: 700; color: var(--blue); font-size: 13px;
	text-transform: uppercase; letter-spacing: .12em;
	border-left: 1px solid var(--line); padding-left: 12px; line-height: 1;
}

.topic-nav { margin-left: 8px; margin-right: auto; }
.topic-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.topic-link {
	display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink);
	font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .12s ease, color .12s ease;
}
.topic-link:hover { background: var(--bg-soft); color: var(--navy); }
.topic-link.is-active { background: var(--bg-soft); color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.header-search { display: flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 2px 2px 14px; }
.header-search input {
	border: 0; background: transparent; outline: none; font: inherit; font-size: 14px;
	width: 130px; color: var(--ink);
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
	display: grid; place-items: center; width: 34px; height: 34px; border: 0; cursor: pointer;
	background: var(--blue); color: #fff; border-radius: 999px;
}
.header-search button:hover { background: var(--blue-dark); }

.header-cta {
	flex-shrink: 0; font-weight: 700; color: var(--navy); font-size: 15px; white-space: nowrap;
	padding: 9px 16px; border: 2px solid var(--line); border-radius: 999px;
}
.header-cta:hover { border-color: var(--blue); color: var(--blue); }

.nav-toggle {
	display: none; flex-direction: column; gap: 5px; background: none; border: 0;
	cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ==========================================================================
   Home – hero
   ========================================================================== */
.hero { padding: 32px 0 8px; }
.lead {
	display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
	color: var(--ink); transition: box-shadow .2s ease, transform .2s ease;
}
.lead:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.lead-media { display: block; }
.lead-media img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.lead-body { padding: 32px; display: flex; flex-direction: column; gap: 12px; align-self: center; }
.lead-title { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.lead-excerpt { color: var(--muted); }
.lead-date { font-size: 13px; color: var(--muted); }

.highlights {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px;
}
.highlight {
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column;
	transition: box-shadow .2s ease, transform .2s ease;
}
.highlight:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.highlight-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.highlight .tag { margin: 14px 14px 0; }
.highlight-title { padding: 8px 14px 18px; font-weight: 700; color: var(--navy); font-size: 16px; }

/* ==========================================================================
   Content – feed + rail
   ========================================================================== */
.content { padding: 40px 0 64px; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.section-title { font-size: 22px; margin-bottom: 20px; }

.card-list { display: flex; flex-direction: column; gap: 18px; }
.card {
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-link { display: grid; grid-template-columns: 220px 1fr; color: var(--ink); }
.card-media img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
.card-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1.25; }
.card-excerpt { color: var(--muted); font-size: 15px; }
.card-date { font-size: 13px; color: var(--muted); margin-top: auto; }

.load-more-wrap { text-align: center; margin-top: 32px; }

/* card grid (onderwerp) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid .card-link { grid-template-columns: 1fr; }
.card-grid .card-media img { aspect-ratio: 16/9; min-height: 0; }

.rail { position: sticky; top: 96px; }
.contact-card {
	background: linear-gradient(160deg, var(--navy), #00528c); color: #fff;
	border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.contact-card h2 { color: #fff; font-size: 20px; }
.contact-card p { color: rgba(255, 255, 255, .85); margin: 0 0 18px; }
.contact-card .btn-primary { background: #fff; color: var(--navy); }
.contact-card .btn-primary:hover { background: var(--bg-soft); color: var(--navy); }

.empty { color: var(--muted); padding: 40px 0; }

/* Zoekpagina */
.search-form { display: flex; gap: 10px; max-width: 560px; margin-top: 18px; }
.search-form input {
	flex: 1; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--ink);
	background: var(--white); border: 1px solid var(--line); border-radius: 999px;
}
.search-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.search-summary { color: var(--muted); margin-top: 16px; }

/* Onderwerp-intro (beheerd, anti-cannibalisatie) */
.topic-intro { padding: 8px 0 8px; }
.topic-intro-box {
	background: var(--bg-soft); border-radius: var(--radius); padding: 24px 28px;
	border-left: 4px solid var(--accent);
}
.topic-intro-text { color: var(--ink); max-width: 75ch; }
.topic-intro-text p { margin: 0 0 .8em; }
.topic-intro-text p:last-child { margin-bottom: 0; }
.topic-intro-cta { margin-top: 16px; }

/* ==========================================================================
   Onderwerp / pagina-kop + kruimelpad
   ========================================================================== */
.page-head { padding: 14px 0 8px; }
.page-head h1 { font-size: 34px; margin-top: 6px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs-light, .crumbs-light a { color: rgba(255, 255, 255, .85); }

/* ==========================================================================
   Blog detail
   ========================================================================== */
.post-hero {
	position: relative; background-size: cover; background-position: center; min-height: 380px;
}
.post-hero-overlay {
	position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: 32px;
	background: linear-gradient(to top, rgba(0, 28, 51, .88) 0%, rgba(0, 28, 51, .55) 35%, rgba(0, 28, 51, .12) 70%, rgba(0, 28, 51, 0) 100%);
}
.post-hero .tag { background: rgba(255, 255, 255, .9); }
.post-hero h1 { color: #fff; font-size: 36px; max-width: 880px; margin-top: 12px; }

/* Slanke auteur-byline-balk onder de hero (volle breedte) */
.post-byline { border-bottom: 1px solid var(--line); }
.post-byline-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 20px; }
.post-byline-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-byline-author {
	font-weight: 500; color: var(--navy); font-size: 14px;
	border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--white);
}
.post-byline-author:hover { border-color: var(--blue); color: var(--blue); }
.post-byline-date { font-size: 14px; color: var(--muted); }

.post-layout {
	display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start;
	padding: 32px 20px 64px;
}
.post-main { min-width: 0; }

.post-body { font-size: 18px; }
.post-body p { margin: 0 0 1.2em; }
.post-body h2 { font-size: 26px; margin: 1.6em 0 .5em; scroll-margin-top: 90px; }
.post-body h3 { font-size: 21px; margin: 1.4em 0 .5em; scroll-margin-top: 90px; }
.post-body img { border-radius: var(--radius-sm); margin: 1.4em 0; height: auto; }
.post-body a { color: var(--blue); text-decoration: underline; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-body li { margin-bottom: .4em; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-body th { background: var(--bg-soft); }
.post-body blockquote {
	margin: 1.4em 0; padding: 12px 20px; border-left: 4px solid var(--accent);
	background: var(--bg-soft); border-radius: 0 8px 8px 0; color: var(--navy);
}

/* Legacy WordPress-content: oude Moneywise utility-classes opnieuw stijlen.
   O.a. het "TIP!"-blok: <div class="w100 left bg_grey p10 b1pxGrey br5px"> */
.post-body .bg_grey {
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius-sm);
	padding: 20px 24px;
	margin: 1.8em 0;
	overflow: hidden; /* bevat de zwevende logo */
	box-shadow: var(--shadow);
}
.post-body .bg_grey > b:first-child {
	display: block;
	font-size: 18px;
	color: var(--navy);
	margin-bottom: 10px;
}
.post-body .bg_grey .logo {
	float: right;
	width: 150px;
	height: auto;
	margin: 0 0 12px 24px;
	border-radius: 0;
}
.post-body .bg_grey a { color: var(--blue); }

/* veelgebruikte oude helpers binnen content veilig opvangen */
.post-body .w100 { width: 100%; }
.post-body .left { float: left; }
.post-body .right { float: right; }
.post-body .center { margin-left: auto; margin-right: auto; }

.post-rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.toc h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 6px 0; }
.toc li.h3 { padding-left: 14px; }
.toc a { color: var(--ink); font-size: 15px; }
.toc a:hover { color: var(--blue); }
.toc a.is-active { color: var(--blue); font-weight: 500; }

/* Verwijzingsblok naar moneywise.nl (per onderwerp, beheerd) */
.referral {
	margin: 2.4em 0; padding: 24px 28px; border-radius: var(--radius);
	background: linear-gradient(160deg, var(--navy), #00528c); color: #fff;
}
.referral h2 { color: #fff; font-size: 20px; margin-bottom: 8px; }
.referral-text { color: rgba(255, 255, 255, .9); margin-bottom: 16px; }
.referral-text p:last-child { margin-bottom: 0; }
.referral .btn-primary { background: #fff; color: var(--navy); }
.referral .btn-primary:hover { background: var(--bg-soft); color: var(--navy); }

/* Auteur-biobox (E-E-A-T) */
.author-box {
	display: flex; gap: 20px; align-items: flex-start; margin: 2.4em 0;
	padding: 22px 24px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.author-box-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box-label { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.author-box-name { display: block; font-size: 19px; font-weight: 700; color: var(--navy); margin: 2px 0 8px; }
.author-box-bio { color: var(--ink); margin: 0 0 10px; font-size: 15px; }
.author-box-link { font-weight: 500; font-size: 14px; }

/* "Deze artikelen zijn mogelijk ook interessant" */
.related { margin: 3em 0 0; }
.related h2 { font-size: 22px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-grid .card-link { grid-template-columns: 1fr; }
.related-grid .card-media img { aspect-ratio: 16/9; min-height: 0; }

@media (max-width: 720px) {
	.related-grid { grid-template-columns: 1fr; }
	.author-box { flex-direction: column; }
}

/* ---------- Reacties ---------- */
.reactions { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 32px; }
.reactions h2 { font-size: 22px; }
.reaction-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 32px; }
.reaction { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow); }
.reaction-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.reaction-head strong { color: var(--navy); }
.reaction-head time { font-size: 13px; color: var(--muted); }
.reaction-body { margin: 8px 0; }
.reaction-children { margin: 16px 0 0 24px; padding-left: 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; font-size: 14px; padding: 0; }
.link:hover { text-decoration: underline; }

.reaction-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.reaction-form h3 { font-size: 18px; }
.reaction-form label { display: block; font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 14px; }
.reaction-form input, .reaction-form textarea {
	display: block; width: 100%; margin-top: 6px; padding: 11px 14px; font: inherit; font-size: 16px;
	border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--ink);
}
.reaction-form input:focus, .reaction-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reaction-form-actions { display: flex; gap: 12px; margin-top: 4px; }
.reaction-status { margin: 14px 0 0; font-weight: 500; }
.reaction-status.is-ok { color: var(--green); }
.reaction-status.is-error { color: #d23b3b; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .85); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding: 48px 20px; }
.footer-brand p { color: rgba(255, 255, 255, .7); max-width: 36ch; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social img { width: 28px; height: 28px; }
.footer-col h2 { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 8px 0; }
.footer-col a { color: rgba(255, 255, 255, .8); }
.footer-col a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.footer-legal .container { display: flex; gap: 20px; padding: 16px 20px; flex-wrap: wrap; }
.footer-legal a { color: rgba(255, 255, 255, .7); }

/* ==========================================================================
   Dialog
   ========================================================================== */
.weblog-dialog { border: 0; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-hover); max-width: 420px; }
.weblog-dialog::backdrop { background: rgba(0, 28, 51, .5); }
.weblog-dialog h2 { font-size: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
	.content-grid, .post-layout { grid-template-columns: 1fr; }
	.rail, .post-rail { position: static; }
	.highlights { grid-template-columns: repeat(2, 1fr); }
	.card-grid { grid-template-columns: repeat(2, 1fr); }
	.post-rail { flex-direction: column-reverse; }
}

/* nav klapt in op hamburger zodra de 8 items niet meer comfortabel passen */
@media (max-width: 1024px) {
	.nav-toggle { display: flex; }
	.topic-list {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
		padding: 8px 16px 16px; box-shadow: var(--shadow); z-index: 60;
	}
	.topic-list.is-open { display: flex; }
	.topic-link { padding: 10px 12px; }
	.site-header .container { position: relative; }
}

@media (max-width: 720px) {
	body { font-size: 16px; }
	.header-cta { display: none; }
	.header-search input { width: 0; padding: 0; }
	.lead { grid-template-columns: 1fr; }
	.lead-media img { min-height: 200px; }
	.lead-title { font-size: 22px; }
	.highlights, .card-grid { grid-template-columns: 1fr; }
	.card-link { grid-template-columns: 1fr; }
	.card-media img { aspect-ratio: 16/9; min-height: 0; }
	.post-hero h1 { font-size: 26px; }
	.post-hero { min-height: 260px; }
	.form-row { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
