/* Professional Modern Navbar Styles */
.navbar {
    border-radius: 0;
    margin-bottom: 0;
    min-height: 44px;
}

.navbar-default {
    background: #fff;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: none;
}

.navbar-collapse {
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Top Level Menu Items */
#dnnMenu .topLevel {
    margin: 0;
    padding: 0;
}

#dnnMenu .topLevel > li {
    position: relative;
    float: left;
    border-right: 1px solid #eeeeee;
}

#dnnMenu .topLevel > li:first-child {
    border-left: 1px solid #eeeeee;
}

#dnnMenu .topLevel > li:hover {
    background: #f5f5f5;
}



#dnnMenu .topLevel > li > a {
    color: #424242;
    font-weight: 500;
    font-size: 12px;
    padding: 14px 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: block;
    line-height: 1;
    position: relative;
    transition: all 0.25s ease;
}

#dnnMenu .topLevel > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1976D2, #42A5F5);
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

#dnnMenu .topLevel > li > a:hover::after,
#dnnMenu .topLevel > li.active > a::after {
    width: 100%;
}

#dnnMenu .topLevel > li > a:focus,
#dnnMenu .topLevel > li > a:hover {
    color: #1976D2;
    background: #f8f9fa;
    text-decoration: none;
}

#dnnMenu .topLevel > li.active > a {
    color: #1565C0;
    background: #f0f7ff;
    font-weight: 600;
}

#dnnMenu .topLevel > li.active > a:focus,
#dnnMenu .topLevel > li.active > a:hover {
    color: #1565C0;
}

#dnnMenu .topLevel > .open > a,
#dnnMenu .topLevel > .open > a:hover,
#dnnMenu .topLevel > .open > a:focus {
    background: #f0f7ff;
    color: #1976D2;
}

#dnnMenu .topLevel > .active.open > a,
#dnnMenu .topLevel > .active.open > a:hover,
#dnnMenu .topLevel > .active.open > a:focus {
    background: #e3f2fd;
}

/* Dropdown Menu Styles */
#dnnMenu .dropdown-menu {
    border-radius: 0 0 6px 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 2px solid #1976D2;
    padding: 6px 0;
    margin-top: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 210px;
    overflow: visible;
    z-index: 1000;
}

/* SmartMenus dropdown visibility - these work with the SM library */
#dnnMenu .sm .dropdown-menu {
    display: none;
}

#dnnMenu .sm li:hover > .dropdown-menu,
#dnnMenu .sm li.open > .dropdown-menu,
#dnnMenu .topLevel > li.dropdown:hover > .dropdown-menu,
#dnnMenu .topLevel > li.dropdown.open > .dropdown-menu {
    display: block !important;
}

/* Nested submenu positioning */
#dnnMenu .dropdown-menu .dropdown:hover > .dropdown-menu,
#dnnMenu .dropdown-menu .dropdown.open > .dropdown-menu,
#dnnMenu .dropdown-menu li:hover > .dropdown-menu,
#dnnMenu .dropdown-menu li.open > .dropdown-menu {
    display: block !important;
    top: 0;
    left: 100%;
}

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

#dnnMenu .dropdown-menu::before {
    display: none;
}

#dnnMenu .dropdown-menu::after {
    display: none;
}

#dnnMenu .dropdown-menu li {
    background: none;
    float: none;
    clear: both;
    width: auto;
    padding: 0;
    border-bottom: 1px solid rgba(21, 101, 192, 0.08);
    transition: all 0.2s ease;
    position: relative;
}

#dnnMenu .dropdown-menu li:last-child {
    border-bottom: none;
}

#dnnMenu .dropdown-menu li > a {
    background: transparent;
    padding: 8px 14px 8px 12px;
    color: #37474F;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

#dnnMenu .dropdown-menu li > a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #1976D2;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

#dnnMenu .dropdown-menu li > a span {
    color: inherit;
}

#dnnMenu .dropdown-menu li:hover {
    background: linear-gradient(90deg, rgba(21, 101, 192, 0.06), rgba(21, 101, 192, 0.02));
}

#dnnMenu .dropdown-menu li:hover > a {
    color: #1565C0;
    border-left-color: #1976D2;
    padding-left: 12px;
}

#dnnMenu .dropdown-menu li:hover > a::before {
    opacity: 1;
    transform: scale(1);
}

#dnnMenu .dropdown-menu li.active > a,
#dnnMenu .dropdown-menu li.active a:hover,
#dnnMenu .dropdown-menu li.active a:focus {
    color: #1565C0;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(21, 101, 192, 0.12), rgba(21, 101, 192, 0.04));
    border-left-color: #1976D2;
}

#dnnMenu .dropdown-menu li.active > a::before {
    opacity: 1;
    transform: scale(1);
    background: #1565C0;
}

#dnnMenu .dropdown-menu a:hover {
    color: #1565C0;
    text-decoration: none;
}

/* Sub-level dropdowns (nested) */
#dnnMenu .subLevelRight {
    border-radius: 0 6px 6px 0;
    margin-left: 0;
    margin-top: 0;
    border-top: none;
    border-left: 2px solid #1976D2;
    box-shadow: 6px 6px 20px rgba(21, 101, 192, 0.12);
}

#dnnMenu .subLevelRight::before,
#dnnMenu .subLevelRight::after {
    display: none;
}

/* Nested submenu items */
#dnnMenu .subLevelRight li {
    background: rgba(21, 101, 192, 0.02);
}

#dnnMenu .subLevelRight li:hover {
    background: rgba(21, 101, 192, 0.08);
}

/* Caret styling */
#dnnMenu .caret {
    border-top-color: currentColor;
    margin-left: 4px;
    opacity: 0.7;
}

/* Medium screens */
@media only screen and (min-width: 768px) and (max-width: 1200px) {
    #dnnMenu .topLevel > li > a {
        font-size: 11px;
        padding: 10px 8px;
    }
}

/* Mobile Styles */
@media only screen and (max-width: 767px) {
    .navbar-default {
        background: #fff;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .navbar-toggle {
        border: 1px solid #bdbdbd;
        border-radius: 3px;
        margin: 8px 12px;
        padding: 6px 8px;
        transition: all 0.3s ease;
        background: transparent;
    }
    
    .navbar-toggle:hover,
    .navbar-toggle:focus {
        background: #f5f5f5;
        border-color: #9e9e9e;
    }
    
    .navbar-toggle .icon-bar {
        background: #616161;
        height: 2px;
        border-radius: 1px;
        transition: all 0.3s ease;
    }
    
    #dnnMenu .dropdown-menu {
        padding: 0;
        background: #fafafa;
        box-shadow: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid #e0e0e0;
        animation: none;
    }
    
    #dnnMenu .dropdown-menu::before,
    #dnnMenu .dropdown-menu::after {
        display: none;
    }
    
    #dnnMenu .dropdown-menu.subLevel {
        padding: 0;
    }
    
    #dnnMenu .dropdown-menu.subLevel li {
        background: #f5f5f5;
        border-bottom: 1px solid #eeeeee;
        padding: 0;
    }
    
    #dnnMenu .dropdown-menu.subLevel li > a {
        color: #616161;
        padding-left: 28px;
        border-left: none;
    }
    
    #dnnMenu .dropdown-menu.subLevel li.active a span {
        color: #1976D2;
    }
    
    #dnnMenu .dropdown-menu.subLevelRight li {
        background: #eeeeee;
        padding: 0;
    }
    
    #dnnMenu .dropdown-menu.subLevelRight li > a {
        padding-left: 40px;
    }
    
    #dnnMenu .topLevel {
        display: block;
    }
    
    #dnnMenu .topLevel li {
        position: relative;
        background: transparent;
        list-style-type: none;
        float: none;
        width: 100%;
        margin-bottom: 0;
        border-top: 1px solid #eeeeee;
    }
    
    #dnnMenu .topLevel > li > a::after {
        display: none;
    }
    
    #dnnMenu .topLevel li.active a {
        color: #1565C0;
        font-weight: 600;
        background: #e3f2fd;
    }
    
    #dnnMenu .topLevel li a {
        display: block;
        color: #424242;
        transition: all 0.2s ease;
        padding: 10px 15px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        font-size: 11px;
    }
    
    #dnnMenu .topLevel li a:hover {
        background: #f5f5f5;
    }
    
    #dnnMenu .topLevel li a:hover span {
        color: #1976D2;
    }
    
    #dnnMenu .topLevel li a span {
        line-height: normal;
        margin: 0;
        padding: 0;
        font-size: inherit;
    }
    
    #dnnMenu .topLevel .dropdown.open > a {
        background: #e3f2fd;
    }
    
    #dnnMenu .topLevel .dropdown.open a span {
        color: #1976D2;
    }
    
    #dnnMenu .topLevel .dropdown-menu.subLevel a span {
        color: #616161;
    }
    
    #dnnMenu .topLevel > li > a {
        color: #424242;
    }
    
    #dnnMenu .topLevel > li > a:hover span {
        color: #1976D2;
    }
    
    #dnnMenu .dropdown.open .subLevel > li a:hover span {
        color: #1976D2;
    }
    
    .navbar-nav.sm-collapsible .caret,
    .navbar-nav.sm-collapsible ul .caret {
        position: absolute;
        right: 0;
        padding: 0;
        width: 42px;
        height: 38px;
        line-height: 38px;
        text-align: center;
        top: 0;
        border: none;
        border-left: 1px solid #eeeeee;
        background: #fafafa;
        display: block;
        margin: 0;
        border-radius: 0;
        font-size: 0.9em;
        color: #757575;
        transition: all 0.2s ease;
    }
    
    .navbar-nav.sm-collapsible .caret:hover,
    .navbar-nav.sm-collapsible ul .caret:hover {
        background: #e3f2fd;
        color: #1976D2;
    }
}
