/* ===== Language dropdown (top nav, after 联系我们) ===== */
.lang-switch {
    cursor: pointer;
}

.lang-switch > .lang-current {
    display: inline-flex;
    align-items: center;
    height: 40px;
    line-height: 40px;
    font-size: 12px;
    color: #b0b0b0;
    text-decoration: none;
    white-space: nowrap;
}

.lang-switch:hover > .lang-current,
.lang-switch.open > .lang-current {
    color: #ffffff;
}

.lang-caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform .2s ease;
}

.lang-switch.open > .lang-current .lang-caret {
    transform: rotate(180deg);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    min-width: 140px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    z-index: 99999;
}

/* 桌面端悬停展开 + 移动端点击展开 */
.lang-switch:hover > .lang-menu,
.lang-switch.open > .lang-menu {
    display: block;
}

.lang-menu li {
    width: 100%;
}

/* 语言项之间用横线分割 */
.lang-menu li + li {
    border-top: 1px solid #eeeeee;
}

.lang-menu li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 0;
    font-size: 13px;
    color: #555555;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

/* 高优先级：覆盖 .nav .nav_top li:hover > a（白字），避免 hover 时白字落在白底上看不见 */
.nav .nav_top .lang-switch .lang-menu li a {
    color: #555555;
}

.nav .nav_top .lang-switch .lang-menu li a:hover {
    background-color: #f5f8ff;
    color: #2d83e8;
}

.lang-menu li.active a,
.lang-menu li.active a:hover {
    background-color: #f0f6ff;
    color: #2d83e8;
    font-weight: 600;
}

.lang-menu li.active a::after {
    content: '\2713';
    margin-left: 8px;
    font-weight: 700;
}

/* 移动端（窄屏）下拉框全屏宽度、内容居中 */
@media (max-width: 767px) {
    .lang-switch .lang-menu,
    .nav .nav_top .lang-switch .lang-menu {
        position: fixed;
        top: 40px;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* ===== Mobile slide-out menu language toggle ===== */
.nav-menu__lang a,
a.nav-menu__lang {
    font-weight: 600;
    color: #2d83e8;
}
