/* ==========================================================================
   Divi Mega Menu Pro - Premium Frontend Design System & Animations
   Compatible with Divi 4 & Divi 5 Engine
   ========================================================================== */

/* 1. Core Mega Menu Container Rules */
li.dmm-mega-menu-item {
	position: relative !important;
}

li.dmm-mega-menu-item.dmm-width-full {
	position: static !important;
}

/* 2. Mega Menu Dropdown Wrapper */
ul.dmm-mega-menu-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	z-index: 99999;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
	padding: 0;
	margin: 0;
	list-style: none !important;
	border: 1px solid rgba(0, 0, 0, 0.06);
	backdrop-filter: blur(10px);
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dmm-mega-menu-content-wrap {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* 3. Width Modes */
/* Full Width (100vw) */
li.dmm-mega-menu-item.dmm-width-full > ul.dmm-mega-menu-dropdown {
	width: 100vw !important;
	left: 50% !important;
	transform: translateX(-50%);
	border-radius: 0 0 12px 12px;
}

/* Container Width */
li.dmm-mega-menu-item.dmm-width-container > ul.dmm-mega-menu-dropdown {
	width: 100% !important;
	min-width: 700px;
	left: 0;
}

/* Alignments for Custom & Container Widths */
ul.dmm-mega-menu-dropdown.dmm-align-center {
	left: 50% !important;
	transform: translateX(-50%);
}

ul.dmm-mega-menu-dropdown.dmm-align-left {
	left: 0 !important;
}

ul.dmm-mega-menu-dropdown.dmm-align-right {
	right: 0 !important;
	left: auto !important;
}

/* 4. Trigger State & Hover/Click Reveal */
li.dmm-mega-menu-item:hover > ul.dmm-mega-menu-dropdown,
li.dmm-mega-menu-item.dmm-open > ul.dmm-mega-menu-dropdown {
	display: block !important;
	opacity: 1;
	visibility: visible;
}

/* 5. Entrance Animations */
/* Fade In */
ul.dmm-mega-menu-dropdown.dmm-anim-fade-in {
	animation: dmmFadeIn 0.3s ease-in-out forwards;
}

@keyframes dmmFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

ul.dmm-mega-menu-dropdown.dmm-align-center.dmm-anim-fade-in {
	animation: dmmFadeInCenter 0.3s ease-in-out forwards;
}

@keyframes dmmFadeInCenter {
	from { opacity: 0; transform: translate(-50%, 10px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Slide Down */
ul.dmm-mega-menu-dropdown.dmm-anim-slide-down {
	animation: dmmSlideDown 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes dmmSlideDown {
	from { opacity: 0; transform: translateY(-20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Slide Up */
ul.dmm-mega-menu-dropdown.dmm-anim-slide-up {
	animation: dmmSlideUp 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes dmmSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Zoom In */
ul.dmm-mega-menu-dropdown.dmm-anim-zoom-in {
	animation: dmmZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dmmZoomIn {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}

/* Flip */
ul.dmm-mega-menu-dropdown.dmm-anim-flip {
	perspective: 1000px;
	animation: dmmFlip 0.4s ease forwards;
}

@keyframes dmmFlip {
	from { opacity: 0; transform: rotateX(-30deg); }
	to   { opacity: 1; transform: rotateX(0deg); }
}

/* Bounce In */
ul.dmm-mega-menu-dropdown.dmm-anim-bounce {
	animation: dmmBounce 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes dmmBounce {
	0%   { opacity: 0; transform: scale(0.8); }
	70%  { opacity: 1; transform: scale(1.03); }
	100% { opacity: 1; transform: scale(1); }
}

/* 6. Status Badges & Icons */
.dmm-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 20px;
	margin-left: 6px;
	vertical-align: middle;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	animation: dmmBadgePulse 2s infinite;
}

@keyframes dmmBadgePulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.06); }
	100% { transform: scale(1); }
}

.dmm-item-icon {
	margin-right: 6px;
	vertical-align: middle;
}

/* 7. Mobile Drawer & Responsive Accordion */
.dmm-mobile-toggle-wrapper {
	display: none;
}

.dmm-mobile-toggle {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 10px;
}

.dmm-hamburger {
	display: block;
	width: 24px;
	height: 2px;
	background: #333;
	position: relative;
}

.dmm-hamburger::before,
.dmm-hamburger::after {
	content: '';
	position: absolute;
	width: 24px;
	height: 2px;
	background: #333;
	left: 0;
}

.dmm-hamburger::before { top: -7px; }
.dmm-hamburger::after  { top: 7px; }

@media (max-width: 980px) {
	.dmm-hide-mobile {
		display: none !important;
	}

	.dmm-mobile-toggle-wrapper {
		display: block;
	}

	li.dmm-mega-menu-item.dmm-width-full > ul.dmm-mega-menu-dropdown,
	li.dmm-mega-menu-item.dmm-width-container > ul.dmm-mega-menu-dropdown,
	ul.dmm-mega-menu-dropdown {
		position: static !important;
		width: 100% !important;
		transform: none !important;
		box-shadow: none !important;
		border: none !important;
		border-radius: 0 !important;
		background: transparent !important;
	}
}

@media (min-width: 981px) {
	.dmm-hide-desktop {
		display: none !important;
	}
}
