.pages .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  height: 60px;
  z-index: 10000;
  box-sizing: border-box;
}

.pages .header .header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 70px;
  background: rgba(61, 148, 224, 0.26);
  padding: 0 302px 0 280px;
  box-shadow: 0px 3px 6px rgba(0, 37, 93, 0.05);
  z-index: 10000;
  box-sizing: border-box;
}

.pages .header .header-box .left-box {
  display: flex;
  align-items: center;
}

.pages .header .header-box .left-box .brand-name {
  margin-left: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
}

.pages .header .header-box .left-box .logo {
  height: 40px;
  cursor: pointer;
}

.pages .header .header-box .left-box .logo img {
  width: 168px;
  height: 50px;
}

/* 导航菜单 */
.pages .header .header-box .right-box {
  position: relative;
  display: flex;
  align-items: center;
}

.pages .header .header-box .right-box .nav-item {
  display: flex;
  align-items: center;
  color: #FFFFFF;
  font-size: 14px;
  margin-left: 40px;
  cursor: pointer;
  transition: all 0.3s;
}

.pages .header .header-box .right-box .nav-item span {
  display: inline-block;
}

.pages .header .header-box .right-box .nav-item .iconfont {
  font-size: 13px;
  margin-right: 8px;
  color: #FFFFFF; /* 默认状态下图标为白色 */
  flex-shrink: 0;
}



/* Iconfont图标样式已在上方统一定义 */

.pages .header .header-box .right-box .nav-item:hover {
  opacity: 0.8;
}

.pages .header .header-box .right-box .nav-item.active {
  background: #FFFFFF;
  color: #E50014;
  padding: 12px 32px;
  border-radius: 8px;
}

.pages .header .header-box .right-box .nav-item .iconfont {
  color: #FFFFFF;
}
.pages .header .header-box .right-box .nav-item.active .iconfont {
  color: #E50014;
}
.pages .header .header-box.scrolled .right-box .nav-item.active {
  background: rgba(229, 0, 20, 0.1);
  color: #E50014;
}

.pages .header .header-box.scrolled .right-box .nav-item.active .iconfont {
  color: #E50014;
}

.pages .contact-box {
  position: fixed;
  top: 45%;
  right: 10px;
  width: 112px;
  height: 411px;
  background: url("../images/contact-icon3.png") no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 22px;
}

.pages .contact-box .contact-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pages .contact-box .contact-panel .robot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pages .contact-box .contact-panel .robot img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff;
  margin-bottom: 11px;

}

.pages .contact-box .online-btn {
  width: 72px;
  height: 29px;
  background: url("../images/contact-icon7.png") no-repeat;
  color: #fff;
  /* padding: 6px 10px; */
  border-radius: 18px;
  font-size: 12px;
  margin-bottom: 22px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pages .contact-box .contact-items {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}

.pages .contact-box .contact-items .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.pages .contact-box .contact-items .item img {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
}

.pages .contact-box .contact-items .item.top img {
  width: 26px;
  height: 26px;
}

/* WeChat QR popup */
.pages .contact-box .contact-items .item.wechat {
  position: relative;
}

.pages .contact-box .contact-items .item.wechat .wechat-qr {
  position: absolute;
  right: 170%;
  top: 50%;
  transform: translateY(-50%) translateX(-10px) scale(0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(.2,.9,.3,1);
  width: 260px;
  pointer-events: none;
  box-shadow: 0 18px 40px rgba(7, 67, 132, 0.12);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.pages .contact-box .contact-items .item.wechat .wechat-qr img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.pages .contact-box .contact-items .item.wechat:hover .wechat-qr,
.pages .contact-box .contact-items .item.wechat:focus-within .wechat-qr {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px) scale(1);
  pointer-events: auto;
}

/* Phone popup */
.pages .contact-box .contact-items .item.phone {
  position: relative;
}

.pages .contact-box .contact-items .item.phone .phone-popup {
  position: absolute;
  right: 170%;
  top: 50%;
  transform: translateY(-50%) translateX(-10px) scale(0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(.2,.9,.3,1);
  width: auto;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(7, 67, 132, 0.08);
  border-radius: 6px;
  background: #ffffff;
  padding: 8px 12px;
  white-space: nowrap;
  z-index: 1000;
}

.pages .contact-box .contact-items .item.phone .phone-number {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
}

.pages .contact-box .contact-items .item.phone:hover .phone-popup,
.pages .contact-box .contact-items .item.phone:focus-within .phone-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px) scale(1);
  pointer-events: auto;
}

.pages .contact-box .tip-box {
  display: none;
  position: absolute;
  right: 110%;
  top: 0;
}

.pages .contact-box .contact-panel:hover .tip-box {
  display: block;
}

.pages .contact-box .tip-box .tip {
  width: 360px;
  height: auto;
  background: url("../images/contact-icon2.png") no-repeat;
  background-position: center;
  font-size: 16px;
  font-family: MiSans;
  color: #fff;
  padding: 18px;
}

.pages .contact-box .tip-box .tip .content {
  display: flex;
}

.pages .contact-box .tip-box .tip .content .txt {
  width: 267px;
  flex-shrink: 0;
  word-break: break-all;
}

/* 滚动后的header样式 */
.pages .header .header-box.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}

.pages .header .header-box.scrolled .right-box .nav-item {
  color: #333333;
}

.pages .header .header-box.scrolled .right-box .nav-item.active {
  background: #E50014;
  color: #FFFFFF;
}

.pages .header .header-box.scrolled .right-box .nav-item.active .iconfont {
  color: #FFFFFF; /* 滚动后首页按钮图标为白色，与文字颜色一致 */
}

.pages .header .header-box.scrolled .right-box .nav-item .iconfont {
  color: #333333; /* 滚动后图标为深色 */
}

/* ========== 头部宽度保护 ========== */

/* 确保头部始终保持全宽度，不受其他元素动画影响 */
.pages .header {
  /* 强制宽度设置 */
  width: 100vw !important;
  min-width: 100vw !important;
  max-width: 100vw !important;
  /* 强制定位 */
  left: 0 !important;
  right: 0 !important;
  /* 防止其他样式覆盖 */
  box-sizing: border-box !important;
  /* 提升层级 */
  z-index: 10000 !important;
}

.pages .header .header-box {
  /* 强制宽度设置 */
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  /* 防止其他样式覆盖 */
  box-sizing: border-box !important;
  /* 提升层级 */
  z-index: 10000 !important;
}

/* ========== 移动端适配 ========== */

 /* 桌面端隐藏汉堡菜单按钮 */
@media (min-width: 769px) {
  .pages .header .header-box .menu-toggle {
    display: none;
  }
}

/* 平板端适配 (1024px 及以下) */
@media (max-width: 1024px) {
  .pages .header .header-box {
    padding: 0 150px 0 150px;
  }

  .pages .header .header-box .right-box .nav-item {
    margin-left: 30px;
    font-size: 13px;
    padding: 10px 24px;
  }

  .pages .header .header-box .right-box .nav-item.active {
    padding: 10px 24px;
  }
  .pages .header .header-box .left-box .logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pages .header .header-box .left-box .logo img {
    width: 140px;
    height: 42px;
  }
}

/* 移动端适配 (768px 及以下) */
@media (max-width: 768px) {
  .pages .header {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }

  .pages .header .header-box {
    height: 60px;
    padding: 0 20px;
    position: relative;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .pages .header .header-box .left-box .logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pages .header .header-box .left-box .logo img {
    width: 120px;
    height: 36px;
  }

  .pages .header .header-box .left-box .brand-name {
    font-size: 18px;
    margin-left: 10px;
  }

  /* 导航菜单移动端调整 */
  .pages .header .header-box .right-box {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
  }

  .pages .header .header-box .right-box.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .pages .header .header-box .right-box .nav-item {
    margin-left: 0;
    margin-bottom: 10px;
    justify-content: center;
    font-size: 16px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #333333;
  }

  .pages .header .header-box .right-box .nav-item:hover {
    opacity: 1;
    background: rgba(229, 0, 20, 0.1);
  }

  .pages .header .header-box .right-box .nav-item.active {
    background: #E50014;
    color: #FFFFFF;
    padding: 15px 20px;
  }

  .pages .header .header-box .right-box .nav-item .iconfont {
    color: #333333;
  }

  .pages .header .header-box .right-box .nav-item.active .iconfont {
    color: #FFFFFF;
  }

  /* 添加汉堡菜单按钮 */
  .pages .header .header-box .menu-toggle {
    display: block;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .pages .header .header-box .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .pages .header .header-box .menu-toggle span {
    font-size: 24px;
    color: #FFFFFF;
    transition: transform 0.3s ease;
  }

  .pages .header .header-box .menu-toggle.active span {
    transform: rotate(90deg);
  }

  /* 滚动后的移动端样式 */
  .pages .header .header-box.scrolled .right-box {
    background: rgba(255, 255, 255, 0.98);
  }

  /* 优化scrolled状态下的汉堡菜单样式 */
  .pages .header .header-box.scrolled .menu-toggle {
    border: 1px solid rgba(229, 0, 20, 0.2);
    transition: all 0.3s ease;
  }

  .pages .header .header-box.scrolled .menu-toggle:hover {
    border-color: rgba(229, 0, 20, 0.3);
    transform: scale(1.05);
  }

  .pages .header .header-box.scrolled .menu-toggle span {
    color: #E50014;
    transition: all 0.3s ease;
  }

  .pages .header .header-box.scrolled .menu-toggle.active {
    background: #E50014;
    border-color: #E50014;
  }

  .pages .header .header-box.scrolled .menu-toggle.active span {
    color: #FFFFFF;
  }

  /* 隐藏右侧联系框在移动端 */
  .pages .contact-box {
    display: none;
  }
}

/* 小屏移动端适配 (480px 及以下) */
@media (max-width: 480px) {
  .pages .header {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }

  .pages .header .header-box {
    height: 55px;
    padding: 0 15px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .pages .header .header-box .left-box .logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pages .header .header-box .left-box .logo img {
    width: 100px;
    height: 30px;
  }

  .pages .header .header-box .left-box .brand-name {
    font-size: 16px;
  }

  .pages .header .header-box .right-box {
    top: 55px;
    padding: 15px;
  }

  .pages .header .header-box .right-box .nav-item {
    font-size: 15px;
    padding: 12px 15px;
  }

  .pages .header .header-box .right-box .nav-item.active {
    padding: 12px 15px;
  }

  .pages .header .header-box .menu-toggle {
    width: 35px;
    height: 35px;
  }

  .pages .header .header-box .menu-toggle span {
    font-size: 20px;
  }

  /* 小屏移动端scrolled状态下的汉堡菜单优化 */
  .pages .header .header-box.scrolled .menu-toggle {
    background: rgba(229, 0, 20, 0.1);
    border: 1px solid rgba(229, 0, 20, 0.2);
    box-shadow: 0 2px 8px rgba(229, 0, 20, 0.15);
  }

  .pages .header .header-box.scrolled .menu-toggle:hover {
    background: rgba(229, 0, 20, 0.15);
    border-color: rgba(229, 0, 20, 0.3);
    box-shadow: 0 4px 12px rgba(229, 0, 20, 0.2);
  }

  .pages .header .header-box.scrolled .menu-toggle span {
    color: #E50014;
  }

  .pages .header .header-box.scrolled .menu-toggle.active {
    background: #E50014;
    border-color: #E50014;
    box-shadow: 0 4px 12px rgba(229, 0, 20, 0.3);
  }

  .pages .header .header-box.scrolled .menu-toggle.active span {
    color: #FFFFFF;
  }
}