/**
 * Third-level (nested) dropdown in the main Divi nav menu: click-to-open
 * instead of hover, sliding down/up smoothly.
 *
 * Two things were wrong with the original hover version, not just the
 * hover-vs-click part: "display: none" can't be transitioned (it snaps
 * instantly regardless of the transition property), and "height: 0" to
 * "height: auto" doesn't animate either -- CSS can't interpolate to/from
 * "auto" at all, so that half of the transition was a no-op even before
 * touching click-vs-hover.
 *
 * Fix: use max-height + overflow: hidden, which CAN be transitioned, and
 * let assets/js/nav-submenu-toggle.js set the actual max-height (equal to
 * the submenu's real content height) on click, rather than relying on
 * "auto" at all.
 */
.et-db #et-boc .et-l .nav li ul.sub-menu li ul.sub-menu {
	background-color: #313c4b !important;
	position: static !important;
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.4s ease;
	margin-left: 18px;
	border-radius: 6px !important;
}

/*
 * Divi's own theme CSS reveals dropdowns on ":hover" at every level, not
 * just the top one -- that's a separate mechanism from the max-height
 * transition above, and it's what was making this third level pop open on
 * hover even with the click handler working correctly. Force it closed
 * (opacity/visibility, not just max-height, in case Divi's hover rule sets
 * those directly with its own !important) for any item our JS hasn't
 * marked open.
 *
 * Scoped to ":not(.crde-submenu-open)" specifically so this can never
 * fight the plain (non-!important) inline max-height our click handler
 * sets when actually opening it -- once that class is added, this rule no
 * longer matches at all.
 */
.et-db #et-boc .et-l .nav li ul.sub-menu li:not(.crde-submenu-open) ul.sub-menu {
	max-height: 0 !important;
	opacity: 0 !important;
	visibility: hidden !important;
	padding: 0 !important;
	border: none !important;
}

.et-db #et-boc .et-l .nav li ul.sub-menu li.crde-submenu-open > ul.sub-menu {
	opacity: 1 !important;
	visibility: visible !important;
	padding-top: 8px!important;
	padding-bottom: 8px!important;
}

.et-db #et-boc .et-l .nav li ul.sub-menu li > ul.sub-menu li {
	padding: 0 !important;
}

.et-db #et-boc .et-l .nav li ul.sub-menu li > ul.sub-menu li a {
	text-transform: none;
	font-size: 16px;
	font-weight: 700;
	padding: 6px 20px 10px;
}

/* Menu Link override fix */
.single-technology.et-db #et-boc .et-l .has_et_pb_sticky .et_pb_menu_0_tb_header.et_pb_menu ul li a,
.single-press_release.et-db #et-boc .et-l .has_et_pb_sticky .et_pb_menu_0_tb_header.et_pb_menu ul li a,
.single-technology.et-db #et-boc .et-l .et_pb_menu_0_tb_header.et_pb_menu ul.sub-menu li a,
.single-press_release.et-db #et-boc .et-l .et_pb_menu_0_tb_header.et_pb_menu ul.sub-menu li a {
	color: #fff !important;
}
