/**
 * Custom Gradient Menu Styles
 * Matches the design with gradient background and white text
 */

/* Main menu container */
.custom-gradient-menu {
    width: 100%;
    background: linear-gradient(to right, #7dd3e8 0%, #1e3a5f 100%);
    padding: 0;
    margin: 0;
}

.custom-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.custom-menu-list > .menu-item {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Menu links */
.custom-menu-list .menu-link {
    display: block;
    padding: 15px 20px;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.custom-menu-list .menu-link:hover,
.custom-menu-list .menu-item.active > .menu-link,
.custom-menu-list .menu-item.current > .menu-link {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    text-decoration: none;
}

.custom-menu-list .menu-link span {
    display: inline-block;
}

/* Dropdown arrow */
.custom-menu-list .dropdown-arrow {
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.custom-menu-list .menu-item.parent:hover .dropdown-arrow,
.custom-menu-list .menu-item.has-children:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Submenu dropdown */
.custom-menu-list .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: none;
    z-index: 1000;
    border-top: 3px solid #1e3a5f;
}

.custom-menu-list .menu-item:hover > .submenu,
.custom-menu-list .menu-item.parent:hover > .submenu {
    display: block;
}

/* Submenu items */
.custom-menu-list .submenu .menu-item {
    width: 100%;
}

.custom-menu-list .submenu .menu-link {
    padding: 12px 20px;
    color: #333333 !important;
    font-size: 13px;
    text-transform: none;
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.custom-menu-list .submenu .menu-link:hover,
.custom-menu-list .submenu .menu-item.active > .menu-link,
.custom-menu-list .submenu .menu-item.current > .menu-link {
    background-color: #f5f5f5;
    color: #1e3a5f !important;
    padding-left: 25px;
}

.custom-menu-list .submenu .menu-link:last-child {
    border-bottom: none;
}

/* Nested submenus (third level) */
.custom-menu-list .submenu .submenu {
    top: 0;
    left: 100%;
    margin-left: 5px;
}

/* Separator and heading */
.custom-menu-list .separator,
.custom-menu-list .heading {
    display: block;
    padding: 12px 20px;
    color: #666666;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid #e0e0e0;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .custom-menu-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-menu-list > .menu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .custom-menu-list .menu-link {
        padding: 15px 20px;
    }
    
    .custom-menu-list .submenu {
        position: static;
        display: none;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        border-top: none;
        margin-left: 20px;
    }
    
    .custom-menu-list .menu-item.active > .submenu,
    .custom-menu-list .menu-item.parent.active > .submenu {
        display: block;
    }
    
    .custom-menu-list .submenu .menu-link {
        color: #ffffff !important;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .custom-menu-list .submenu .menu-link:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: #ffffff !important;
    }
}

/* Ensure menu is visible and properly styled */
#jux-mainnav .custom-gradient-menu,
#t3-mainnav .custom-gradient-menu,
.jux-navbar .custom-gradient-menu {
    width: 100%;
}

/* Fix for container alignment */
.main-menu-row .custom-gradient-menu {
    width: 100%;
}
