/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 字体和全局样式 */
body {
    font-family: Arial, sans-serif;
    color: #333;
}
a {
    text-decoration: none;
    color: black;
}
/* 容器样式 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px; 
    padding-left: 0;
    padding-right: 80px;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    height: 100%; /* 确保容器填满高度 */
    align-items: center; /* 保持内容垂直居中 */
}

.brand {
    display: flex;
    align-items: center;
    margin-left: 0; 
    /* 进一步增加左侧内边距，可按需调整值 */
    padding-left: 50px; 
    gap: 15px;
    flex-shrink: 0; 
}
.header {
    position: fixed;
    top: 0;
    left: 0;
    max-height: 90px;
    width: 100%;
    background-color: white;
    box-shadow: none;
    z-index: 9999;
    padding: 15px 0;
    transition: all 0.3s ease-in-out;
}

.brand h1 {
    font-size: 22px; /* 从28px减小到22px */
    color: black;
    transition: color 0.3s ease-in-out;
}

.brand-logo {
    width: 90px; /* 从120px减小到90px */
    height: auto;
    display: block;
    margin-left: -60px;
}

/* 品牌名称样式 */
.brand {
    display: flex;
    align-items: center;
    margin-left: 0; 
    /* 增加左侧内边距，让品牌区域更靠左 */
    padding-left: 30px; 
    gap: 15px;
    flex-shrink: 0; 
}
.brand h1 {
    font-size: 28px;
    color: black;
    transition: color 0.3s ease-in-out;
}

/* 导航链接样式 */
.nav-list a {
    color: black;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease-in-out;
    position: relative;
}


.nav-list a:hover {
    color: #007BFF;
}

/* 导航链接下划线效果 */
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #007BFF, #00BFFF);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

/* 导航样式 */
.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: 100px;
    overflow: visible; /* 改为visible，允许下拉菜单显示 */
}

/* 导航内容容器 */
.nav-content {
    display: flex;
    align-items: center;
    white-space: nowrap; /* 防止换行 */
    overflow-x: auto; /* 允许水平滚动 */
    overflow-y: visible; /* 改为visible，允许下拉菜单显示 */
    scrollbar-width: none; /* Firefox隐藏滚动条 */
    -ms-overflow-style: none; /* IE隐藏滚动条 */
}

/* Webkit浏览器隐藏滚动条 */
.nav-content::-webkit-scrollbar {
    display: none;
}

/* 导航栏样式 */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap; /* 防止换行 */
    flex-shrink: 0; /* 防止压缩 */
}

.nav-list > li {
    position: relative;
    margin-left: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        justify-content: space-between;
    }
    
    .brand {
        padding-left: 0;
        margin-left: 0;
        gap: 10px;
    }
    
    .brand-logo {
        width: 60px;
        margin-left: 0;
    }
    
    .brand h1 {
        font-size: 18px;
    }
    
    .nav {
        margin-left: 0;
        justify-content: flex-end;
        overflow: visible; /* 移动端允许溢出 */
    }
    
    .nav-content {
        overflow: visible; /* 移动端允许溢出 */
        white-space: normal; /* 移动端允许换行 */
    }
    
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        display: none;
        z-index: 10000; /* 确保显示在header之上 */
    }
    
    .nav-list.show {
        display: flex;
    }
    
    .nav-list li {
        margin-left: 0;
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
    }
    
    .menu-toggle {
        display: block !important;
        background-color: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        font-size: 20px;
        color: #333;
    }
    
    .menu-toggle i.fas {
        font-size: 20px;
        color: #333;
    }
    
    .nav-phone {
        margin-left: 10px;
    }
}

.nav-list li {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    margin-left: 60px; /* 从40px增加到60px */
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    width: 150px;
    transition: width 0.3s ease;
}

/* 搜索框样式 */
/* 搜索框容器 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

/* 搜索表单 */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* 搜索输入框 */
.search-input {
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    width: 100%;
    background-color: white; /* 确保默认背景为白色 */
}

.search-input:focus {
    border-color: #007BFF;
}

/* 搜索按钮 */
.search-button {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    color: #007BFF;
}

.search-button:focus {
    outline: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-box {
        margin: 10px 0;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
}

.search-form {
    display: flex;
    position: relative;
    width: 180px;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    width: 200px;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: #007BFF;
}

.search-button:focus {
    outline: none;
}

/* 移动端搜索框样式 */
@media (max-width: 768px) {
    .search-form {
        width: 150px;
    }
    
    .search-input:focus {
        width: 180px;
    }
}

.nav-phone {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin-left: 20px;
    background-color: #2a7fba;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-phone:hover {
    background-color: #1e6fa3;
}

.nav-phone i {
    margin-right: 8px;
    color: white;
}

@media (max-width: 1024px) {
    .nav-phone {
        display: none;
    }
}

.brand {
    display: flex;
    align-items: center;
    margin-left: 0; 
    padding-left: 0; 
    gap: 15px;
    flex-shrink: 0; 
}

.brand-logo {
    width: 120px;
    height: auto;
    display: block;
    margin-left: -60px; /* 添加负的左外边距 */
}

/* 菜单按钮样式 */
.menu-toggle-container {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle i.fas {
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
}

.menu-toggle:hover i.fas {
    color: #007BFF;
}

/* 修改语言选择菜单样式 */
.nav-list li {
    position: relative;
}

/* 导航栏样式 */
.nav-list li {
    position: relative;
}

.submenu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 120px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
    z-index: 100;
}

/* 桌面端点击显示二级菜单 */
.nav-list li.active .submenu {
    display: block;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        display: none;
        z-index: 10000; /* 确保显示在header之上 */
    }
    
    .nav-list.show {
        display: flex;
    }
    
    .submenu {
        position: static;
        box-shadow: none;
        margin-top: 5px;
        padding-left: 20px;
        display: none;
    }
    
    .nav-list li.active .submenu {
        display: block;
    }
}

/* 移动端菜单美化 */
@media (max-width: 768px) {
    .submenu li a {
        color: #333;
        padding: 8px 0;
        display: block;
    }
    
    .submenu li a:hover {
        color: #007BFF;
    }
}

/* 语言菜单样式 */
.language-menu {
    position: relative;
    margin-left: 60px; /* 从40px增加到60px */
}

.language-submenu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 120px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000; /* 提高z-index确保显示在最上层 */
}

.language-menu.active .language-submenu {
    display: block;
}

/* 统一使用.active类控制 */
.nav-list li.active .submenu,
.language-menu.active .language-submenu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* 移动端样式保持不变 */
@media (max-width: 768px) {
    .nav-list li.active .submenu {
        display: block;
    }
}
.language-submenu li {
    padding: 8px 15px;
    transition: background 0.2s;
}

.language-submenu li:hover {
    background: #f5f5f5;
}

.language-submenu a {
    color: #333;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .language-submenu {
        position: static;
        box-shadow: none;
        display: none;
    }
    
    .language-menu.active .language-submenu {
        display: block;
    }
}

.nav-phone {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin-left: 60px; /* 从40px增加到60px */
    background-color: #2a7fba;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-phone:hover {
    background-color: #1e6fa5;
    transform: scale(1.05);
}

.nav-phone i {
    margin-right: 8px;
    color: white;
}

@media (max-width: 1024px) {
    .nav-phone {
        display: none;
    }
}

.brand {
    display: flex;
    align-items: center;
    margin-left: 0; 
    padding-left: 0; 
    gap: 15px;
    flex-shrink: 0; 
}

.brand-logo {
    width: 120px;
    height: auto;
    display: block;
    margin-left: -60px; /* 添加负的左外边距 */
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .brand {
        gap: 8px;
    }
    
    .brand-logo {
        width: 50px;
    }
    
    .brand h1 {
        font-size: 16px;
    }
    
    .header {
        padding: 10px 0;
    }
}

@media (max-width: 360px) {
    .brand h1 {
        font-size: 14px;
    }
    
    .brand-logo {
        width: 45px;
    }
}


