.mega_menu {
	--mega-menu-top: 132.5px;
	padding-top: 5px;
	padding-bottom: 18px;
	position: fixed;
	left: 0;
	width: 100%;
	background-color: transparent;
	box-shadow: 0px 6px 12px #00000014;
	top: var(--mega-menu-top);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background-color 0.3s;
	border-top: 1px solid var(--creme);
    margin-top: -1px;
}

/* nav.menu li.has_mega_menu:hover .mega_menu { */
nav.menu li.has_mega_menu.js_mega_menu_open .mega_menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	background-color: white;
}

.admin-bar .mega_menu {
	--mega-menu-top: calc(132.5px + 32px);
}

@media (max-width: 1199px) {
	.mega_menu {
		--mega-menu-top: 129px;
	}

	.admin-bar .mega_menu {
		--mega-menu-top: calc(129px + 32px);
	}
}

ul.mega_menu__columns {
	padding: 0;
	margin: 0;
	list-style: none;
	display: flex;
	gap: 32px;
}

.mega_menu__column {
	flex: 1;
}

ul.mega_menus {
	padding: 0;
	margin: 0;
	list-style: none;
}

ul.mega_menu__links {
	padding: 0;
	margin: 0;
	list-style: none;
}

.mega_menu__title {
	font-size: 28px;
	line-height: 1.321429;
	font-weight: bold;
	color: var(--brown);
	margin-bottom: 15px;
	background: white;
}

.mega_menu__image {
	width: 100%;
	height: 181px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	margin-bottom: 18px;
}

@media (min-width: 992px) {
	.mega_menu {
		max-height: calc(100vh - var(--mega-menu-top));
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__image {
		height: 250px;
	}
}

/* Keep long two-column menus fully usable on laptop-height viewports. */
@media (min-width: 992px) and (max-height: 900px) {
	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__image {
		height: 181px;
		margin-bottom: 14px;
	}

	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__column_title {
		margin-bottom: 8px;
	}

	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__link a {
		font-size: 13px;
		line-height: 18px;
	}

	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) li.mega_menu__link {
		margin-bottom: 6px;
	}
}

/* Use the available width to keep long link lists above the fold on laptops. */
@media (min-width: 992px) and (max-width: 1440px) and (max-height: 900px) {
	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__links:has(> .mega_menu__link:nth-child(8)) {
		column-count: 2;
		column-gap: 32px;
	}

	.mega_menu__columns:has(> .mega_menu__column:nth-child(2):last-child) .mega_menu__links:has(> .mega_menu__link:nth-child(8)) li.mega_menu__link {
		break-inside: avoid;
	}
}

.mega_menu__column_title {
	font-size: 14px;
	line-height: 18px;
	font-weight: bold;
	color: var(--brown);
	margin-bottom: 10px;
}

.mega_menu__link a {
	color: var(--brown);
	text-decoration: none;
	font-size: 14px;
}

.mega_menu__link a:hover {
	text-decoration: underline;
}

li.mega_menu__link {
	margin-bottom: 13px;
}

li.mega_menu__link:last-child {
	margin-bottom: 0;
}
