/* Rijschool Wim Trip — thema
 * Beeldtaal: Nederlandse verkeersborden. Bordblauw met witte binnenrand, wegwijzerletter (Overpass), asfalt en beton.
 */
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
	--blue: #1E4BA6;       /* bordblauw */
	--blue-d: #163A85;
	--blue-tint: #E9EEF8;
	--ink: #22262D;        /* asfalt */
	--asphalt: #2A2E35;
	--muted: #5A6170;
	--concrete: #EEF0F3;   /* beton */
	--line: #D8DCE3;
	--yellow: #FFC61A;     /* signaalgeel */
	--white: #fff;
	--radius: 12px;
	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 76px;
	--font: "Overpass", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--cms-offset, 0px) + 16px); }
body { margin: 0; font: 400 17px/1.6 var(--font); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-d); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.sign :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.12; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 28px; }
.section-title.small { font-size: 1.35rem; margin-bottom: 18px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Bord (pictogram in bordblauw met witte binnenrand) ---------- */
.road-sign { display: inline-grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 12px; color: #fff; background: var(--blue);
	box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 7px #fff; }
.road-sign .picto { width: 76%; height: 76%; margin-top: -4%; }
.road-sign-lg { width: 64px; height: 64px; border-radius: 11px; }
.road-sign-sm { width: 40px; height: 40px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 4px #fff; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
	font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn-icon { width: 18px; height: 18px; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--yellow); color: var(--ink); }
.btn-outline { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.12); color: #fff; }
.btn-blue, .btn-primary, .prose .btn { background: var(--blue); color: #fff; }
.btn-blue:hover, .btn-primary:hover, .prose .btn:hover { background: var(--blue-d); color: #fff; }
.btn-outline-blue { border-color: var(--blue); color: var(--blue); }
.btn-outline-blue:hover { background: var(--blue-tint); }
.btn-block { width: 100%; }

/* ---------- Kop ---------- */
.site-header { position: sticky; top: var(--cms-offset, 0px); z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { display: block; height: 46px; width: auto; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
	display: flex; align-items: center; gap: 6px; height: var(--header-h); padding: 0 12px; border: 0; background: none; cursor: pointer;
	font: 600 1rem/1 var(--font); color: var(--ink); text-decoration: none; position: relative; }
.main-nav > ul > li > a::after, .main-nav > ul > li > button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px; background: transparent; border-radius: 2px 2px 0 0; }
.main-nav > ul > li.active > a::after, .main-nav > ul > li.active > button::after { background: var(--blue); }
.main-nav > ul > li > a:hover, .main-nav > ul > li > button:hover { color: var(--blue); }
.main-nav button svg { width: 12px; height: 8px; transition: transform .15s; }
.main-nav button[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub { position: absolute; top: calc(100% - 6px); left: 0; min-width: 250px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 0 14px 32px rgba(34,38,45,.14); display: none; }
.has-sub > button[aria-expanded="true"] + .sub { display: block; }
@media (hover: hover) and (min-width: 961px) { .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; } }
.sub a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.sub a:hover, .sub .active a { background: var(--blue-tint); color: var(--blue); }
.sub-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--blue); color: #fff; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.5px #fff; flex: none; }
.sub-icon .picto { width: 26px; height: 26px; margin-top: -2px; }
.call { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 10px; background: var(--yellow); color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
.call:hover { background: #ffd451; color: var(--ink); }
.call-icon { width: 18px; height: 18px; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
	:root { --header-h: 66px; }
	.brand img { height: 38px; }
	.menu-toggle { display: grid; place-items: center; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--concrete); cursor: pointer; }
	.menu-toggle span:first-child, .menu-toggle span:first-child::before, .menu-toggle span:first-child::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s; }
	.menu-toggle span:first-child::before, .menu-toggle span:first-child::after { content: ""; position: absolute; left: 0; }
	.menu-toggle span:first-child::before { top: -6px; } .menu-toggle span:first-child::after { top: 6px; }
	.menu-toggle[aria-expanded="true"] span:first-child { background: transparent; }
	.menu-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(6px) rotate(45deg); }
	.menu-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-6px) rotate(-45deg); }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 12px var(--gutter) 24px;
		background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(34,38,45,.12); max-height: calc(100vh - var(--header-h) - var(--cms-offset, 0px)); overflow-y: auto; }
	.main-nav.open { display: flex; }
	.main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav > ul > li > a, .main-nav > ul > li > button { height: auto; padding: 14px 4px; width: 100%; justify-content: space-between; font-size: 1.1rem; border-bottom: 1px solid var(--concrete); }
	.main-nav > ul > li > a::after, .main-nav > ul > li > button::after { display: none; }
	.main-nav > ul > li.active > a { color: var(--blue); }
	.sub { position: static; box-shadow: none; border: 0; padding: 4px 0 8px; min-width: 0; }
	.call { justify-content: center; padding: 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--blue-d); overflow: hidden; }
.hero-img { display: block; width: 100%; height: clamp(440px, 62vh, 580px); object-fit: cover; object-position: 30% 40%; }
.hero-inner { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: clamp(28px, 5vw, 56px); pointer-events: none; }
.sign { pointer-events: auto; width: min(540px, 100%); padding: 34px 36px 32px; border-radius: 16px; color: #fff; background: var(--blue);
	box-shadow: inset 0 0 0 5px var(--blue), inset 0 0 0 9px #fff, 0 24px 60px rgba(10,25,60,.35); }
.sign h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.04; margin-bottom: 14px; }
.sign-text { font-size: 1.15rem; line-height: 1.5; color: rgba(255,255,255,.92); margin-bottom: 24px; }
.sign-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) {
	.hero-img { height: 240px; object-position: 22% 30%; }
	.hero-inner { position: static; padding: 0; display: block; }
	.sign { width: auto; border-radius: 0; padding: 30px var(--gutter) 34px; box-shadow: none; }
	.sign-actions .btn { flex: 1 1 100%; }
}

/* ---------- Rijbewijzen ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; padding: 24px 22px 22px; border: 1px solid var(--line); border-radius: 14px;
	color: var(--ink); text-decoration: none; transition: border-color .15s, background-color .15s; }
.tile:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--ink); }
.tile .road-sign { margin-bottom: 8px; }
.tile-name { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.tile-text { color: var(--muted); font-size: .98rem; line-height: 1.5; flex: 1; }
.tile-more { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 1020px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
	.tiles { grid-template-columns: 1fr; gap: 12px; }
	.tile { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 4px; padding: 16px; }
	.tile .road-sign { grid-row: span 3; width: 64px; height: 64px; margin: 0; }
}

/* ---------- Intro + contactkaart ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.is-home .intro { border-top: 1px solid var(--line); }
.cta-card { background: var(--concrete); border-radius: 16px; padding: 28px; position: sticky; top: calc(var(--header-h) + var(--cms-offset, 0px) + 24px); }
.cta-title { font-size: 1.5rem; margin-bottom: 10px; }
.cta-card > p { color: var(--muted); }
.cta-phones { list-style: none; margin: 18px 0 20px; padding: 0; display: grid; gap: 2px; }
.cta-phones a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.cta-phones a:hover { background: #fff; color: var(--blue); }
.cta-phones strong { font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; }
.cta-phones small { color: var(--muted); font-size: .9rem; margin-left: 4px; }
.li-icon { width: 20px; height: 20px; flex: none; color: var(--blue); }
.cta-hours, .cta-line { display: flex; gap: 12px; margin: 18px 0 0; font-size: .95rem; color: var(--muted); }
.cta-line { color: var(--ink); margin-top: 16px; }
.cta-hours .li-icon, .cta-line .li-icon { margin-top: 2px; }
@media (max-width: 900px) {
	.intro, .page-body { grid-template-columns: 1fr !important; }
	.cta-card { position: static; }
}

/* ---------- Subpagina ---------- */
.page-head { background: var(--concrete); padding: clamp(28px, 4vw, 48px) 0 clamp(26px, 3.5vw, 40px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.title-row { display: flex; align-items: center; gap: 20px; }
.title-row h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.meta { margin: 10px 0 0; color: var(--muted); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-size: .85rem; font-weight: 600; }
.page-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 80px); align-items: start; padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 88px); }
.news-image { border-radius: var(--radius); margin-bottom: 24px; }
.other-cats { padding-top: 0; }
.mini-tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.mini-tiles a { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.mini-tiles a:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.notice { margin-top: 20px; padding: 14px 18px; border-radius: 10px; background: #E3F3EA; color: #11502F; }

/* ---------- Tekstopmaak ---------- */
.prose { max-width: 70ch; font-size: 1.06rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 .55em; }
.prose h3 { font-size: 1.25rem; margin: 1.7em 0 .5em; }
.prose h2 + h3, .prose h3 + h3 { margin-top: .6em; }
.prose strong { font-weight: 800; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; padding-left: .2em; }
.prose ul li::marker { color: var(--blue); }
.prose ol li::marker { color: var(--blue); font-weight: 800; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--yellow); font-size: 1.1rem; }
.prose img { border-radius: 10px; margin: .4em 0 1em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; margin: 0 0 1.4em; width: 100%; max-width: 520px; }
.prose td, .prose th { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.prose .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.page-content .prose { max-width: none; }
.page-content .prose > *:not(.cols):not(form) { max-width: 70ch; }
@media (max-width: 1100px) { .prose .cols { grid-template-columns: 1fr; } }
.page-body .prose .cols { grid-template-columns: 1fr; }

/* ---------- Formulier ---------- */
.cms-form { margin: 1.6em 0 0; padding: clamp(20px, 3vw, 32px); background: var(--concrete); border-radius: 16px; max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-bottom: 18px; }
.form-field { display: grid; gap: 6px; }
.form-field.wide { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: .95rem; }
.form-field .req { color: var(--blue); }
.cms-form input, .cms-form select, .cms-form textarea { width: 100%; font: 400 1rem/1.4 var(--font); color: var(--ink); background: #fff; border: 1px solid #C5CBD4; border-radius: 10px; padding: 12px 14px; min-height: 50px; }
.cms-form textarea { resize: vertical; min-height: 130px; }
.cms-form input:focus, .cms-form select:focus, .cms-form textarea:focus { outline: 3px solid rgba(30,75,166,.35); border-color: var(--blue); }
.has-error input, .has-error select, .has-error textarea { border-color: #C0362C; }
.field-error { color: #B32D24; font-size: .9rem; }
.form-error { margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; background: #FCE9E7; color: #8C221B; }
.form-success { margin: 1.6em 0; padding: 20px 24px; border-radius: 14px; background: #E3F3EA; color: #11502F; }
.form-note { font-size: .9rem; color: var(--muted); }
.form-missing { color: #B32D24; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .cms-form .btn { width: 100%; } }

/* ---------- Nieuws ---------- */
.news-items { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card { display: grid; gap: 8px; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.news-card:hover { border-color: var(--blue); }
.news-card img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.news-card time { color: var(--muted); font-size: .9rem; }
.news-card h2 { font-size: 1.3rem; }
.news-card p { margin: 0; color: var(--muted); }
.pager { display: flex; gap: 12px; }

/* ---------- Voet ---------- */
.site-footer { background: var(--asphalt); color: #C6CBD3; font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer .muted { color: #98A0AC; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr; gap: 36px; padding-block: 56px 44px; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.25rem; margin-bottom: 10px; }
.footer-h { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-block: 20px 28px; border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; color: #98A0AC; }
.footer-bottom a { color: #C6CBD3; }
.footer-bottom .login-link { margin-left: auto; color: #6F7783; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } .footer-bottom .login-link { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .site-header, .site-footer, .cta-card, .other-cats { display: none; } }
