/* ==========================================================================
   BM Diensten
   Donkere sectie: diensten als genummerde index, rechts een paneel dat
   meeverandert met de aangewezen rij. Alles begint met bmd-.
   ========================================================================== */

.bmd {
	--bmd-accent: #E0195F;
	--bmd-ink: #0A0A0B;
	--bmd-wrap: 1400px;

	--bmd-accent-licht: color-mix(in srgb, var(--bmd-accent) 72%, #fff);
	--bmd-accent-diep: color-mix(in srgb, var(--bmd-accent) 55%, #000);
	--bmd-vlak: #131215;
	--bmd-tekst: #F4F1ED;
	--bmd-zacht: rgba(244, 241, 237, .78);
	--bmd-mute: rgba(244, 241, 237, .52);
	--bmd-lijn: rgba(255, 255, 255, .08);
	--bmd-lijn-2: rgba(255, 255, 255, .14);
	--bmd-kop: 'BM Frama', 'PP Frama', 'Helvetica Neue', Arial, sans-serif;
	--bmd-body: 'BM Frama Text', 'PP Frama Text', 'Helvetica Neue', Arial, sans-serif;
	--bmd-gutter: max(24px, (100% - var(--bmd-wrap)) / 2);
	--bmd-ease: cubic-bezier(.2, .8, .2, 1);

	position: relative;
	isolation: isolate;
	overflow: clip;
	background: var(--bmd-ink);
	color: var(--bmd-tekst);
	font-family: var(--bmd-body);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.bmd *, .bmd *::before, .bmd *::after { box-sizing: border-box; }
.bmd :where(h2, h3, p, ul, ol, li) { margin: 0; padding: 0; }
.bmd :where(ul, ol) { list-style: none; }
.bmd.bmd h2, .bmd.bmd h3 { color: inherit; }
.bmd.bmd a { color: inherit; text-decoration: none; }
.bmd img { max-width: 100%; display: block; }
.bmd svg { display: block; flex: none; }
.bmd :focus-visible { outline: 2px solid var(--bmd-accent-licht); outline-offset: 3px; }

.bmd.bmd button {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
}

.bmd.bmd button:hover, .bmd.bmd button:focus, .bmd.bmd button:active { color: inherit; text-decoration: none; }

.bmd-gloed {
	position: absolute;
	left: -20%;
	bottom: -50%;
	width: min(1200px, 90vw);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--bmd-accent) 26%, transparent), transparent 70%);
	pointer-events: none;
	z-index: -1;
}

.bmd-in { padding: clamp(80px, 11vh, 150px) var(--bmd-gutter); }

/* ---------- Kop ---------- */
.bmd-kop {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	align-items: end;
	gap: 40px clamp(40px, 6vw, 120px);
	padding-bottom: 40px;
	border-bottom: 1px solid var(--bmd-lijn);
}

.bmd-kop-l { min-width: 0; container-type: inline-size; }

.bmd-label { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--bmd-zacht); }
.bmd-label i { width: 7px; height: 7px; border-radius: 2px; background: var(--bmd-accent); transform: rotate(45deg); }

.bmd.bmd .bmd-titel {
	margin-top: 22px;
	font-family: var(--bmd-kop);
	font-weight: 700;
	font-size: clamp(40px, 8.4cqi, 84px);
	line-height: .95;
	letter-spacing: -.045em;
	color: #fff;
	text-wrap: balance;
}

.bmd-regel { display: block; overflow: hidden; padding: .04em .1em .1em 0; margin-bottom: -.1em; }
.bmd-regel-in { display: inline-block; transform: translateY(110%); }
.bmd.is-zichtbaar .bmd-regel-in { animation: bmdRegel 1s var(--bmd-ease) forwards; animation-delay: calc(var(--d, 0) * 100ms); }
@keyframes bmdRegel { to { transform: none; } }
.bmd-accent { color: var(--bmd-accent); }

.bmd-kop-r { max-width: 460px; padding-bottom: 6px; }
.bmd-kop-r p { font-size: clamp(16px, 1.15vw, 17.5px); line-height: 1.6; color: var(--bmd-mute); text-wrap: pretty; }
.bmd-kop-r .bmd-tekstlink { margin-top: 18px; }

.bmd-tekstlink { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font: 600 15px/1 var(--bmd-kop); letter-spacing: -.01em; color: #fff; }
.bmd-tekstlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: .3; transition: opacity .3s; }
.bmd-tekstlink:hover::after { opacity: 1; animation: bmdStreep .6s var(--bmd-ease); }
@keyframes bmdStreep { 0% { transform: scaleX(1); transform-origin: right; } 50% { transform: scaleX(0); transform-origin: right; } 51% { transform: scaleX(0); transform-origin: left; } 100% { transform: scaleX(1); transform-origin: left; } }
.bmd-tekstlink span { width: 15px; height: 15px; color: var(--bmd-accent-licht); transition: transform .4s var(--bmd-ease); }
.bmd-tekstlink span svg { width: 100%; height: 100%; stroke-width: 2.4; }
.bmd-tekstlink:hover span { transform: rotate(45deg); }

/* ---------- Index en paneel ---------- */
.bmd-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	gap: clamp(40px, 6vw, 110px);
	align-items: start;
}

.bmd-lijst { min-width: 0; }

.bmd-rij { border-bottom: 1px solid var(--bmd-lijn); }

.bmd.bmd .bmd-kopregel {
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	grid-template-areas: "nr naam pijl" "nr kort pijl";
	align-items: center;
	column-gap: 18px;
	width: 100%;
	padding: 24px 0;
	transition: padding .4s var(--bmd-ease);
}

.bmd-kopregel::before {
	content: "";
	position: absolute;
	left: -20px;
	right: -20px;
	top: 6px;
	bottom: 6px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .03);
	opacity: 0;
	transition: opacity .3s;
	pointer-events: none;
}

.bmd-rij.is-actief .bmd-kopregel::before { opacity: 1; }

.bmd-nr {
	grid-area: nr;
	align-self: start;
	padding-top: 10px;
	font: 500 13px/1 var(--bmd-kop);
	color: var(--bmd-mute);
	font-variant-numeric: tabular-nums;
	transition: color .3s;
}

.bmd-rij.is-actief .bmd-nr { color: var(--bmd-accent); }

.bmd-naam {
	grid-area: naam;
	font: 600 clamp(28px, 3vw, 42px)/1.02 var(--bmd-kop);
	letter-spacing: -.04em;
	color: rgba(244, 241, 237, .62);
	transition: color .35s, transform .5s var(--bmd-ease);
}

.bmd-rij.is-actief .bmd-naam { color: #fff; transform: translateX(6px); }

.bmd-kort {
	grid-area: kort;
	margin-top: 6px;
	font-size: 14.5px;
	color: var(--bmd-mute);
	transition: color .35s, transform .5s var(--bmd-ease);
}

.bmd-rij.is-actief .bmd-kort { color: var(--bmd-zacht); transform: translateX(6px); }

.bmd-pijl {
	grid-area: pijl;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--bmd-lijn-2);
	color: #fff;
	transition: background .3s, border-color .3s, transform .5s var(--bmd-ease), color .3s;
}

.bmd-pijl svg { width: 16px; height: 16px; stroke-width: 2.4; transition: transform .5s var(--bmd-ease); }
.bmd-rij.is-actief .bmd-pijl { background: var(--bmd-accent); border-color: var(--bmd-accent); }
.bmd-rij.is-actief .bmd-pijl svg { transform: rotate(45deg); }

/* Uitklapdetail: alleen op smalle schermen */
.bmd-detail { display: none; }

/* Paneel */
.bmd-paneel { position: sticky; top: 110px; }

.bmd-kaart {
	border-radius: 26px;
	overflow: hidden;
	background: var(--bmd-vlak);
	border: 1px solid var(--bmd-lijn-2);
	box-shadow: 0 60px 120px -50px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .05) inset;
	animation: bmdKaart .55s var(--bmd-ease);
}

.bmd-kaart[hidden] { display: none; }
@keyframes bmdKaart { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.bmd-beeld {
	position: relative;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	background:
		radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--bmd-accent) 42%, transparent), transparent 62%),
		linear-gradient(160deg, #1B191E, #0E0D10);
	border-bottom: 1px solid var(--bmd-lijn);
}

.bmd-beeld img { width: 100%; height: 100%; object-fit: cover; }

.bmd-groot {
	position: absolute;
	left: 22px;
	bottom: 10px;
	font: 700 clamp(96px, 9vw, 150px)/.85 var(--bmd-kop);
	letter-spacing: -.07em;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.bmd-beeld-naam {
	position: absolute;
	right: 18px;
	top: 16px;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(10, 10, 11, .55);
	border: 1px solid rgba(255, 255, 255, .12);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font: 500 12.5px/1 var(--bmd-kop);
	color: #fff;
}

.bmd-kaart-tx { padding: 22px 24px 24px; }
.bmd-kaart-tx b { display: block; font: 600 21px/1.15 var(--bmd-kop); letter-spacing: -.03em; color: #fff; }
.bmd-kaart-tx p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--bmd-mute); text-wrap: pretty; }

.bmd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.bmd-tags li { padding: 7px 11px; border-radius: 9px; border: 1px solid var(--bmd-lijn-2); font-size: 12.5px; font-weight: 500; color: var(--bmd-zacht); }

.bmd.bmd .bmd-btn {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	height: 54px;
	margin-top: 20px;
	padding: 0 6px 0 22px;
	border-radius: 99px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--bmd-lijn-2);
	font: 600 15px/1 var(--bmd-kop);
	letter-spacing: -.01em;
	color: #fff;
	white-space: nowrap;
	transition: color .4s, border-color .3s;
}

.bmd.bmd .bmd-btn::after { content: ""; position: absolute; z-index: -1; right: 26px; top: 50%; width: 20px; height: 20px; margin: -10px -10px 0 0; border-radius: 50%; background: var(--bmd-tekst); transform: scale(0); transition: transform .6s var(--bmd-ease); }
.bmd.bmd .bmd-btn:hover::after { transform: scale(24); }
.bmd.bmd .bmd-btn:hover { color: var(--bmd-ink); border-color: transparent; }
.bmd-dot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bmd-accent); color: #fff; transition: background .4s, color .4s; }
.bmd-dot svg { width: 16px; height: 16px; stroke-width: 2.4; transition: transform .45s var(--bmd-ease); }
.bmd-btn:hover .bmd-dot { background: var(--bmd-ink); }
.bmd-btn:hover .bmd-dot svg { transform: translateX(2px); }

/* ---------- Grid ---------- */
.bmd-rooster {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	padding-top: 40px;
}

.bmd-cel { min-width: 0; opacity: 0; transform: translateY(16px); }
.bmd.is-zichtbaar .bmd-cel { animation: bmdIn .8s var(--bmd-ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 300ms); }

.bmd-cel-in {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 300px;
	padding: 22px 22px 22px;
	border-radius: 22px;
	background: var(--bmd-vlak);
	border: 1px solid var(--bmd-lijn);
	overflow: hidden;
	transition: transform .45s var(--bmd-ease), border-color .3s, background .3s;
}

.bmd-cel-in::before {
	content: "";
	position: absolute;
	right: -30%;
	top: -30%;
	width: 80%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--bmd-accent) 30%, transparent), transparent 70%);
	opacity: 0;
	transition: opacity .5s;
	pointer-events: none;
}

a.bmd-cel-in:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--bmd-accent) 45%, transparent); background: #16151A; }
a.bmd-cel-in:hover::before { opacity: 1; }

.bmd-cel-in > * { position: relative; z-index: 1; }

/* Foto als achtergrond: gedimd, met een donkere waas zodat de tekst leesbaar blijft */
.bmd-cel-in .bmd-cel-foto {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: .8;
	transform: scale(1.02);
	transition: transform 1.1s var(--bmd-ease), opacity .5s;
	pointer-events: none;
}
.bmd-cel-in.heeft-foto::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 11, .58) 0%, rgba(10, 10, 11, .3) 38%, rgba(10, 10, 11, .62) 70%, rgba(10, 10, 11, .92) 100%);
	pointer-events: none;
	transition: opacity .5s;
}
.bmd-cel-in.heeft-foto::before { z-index: 0; }
.bmd-cel-in.heeft-foto { border-color: rgba(255, 255, 255, .1); }
.bmd-cel-in.heeft-foto .bmd-cel-kort { color: rgba(244, 241, 237, .86); }
.bmd-cel-in.heeft-foto .bmd-cel-tekst { color: rgba(244, 241, 237, .68); }
.bmd-cel-in.heeft-foto .bmd-tags span { border-color: rgba(255, 255, 255, .22); background: rgba(10, 10, 11, .35); color: rgba(244, 241, 237, .86); }
.bmd-cel-in.heeft-foto .bmd-pijl { background: rgba(10, 10, 11, .4); }
a.bmd-cel-in.heeft-foto:hover { background: var(--bmd-vlak); }
a.bmd-cel-in.heeft-foto:hover .bmd-cel-foto { transform: scale(1.07); opacity: 1; }

.bmd-cel-kop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.bmd-cel-kop .bmd-nr { padding-top: 0; }
.bmd-cel-kop .bmd-pijl { width: 40px; height: 40px; }
.bmd-cel-kop .bmd-pijl svg { width: 15px; height: 15px; }
a.bmd-cel-in:hover .bmd-nr { color: var(--bmd-accent); }
a.bmd-cel-in:hover .bmd-pijl { background: var(--bmd-accent); border-color: var(--bmd-accent); }
a.bmd-cel-in:hover .bmd-pijl svg { transform: rotate(45deg); }

.bmd-cel-naam { display: block; font: 600 clamp(26px, 2.2vw, 32px)/1.04 var(--bmd-kop); letter-spacing: -.035em; color: #fff; }
.bmd-cel-kort { display: block; margin-top: 8px; font: 500 15px/1.4 var(--bmd-body); color: var(--bmd-zacht); }
.bmd-cel-tekst { display: block; margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--bmd-mute); text-wrap: pretty; }
.bmd-cel .bmd-tags { margin-top: auto; padding-top: 20px; }
.bmd-cel .bmd-tags span { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--bmd-lijn-2); font-size: 12px; font-weight: 500; color: var(--bmd-zacht); }

/* Oproepkaart */
.bmd-cel-cta .bmd-cel-in {
	background:
		radial-gradient(100% 80% at 100% 0%, var(--bmd-accent-licht), transparent 55%),
		linear-gradient(160deg, var(--bmd-accent), var(--bmd-accent-diep));
	border-color: transparent;
	justify-content: flex-end;
}

.bmd-cel-cta .bmd-cel-naam { font-size: clamp(24px, 2vw, 30px); }
.bmd-cel-cta .bmd-cel-tekst { color: rgba(255, 255, 255, .86); font-size: 14px; }
.bmd.bmd .bmd-btn.is-licht { margin-top: 22px; background: var(--bmd-tekst); border-color: transparent; color: var(--bmd-ink); }
.bmd.bmd .bmd-btn.is-licht::after { background: var(--bmd-ink); }
.bmd.bmd .bmd-btn.is-licht:hover { color: #fff; }
.bmd-btn.is-licht .bmd-dot { background: var(--bmd-ink); color: #fff; }
.bmd-btn.is-licht:hover .bmd-dot { background: var(--bmd-accent); }

/* Binnenkomen */
.bmd-in-beeld { opacity: 0; transform: translateY(14px); }
.bmd.is-zichtbaar .bmd-in-beeld { animation: bmdIn .9s var(--bmd-ease) forwards; animation-delay: calc(var(--d, 0) * 110ms + 120ms); }
@keyframes bmdIn { to { opacity: 1; transform: none; } }

/* ---------- Kleinere schermen ---------- */
@media (max-width: 1240px) {
	.bmd-rooster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
	.bmd-in { padding-top: 72px; padding-bottom: 72px; }
	.bmd-rooster { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 28px; }
	.bmd-cel-in { min-height: 260px; }
	.bmd-kop { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; padding-bottom: 28px; }
	.bmd-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.bmd-paneel { display: none; }

	/* Rijen klappen zelf uit */
	.bmd-detail { display: block; padding: 0 0 24px 62px; }
	.bmd-detail[hidden] { display: none; }
	.bmd-detail p { max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--bmd-mute); }
	.bmd-detail .bmd-tags { margin-top: 14px; }
	.bmd-detail .bmd-tekstlink { margin-top: 16px; }
	.bmd-rij.is-actief .bmd-naam, .bmd-rij.is-actief .bmd-kort { transform: none; }
	.bmd-kopregel::before { display: none; }
	.bmd-rij.is-open .bmd-pijl { background: var(--bmd-accent); border-color: var(--bmd-accent); }
	.bmd-rij.is-open .bmd-pijl svg { transform: rotate(135deg); }
	.bmd-rij:not(.is-open) .bmd-pijl { background: transparent; border-color: var(--bmd-lijn-2); }
	.bmd-rij:not(.is-open) .bmd-pijl svg { transform: none; }
}

@media (max-width: 640px) {
	.bmd-in { padding: 56px 16px 64px; }
	.bmd.bmd .bmd-titel { font-size: clamp(36px, 11.5cqi, 56px); }
	.bmd.bmd .bmd-kopregel { grid-template-columns: 34px minmax(0, 1fr) 40px; column-gap: 12px; padding: 18px 0; }
	.bmd-nr { padding-top: 8px; font-size: 12px; }
	.bmd-naam { font-size: 26px; }
	.bmd-kort { font-size: 13.5px; }
	.bmd-pijl { width: 40px; height: 40px; }
	.bmd-detail { padding-left: 46px; }
	.bmd-rooster { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.bmd-cel-in { min-height: 0; padding: 20px 18px; }
	.bmd-cel-kop { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.bmd *, .bmd *::before, .bmd *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
	.bmd-in-beeld, .bmd-regel-in, .bmd-cel { opacity: 1; transform: none; }
}

.elementor-editor-active .bmd-in-beeld,
.elementor-editor-active .bmd-cel,
.elementor-editor-active .bmd-regel-in { opacity: 1; transform: none; animation: none; }

/* PP Frama heeft een smalle woordspatie; iets ruimer leest beter. */
.bmd { word-spacing: .06em; }
