/* 头部导航样式 */
.header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--secondary-color);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .nav-menu li {
        margin-left: 20px;
    }
    
    .nav-menu li a {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .nav {
        justify-content: space-between;
    }
    
    .logo img {
        height: 35px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
    }
    
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 80px);
        background-color: var(--secondary-color);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        transition: top 0.3s ease;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 80px 0 20px 0;
        overflow-y: auto;
    }
    
    .nav-menu.open {
        top: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu li a {
        display: block;
        padding: 15px 25px;
        color: var(--text-color);
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
    }
    
    .nav-menu li a:hover,
    .nav-menu li a.active {
        background-color: #f8f9fa;
        border-left-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .nav-menu li a::after {
        display: none;
    }
    
    .mobile-menu-close {
        display: none;
        position: absolute;
        top: 15px;
        right: 20px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .mobile-menu-close span {
        font-size: 24px;
        color: var(--text-color);
        font-weight: 300;
        transition: color 0.3s ease;
    }
    
    .mobile-menu-close:hover span {
        color: var(--primary-color);
    }
    
    .nav-menu.open .mobile-menu-close {
        display: block;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 15px 0;
    }
    
    .logo img {
        height: 45px;
    }
    
    .nav-menu {
        width: 100%;
        padding-top: 60px;
    }
}
