/* 菜单专用样式 */
:root {
    --primary-color: #0047AB;
    --secondary-color: #0077CC;
    --accent-color: #3399FF;
    --dark-color: #1A1A1A;
    --light-color: #F8F9FA;
    --gray-color: #E9ECEF;
}

/* 导航栏基础样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    padding: 15px 0;
}

.navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item {
    position: relative;
    margin: 0;
}

.navbar-nav .nav-item .nav-link {
    position: relative;
    padding: 20px 15px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--dark-color);
    margin: 0;
}

.navbar-nav .nav-item:hover .nav-link {
    color: var(--primary-color);
}

/* 下拉菜单样式 */
.dropdown-menu {
    min-width: 200px;
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px 0;
    margin-top: 0;
    transition: all 0.3s ease;
    background-color: white;
    position: absolute;
    top: 99%;
    left: 0;
    z-index: 1000;
    display: none;
}

.navbar-nav .nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 8px 20px;
    font-size: 0.9rem;
    color: var(--dark-color);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

/* 二级下拉菜单 */
.dropdown-menu .dropdown {
    position: relative;
}

.dropdown-menu .dropdown .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: 0;
    border-left: 1px solid #e0e0e0;
}

.dropdown-menu .dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item.dropdown-toggle::after {
    margin-left: 8px;
}

/* 解决方案菜单链接样式 */
.solution-link {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.solution-link:hover,
.solution-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

/* 三级菜单链接样式 */
.third-level-link {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.third-level-link:hover,
.third-level-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

/* 四级内容区域 */
.fourth-level-content,
.solution-products {
    animation: fadeIn 0.3s ease;
}

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

/* 产品展示项悬停效果 */
.fourth-level-content .d-flex,
.solution-products .d-flex {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.fourth-level-content .d-flex:hover,
.solution-products .d-flex:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* 移动端响应式样式 */
@media (max-width: 992px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .navbar-brand {
        padding: 10px 0;
        font-size: 1.3rem;
    }
    
    .navbar-nav .nav-item .nav-link {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .dropdown-menu {
        position: static;
        background-color: #f8f9fa;
        box-shadow: none;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        margin-top: 5px;
        padding: 10px 0;
        width: 100%;
    }
    
    .dropdown-item {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .dropdown-menu .dropdown .dropdown-menu {
        position: static;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        margin-top: 5px;
        padding-top: 5px;
    }
    
    .navbar-toggler {
        border: none;
        padding: 8px 12px;
    }
    
    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }
    
    .navbar-collapse {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 8px 15px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-item .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .dropdown-item {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}
