/* ============================================
   多语言公共样式 - Common Multilingual Styles
   从index.html提取的所有多语言相关CSS
   ============================================ */

/* 语言选择器样式 */
.top-language {
  z-index: 999999;
  position: fixed;
  top: 30px;
  right: 0px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.current-lang {
  padding: 10px 20px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  user-select: none;
  width: 140px;
  justify-content: flex-start;
}
.current-lang:hover {
  background: rgba(255,255,255,1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.lang-icon {
  font-size: 18px;
  line-height: 1;
}
.lang-text {
  font-weight: 500;
  white-space: nowrap;
}
.lang-list {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 160px;
  list-style: none;
  padding: 6px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}
.top-language.active .lang-list {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-list li {
  margin: 0;
  padding: 0;
}
.lang-list li a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
}
.lang-list li a:hover {
  background: #f5f5f5;
  color: #0066cc;
}
.lang-list li a.active {
  background: #e3f2fd;
  color: #0066cc;
  font-weight: 600;
}
.lang-list li:first-child a {
  border-radius: 8px 8px 0 0;
}
.lang-list li:last-child a {
  border-radius: 0 0 8px 8px;
}

/* 导航菜单固定布局 - 强制锁定宽度，允许多行显示 */
.header-menu .ul li {
  width: 14.2857% !important;
  max-width: 14.2857% !important;
  min-width: 14.2857% !important;
  box-sizing: border-box !important;
  flex-shrink: 0;
  flex-grow: 0;
}

.header-menu .ul li em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  line-height: 1.3;
}

.header-menu .ul li em a {
  display: block;
  width: 100%;
  padding-left: 5px;
  padding-right: 5px;
  box-sizing: border-box;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.3;
  text-align: center;
}

/* 简体中文和繁体中文保持正常字体 */
html[lang="zh-CN"] .header-menu .ul li em a,
html[lang="zh-TW"] .header-menu .ul li em a {
  font-size: 16px;
  white-space: nowrap;
}

/* 其他所有语言使用更小字体，允许换行 */
html[lang="en"] .header-menu .ul li em a,
html[lang="de"] .header-menu .ul li em a,
html[lang="ja"] .header-menu .ul li em a,
html[lang="ko"] .header-menu .ul li em a,
html[lang="ru"] .header-menu .ul li em a,
html[lang="it"] .header-menu .ul li em a {
  font-size: 11px;
  letter-spacing: -0.5px;
  white-space: normal;
}

/* 法语、西班牙语、葡萄牙语使用更小字体 */
html[lang="fr"] .header-menu .ul li em a,
html[lang="es"] .header-menu .ul li em a,
html[lang="pt"] .header-menu .ul li em a {
  font-size: 10px;
  letter-spacing: -0.6px;
  white-space: normal;
}

/* 长文本语言的顶部菜单布局优化 */
html[lang="en"] .site-header .header-menu li em {
  padding: 0 16px;
  font-size: 14px;
  min-width: 100px;
  max-width: 140px;
}

html[lang="en"] .site-header .header-menu li em a {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  text-align: center;
}

html[lang="fr"] .site-header .header-menu li em,
html[lang="es"] .site-header .header-menu li em,
html[lang="pt"] .site-header .header-menu li em,
html[lang="de"] .site-header .header-menu li em {
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: -0.3px;
  min-width: 90px;
  max-width: 130px;
}

html[lang="fr"] .site-header .header-menu li em a,
html[lang="es"] .site-header .header-menu li em a,
html[lang="pt"] .site-header .header-menu li em a,
html[lang="de"] .site-header .header-menu li em a {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  text-align: center;
}

html[lang="ru"] .site-header .header-menu li em {
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: -0.4px;
  min-width: 85px;
  max-width: 120px;
}

html[lang="ru"] .site-header .header-menu li em a {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
  text-align: center;
}

/* Footer导航菜单全局布局 - 所有语言统一 */
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}

.site-footer nav dl {
  margin-bottom: 0.4rem;
  margin-right: 0.35rem;
  flex: 0 0 auto;
}

/* 使用order重新排序：1,2,3,7 在第一行，4,5,6 在第二行 */
.site-footer nav dl:nth-child(1) { order: 1; width: 1.9rem; }
.site-footer nav dl:nth-child(2) { order: 2; width: 1.9rem; }
.site-footer nav dl:nth-child(3) { order: 3; width: 1.9rem; }
.site-footer nav dl:nth-child(4) { order: 5; width: 1.9rem; }
.site-footer nav dl:nth-child(5) { order: 6; width: 1.9rem; }
.site-footer nav dl:nth-child(6) { order: 7; width: 1.9rem; }
.site-footer nav dl:nth-child(7) { order: 4; width: 2.0rem; }

/* 移除最后一个元素的右边距，确保换行 */
.site-footer nav dl:nth-child(7) {
  margin-right: 0;
}

/* 关注我们部分 - 二维码居中对齐 */
.site-footer nav dl:nth-child(7) dd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.site-footer nav dl:nth-child(7) .code {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-footer nav dl:nth-child(7) .code img {
  display: block;
  margin: 0 auto;
}

.site-footer nav dl:nth-child(7) .code p {
  margin-top: 0.1rem;
  text-align: center;
}

/* 长文本语言的字体调整 */
html[lang="en"] .site-footer nav dl dt,
html[lang="fr"] .site-footer nav dl dt,
html[lang="es"] .site-footer nav dl dt,
html[lang="pt"] .site-footer nav dl dt,
html[lang="de"] .site-footer nav dl dt,
html[lang="ru"] .site-footer nav dl dt {
  font-size: 0.15rem;
  line-height: 1.4;
  margin-bottom: 0.15rem;
  word-wrap: break-word;
  white-space: normal;
}

html[lang="en"] .site-footer nav dd,
html[lang="fr"] .site-footer nav dd,
html[lang="es"] .site-footer nav dd,
html[lang="pt"] .site-footer nav dd,
html[lang="de"] .site-footer nav dd,
html[lang="ru"] .site-footer nav dd {
  font-size: 0.13rem;
  line-height: 0.24rem;
  word-wrap: break-word;
}

/* 友情链接布局调整 */
html[lang="en"] .site-footer .links,
html[lang="fr"] .site-footer .links,
html[lang="es"] .site-footer .links,
html[lang="pt"] .site-footer .links,
html[lang="de"] .site-footer .links,
html[lang="ru"] .site-footer .links {
  padding-left: 150px;
}

html[lang="en"] .site-footer .links span,
html[lang="fr"] .site-footer .links span,
html[lang="es"] .site-footer .links span,
html[lang="pt"] .site-footer .links span,
html[lang="de"] .site-footer .links span {
  width: 140px;
  text-align: left;
}

/* 俄语友情链接标签需要更宽 */
html[lang="ru"] .site-footer .links {
  padding-left: 210px;
}

html[lang="ru"] .site-footer .links span {
  width: 200px;
  text-align: left;
}

html[lang="en"] .site-footer .links a,
html[lang="fr"] .site-footer .links a,
html[lang="es"] .site-footer .links a,
html[lang="pt"] .site-footer .links a,
html[lang="de"] .site-footer .links a {
  font-size: 13px;
}

/* 日语和韩语的友情链接调整 */
html[lang="ja"] .site-footer .links,
html[lang="ko"] .site-footer .links {
  padding-left: 110px;
}

html[lang="ja"] .site-footer .links span,
html[lang="ko"] .site-footer .links span {
  width: 100px;
}

/* 联系信息电话号码优化 */
.site-footer .contact li b {
  display: block;
  line-height: 1.4;
  word-break: break-word;
}

.site-footer .contact li b span {
  display: inline-block;
  margin-right: 8px;
}

/* 长文本语言的电话号码字体调整 */
html[lang="en"] .site-footer .contact li b,
html[lang="fr"] .site-footer .contact li b,
html[lang="es"] .site-footer .contact li b,
html[lang="pt"] .site-footer .contact li b,
html[lang="de"] .site-footer .contact li b,
html[lang="ru"] .site-footer .contact li b {
  font-size: 0.24rem;
}

/* ============================================
   侧边导航菜单(NYmenu)多语言优化
   ============================================ */

/* 法语、西班牙语、葡萄牙语、德语的侧边导航字体调整 */
html[lang="fr"] .NYmenu .nav-menu ul li,
html[lang="es"] .NYmenu .nav-menu ul li,
html[lang="pt"] .NYmenu .nav-menu ul li,
html[lang="de"] .NYmenu .nav-menu ul li {
  font-size: 0.13rem;
  padding: 0 15px;
  margin: 0 4px;
}

/* 英语的侧边导航字体调整 */
html[lang="en"] .NYmenu .nav-menu ul li {
  font-size: 0.14rem;
  padding: 0 18px;
}

/* 俄语的侧边导航字体调整 */
html[lang="ru"] .NYmenu .nav-menu ul li {
  font-size: 0.12rem;
  padding: 0 12px;
  margin: 0 3px;
}

/* 长文本语言的面包屑导航字体调整 */
html[lang="fr"] .NYmenu .current a,
html[lang="es"] .NYmenu .current a,
html[lang="pt"] .NYmenu .current a,
html[lang="de"] .NYmenu .current a,
html[lang="ru"] .NYmenu .current a {
  font-size: 0.13rem;
}

html[lang="en"] .NYmenu .current a {
  font-size: 0.14rem;
}
