header {
    position: relative;
    width: 100%;
    min-width: 1200px;
    height: 66px;
    transition: background-color 0.3s ease; /* 添加平滑过渡 */
}
/*主页用*/
header.transparent {
    background-color: transparent; /* 默认透明 */
}
/*其他页面用*/
header.white {
    background-color: #fff;
}

header.block {
    position: fixed;
    z-index: 9999;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

/*固定header占位用，与header高度相同*/
.header-placeholder{
    height: 66px;
}

header:hover {
    background-color: #fff;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

#nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 1200px;
    margin: 0 auto;
    z-index: 30;
    overflow: visible;
}

#nav-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 所有右侧内容靠右 */
    justify-content: space-between;
    height: 100%;
    gap: 5px; /* 两行间距 */
}

#nav-right .top-row {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    align-items: center;
}

#nav-right .bottom-row {
    display: flex;
    justify-content: flex-end; /* 菜单靠右 */
    width: 100%;
}

#nav-logo {
    display: flex;
    align-items: center;
    z-index: 15;
}

#nav-logo a {
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

#nav-logo a img {
    width: 296px;
    height: 42px;
}

#nav-contact {
    display: flex;
    z-index: 14;
}

#nav-lang {
    display: flex;
    z-index: 14;
}

.mw-iconfont {
    font-family: "mw-iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
}

#nav-contact a, #nav-lang a {
    line-height: 23px;
    display: inline-block;
    border-top: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-left: 1px solid transparent;
    cursor: pointer;
    outline: none;
    text-align: center;
    padding: 0 5px;
    font-family: Arial;
    font-size: 15px;
    color: #999999;
    font-weight: 400;
    font-style: normal;
    text-decoration: none;/*取消下划线*/
}

#nav-contact a,
#nav-lang a {
    display: flex;
    align-items: center;
    gap: 5px;
}

#nav-search {
    display: flex;
    width: 196px;
    z-index: 12;
}

#nav-search form {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0; /* 避免 form 默认 margin 影响布局 */
}

#nav-search input {
    flex: 1;
    height: 30px;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
    border: none;
    outline: none;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #444;
    background-color: rgba(0, 0, 0, 0.1);
}

#nav-search button {
    height: 30px;
    line-height: 30px;
    padding: 0 15px;
    border: none;
    outline: none;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    color: #444;
    background-color: rgba(0, 0, 0, 0.1);
}

#nav-search button:hover {
    background-color: #fff;
    cursor: pointer;
}

#nav-menu {
    display: flex;
    height: 36px;
    z-index: 100002;
}

/* 基本样式 */
#nav-menu, #nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav-menu .nav_item_level1 {
    position: relative;
    float: left; /* 一级菜单水平排列 */
    width: 120px;
    height: 32px;
    line-height: 32px;
}

/* 一级菜单 a 样式 */
#nav-menu .nav_item_level1 > a {
    margin: 0;
    padding: 0;
    line-height: 30px;
    display: block;
    text-align: center;
    font-family: Arial;
    font-size: 17px;
    color: #000000;
    font-weight: bold;
    text-decoration: none;
    border-top: 2px solid transparent;
    border-bottom: 0 solid transparent;
}

/* 二级菜单初始隐藏 */
#nav-menu li ul {
    width: 280px;
    top: 100%; /* 从父菜单下方开始 */
    left: 0;
    display: none;
    position: absolute;
    background: #EEE;
    min-width: 280px;
    z-index: 10;
}

/* 二级菜单 a 样式 */
#nav-menu .nav_item_level2 > a {
    display: block;
    font-size: 15px;
    font-weight: bold;
    font-style: normal;
    padding: 4px 10px;
    color: #666666;
    text-decoration: none;
}

/* 鼠标悬浮展开二级菜单 */
#nav-menu .nav_item_level1:hover > ul {
    display: block;
}

/* 三级菜单初始隐藏 */
#nav-menu li ul li ul {
    display: none;
    position: absolute;
    top: 0;
    left: 100%; /* 默认向右展开 */
    background: #fff;
    min-width: 280px;
}

/* 三级菜单 a 样式 */
#nav-menu .nav_item_level3 > a {
    display: block;
    padding: 4px 15px;
    font-size: 15px;
    color: #000000;
    font-weight: normal;
    font-style: normal;
    text-decoration: none;
}

/* 鼠标悬浮展开三级菜单 */
#nav-menu li ul li:hover > ul {
    display: block;
}

/* 可选：三级菜单向左展开（如果右边空间不足，可以用 JS 动态调整 left） */
#nav-menu li ul li ul.left {
    left: auto;
    right: 100%; /* 向左展开 */
}

/* 悬浮和选中效果 */
#nav-menu .nav_item_level1:hover,
#nav-menu .nav_item_level1.active_level1 {
    color: #000000;
    background-image: url(../images/line_nav.png);
    background-repeat: no-repeat;
    background-position: center bottom; /* 水平居中，底部对齐 */
    background-size: auto;
    background-color: transparent;
    border: none;
}

#nav-menu .nav_item_level2:hover,
#nav-menu .nav_item_level2.active_level2 {
    background-color: rgb(255, 255, 255);
}
#nav-menu .nav_item_level2:hover > a,
#nav-menu .nav_item_level2.active_level2 > a {
    color: #660000;
}

#nav-menu .nav_item_level3:hover,
#nav-menu .nav_item_level3.active_level3 {
    background: #EEE;
}
#nav-menu .nav_item_level3:hover > a {
    display: block;
    font-weight: bold;
    font-style: normal;
    color: #660000;
}

.active_level3 > a {
    display: block;
    font-weight: bold;
    font-style: normal;
    color: #000000;
}