/* 头部容器 */
.site-header {
  background-color: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
}

.header-container {
  /* max-width: 1200px; */
  margin: 0 auto;
  padding: 0 150px;
}

@media (max-width: 1499px) {
  .header-container {
    padding: 0 60px;
  }
}

@media (max-width: 1299px) {
  .header-container {
    padding: 0 20px;
  }
}

/* 头部主要内容区域 */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

/* 左侧区域 */
.header-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo-container {
  margin-right: 20px;
}

.logo {
  height: 60px;
  width: auto;
}

@media (max-width: 1199px) {
  .logo {
    height: 50px;
  }
}

@media (max-width: 768px) {
  .logo {
    height: 40px;
  }
}

.language-switcher {
  /* padding: 8px 12px; */
  background-color: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

/* .language-switcher:hover {
  background-color: #223880;
  color: white;
}

.language-switcher i {
  margin-right: 5px;
  color: #223880;
}

.language-switcher:hover i {
  color: white;
} */

/* 中间导航区域 */
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav {
  display: flex;
  list-style: none;
}

.nav-item {
  position: relative;
  margin: 0 15px;
}

@media (max-width: 1299px) {
  .nav-item {
    margin: 0 10px;
  }
}

.nav-link {
  text-decoration: none;
  color: #333333;
  font-weight: 500;
  padding: 10px 0;
  display: flex;
  align-items: center;
  transition: color 0.3s;
  font-size: 20px;
}

.nav-link:hover {
  color: #223880;
}

/* 最可靠的高亮方案 */
.nav-item.current-menu-item>.nav-link,
.nav-item.current-menu-ancestor>.nav-link {
  color: #223880 !important;
}

.submenu-container.current-menu-ancestor>.dropdown-item.has-children {
  color: #223880 !important;
}

.dropdown-item.current-menu-item a {
  color: #223880 !important;
}

.nav-link i {
  margin-left: 5px;
  font-size: 12px;
  transition: transform 0.3s;
}

.nav-item:hover .nav-link i {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333333;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s;
  position: relative;
  font-size: 16px;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
  color: #223880;
}

/* 二级菜单项样式 */
.dropdown-item.has-children {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-item.has-children::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  color: #666;
}

/* 三级菜单容器 */
.submenu-container {
  position: relative;
}

/* 三级下拉菜单 */
.sub-dropdown {
  position: absolute;
  left: 100%;
  top: 0;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s;
  z-index: 101;
}

/* 三级菜单在悬停时显示 */
.submenu-container:hover .sub-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* 右侧区域 */
.header-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.header-contact,
.header-search {
  margin-left: 20px;
  position: relative;
  width: 36px;
  height: 36px;
  background-color: #223880;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1299px) {
  .header-contact {
    display: none;
  }
}

.contact-icon,
.search-icon {
  font-size: 18px;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s;
}

/* 悬停显示内容 - 添加动画效果 */
.contact-info,
.search-box {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 15px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  transform-origin: top right;
}

.search-box form {
  position: relative;
}

.search-box form input {
  padding-right: 40px;
}

.search-box form button {
  background: none;
  color: #333333;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-contact:hover .contact-info,
.header-search:hover .search-box {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.contact-info {
  text-align: center;
}

.phone-number {
  font-size: 18px;
  font-weight: bold;
  color: #223880;
  /* margin-bottom: 5px; */
}

.contact-time {
  font-size: 14px;
  color: #666;
}

.search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

.search-box input:focus {
  border-color: #223880;
}

/* 移动端样式 */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  z-index: 1002;
}

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: left 0.4s ease;
  z-index: 1001;
  padding: 70px 20px 20px;
  overflow-y: auto;
}

.mobile-menu.active {
  left: 0;
}

/* 移动端菜单样式 */
.mobile-nav {
  list-style: none;
  /* background: white; */
  border-radius: 8px;
  overflow: hidden;
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

.mobile-nav-item {
  border-bottom: 1px solid #eee;
}

.mobile-nav-item:last-child {
  border-bottom: none;
}

/* 一级菜单项 */
.nav-item-wrapper {
  display: flex;
  align-items: center;
  padding: 0;
}

.mobile-nav-link {
  flex: 1;
  padding: 15px 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  display: block;
  transition: background-color 0.3s;
}

.mobile-nav-link:hover {
  background-color: #f9f9f9;
}

.mobile-toggle-icon {
  padding: 15px 20px;
  cursor: pointer;
  color: #666;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
}

.mobile-toggle-icon:hover {
  background-color: #f0f0f0;
}

/* 二级菜单 */
.mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f9f9f9;
}

.mobile-nav-item.active .mobile-dropdown {
  max-height: 1000px;
}

.mobile-dropdown-item {
  border-bottom: 1px solid #eee;
}

.mobile-dropdown-item:last-child {
  border-bottom: none;
}

/* 有子菜单的二级菜单项 */
.dropdown-item-wrapper {
  display: flex;
  align-items: center;
  padding: 0;
}

.mobile-dropdown-link {
  flex: 1;
  padding: 12px 20px;
  text-decoration: none;
  color: #666;
  display: block;
  transition: background-color 0.3s;
}

.mobile-dropdown-link:hover {
  background-color: #f0f0f0;
  color: #223880;
}

/* 三级菜单 */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f0f0f0;
}

.mobile-dropdown-item.active .mobile-submenu {
  max-height: 1000px;
}

.mobile-submenu-item {
  display: block;
  padding: 10px 20px 10px 40px;
  text-decoration: none;
  color: #888;
  border-bottom: 1px solid #e5e5e5;
  transition: all 0.3s;
}

.mobile-submenu-item:last-child {
  border-bottom: none;
}

.mobile-submenu-item:hover {
  background-color: #e8e8e8;
  color: #223880;
}

/* 箭头动画 - 分别控制各级菜单 */
.mobile-nav-item .mobile-toggle-icon i {
  transition: transform 0.3s ease;
}

.mobile-nav-item.active .nav-item-wrapper .mobile-toggle-icon i {
  transform: rotate(180deg);
}

.mobile-dropdown-item .mobile-toggle-icon i {
  transition: transform 0.3s ease;
}

.mobile-dropdown-item.active .dropdown-item-wrapper .mobile-toggle-icon i {
  transform: rotate(180deg);
}

/* 激活状态 */
.mobile-nav-item.active>.nav-item-wrapper .mobile-nav-link,
.mobile-dropdown-item.active>.dropdown-item-wrapper .mobile-dropdown-link {
  color: #223880;
  font-weight: 600;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-header-right {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.mobile-contact,
.mobile-search {
  margin-bottom: 15px;
}

.mobile-contact-info {
  text-align: center;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.mobile-search-box {
  display: flex;
}

.mobile-search-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.mobile-search-box button {
  height: 100%;
  background-color: #223880;
  color: white;
  border: none;
  padding: 0 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 1099px) {

  .header-center,
  .header-right {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .header-left {
    flex: 1;
  }

  .header-main {
    padding: 10px 0;
  }

  .mobile-header-right {
    display: block;
  }
}

/* @media (max-width: 576px) {
  .language-switcher span {
    display: none;
  }

  .language-switcher {
    padding: 8px;
  }
} */
