/* Mega Menu Styles */
.mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mega-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mega-menu-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    padding-top: 90px;
    z-index: 10;
}

.mega-menu-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    /* bg-white/10 */
    backdrop-filter: blur(12px);
    /* backdrop-blur-md */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    /* Matching rounded feel (approx rounded-2xl) */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    /* shadow-lg */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* border-white/20 */
    overflow: hidden;
    height: 500px;
}

/* Panels */
.menu-panel {
    height: 100%;
    overflow-y: auto;
    background: transparent !important;
}

.menu-panel:last-child {
    border-right: none;
}

.menu-panel.level-1 {
    flex: 0 0 280px;
}

.menu-panel.level-2 {
    flex: 0 0 300px;
}

.menu-panel.level-3 {
    flex: 1;
}

/* Lists and Items */
.menu-items,
.sub-menu-items,
.deep-menu-items {
    list-style: none;
    padding: 1rem;
    margin: 0;
    display: none;
}

.menu-items,
.sub-menu-items.active,
.deep-menu-items.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    /* text-white */
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}

.menu-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #93c5fd;
    /* hover:text-blue-300 */
}

.menu-item .icon {
    width: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.menu-item:hover .icon,
.menu-item.active .icon {
    color: #93c5fd;
    /* hover:text-blue-300 */
}

.menu-item .text {
    flex: 1;
}

.menu-item .arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s;
}

.menu-item:hover .arrow,
.menu-item.active .arrow {
    opacity: 1;
    color: #93c5fd;
    transform: translateX(0);
}

.menu-link-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    color: inherit;
}

/* Scrollbar Styling */
.menu-panel::-webkit-scrollbar {
    width: 4px;
}

.menu-panel::-webkit-scrollbar-track {
    background: transparent;
}

.menu-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.menu-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .mega-menu {
        display: none !important;
    }
}