/* Mega Menu Refinement */
.mega-menu-container {
    display: flex;
    width: 800px;
    /* Adjust as needed */
    background: #fff;
    min-height: 400px;
}

.main-menu .navigation>li.dropdown>.megamenu {
    padding: 0 !important;
    width: 800px !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-left: 0 !important;
}

/* Sidebar */
.mega-menu-sidebar {
    width: 250px;
    background: #f9f9f9;
    padding: 20px 0;
    border-right: 1px solid #eee;
}

.mega-menu-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-tabs li {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-bottom: 0;
    border-bottom: none;
}

.mega-menu-tabs li:hover,
.mega-menu-tabs li.active {
    color: var(--theme-color);
    background: #fff;
    border-left: 3px solid var(--theme-color);
    padding-left: 17px;
    /* Adjust for border width */
}

/* Content Area */
.mega-menu-content {
    display: none;
    /* Hidden by default on mobile for dropdown toggle */
    width: 100%;
    background: #fff;
    padding: 10px;
}

.mega-menu-tabs li .dropdown-btn {
    display: block;
    position: absolute;
    right: 15px;
    top: 5px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
    font-size: 16px;
    color: var(--title-color) !important;
}

@media(min-width:1025px) {
    .mega-menu-tabs li .mega-menu-content {
        position: absolute;
        right: 0%;
        top: 0;
        width: 550px;
        height: 100%;
        z-index: 999;
        background: rgb(249, 247, 247);
        padding-top: 20px;
        display: none !important;
    }

    .mega-menu-tabs li.active .mega-menu-content {
        display: block !important;
    }

    .mega-menu-tabs li .dropdown-btn {
        display: none !important;
        /* Hide dropdown arrow on desktop */
    }
}

.mega-menu-tab {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.mega-menu-tab.active-tab {
    display: block;
}

.mega-menu-tab h4 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Items */
.mega-menu-item {
    display: block;
    margin-bottom: 20px;
}

.mega-menu-item>a {
    display: flex !important;
    /* Override default block if needed */
    align-items: center;
    padding: 0 !important;
    /* Override default menu padding */
    border-bottom: none !important;
}

.mega-menu-item>a:hover {
    padding-left: 0 !important;
    /* Override hover effect */
}

.mega-menu-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.mega-menu-item .item-text {
    display: flex;
    flex-direction: column;
}

.mega-menu-item .title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    white-space: nowrap;
}

.mega-menu-item .subtitle {
    font-size: 13px;
    color: #777;
    margin-top: 3px;
    font-weight: 400;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.main-menu .navigation>li.dropdown:hover>.megamenu {
    display: block !important;
}