/**
 * 语言切换控件样式
 * 桌面端 + 移动端适配
 *
 * 定位策略：.lang-switch-wrapper 放置在 #zte-nav 导航栏内（.navbar-container 内、.navbar-menu 之前），
 * 使用 position:absolute 锚定到导航栏右上角，并保证 z-index 高于 .navbar-menu（absolute 覆盖层）。
 */

/* ==================== 桌面端 ==================== */
.lang-switch-wrapper {
    position: absolute;
    right: 0.2rem;
    top: 0;
    height: 0.7rem;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* 让下拉面板不被导航菜单 absolute 层遮挡 */
    pointer-events: none;
}

#zte-nav .lang-switch-wrapper {
    /* 锚定 #zte-nav（position:absolute 导航栏），确保在所有页面布局一致 */
    right: 1.8rem;
    top: 0;
    height: 100%;
}

.lang-switch {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    color: inherit;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.lang-switch:hover {
    opacity: 0.8;
}

/* 当前语言文本 */
.lang-current {
    margin-right: 4px;
    font-size: 14px;
    line-height: 1;
}

/* 下拉箭头 */
.lang-arrow {
    font-size: 10px;
    line-height: 1;
    transition: transform 0.2s ease;
    display: inline-block;
}

.lang-dropdown.show .lang-arrow {
    transform: rotate(180deg);
}

/* 下拉选项面板 */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 120px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    margin-top: 4px;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 下拉选项 */
.lang-option {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
    position: relative;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    color: #0078d4;
    font-weight: 600;
    padding-left: 28px;
}

.lang-option.active::before {
    content: '\2713';
    position: absolute;
    left: 8px;
    font-size: 12px;
    color: #0078d4;
}

/* 白色导航栏上的语言切换（默认深色文字） */
.new-header.white-nav .lang-switch {
    color: #333;
}

.new-header.white-nav .lang-dropdown {
    background: #fff;
    border: 1px solid #e8e8e8;
}

/* 滚动后固定导航栏上的语言切换 */
.new-header.fixed .lang-switch,
.new-header.not-home .lang-switch {
    color: #333;
}

/* ==================== 移动端 ==================== */
.mobile-lang-switch-wrapper {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

#mobileLangSwitch {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
}

#mobileLangSwitch .lang-current {
    font-weight: 500;
}

#mobileLangSwitch .lang-arrow {
    font-size: 10px;
}

#mobileLangDropdown {
    background: #f8f8f8;
    border-radius: 6px;
    margin-top: 4px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

#mobileLangDropdown.show {
    max-height: 120px;
    opacity: 1;
    visibility: visible;
}

#mobileLangDropdown .lang-option {
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    border-top: 1px solid #eee;
}

#mobileLangDropdown .lang-option:first-child {
    border-top: none;
}

#mobileLangDropdown .lang-option.active {
    color: #0078d4;
    font-weight: 600;
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 991px) {
    .lang-switch-wrapper {
        display: none;
    }
}

@media screen and (min-width: 992px) {
    .mobile-lang-switch-wrapper {
        display: none;
    }
}

/* ==================== 修复：导航下拉在英文切换后内容底部被裁剪 ====================
 * 站点编译产物（clientlibs）中 .nav-open-cs 被强制为 height:360px + overflow:hidden，
 * 而切换英文后 "解决方案与产品"(Solutions & Products) 下拉内容（.solutions-Products-main）
 * 实际高度需约 406px（中文约 396px），导致底部约 46px（英文）/36px（中文）被裁剪遮挡。
 * 此处提升下拉容器高度至能完整容纳英文内容（430px 已验证在多数页面布局正常），
 * 使英文与中文状态下下拉内容均完整可见。
 *
 * 注意：必须使用与编译产物完全相同的选择器才能覆盖：
 * #zte-nav .nav-content .nav-main .zte-navbar .navbar-container .navbar-menu .nav-open-cs { height: 360px !important; }
 */
#zte-nav .nav-content .nav-main .zte-navbar .navbar-container .navbar-menu .nav-open-cs {
    height: 430px !important;
    min-height: 430px !important;
}

/* 让内部 .nav-open 面板与容器高度一致，避免下拉面板下方出现空隙 */
html #zte-nav .navbar-menu .nav-open-cs .nav-open,
html #zte-nav .nav-content .nav-main .zte-navbar .navbar-container .navbar-menu .nav-open-cs .nav-open,
html .nav-open-cs .nav-open {
    height: 100% !important;
}

/* ==================== 修复：中英文导航下拉及标题文字拥挤/挤压问题 ====================
 * 1. 英文状态下 "解决方案与产品" 下拉菜单列宽被压缩到 40%，长文本（如 Digital Network Deployment）
 *    换行后行高为 normal，视觉上文字挤在一起；统一放宽列宽并增加行高。
 * 2. Banner 大标题与产品卡片标题字符/字母间距偏紧，增加少量 letter-spacing 提升可读性。
 */

/* 英文下拉菜单链接：避免过窄列宽导致单词被截断换行，同时给足行高 */
html[lang="en"] #zte-nav .solutions-Products-main .sp-ul-list.two-Columns ol li {
    width: 50%;
}

html[lang="en"] #zte-nav .solutions-Products-main .sp-list-li ol li .sp-li-a {
    line-height: 1.5;
}

/* 中文下拉菜单链接保持清晰行高 */
#zte-nav .solutions-Products-main .sp-list-li ol li .sp-li-a {
    line-height: 1.5;
}

/* Banner 大标题增加字间距，防止中英文在 bold 状态下显得拥挤 */
.t-banner .tl,
.t-banner h1 {
    letter-spacing: 0.02em;
}

/* 产品卡片标题增加字间距 */
.japan-home-hot-products-component .new-productc ul.new-productc-concent-new li .new-productc-concent-title,
.japan-home-hot-products-component .new-productc .new-productc-concent-mobile .new-productc-concent-title {
    letter-spacing: 0.02em;
}

/* 移动端导航子项增加行高，避免英文换行后文字拥挤 */
#zte-mobile-nav .zte-mobile-navber .sub-item.plate2 .item-entry .entry .entry-tit .entry-more>P .entry-more-ite {
    line-height: 1.4;
}

