/* 改进的导航菜单样式 - 避免z-index冲突 */

/* 重置导航菜单的z-index，避免遮挡语言选择器 */
.tem_head nav {
  position: absolute !important;
  top: 50% !important;
  right: 0 !important;
  margin-top: 25px !important;
  height: 105px !important;
  line-height: 105px !important;
  z-index: 100 !important; /* 降低z-index，让语言选择器优先显示 */
}

/* 导航菜单链接悬浮效果优化 */
.tem_head nav a:hover {
  border-radius: 2px !important;
  color: #667eea !important; /* 使用与语言选择器一致的主题色 */
  text-decoration: none !important;
  background: rgba(102, 126, 234, 0.1) !important; /* 半透明背景 */
  transition: all 0.3s ease !important;
}

/* 导航菜单下拉列表的z-index也需要调整 */
.tem_head nav ul li dl {
  position: absolute !important;
  top: 55px !important;
  left: 0 !important;
  z-index: 150 !important; /* 稍高于导航菜单但低于语言选择器 */
  display: none !important;
  width: 500px !important;
  background: #3489CA !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  pointer-events: none !important;
}

/* 当鼠标悬浮在父菜单项上时显示子菜单 */
.tem_head nav ul li:hover > dl {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition-delay: 0.2s !important; /* 添加200ms延迟，让用户有时间移动鼠标 */
}

/* 当鼠标在子菜单上时保持显示 */
.tem_head nav ul li dl:hover {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* 为了更好的视觉效果，给导航菜单添加现代化的悬浮效果 */
.tem_head nav ul li {
  position: relative !important;
  float: left !important;
  margin-left: 0px !important;
  padding: 0px 2px 0px 2px !important;
  border-left: 0px solid #dee2e6 !important;
  height: 20px !important;
  margin-top: 78px !important;
  height: 41px !important;
  line-height: 41px !important;
  transition: all 0.3s ease !important; /* 添加过渡效果 */
}

/* 导航菜单项悬浮时的微动画 */
.tem_head nav ul li:hover {
  transform: translateY(-1px) !important;
}

/* 确保导航菜单链接的现代化样式 */
.tem_head nav a {
  display: block !important;
  padding: 0 15px !important;
  color: #ffffff !important;
  margin-top: -43px !important;
  font-size: 14px !important;
  border-radius: 4px !important; /* 添加圆角 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; /* 更流畅的过渡 */
}

/* 移除过高的z-index值 */
.navflag {
  z-index: 200 !important; /* 降低z-index */
}

/* 确保语言选择器区域不受导航菜单影响 */
.language-selector {
  position: relative !important;
  display: inline-block !important;
  margin-top: 10px !important;
  z-index: 9999 !important; /* 确保在最上层 */
}

/* 确保语言选择器的下拉菜单在最上层 */
.language-dropdown {
  z-index: 10000 !important; /* 确保下拉菜单在所有元素之上 */
}