/* ===== 统一导航栏样式 ===== */

/* 导航容器 */
.main-nav {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 20px;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: #667eea;
    transform: scale(1.05);
}

.nav-logo-icon {
    font-size: 32px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: linear-gradient(135deg, #f5f7fa, #e8ecf3);
    color: #667eea;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▾';
    margin-left: 4px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f5f7fa, #e8ecf3);
    color: #667eea;
    padding-left: 20px;
}

/* 语言选择器 */
.nav-language {
    margin-left: 15px;
}

.nav-language select {
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

.nav-language select:hover,
.nav-language select:focus {
    border-color: #667eea;
    transform: scale(1.05);
}

/* 移动端汉堡菜单 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        align-items: stretch;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 14px 18px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        margin-top: 0;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .nav-language {
        margin: 15px 0 0 0;
        padding-top: 15px;
        border-top: 2px solid #f0f0f0;
    }
    
    .nav-language select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 16px;
    }
    
    .nav-logo-icon {
        font-size: 26px;
    }
}
