/* ==========================================================================
   Schoonvermogen — Legal Pages Stylesheet (shared)
   Used by page-privacy.php and page-algemene-voorwaarden.php, and later
   page-cookiebeleid.php. Reuses tokens, .container, .eyebrow and
   .link-arrow from assets/css/home.css. Only legal-page-specific layout
   lives here, fully scoped under .legal-page / .legal-* selectors so
   nothing here can affect any other page, the header, or the footer.

   DESIGN GOAL: these are long, text-heavy documents — readability over
   visual effects. Light background throughout (no dark hero), generous
   line-height, a restrained max reading width, and calm numbered
   section styling. No images, no JS, no animation dependencies.

   No :root-level custom properties are declared anywhere in this file.
   ========================================================================== */

.legal-page { background: var(--white); }

/* --------------------------------------------------------------------------
   1. Compact hero
   -------------------------------------------------------------------------- */
.legal-hero {
	background: var(--grey-light);
	border-bottom: 1px solid var(--grey-border);
	padding-block: clamp(48px, 6vw, 72px);
}

.legal-hero__inner { max-width: 640px; }

.legal-hero__title {
	font-size: clamp(30px, 3.6vw, 42px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--primary);
	margin-bottom: 14px;
}

.legal-hero__intro {
	font-size: 15px;
	line-height: 1.65;
	color: var(--text-body);
	margin-bottom: 14px;
}

.legal-hero__updated {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   2. Layout — TOC + article
   -------------------------------------------------------------------------- */
.legal-layout {
	display: grid;
	grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
	gap: clamp(40px, 5vw, 72px);
	padding-block: clamp(48px, 6vw, 80px);
	align-items: start;
}

/* --------------------------------------------------------------------------
   3. Table of contents
   -------------------------------------------------------------------------- */
.legal-toc {
	position: sticky;
	/* Matches the sticky site-header's approximate rendered height so an
	   anchor jump never lands underneath it. */
	top: calc(88px + 24px);
	max-height: calc(100vh - 88px - 48px);
	overflow-y: auto;
}

.legal-toc__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 16px;
}

.legal-toc__list { display: flex; flex-direction: column; gap: 2px; }

.legal-toc__link {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding-block: 7px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--text-muted);
	border-left: 2px solid transparent;
	padding-left: 12px;
	margin-left: -1px;
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.legal-toc__link:hover,
.legal-toc__link:focus-visible {
	color: var(--primary);
	border-left-color: var(--grey-border);
}

.legal-toc__number {
	flex-shrink: 0;
	font-weight: 700;
	color: var(--accent-dark);
	font-size: 12px;
}

/* --------------------------------------------------------------------------
   4. Article
   -------------------------------------------------------------------------- */
.legal-article { max-width: 720px; }

.legal-section {
	padding-block: clamp(28px, 3vw, 40px);
	border-bottom: 1px solid var(--grey-border);
	/* Keeps an anchor-jumped heading clear of the sticky site-header. */
	scroll-margin-top: calc(88px + 24px);
}

.legal-section:first-child { padding-top: 0; }
.legal-section:last-child { border-bottom: none; padding-bottom: 0; }

.legal-section__heading {
	display: flex;
	align-items: baseline;
	gap: 12px;
	font-size: clamp(19px, 2vw, 22px);
	font-weight: 800;
	line-height: 1.3;
	color: var(--primary);
	margin-bottom: 16px;
}

.legal-section__number {
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--accent-dark);
}

/* Generic long-form content styling, scoped strictly to legal article
   sections — does not touch global h2/h3/p/ul/a. */
.legal-section h3 {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--primary);
	margin-top: 24px;
	margin-bottom: 10px;
}

.legal-section p {
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--text-body);
	margin-bottom: 14px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
	margin: 0 0 14px;
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }

.legal-section li {
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--text-body);
}

.legal-section a {
	color: var(--accent-dark);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.2s var(--ease);
}

.legal-section a:hover { color: var(--primary); }

.legal-section strong { color: var(--primary); font-weight: 700; }

/* --------------------------------------------------------------------------
   5. Bottom contact block
   -------------------------------------------------------------------------- */
.legal-contact {
	background: var(--grey-light);
	border-top: 1px solid var(--grey-border);
	padding-block: clamp(40px, 5vw, 56px);
}

.legal-contact__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.legal-contact__title { font-size: 18px; font-weight: 700; color: var(--primary); margin: 0; }

/* --------------------------------------------------------------------------
   6. Responsive — Tablet (≤ 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.legal-layout { grid-template-columns: 1fr; }

	.legal-toc {
		position: static;
		max-height: none;
		overflow-y: visible;
		margin-bottom: 8px;
		padding-bottom: 24px;
		border-bottom: 1px solid var(--grey-border);
	}

	.legal-toc__list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px 10px;
	}

	.legal-toc__link {
		border: 1px solid var(--grey-border);
		border-radius: var(--radius-pill);
		padding: 8px 14px;
		margin-left: 0;
	}

	.legal-toc__link:hover,
	.legal-toc__link:focus-visible {
		border-color: var(--accent-dark);
	}

	.legal-article { max-width: none; }
}

/* --------------------------------------------------------------------------
   7. Responsive — Mobile (≤ 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
	.legal-toc__list { gap: 6px 8px; }
	.legal-toc__link { font-size: 12.5px; padding: 7px 12px; }

	.legal-section__heading { flex-direction: column; align-items: flex-start; gap: 4px; }

	.legal-contact__inner { flex-direction: column; align-items: flex-start; }
}

/* Legal pages — mobile inhoudsopgave netjes 1 per regel */
@media (max-width: 768px) {

    .legal-page .legal-toc__list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .legal-page .legal-toc__link {
        display: flex !important;
        align-items: baseline !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding: 10px 14px !important;
    }
}

/* ==========================================================================
   Legal pages — final typography & CTA consistency
   ========================================================================== */

/* Inhoudsopgave iets sterker en beter leesbaar */
.legal-page .legal-toc__label {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.legal-page .legal-toc__link {
	font-size: 14px;
	line-height: 1.45;
	gap: 10px;
	padding-block: 8px;
}

/* Werkt zowel met bestaande .legal-toc__number als met <span> */
.legal-page .legal-toc__number,
.legal-page .legal-toc__link > span {
	flex-shrink: 0;
	min-width: 22px;
	font-size: 13px;
	font-weight: 800;
	color: var(--accent-dark);
}


/* Sectiekop */
.legal-page .legal-section__heading {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 18px;
}

/* H2 expliciet stylen — voorkomt verschil tussen juridische templates */
.legal-page .legal-section__heading h2 {
	margin: 0;
	padding: 0;
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--primary);
}

/* 01 / 02 / 03 naast de H2 duidelijker maken */
.legal-page .legal-section__number {
	flex-shrink: 0;
	min-width: 26px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--accent-dark);
}


/* Bodytekst van alle juridische secties */
.legal-page .legal-section p {
	font-size: 16px;
	line-height: 1.75;
	color: var(--text-body);
	margin-bottom: 18px;
}

.legal-page .legal-section li {
	font-size: 16px;
	line-height: 1.7;
}


/* Intro boven de eerste juridische sectie */
.legal-page .legal-intro {
	margin-bottom: 10px;
}

.legal-page .legal-intro p {
	font-size: 16px;
	line-height: 1.75;
	color: var(--text-body);
	margin: 0 0 16px;
}


/* --------------------------------------------------------------------------
   Final contact CTA
   -------------------------------------------------------------------------- */

.legal-page .legal-contact {
	margin-top: 40px;
	padding: 0;
	background: transparent;
	border: 0;
}

.legal-page .legal-contact__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 32px 34px;
	background: var(--grey-light);
	border: 1px solid var(--grey-border);
	border-radius: 16px;
}

.legal-page .legal-contact__inner > div {
	flex: 1 1 420px;
}

.legal-page .legal-contact__inner h2,
.legal-page .legal-contact__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--primary);
}

.legal-page .legal-contact__inner p {
	margin: 0;
	max-width: 560px;
	font-size: 15px;
	line-height: 1.65;
	color: var(--text-body);
}

.legal-page .legal-contact__inner .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 48px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--primary);
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		transform 0.2s var(--ease),
		opacity 0.2s var(--ease);
}

.legal-page .legal-contact__inner .btn:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}


/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {

	.legal-page .legal-section__heading {
		flex-direction: row;
		align-items: baseline;
		gap: 10px;
	}

	.legal-page .legal-section__heading h2 {
		font-size: 22px;
	}

	.legal-page .legal-section__number {
		min-width: 24px;
		font-size: 14px;
	}

	.legal-page .legal-section p,
	.legal-page .legal-section li,
	.legal-page .legal-intro p {
		font-size: 15px;
	}

	.legal-page .legal-contact {
		margin-top: 30px;
	}

	.legal-page .legal-contact__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 22px;
		padding: 26px 22px;
		border-radius: 14px;
	}

	.legal-page .legal-contact__inner > div {
		flex: 0 1 auto;
	}

	.legal-page .legal-contact__inner h2,
	.legal-page .legal-contact__title {
		font-size: 20px;
	}

	.legal-page .legal-contact__inner .btn {
		width: 100%;
		min-height: 48px;
	}
}

/* Disclaimer — hero exact uitlijnen met juridische artikelkolom */
.legal-hero__inner--centered {
	max-width: 720px;
	width: 100%;
	margin-left: calc(240px + clamp(40px, 5vw, 72px));
	margin-right: 0;
}

@media (max-width: 1024px) {
	.legal-hero__inner--centered {
		margin-left: 0;
		margin-right: 0;
	}
}