/* ==========================================================================
   BM Diensten, variant C "bento"
   Donkere sectie met fototegels van verschillende grootte. Bij aanwijzen
   zoomt de foto in en schuift de uitleg omhoog. Alles begint met bmdc-.
   ========================================================================== */

.bmdc {
	--bmdc-accent: #E0195F;
	--bmdc-wrap: 1400px;

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

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

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

.bmdc-in { padding: clamp(88px, 11vw, 150px) var(--bmdc-gutter); }

/* ---------- Kop ---------- */
.bmdc-kop {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	align-items: end;
	gap: 32px clamp(40px, 6vw, 120px);
	padding-bottom: clamp(36px, 4vw, 56px);
}
.bmdc-label { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--bmdc-zacht); }
.bmdc-label i { width: 7px; height: 7px; border-radius: 2px; background: var(--bmdc-accent); transform: rotate(45deg); }
.bmdc.bmdc .bmdc-titel { margin-top: 22px; font: 700 clamp(40px, 5.6vw, 84px)/.95 var(--bmdc-kop); letter-spacing: -.045em; color: #fff; text-wrap: balance; }
.bmdc-regel { display: block; overflow: hidden; padding: .04em .1em .1em 0; margin-bottom: -.1em; }
.bmdc-regel-in { display: inline-block; transform: translateY(110%); }
.bmdc.is-zichtbaar .bmdc-regel-in { animation: bmdcRegel 1s var(--bmdc-ease) forwards; animation-delay: calc(var(--d, 0) * 100ms); }
@keyframes bmdcRegel { to { transform: none; } }
.bmdc-accent { color: var(--bmdc-accent); }
.bmdc-kop-r { max-width: 460px; padding-bottom: 6px; }
.bmdc-kop-r p { font-size: clamp(16px, 1.15vw, 17.5px); line-height: 1.6; color: var(--bmdc-mute); text-wrap: pretty; }
.bmdc-tekstlink { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 0; font: 600 15px/1 var(--bmdc-kop); letter-spacing: -.01em; color: #fff; }
.bmdc-tekstlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: .3; transition: opacity .3s; }
.bmdc-tekstlink:hover::after { opacity: 1; }
.bmdc-tekstlink span { width: 15px; height: 15px; color: var(--bmdc-accent-licht); transition: transform .4s var(--bmdc-ease); }
.bmdc-tekstlink span svg { width: 100%; height: 100%; stroke-width: 2.4; }
.bmdc-tekstlink:hover span { transform: rotate(45deg); }

/* ---------- Raster ---------- */
.bmdc-raster {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(240px, 21vw, 300px);
	grid-template-areas:
		"w w a b"
		"w w g g"
		"c f s o";
	gap: 14px;
}

.bmdc-tegel { position: relative; min-width: 0; border-radius: 22px; overflow: hidden; background: var(--bmdc-vlak); }

.bmdc-tegel > a {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(18px, 1.8vw, 26px);
}

.bmdc-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--bmdc-ease); }
.bmdc-tegel > a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	/* Sterker naar onderen, zodat witte tekst ook op lichte foto's leesbaar is */
	background: linear-gradient(180deg, rgba(10, 10, 11, .3) 0%, rgba(10, 10, 11, 0) 24%, rgba(10, 10, 11, .2) 46%, rgba(10, 10, 11, .82) 78%, rgba(10, 10, 11, .95) 100%);
	transition: background-color .5s;
}
/* Alleen de tekstlagen boven de foto; de foto zelf blijft absoluut */
.bmdc-tegel > a > span { position: relative; z-index: 1; }

.bmdc-boven { display: flex; align-items: center; justify-content: space-between; }
.bmdc-nr { font: 500 12.5px/1 var(--bmdc-kop); color: var(--bmdc-zacht); font-variant-numeric: tabular-nums; }
.bmdc-pijl {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(10, 10, 11, .35);
	border: 1px solid rgba(255, 255, 255, .2);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	transition: background .35s, border-color .35s, transform .5s var(--bmdc-ease);
}
.bmdc-pijl svg { width: 16px; height: 16px; stroke-width: 2.2; }

.bmdc-onder { display: grid; text-shadow: 0 1px 14px rgba(10, 10, 11, .45); }
.bmdc-naam { font: 700 clamp(26px, 2.2vw, 34px)/1 var(--bmdc-kop); letter-spacing: -.04em; color: #fff; }
.bmdc-kort { margin-top: 8px; font-size: 14.5px; line-height: 1.4; color: var(--bmdc-zacht); }

/* Uitleg en tags schuiven bij aanwijzen omhoog (via grid-rows) */
/* Eén rij met daarin uitleg en tags, die van 0fr naar 1fr openschuift */
.bmdc-meer { display: grid; grid-template-rows: 0fr; grid-template-columns: minmax(0, 1fr); opacity: 0; transition: grid-template-rows .55s var(--bmdc-ease), opacity .4s; }
.bmdc-meer-in { display: block; min-height: 0; overflow: hidden; }
.bmdc-uitleg { display: block; padding-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--bmdc-zacht); text-wrap: pretty; }
.bmdc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bmdc-tags span { margin-top: 12px; padding: 6px 11px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(10, 10, 11, .3); font-size: 12.5px; color: var(--bmdc-zacht); }

.bmdc-tegel > a:hover .bmdc-foto, .bmdc-tegel > a:focus-visible .bmdc-foto { transform: scale(1.08); }
.bmdc-tegel > a:hover .bmdc-pijl { background: var(--bmdc-accent); border-color: var(--bmdc-accent); transform: rotate(45deg); }
.bmdc-tegel > a:hover .bmdc-meer, .bmdc-tegel > a:focus-visible .bmdc-meer { grid-template-rows: 1fr; opacity: 1; }
.bmdc-tegel > a:hover::before { background-color: rgba(10, 10, 11, .45); }

/* Grote tegel: grotere naam en de uitleg altijd zichtbaar */
.bmdc-tegel.is-groot .bmdc-naam { font-size: clamp(40px, 4.2vw, 64px); }
.bmdc-tegel.is-groot .bmdc-kort { margin-top: 12px; font: 600 clamp(18px, 1.5vw, 22px)/1.3 var(--bmdc-kop); letter-spacing: -.015em; color: #fff; }
.bmdc-tegel.is-groot .bmdc-meer { grid-template-rows: 1fr; opacity: 1; }
.bmdc-tegel.is-groot .bmdc-uitleg { max-width: 520px; font-size: 16px; }

/* ---------- Oproeptegel ---------- */
.bmdc-oproep { display: flex; background: var(--bmdc-accent); }
.bmdc-oproep > div { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; width: 100%; padding: clamp(18px, 1.8vw, 26px); }
.bmdc-oproep-titel { font: 700 clamp(22px, 1.9vw, 28px)/1.05 var(--bmdc-kop); letter-spacing: -.035em; color: #fff; }
.bmdc-oproep-tekst { margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.bmdc.bmdc .bmdc-btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-self: flex-start; align-items: center; gap: 14px; height: 50px; padding: 0 5px 0 20px; border-radius: 99px; background: #fff; font: 600 14.5px/1 var(--bmdc-kop); letter-spacing: -.01em; color: var(--bmdc-ink); white-space: nowrap; transition: color .4s; }
.bmdc.bmdc .bmdc-btn::after { content: ""; position: absolute; z-index: -1; right: 24px; top: 50%; width: 20px; height: 20px; margin: -10px -10px 0 0; border-radius: 50%; background: var(--bmdc-ink); transform: scale(0); transition: transform .6s var(--bmdc-ease); }
.bmdc.bmdc .bmdc-btn:hover { color: #fff; }
.bmdc.bmdc .bmdc-btn:hover::after { transform: scale(24); }
.bmdc-dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bmdc-accent); color: #fff; }
.bmdc-dot svg { width: 16px; height: 16px; stroke-width: 2.4; }

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

/* ---------- Schermen ---------- */
@media (max-width: 1060px) {
	.bmdc-kop { grid-template-columns: minmax(0, 1fr); align-items: start; }
	.bmdc-raster {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: clamp(220px, 34vw, 300px);
		grid-template-areas:
			"w w"
			"w w"
			"a b"
			"g g"
			"c f"
			"s o";
	}
}

/* Zonder muis staat de uitleg niet verborgen achter aanwijzen: alleen de naam
   en de korte belofte, de rest op de dienstpagina. */
@media (hover: none) {
	.bmdc-tegel > a:hover .bmdc-meer { grid-template-rows: 0fr; opacity: 0; }
	.bmdc-tegel.is-groot > a:hover .bmdc-meer { grid-template-rows: 1fr; opacity: 1; }
}

@media (max-width: 640px) {
	.bmdc-raster {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: auto;
		grid-template-areas: "w" "a" "b" "g" "c" "f" "s" "o";
		gap: 12px;
	}
	.bmdc-tegel { aspect-ratio: 4 / 3; }
	.bmdc-tegel.is-groot { aspect-ratio: 4 / 5; }
	.bmdc-oproep { aspect-ratio: auto; }
	.bmdc-tegel.is-groot .bmdc-uitleg { font-size: 15px; }
	.bmdc-oproep > div { gap: 22px; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.bmdc-in-beeld, .bmdc-regel-in { opacity: 1; transform: none; animation: none !important; }
	.bmdc-foto, .bmdc-tegel > a:hover .bmdc-foto { transform: none; transition: none; }
}
