/**
 * Tiny static-site patches. Keep Divi / WPML / Mad Menu look unchanged.
 */

/*
 * Language switcher hover-off (desktop Mad Menu).
 *
 * The WPML .sub-menu is position:absolute; top:100% with a 3px border-top
 * and 20px padding-top, so the first flag sits below the parent li.
 * Following Divi sections use .et_pb_column { z-index:2 } as well, so the
 * hero (.et_pb_text_* with large padding-top) paints on top of that
 * overflow and steals pointer events. Mad Menu then adds .dvmm_was_hovered
 * and sets display:none.
 *
 * Header section number differs per language (section_0 vs section_1),
 * so target the section that contains the menu. Bridge + keep-open on
 * :hover; flags / colors / layout stay the same.
 */
@media (min-width: 981px) {
	.et_pb_section:has(.dvmm_mad_menu) {
		z-index: 100;
	}

	.dvmm_menu__menu .wpml-ls-item.menu-item-has-children > ul.sub-menu {
		margin-top: 0;
	}

	.dvmm_menu__menu .wpml-ls-item.menu-item-has-children > ul.sub-menu::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 100%;
		height: 28px;
	}

	.dvmm_menu__menu .wpml-ls-item.menu-item-has-children:hover > ul.sub-menu,
	.dvmm_menu__menu .wpml-ls-item.menu-item-has-children.dvmm_is_hovered > ul.sub-menu {
		display: -ms-flexbox;
		display: flex;
		visibility: visible;
		opacity: 1;
	}
}
