
/* ==========================================================================
   DESKTOP MEGA MENU STYLES (.cmm-desktop-nav)
   ========================================================================== */

/* The top-level parent link on desktop */
.cmm-desktop-nav .has-mega-menu > a {
	color: #fff !important;
	transition: .4s !important;
}

/* Mega Menu Container on desktop */
.cmm-desktop-nav .has-mega-menu {
	position: relative !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown, .cmm-desktop-dropdown {
	position: absolute !important;
	top: 100% !important;
	margin-top: 20px !important;
	left: 50% !important;
	width: max-content !important;
	/* Shrink-wrap to fit the content */
	min-width: 400px !important;
	/* Ensure it doesn't get too tiny */
	max-width: min(1100px, calc(100vw - 32px)) !important;
	background: #fff !important;
	box-shadow: 0px 8px 48px rgba(0, 0, 0, .08) !important;
	border-radius: 12px !important;
	display: none !important;
	z-index: 999999 !important;
	opacity: 0;
	transform: translateY(10px) translateX(-23%) !important;
	transition: opacity .3s ease, transform .3s ease !important;
	border: none !important;
}

/* Invisible bridge to keep hover active across the margin gap */
.cmm-desktop-nav ul.mega-menu-dropdown::before {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 0;
	right: 0;
	height: 35px;
	background: transparent;
}

/* When active on desktop */
.cmm-desktop-nav li.has-mega-menu.is-active > ul.mega-menu-dropdown, .cmm-desktop-nav li.has-mega-menu:hover > ul.mega-menu-dropdown, .cmm-desktop-nav li.has-mega-menu:focus-within > ul.mega-menu-dropdown {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	grid-auto-flow: row !important;
	align-items: stretch !important;
	opacity: 1 !important;
}

/* Dynamically adjust columns if there are only 1 or 2 items so it doesn't leave blank space */
.cmm-desktop-nav ul.mega-menu-dropdown:has(> li:first-child:nth-last-child(2)) {
	grid-template-columns: repeat(2, 1fr) !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown:has(> li:first-child:nth-last-child(1)) {
	grid-template-columns: 1fr !important;
}

/* Post Object styling: Force it to span all rows on the right side so it doesn't break row heights */
.cmm-desktop-nav ul.mega-menu-dropdown > li.has-mega-menu-post {
	grid-column: 3/4;
	height: auto;
	margin-bottom: 0 !important;
}

/* Ensure a 2-column layout forces the post to the 2nd column */
.cmm-desktop-nav ul.mega-menu-dropdown:has(> li:first-child:nth-last-child(2)) > li.has-mega-menu-post {
	grid-column: 2/3;
}

/* Columns Structure */
.cmm-desktop-nav ul.mega-menu-dropdown > li {
	list-style: none !important;
	margin: 0 !important;
	padding: 16px 24px !important;
	width: auto !important;
	height: auto !important;
	min-height: 100% !important;
	align-self: stretch !important;
	min-width: 0 !important;
	background: transparent !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown > li:not(:last-child) {
	border-right: 1px solid rgba(127, 127, 127, 10%) !important;
}

/* Inner links reset (Depth 2 items) */
.cmm-desktop-nav ul.mega-menu-dropdown .sub-menu {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	position: static !important;
	background: transparent !important;
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	border: none !important;
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
}

/* If the parent has menu-col-2 class, split its sub-menu into 2 columns */
.cmm-desktop-nav ul.mega-menu-dropdown li.menu-col-2 > ul.sub-menu {
	display: block !important;
	column-count: 2 !important;
	column-gap: 16px !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown li.menu-col-2 > ul.sub-menu > li {
	margin-bottom: 8px !important;
	break-inside: avoid !important;
	page-break-inside: avoid !important;
	display: inline-block !important;
	width: 100% !important;
}

/* Column Header Styling (Depth 1) */
.cmm-desktop-nav ul.mega-menu-dropdown div.mega-menu-column-header {
	display: block !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	color: #8a94a6 !important;
	letter-spacing: .5px !important;
	margin-bottom: 16px !important;
	background: transparent !important;
	border: none !important;
	pointer-events: none !important;
	padding-left: 8px;
}

.cmm-desktop-nav ul.mega-menu-dropdown div.mega-menu-column-header .menu-icon, .cmm-desktop-nav ul.mega-menu-dropdown div.mega-menu-column-header .dropdown-indicator {
	display: none !important;
}

/* Menu links */
.cmm-desktop-nav ul.mega-menu-dropdown a.mega-menu-link {
	display: flex !important;
	align-items: flex-start !important;
	padding: 12px !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	color: #333 !important;
	transition: background .2s ease !important;
	gap: 16px !important;
	background: transparent !important;
	border: none !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	white-space: normal !important;
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown a.mega-menu-link:hover {
	background: transparent !important;
}

.cmm-desktop-nav .menu-icon {
	width: 48px !important;
	height: 48px !important;
	flex-shrink: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background-color: #f7f8fa;
	border: 1px solid rgba(127, 127, 127, 10%);
	border-radius: 4px;
	transition: .4s;
}

.cmm-desktop-nav .menu-icon img {
	max-width: 100%;
	height: auto;
}

.cmm-desktop-nav .menu-text-wrap {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px !important;
	flex: 1 1 0% !important;
	min-width: 0 !important;
	max-width: 100% !important;
}

.cmm-desktop-nav .elementor-nav-menu .sub-arrow {
	display: none !important;
}

.cmm-desktop-nav .menu-title {
	font-weight: 400;
	font-size: 16px;
	color: #2c2e2f;
	cursor: pointer;
	transition: .4s;
}

.cmm-desktop-nav .menu-subtitle {
	font-size: 12px !important;
	font-weight: 400 !important;
	color: #2c2e2f !important;
	line-height: 1.4 !important;
	white-space: normal !important;
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
}

.cmm-desktop-nav li.menu-merge-items ul.sub-menu > li.menu-item-has-children {
	margin-bottom: 32px;
}

.cmm-desktop-nav li.menu-item-has-children .mega-menu-column-header .menu-title {
	font-size: 12px;
	font-weight: 500;
	color: #2d2956;
	text-transform: uppercase;
	font-family: "Inter", sans-serif;
}

.cmm-desktop-nav .elementor-sub-item {
	gap: 16px;
	border: 0 !important;
	padding: 8px !important;
	border-radius: 8px !important;
	cursor: pointer;
}

.cmm-desktop-nav .elementor-sub-item:has(.menu-icon) {
	margin-bottom: 8px;
}

.cmm-desktop-nav .elementor-sub-item:hover {
	background-color: #f7f8fa !important;
}

.cmm-desktop-nav .elementor-sub-item:hover .menu-title {
	color: #39f !important;
}

.cmm-desktop-nav .elementor-sub-item:hover .menu-icon {
	background-color: #fff;
}

.cmm-desktop-nav ul.mega-menu-dropdown .elementor-sub-item .menu-title {
	font-weight: 600;
	color: #2d2956;
	text-wrap: wrap;
	transition: .4s;
}

/* Dropdown indicator */
.cmm-desktop-nav .dropdown-indicator {
	margin-left: 11px;
	border: solid #2c2e2f;
	border-width: 0 1px 1px 0;
	display: inline-block;
	padding: 3px;
	transform: rotate(45deg);
	-webkit-transform: rotate(45deg);
	margin-bottom: 3px;
	transition: transform .3s ease, border-color .3s ease !important;
}

/* Specific styling for the 'Latest Release' block */
.cmm-desktop-nav .mega-menu-custom-html {
	background: #fff;
}

.cmm-desktop-nav .mega-menu-custom-html img {
	aspect-ratio: 312/181;
	width: 100%;
	border-radius: 4px;
	overflow: hidden;
	object-fit: cover;
}

.cmm-desktop-nav .mega-menu-custom-html h6 {
	margin-top: 16px !important;
	margin-bottom: 4px !important;
	font-size: 16px !important;
	font-weight: 700;
}

.cmm-desktop-nav .mega-menu-custom-html p {
	font-size: 14px !important;
	font-weight: 400;
	color: #2c2e2f;
}

.cmm-desktop-nav .mega-menu-custom-html a {
	color: #2d2956 !important;
	font-weight: 600 !important;
	text-decoration: none;
	border: 0 !important;
}

.cmm-desktop-nav .has-mega-menu:hover > a .menu-title, .cmm-desktop-nav .menu-item:hover > a .menu-title, .cmm-desktop-nav .menu-item:hover > a {
	color: #39f !important;
}

.cmm-desktop-nav .has-mega-menu:hover > a > .dropdown-indicator {
	transform: rotate(45deg) scale(-1) !important;
	border-color: #39f !important;
	margin-bottom: 0 !important;
	margin-top: 5px !important;
}

/* Active Top-Level Menu Item (Direct Active OR when Inner Submenu Item is Active) */
.cmm-desktop-nav li.current-menu-item > a, .cmm-desktop-nav li.current_page_item > a, .cmm-desktop-nav li.current-menu-ancestor > a, .cmm-desktop-nav li.current-menu-parent > a, .cmm-desktop-nav li.current_page_ancestor > a, .cmm-desktop-nav li.current_page_parent > a, .cmm-desktop-nav li.current-menu-item > a .menu-title, .cmm-desktop-nav li.current_page_item > a .menu-title, .cmm-desktop-nav li.current-menu-ancestor > a .menu-title, .cmm-desktop-nav li.current-menu-parent > a .menu-title, .cmm-desktop-nav li.current_page_ancestor > a .menu-title, .cmm-desktop-nav li.current_page_parent > a .menu-title, .cmm-desktop-nav li.has-mega-menu:has(.current-menu-item) > a, .cmm-desktop-nav li.has-mega-menu:has(.current_page_item) > a, .cmm-desktop-nav li.has-mega-menu:has(.elementor-item-active) > a, .cmm-desktop-nav li.has-mega-menu:has([aria-current="page"]) > a, .cmm-desktop-nav li.has-mega-menu:has(.current-menu-item) > a .menu-title, .cmm-desktop-nav li.has-mega-menu:has(.current_page_item) > a .menu-title, .cmm-desktop-nav li.has-mega-menu:has(.elementor-item-active) > a .menu-title, .cmm-desktop-nav li.has-mega-menu:has([aria-current="page"]) > a .menu-title, .cmm-desktop-nav a.elementor-item.elementor-item-active, .cmm-desktop-nav a.elementor-item.elementor-item-active .menu-title, .cmm-desktop-nav a.elementor-item[aria-current="page"], .cmm-desktop-nav a.elementor-item[aria-current="page"] .menu-title {
	color: #39f !important;
}

.cmm-desktop-nav li.current-menu-item > a > .dropdown-indicator, .cmm-desktop-nav li.current_page_item > a > .dropdown-indicator, .cmm-desktop-nav li.current-menu-ancestor > a > .dropdown-indicator, .cmm-desktop-nav li.current-menu-parent > a > .dropdown-indicator, .cmm-desktop-nav li.current_page_ancestor > a > .dropdown-indicator, .cmm-desktop-nav li.current_page_parent > a > .dropdown-indicator, .cmm-desktop-nav li.has-mega-menu:has(.current-menu-item) > a > .dropdown-indicator, .cmm-desktop-nav li.has-mega-menu:has(.current_page_item) > a > .dropdown-indicator, .cmm-desktop-nav li.has-mega-menu:has(.elementor-item-active) > a > .dropdown-indicator, .cmm-desktop-nav li.has-mega-menu:has([aria-current="page"]) > a > .dropdown-indicator {
	border-color: #39f !important;
}

/* Active Inner Submenu Item in Desktop Dropdown */
.cmm-desktop-nav ul.mega-menu-dropdown li.current-menu-item > a.elementor-sub-item, .cmm-desktop-nav ul.mega-menu-dropdown li.current_page_item > a.elementor-sub-item, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item.elementor-item-active, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item[aria-current="page"], .cmm-desktop-nav ul.mega-menu-dropdown li.current-menu-item > a.mega-menu-link, .cmm-desktop-nav ul.mega-menu-dropdown li.current_page_item > a.mega-menu-link, .cmm-desktop-nav ul.mega-menu-dropdown a.mega-menu-link[aria-current="page"] {
	background-color: #f7f8fa !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown li.current-menu-item > a .menu-title, .cmm-desktop-nav ul.mega-menu-dropdown li.current_page_item > a .menu-title, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item.elementor-item-active .menu-title, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item[aria-current="page"] .menu-title, .cmm-desktop-nav ul.mega-menu-dropdown a.mega-menu-link[aria-current="page"] .menu-title {
	color: #39f !important;
}

.cmm-desktop-nav ul.mega-menu-dropdown li.current-menu-item > a .menu-icon, .cmm-desktop-nav ul.mega-menu-dropdown li.current_page_item > a .menu-icon, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item.elementor-item-active .menu-icon, .cmm-desktop-nav ul.mega-menu-dropdown a.elementor-sub-item[aria-current="page"] .menu-icon, .cmm-desktop-nav ul.mega-menu-dropdown a.mega-menu-link[aria-current="page"] .menu-icon {
	background-color: #fff !important;
	border-color: rgba(51, 153, 255, .4) !important;
}

.mega-menu-custom-html .explore-release-link {
	display: inline-flex !important;
	gap: 9px !important;
	align-items: center !important;
	transition: .4s;
}

.mega-menu-custom-html .explore-release-link:hover {
	color: #39f !important;
}

@media (max-width: 1200px) {
	.choose-region {
		display: none !important;
	}
}
