/**
 * Mega Menu Styles for NSM Idol Live Theme
 * Dark/Neon theme for Services dropdown
 * 
 * @package NSM_Idol_Live_Theme
 * @since 1.2.0
 */

/* ========================================
   MAIN NAVIGATION ENHANCEMENTS
======================================== */

.main-navigation {
	position: relative;
	z-index: 100;
}

.menu-wrapper {
	display: flex;
	align-items: center;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-menu > li {
	position: relative;
}

.nav-menu > li > a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 12px 20px;
	color: var(--text-primary);
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	border-radius: 12px;
	transition: all 0.3s ease;
	position: relative;
}

.nav-menu > li > a:hover {
	color: var(--neon-pink);
	background: rgba(255, 47, 212, 0.1);
}

.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a {
	color: var(--neon-pink);
	background: rgba(255, 47, 212, 0.15);
}

/* Dropdown indicator */
.nav-menu > li.menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 6px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.3s ease;
}

.nav-menu > li.menu-item-has-children:hover > a::after {
	transform: rotate(180deg);
}

/* ========================================
   MEGA MENU CONTAINER
======================================== */

.mega-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	min-width: 900px;
	max-width: 1100px;
	background: var(--bg-dark-rgba-98);
	border: 2px solid var(--neon-pink-rgba-30);
	border-radius: 24px;
	padding: 40px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: blur(20px);
	box-shadow: 0 20px 60px var(--neon-pink-rgba-30);
	z-index: 1000;
}

.menu-item-has-children:hover .mega-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
	transform: translateX(-50%) translateY(-5px);
}

.menu-item-has-children:focus-within > .mega-menu,
.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
	transform: translateX(-50%) translateY(-5px);
}

/* Mega menu arrow */
.mega-menu::before {
	content: '';
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 10px solid var(--neon-pink-rgba-30);
}

/* ========================================
   MEGA MENU GRID (4 COLUMNS)
======================================== */

.mega-menu-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mega-menu-item {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	background: var(--text-primary-rgba-03);
	border: 1px solid var(--text-primary-rgba-05);
	border-radius: 20px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.mega-menu-item::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, 
		var(--neon-pink-rgba-10) 0%, 
		var(--neon-aqua-rgba-10) 100%
	);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mega-menu-item:hover {
	background: var(--text-primary-rgba-05);
	border-color: var(--neon-pink-rgba-50);
	transform: translateY(-4px);
	box-shadow: 0 12px 32px var(--neon-pink-rgba-30);
}

.mega-menu-item:hover::before {
	opacity: 1;
}

/* Icon */
.mega-menu-icon {
	font-size: 48px;
	line-height: 1;
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 0 15px var(--neon-pink-rgba-60));
}

/* Title */
.mega-menu-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--neon-pink);
	margin: 0;
	position: relative;
	z-index: 1;
	text-shadow: 0 0 10px var(--neon-pink-rgba-50);
}

/* Description */
.mega-menu-description {
	font-size: 13px;
	line-height: 1.6;
	color: var(--text-secondary);
	margin: 0;
	position: relative;
	z-index: 1;
}

/* Features list */
.mega-menu-features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: relative;
	z-index: 1;
}

.mega-menu-features li {
	font-size: 13px;
	color: var(--text-secondary);
	padding-left: 20px;
	position: relative;
}

.mega-menu-features li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: var(--neon-aqua);
	font-weight: 700;
}

/* CTA Link */
.mega-menu-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--neon-aqua);
	text-decoration: none;
	margin-top: auto;
	position: relative;
	z-index: 1;
	transition: all 0.3s ease;
}

.mega-menu-link:hover {
	color: var(--neon-pink);
	transform: translateX(4px);
}

.mega-menu-link svg {
	width: 16px;
	height: 16px;
}

/* ========================================
   STANDARD DROPDOWN (3 items)
======================================== */

.sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 280px;
	background: var(--bg-dark);
	border: 2px solid rgba(255, 47, 212, 0.3);
	border-radius: 16px;
	padding: 12px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.3s ease;
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	box-shadow: 0 12px 32px rgba(255, 47, 212, 0.3);
	z-index: var(--z-dropdown);
	list-style: none;
	margin: 0;
}

.menu-item-has-children:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
	transform: translateY(-5px);
}

.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
}

.sub-menu li {
	margin: 0;
}

.sub-menu li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: var(--text-primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	border-radius: 12px;
	transition: all 0.3s ease;
}

.sub-menu li a:hover {
	background: rgba(255, 47, 212, 0.15);
	color: var(--neon-pink);
	transform: translateX(4px);
}

@media (max-width: 1024px) {
	.menu-toggle {
		display: block;
	}

	.main-navigation {
		position: fixed;
		top: 0;
		left: -100%;
		width: min(90vw, 360px);
		height: 100vh;
		background: rgba(11, 0, 20, 0.98);
		border-left: 2px solid rgba(255, 47, 212, 0.3);
		z-index: var(--z-fixed);
		transition: left 0.4s ease;
		overflow-y: auto;
		padding: 5rem var(--spacing-lg) var(--spacing-lg);
		-webkit-backdrop-filter: blur(30px);
		backdrop-filter: blur(30px);
	}

	.main-navigation.is-open,
	.main-navigation.active {
		left: 0;
	}

	.menu-wrapper {
		position: static;
		width: 100%;
		height: auto;
		max-width: none;
		padding: 0;
	}
	width: 28px;
}

.menu-toggle-icon span {
	display: block;
	width: 100%;
	height: 3px;
	background: var(--neon-pink);
	border-radius: 2px;
	transition: all 0.3s ease;
	box-shadow: 0 0 10px rgba(255, 47, 212, 0.8);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
		position: static;
		transform: none;
		min-width: 100%;
		max-width: none;
		padding: 20px;
		margin: 8px 0 0;
		box-shadow: none;
		border: 1px solid rgba(255, 47, 212, 0.2);
		opacity: 1;
		visibility: visible;
		pointer-events: all;
		display: none;
@media (max-width: 1024px) {
	.menu-toggle {
	.menu-item-has-children.submenu-active > .mega-menu,
	.menu-item-has-children.submenu-active > .sub-menu {
		display: block;
		max-height: none;
		opacity: 1;
		visibility: visible;
	}

		display: block;
	}

	.menu-wrapper {
		position: fixed;
		top: 0;
		right: -100%;
		width: 100%;
		max-width: 400px;
		height: 100vh;
		position: static;
		transform: none;
		min-width: 100%;
		width: 100%;
		border: 1px solid rgba(255, 47, 212, 0.2);
		padding: 0;
		margin-top: 8px;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: all;
		display: none;
	}

	.nav-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.nav-menu > li > a {
		padding: 16px 20px;
		font-size: 16px;
	}

	/* Mega menu on mobile - stacked */
	.mega-menu {
		position: static;
		transform: none;
		min-width: auto;
		max-width: none;
		padding: 20px;
		margin-top: 8px;
		border-radius: 16px;
	}

	.mega-menu-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.mega-menu-item {
		padding: 20px;
	}

	/* Standard dropdown on mobile */
	.sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		pointer-events: all;
		transform: none;
		margin-top: 8px;
		padding: 8px;
	}

	/* Mobile overlay */
	body.mobile-menu-active::before {
		content: '';
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.8);
		z-index: 999;
		-webkit-backdrop-filter: blur(5px);
		backdrop-filter: blur(5px);
	}
}

/* Tablet adjustments */
@media (max-width: 1280px) and (min-width: 1025px) {
	.mega-menu {
		min-width: 800px;
		padding: 32px;
	}

	.mega-menu-grid {
		gap: 24px;
	}

	.mega-menu-item {
		padding: 20px;
	}

	.mega-menu-icon {
		font-size: 40px;
	}

	.mega-menu-title {
		font-size: 16px;
	}
}

/* ========================================
   HEADER CTA BUTTON
======================================== */

.header-cta {
	margin-left: 20px;
}

.header-cta .cta-button {
	background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(255, 47, 212, 0.6);
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.header-cta .cta-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(255, 47, 212, 0.8);
}

.header-cta .cta-button svg {
	width: 20px;
	height: 20px;
	animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
	0%, 100% {
		transform: rotate(0deg) scale(1);
		filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
	}
	50% {
		transform: rotate(180deg) scale(1.2);
		filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1));
	}
}

@media (max-width: 1024px) {
	.header-cta {
		margin-left: auto;
		margin-right: 16px;
	}

	.header-cta .cta-button {
		padding: 10px 20px;
		font-size: 14px;
	}
}

/* ========================================
   ACCESSIBILITY
======================================== */

.nav-menu a:focus,
.mega-menu-item:focus-within,
.sub-menu a:focus {
	outline: 2px solid var(--neon-aqua);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--neon-pink);
	color: white;
	padding: 12px 20px;
	z-index: 10000;
	text-decoration: none;
	font-weight: 700;
}

.skip-link:focus {
	top: 0;
}
