/* Logo区域样式 */
.logo-box {
    height: 80px;
    display: flex;
    align-items: center;
}

.logo-box img {
    height: 51%;
    width: auto;
    object-fit: contain;
}

/* 汉堡菜单按钮 - 桌面端隐藏 */
.menu-toggle {
    display: none;
}
.navbar{
   width: 100%;
    height: 100px;
    position: fixed; /* 改为fixed定位 */
    top: 0; /* 改为0 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* 添加z-index确保导航栏在最上层 */
     background: transparent; /* 默认透明背景 */
    transition: all 0.3s ease; /* 添加过渡动画 */
}
.nav-container{
    width: 78%;
    line-height: 135px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-links{
    width: 70%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-item{
    list-style-type: none;
    position: relative;
}
/* 二级导航菜单 - 带动画和居中文字版本 */
.nav-item {
    position: relative;
}

.nav-item > ul {
    position: absolute;
    top: 100%;
    left: -5px;
    width: 210px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-item:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item > ul li {
    margin: 0;
}

.nav-item > ul li a {
    display: block;
    padding: 12px 15px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.nav-item > ul li:last-child a {
    border-bottom: none;
}

.nav-item > ul li a:hover {
    background: #f8f8f8;
    color: #E60012;
    padding-left: 20px;
    padding-right: 20px;
}

/* 滚动状态下的二级菜单 */
.navbar.scrolled .nav-item > ul {
    top: 60px;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .nav-item > ul {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .nav-item > ul li a {
        padding: 12px 20px;
        font-size: 16px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .nav-item > ul li a:hover {
        padding-left: 25px;
        padding-right: 15px;
    }

    .navbar.scrolled .nav-item > ul {
        top: auto;
    }
}



.nav-item a{
    width: 168px;
    height: 14px;
    font-family: Poppins, Poppins;
    font-weight: 400;
    font-size: 18px;

    line-height: 29px;
    text-align: left;
    font-style: normal;
    text-transform: none;
    text-decoration: none;
    position: relative;
    color: #333;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}
/* 导航链接悬停效果 */
.nav-item a:hover {
    color: #E60012;
}
/* 下划线动画效果 */
.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #E60012;
    transition: width 0.3s ease, left 0.3s ease;
}

/* 悬停下划线显示 */
.nav-item a:hover::after {
    width: 100%;
    left: 0;
}

/* 点击后高亮状态 */
.nav-item a.active {
    color: #E60012;
}

.nav-item a.active::after {
    width: 100%;
    left: 0;
}
/* 滚动时的白色背景样式 */
.navbar.scrolled {
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}

.navbar.scrolled .nav-container {
    height: 80px;
    line-height: 80px;
}

.navbar.scrolled .nav-links {

}

/* 滚动时导航链接文字颜色变深 */
.navbar.scrolled .nav-item a {
    color: #333;
}



/* 语言选择器样式 */
.lang-select {
    margin-left: 20px;
}

.lang-select select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f3f3f3;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.lang-select select:hover {
    border-color: #999;
}

.lang-select select:focus {
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}






/* =======================手机端================================================= */
@media (max-width: 768px) {
    .logo-box img {
        width: auto;
        object-fit: contain;
        height: 37%;
    }
    /* 汉堡菜单按钮 - 手机端显示 */
    .menu-toggle {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    /* 导航栏布局调整 */
    .navbar {
        height: 70px;
        justify-content: flex-start;
        padding: 0 20px;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-container {
        width: 100%;
        height: 70px;
        line-height: 70px;
        flex-direction: row;
        justify-content: space-between;
    }

    /* 导航链接区域 - 手机端隐藏 */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 0;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        margin: 10px 0;
    }

    .nav-item a {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        text-align: left;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }

    /* 移除桌面端的下划线动画 */
    .nav-item a::after {
        display: none;
    }

    .nav-item a:hover {
        background-color: #f8f8f8;
        color: #E60012;
    }

    /* 语言选择器调整 */
    .lang-select {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .lang-select select {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }


}

/* 小屏幕手机特殊样式 */
@media (max-width: 480px) {
    .navbar {
        height: 60px;
        padding: 0 0px;
    }

    .nav-container {
        height: 60px;
        line-height: 60px;
    }

    .menu-toggle {
        top: 20px;
        right: 15px;
    }

    .nav-links {
        top: 45px;
        height: calc(100vh - 60px);
    }


}
