/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}
/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
	height: 300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: 1fr 3fr; /* 将容器分为两列，Logo占1份，导航链接占3份 */
    align-items: center;
}

/* 移除之前的伪元素 */
.nav-container::before,
.nav-container::after {
    display: none;
}

.logo {
    margin-right: 0;
    padding-left: 0; /* 让Logo靠左 */
    grid-column: 1;
}

.logo img {
    height: 70px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 将导航链接靠右对齐 */
    grid-column: 2;
    padding-right: 0; /* 让导航链接靠右 */
}

.nav-links a {
    color: #333;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #0066CC;
}

.nav-links a.active {
    color: #0066CC;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a {
    color: #333;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
    padding-right: 1.2rem;
    position: relative;
}

.dropdown > a::after {
    content: '▼';
    font-size: 0.8em;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 2rem;
    background: white;
    min-width: 160px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 8px 0;
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    margin: 0;
    transition: background-color 0.3s;
    position: relative;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #0066CC;
}

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

/* 优化二级菜单样式 */
.dropdown-content {
    padding: 8px 0;
}

.dropdown-content a {
    padding: 12px 20px;
    position: relative;
}

.dropdown-submenu > a::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 20%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .nav-container::before,
    .nav-container::after {
        display: none; /* 在移动端不使用这些空元素 */
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-left: 0;
        flex-grow: 0; /* 重置flex-grow */
        justify-content: flex-start; /* 重置对齐方式 */
    }

    .dropdown {
        display: block;
    }

    .dropdown > a::after {
        right: 1rem;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #f5f5f5;
        margin-left: 1rem;
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
    }

    .nav-links a {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
    }
}

/* 语言切换器样式 */
.language-switcher {
    margin-left: 20px;
    position: relative;
}

.language-switcher select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background-color: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher::after {
    content: '\f0d7';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-primary);
}

.language-switcher select:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.language-switcher select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: 3rem; /* 为移动端菜单按钮留出空间 */
    }
} 

/* 首页动画 */
.animate-title {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.animate-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}