/**
 * Bodako Mobiel Menu
 * Slide-in drawer die de top-nav en hoofd-nav samenvoegt.
 */

:root {
	--bdk-mm-blue: #008ed2;
	--bdk-mm-blue-dark: #0072ab;
	--bdk-mm-blue-soft: #e6f4fc;
	--bdk-mm-ink: #10161c;
	--bdk-mm-muted: #55636e;
	--bdk-mm-grey: #f0f4f4;
	--bdk-mm-line: rgba(16, 22, 28, 0.09);
	--bdk-mm-panel: 420px;
	--bdk-mm-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--bdk-mm-display: "Varien", Helvetica, Arial, Lucida, sans-serif;
	--bdk-mm-body: "Lato", Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
 * 1. Divi's eigen mobiele menu's uitschakelen — alleen als onze JS draait.
 * ----------------------------------------------------------------------- */

html.bdk-mm-ready .et-l--header .et_mobile_nav_menu,
html.bdk-mm-ready #main-header .et_mobile_nav_menu {
	display: none !important;
}

/* De top-nav zit onder de breakpoint in de drawer; de lege balk verbergen we. */
@media (max-width: 980px) {
	html.bdk-mm-ready .bdk-mm-merged {
		display: none !important;
	}
}

html.bdk-mm-locked,
html.bdk-mm-locked body {
	overscroll-behavior: none;
}

/* --------------------------------------------------------------------------
 * 2. Hamburger-knop (zit op de plek van de Divi-hamburger)
 * ----------------------------------------------------------------------- */

.bdk-mm-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--bdk-mm-blue);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	line-height: 0;
}

.bdk-mm-toggle:focus-visible {
	outline: 2px solid var(--bdk-mm-blue);
	outline-offset: 2px;
}

.bdk-mm-toggle__bars {
	position: relative;
	display: block;
	width: 26px;
	height: 16px;
}

.bdk-mm-toggle__bars i {
	position: absolute;
	left: 0;
	display: block;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.35s var(--bdk-mm-ease), opacity 0.2s linear, width 0.35s var(--bdk-mm-ease);
}

.bdk-mm-toggle__bars i:nth-child(1) { top: 0; }
.bdk-mm-toggle__bars i:nth-child(2) { top: 7px; width: 78%; }
.bdk-mm-toggle__bars i:nth-child(3) { top: 14px; }

@media (hover: hover) {
	.bdk-mm-toggle:hover .bdk-mm-toggle__bars i:nth-child(2) { width: 100%; }
}

.bdk-mm-toggle[aria-expanded="true"] .bdk-mm-toggle__bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bdk-mm-toggle[aria-expanded="true"] .bdk-mm-toggle__bars i:nth-child(2) { opacity: 0; }
.bdk-mm-toggle[aria-expanded="true"] .bdk-mm-toggle__bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
	.bdk-mm-toggle {
		display: inline-flex;
	}

	/* Het Divi-menumodule-wrapje weer netjes rechts uitlijnen zonder de Divi-hamburger. */
	html.bdk-mm-ready .et-l--header .et_pb_menu__wrap {
		justify-content: flex-end;
	}
}

/* --------------------------------------------------------------------------
 * 3. Drawer
 * ----------------------------------------------------------------------- */

.bdk-mm {
	position: fixed;
	inset: 0;
	z-index: 999999;
	visibility: hidden;
	font-family: var(--bdk-mm-body);
	-webkit-font-smoothing: antialiased;
}

.bdk-mm.is-open {
	visibility: visible;
}

.bdk-mm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 26, 38, 0.55);
	opacity: 0;
	transition: opacity 0.4s var(--bdk-mm-ease);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.bdk-mm.is-open .bdk-mm__backdrop {
	opacity: 1;
}

.bdk-mm__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(var(--bdk-mm-panel), 90vw);
	height: 100%;
	height: 100dvh;
	background: #fff;
	box-shadow: -26px 0 70px rgba(9, 26, 38, 0.22);
	transform: translateX(100%);
	transition: transform 0.5s var(--bdk-mm-ease);
	will-change: transform;
}

.bdk-mm.is-open .bdk-mm__panel {
	transform: translateX(0);
}

/* Kopbalk — echoot de grijze topbalk van de site. */
.bdk-mm__bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	min-height: 64px;
	padding: 10px 16px 10px 24px;
	background: var(--bdk-mm-grey);
}

.bdk-mm__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--bdk-mm-blue);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: transform 0.35s var(--bdk-mm-ease), color 0.2s linear;
}

@media (hover: hover) {
	.bdk-mm__close:hover {
		transform: rotate(90deg);
		color: var(--bdk-mm-blue-dark);
	}
}

.bdk-mm__close:focus-visible {
	outline: 2px solid var(--bdk-mm-blue);
	outline-offset: 2px;
}

.bdk-mm__close svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

/* Scrollgebied */
.bdk-mm__scroll {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

/* --------------------------------------------------------------------------
 * 4. Hoofdmenu
 * ----------------------------------------------------------------------- */

.bdk-mm__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdk-mm__main {
	padding: 22px 24px 6px;
}

.bdk-mm__item {
	border-bottom: 1px solid var(--bdk-mm-line);
}

.bdk-mm__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bdk-mm__link {
	position: relative;
	display: block;
	flex: 1 1 auto;
	padding: 15px 0;
	color: var(--bdk-mm-ink);
	font-family: var(--bdk-mm-display);
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: color 0.25s ease, transform 0.35s var(--bdk-mm-ease);
}

/* Alleen met een muis: op touch zou de hover-staat blijven "plakken". */
@media (hover: hover) {
	.bdk-mm__link:hover {
		color: var(--bdk-mm-blue);
		transform: translateX(4px);
		text-decoration: none;
	}
}

.bdk-mm__link:focus-visible {
	color: var(--bdk-mm-blue);
	outline: 2px solid var(--bdk-mm-blue);
	outline-offset: 3px;
	text-decoration: none;
}

.bdk-mm__link:active {
	color: var(--bdk-mm-blue);
}

.bdk-mm__item.is-current > .bdk-mm__row > .bdk-mm__link {
	color: var(--bdk-mm-blue);
}

.bdk-mm__item.is-current > .bdk-mm__row > .bdk-mm__link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 10px;
	width: 26px;
	height: 2px;
	background: var(--bdk-mm-blue);
}

/* Accordeon-knop */
.bdk-mm__caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--bdk-mm-line);
	background: #fff;
	color: var(--bdk-mm-blue);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.35s var(--bdk-mm-ease);
}

.bdk-mm__caret svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform 0.35s var(--bdk-mm-ease);
}

@media (hover: hover) {
	.bdk-mm__caret:hover {
		background: var(--bdk-mm-blue-soft);
		border-color: transparent;
	}
}

.bdk-mm__caret:focus-visible {
	outline: 2px solid var(--bdk-mm-blue);
	outline-offset: 2px;
}

.bdk-mm__caret[aria-expanded="true"] {
	background: var(--bdk-mm-blue);
	border-color: var(--bdk-mm-blue);
	color: #fff;
}

.bdk-mm__caret[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* Submenu */
.bdk-mm__sub {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s var(--bdk-mm-ease);
}

.bdk-mm__sub-inner {
	margin: 0 0 14px;
	padding: 4px 0 0 16px;
	border-left: 2px solid var(--bdk-mm-blue-soft);
	list-style: none;
}

.bdk-mm__sub-inner .bdk-mm__item {
	border-bottom: 0;
}

.bdk-mm__sub-inner .bdk-mm__link {
	padding: 9px 0;
	font-family: var(--bdk-mm-body);
	font-size: 15px;
	font-weight: 600;
	color: var(--bdk-mm-muted);
}

.bdk-mm__sub-inner .bdk-mm__item.is-current > .bdk-mm__row > .bdk-mm__link {
	color: var(--bdk-mm-blue);
}

@media (hover: hover) {
	.bdk-mm__sub-inner .bdk-mm__link:hover {
		color: var(--bdk-mm-blue);
	}
}

.bdk-mm__sub-inner .bdk-mm__item.is-current > .bdk-mm__row > .bdk-mm__link::after {
	display: none;
}

/* --------------------------------------------------------------------------
 * 5. Samengevoegde top-nav (grijze strip, net als bovenaan de site)
 * ----------------------------------------------------------------------- */

.bdk-mm__secondary {
	margin: 20px 0 0;
	padding: 14px 24px 15px;
	background: var(--bdk-mm-grey);
}

.bdk-mm__secondary-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bdk-mm__secondary-link {
	display: inline-block;
	padding: 6px 0;
	color: var(--bdk-mm-ink);
	font-family: var(--bdk-mm-body);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.2s ease;
}

.bdk-mm__secondary-item.is-current .bdk-mm__secondary-link,
.bdk-mm__secondary-link:active {
	color: var(--bdk-mm-blue);
	text-decoration: none;
}

@media (hover: hover) {
	.bdk-mm__secondary-link:hover {
		color: var(--bdk-mm-blue);
		text-decoration: none;
	}
}

/* --------------------------------------------------------------------------
 * 6. Contactblok + CTA
 * ----------------------------------------------------------------------- */

.bdk-mm__contact {
	margin-top: auto;
	padding: 22px 24px calc(24px + env(safe-area-inset-bottom));
}

.bdk-mm__contact-title {
	margin: 0 0 12px;
	color: var(--bdk-mm-muted);
	font-family: var(--bdk-mm-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bdk-mm__contact-list {
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.bdk-mm__contact-item + .bdk-mm__contact-item {
	margin-top: 4px;
}

.bdk-mm__contact-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	color: var(--bdk-mm-ink);
	font-family: var(--bdk-mm-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	transition: color 0.2s ease;
}

.bdk-mm__contact-link:active {
	color: var(--bdk-mm-blue);
}

@media (hover: hover) {
	.bdk-mm__contact-link:hover {
		color: var(--bdk-mm-blue);
		text-decoration: none;
	}
}

.bdk-mm__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	background: var(--bdk-mm-blue-soft);
	color: var(--bdk-mm-blue);
}

.bdk-mm__icon svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

.bdk-mm__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 24px;
	background: var(--bdk-mm-blue);
	color: #fff;
	font-family: var(--bdk-mm-body);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background 0.25s ease;
}

.bdk-mm__cta:focus-visible,
.bdk-mm__cta:active {
	background: var(--bdk-mm-blue-dark);
	color: #fff;
	text-decoration: none;
}

.bdk-mm__cta svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform 0.3s var(--bdk-mm-ease);
}

@media (hover: hover) {
	.bdk-mm__cta:hover {
		background: var(--bdk-mm-blue-dark);
		color: #fff;
		text-decoration: none;
	}

	.bdk-mm__cta:hover svg {
		transform: translateX(4px);
	}
}

/* --------------------------------------------------------------------------
 * 7. Animatie — CSS-fallback wanneer GSAP niet beschikbaar is.
 *    De rusttoestand is bewust zichtbaar: valt een animatie weg, dan staat
 *    het menu er gewoon — nooit een onzichtbaar menu.
 * ----------------------------------------------------------------------- */

.bdk-mm.is-anim .bdk-mm__anim {
	animation: bdk-mm-in 0.5s var(--bdk-mm-ease) backwards;
	animation-delay: calc(0.16s + var(--bdk-mm-i, 0) * 0.055s);
}

@keyframes bdk-mm-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bdk-mm__panel,
	.bdk-mm__backdrop,
	.bdk-mm__sub,
	.bdk-mm__link,
	.bdk-mm__close,
	.bdk-mm-toggle__bars i {
		transition-duration: 0.01ms !important;
	}

	.bdk-mm.is-anim .bdk-mm__anim {
		animation: none;
	}
}

/* Lage schermen (of landscape): iets compacter zodat de CTA in beeld blijft. */
@media (max-height: 720px) {
	.bdk-mm__bar {
		min-height: 56px;
	}

	.bdk-mm__main {
		padding-top: 14px;
	}

	.bdk-mm__link {
		padding: 12px 0;
		font-size: 19px;
	}

	.bdk-mm__secondary {
		margin-top: 14px;
		padding-top: 11px;
		padding-bottom: 12px;
	}

	.bdk-mm__contact {
		padding-top: 16px;
	}
}

/* Boven de breakpoint nooit tonen (bijv. na draaien van het toestel). */
@media (min-width: 981px) {
	.bdk-mm {
		display: none;
	}
}
