/* 语言切换器容器（关键：将按钮和菜单包含在同一个hover区域） */
.language-switcher {
    position: relative;
    margin: 0 15px;
    display: inline-block;
    vertical-align: middle;
    z-index: 999; /* 确保在最上层 */
    padding: 5px 0; /* 扩大hover触发区域，上下各加5px */
}

/* 触发按钮（消除与菜单的间隙） */
.lang-trigger {
    background: transparent;
    border: none;
    color: #6C6E76;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px; /* 扩大点击区域 */
    border-radius: 4px;
    margin: 0; /* 消除默认margin，避免间隙 */
}

/* 国旗图标 */
.icon-flag {
    width: 18px;
    height: 12px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}
.icon-flag.en { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3C!-- 红白条纹 --%3E%3Crect width='60' height='5.71' fill='%23b22234'/%3E%3Crect y='5.71' width='60' height='5.71' fill='%23fff'/%3E%3Crect y='11.42' width='60' height='5.71' fill='%23b22234'/%3E%3Crect y='17.13' width='60' height='5.71' fill='%23fff'/%3E%3Crect y='22.84' width='60' height='5.71' fill='%23b22234'/%3E%3Crect y='28.55' width='60' height='5.71' fill='%23fff'/%3E%3Crect y='34.26' width='60' height='5.74' fill='%23b22234'/%3E%3C!-- 蓝色矩形 --%3E%3Crect width='24' height='22.84' fill='%233c3b6e'/%3E%3C/svg%3E"); 
}
.icon-flag.es { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23f1bf00'/%3E%3Crect width='60' height='13' fill='%23aa151b'/%3E%3Crect y='27' width='60' height='13' fill='%23aa151b'/%3E%3Ccircle cx='30' cy='20' r='7' fill='%23aa151b'/%3E%3C/svg%3E"); }
.icon-flag.ru { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='13.33' fill='%23fff'/%3E%3Crect y='13.33' width='60' height='13.33' fill='%230039a6'/%3E%3Crect y='26.66' width='60' height='13.34' fill='%23d52b1e'/%3E%3C/svg%3E"); }
.icon-flag.ar { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23007a3d'/%3E%3Crect width='40' height='40' fill='%23fff'/%3E%3Crect width='20' height='40' fill='%23d80027'/%3E%3Ccircle cx='30' cy='20' r='8' fill='%23007a3d'/%3E%3C/svg%3E"); }
.icon-flag.hi { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='13.33' fill='%23ff9933'/%3E%3Crect y='13.33' width='60' height='13.34' fill='%23fff'/%3E%3Crect y='26.66' width='60' height='13.34' fill='%23138808'/%3E%3Ccircle cx='30' cy='20' r='5' fill='%23000'/%3E%3Cpath d='M30 15v10M25 20h10' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"); }

/* 下拉箭头（hover时旋转） */
.icon-chevron-down {
    font-size: 12px;
    transition: transform 0.2s ease;
}
.language-switcher:hover .icon-chevron-down {
    transform: rotate(180deg);
}

/* 下拉菜单（核心：通过容器hover控制显示） */
.lang-dropdown {
position: absolute;
    top: calc(100% - 5px);
    right: 0;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 6px 7px;
    margin: 0;
    list-style: none;
    display: none!important; 
    z-index: 999;
    overflow: visible;
    white-space: nowrap;
}

/* 容器hover时显示菜单（核心修复） */
.language-switcher:hover .lang-dropdown {
    display: block!important;
}

/* 下拉选项（扩大点击区域） */
.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px; /* 扩大hover区域 */
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.lang-dropdown li a small {
    color: #666;
    font-size: 12px;
    margin-left: 6px;
}
.lang-dropdown li a:hover {
    background: #f5f7fa;
    color: #007bff;
}

/* 社交区域布局（避免干扰） */
.tf-tb-social {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.tf-tb-social .text {
    white-space: nowrap;
}

/* 解决父元素可能的遮挡问题 */
.tf-container, .top-bar-inner {
    overflow: visible !important;
}
/*语言样式结束*/

/*额外的语言样式*/
ul.lang-dropdown li {
    margin-right: unset;
}
li.wzdr {margin-right: 3px!important;}


ul.lang-dropdown li {
    border-right: none!important;
}
.language-switcher {}

.language-switcher {display: block;position: absolute;right: 7%;}

/*额外语言样式结束*/


@media screen and (max-width: 767px) {

.top-header-wrapper li {
    display: none;
}

.top-header-wrapper {
    padding: 26px 0;
}

li.wzdr {
    display: block;
}

.language-switcher {
    right: 0px;
}

ul.lang-dropdown li {
    /* display: block; */
}

ul.lang-dropdown li {
    display: block;
}
    .top-header {
    display: block;
}
}





