.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 5vw;
  overflow: hidden;
  z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
  transition: all 0.6s;
}

.site-header:hover {
  transform-origin: 50% 0 !important;
  height: auto !important;
  /* background: rgba(0, 0, 0, 0.35) !important; */
  /* backdrop-filter: blur(20px) !important; */
  /* -webkit-backdrop-filter: blur(20px) !important; */
  /* box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37) !important; */
  border-radius: 0 0 2.5vw 2.5vw !important;
  transition: transform 0.5s !important;
}

.site-header:hover .mega-menu-panel {
  display: block;
}

.site-header.scrolled {
  /* background: rgba(0, 0, 0, 0.8); */
  /* backdrop-filter: blur(10px); */
  /* box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); */
  .header-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    /* background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.3) 30%,
      rgba(0, 0, 0, 0.25) 40%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0.15) 60%,
      rgba(0, 0, 0, 0.1) 70%,
      rgba(0, 0, 0, 0) 100%
    ); */
  }
}
/* 企业集群切换按钮样式 */
.enterprise-cluster-btn {
  position: relative;
  margin-left: 20px;
}

.enterprise-cluster-toggle-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.enterprise-cluster-toggle-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.enterprise-cluster-toggle-btn:hover {
  color: rgb(0, 0, 0);
  background: rgba(255, 255, 255, 0.1);
}

.enterprise-cluster-toggle-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.enterprise-cluster-toggle-btn.active:hover {
  background: rgba(255, 255, 255, 1);
}

.enterprise-cluster-toggle-text {
  position: relative;
  z-index: 2;
  white-space: nowrap;
}

.site-header.scrolled:hover {
  /* height: 70px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px); */
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.header-container {
  /* background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1); */
  /* background: var(--primary-color); */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.3) 30%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  height: calc(4vw - 1px);
  /* border-bottom: 1px solid rgba(22, 33, 11, 0.2); */
  margin: 0 auto;
  padding: 0 2vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo样式 */
.header-left .logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
}

.logo-subtitle {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: -2px;
}

/* 导航菜单 */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2vw;
}

.nav-item {
  width: 8rem;
  position: relative;
}

.nav-link {
  color: #f4f4f4 !important;
  /* color: #fff !important; */
  white-space: nowrap !important;
  font-weight: 600 !important;
  transition: opacity 0.3s !important;
  display: block !important;
  font-size: 1.4rem !important;
  text-decoration: none !important;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5) !important;
  text-align: center;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  opacity: 1;
}

/* 大面板下拉菜单 */
.mega-menu-panel {
  display: none;
  /* background: red; */
  width: 100%;
  z-index: 999;
  position: relative;
  /* top: -30px; */
  top: -20px;
}

.mega-menu-inner {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.5rem 2vw 2rem 2.5rem;
  gap: 2vw;
  margin: 0 auto;
}

.mega-menu-col {
  visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 8rem;
  padding-top: 1rem;
  transition: all 0.5s ease;
  /* 性能优化：提前创建合成层，减少抖动 */
  transform: translateZ(0);
  will-change: background-color, box-shadow, transform;
}

.mega-menu-col li {
  margin-bottom: 1.2rem;
}

.mega-menu-col a {
  color: #f4f4f4;

  /* opacity: 0.5; */
  white-space: nowrap;
  font-weight: 600;
  transition: opacity 0.3s;
  display: block;
  font-size: 1.4rem;
  text-decoration: none;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.mega-menu-col a:hover {
  opacity: 1;
  color: #fff;
}

/* 悬停/激活列高亮 */
.mega-menu-col:hover,
.mega-menu-col.active,
.mega-menu-col:focus-within {
  visibility: visible;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) inset;
}

/* 仅在支持 hover 的设备上添加轻微上浮效果 */
@media (hover: hover) and (pointer: fine) {
  .mega-menu-col:hover,
  .mega-menu-col.active,
  .mega-menu-col:focus-within {
    transform: translateY(-2px);
  }
}

/* .mega-menu-col.active a {
  opacity: 1;
} */

/* 右侧按钮 */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.lang-switch:hover {
  background: #fff;
  color: #000;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle,
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 3px 0;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 右上角header菜单按钮 */
.header-menu-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.header-menu-icon {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.header-menu-btn:hover .header-menu-icon {
  color: var(--primary-color);
  transform: scale(1.1);
}

.header-menu-btn.active .header-menu-icon {
  color: var(--primary-color);
}

/* header菜单面板 */
.header-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1002;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.header-menu-panel.active {
  right: 0;
}

/* header移动端导航 */
.header-mobile-nav {
  padding: 2rem 1rem;
}

.header-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-mobile-nav-item {
  margin-bottom: 0.5rem;
}

.header-mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-height: 44px;
}

.header-mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}

.nav-icon {
  margin-right: 0.8rem;
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
}

/* header子菜单 */
.header-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-top: 0.5rem;
}

.header-submenu.active {
  max-height: 100%;
}

.header-submenu li {
  margin: 0;
}

.header-submenu a {
  display: block;
  padding: 0.8rem 1rem 0.8rem 3rem;
  color: #ccc;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
  margin: 0.2rem;
}

.header-submenu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 移动端适配 - 保持原有设计风格 */
@media (max-width: 768px) {
  .site-header {
    height: 70px;
  }

  .site-header:hover {
    height: auto !important;
    backdrop-filter: blur(10px);
    border-radius: 0;
  }

  .header-container {
    height: 70px;
    padding: 0 1rem;
  }

  .logo-img {
    height: 32px;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .logo-subtitle {
    font-size: 0.6rem;
  }

  /* 移动端隐藏桌面端导航 */
  .header-nav {
    display: none;
  }

  /* 显示移动端菜单按钮 */
  .mobile-menu-toggle,
  .mobile-menu-btn {
    display: flex;
  }

  /* 显示右上角header菜单按钮 */
  .header-menu-btn {
    display: block;
  }

  /* 移动端大面板菜单调整 - 保持原有风格 */
  .mega-menu-panel {
    top: 70px;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* display: none; */
    /* 默认隐藏，点击后显示 */
  }

  .mega-menu-inner {
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 1rem;
    align-items: center;
  }

  .mega-menu-col {
    width: 100%;
    text-align: center;
  }

  .mega-menu-col li {
    margin-bottom: 1rem;
  }

  .mega-menu-col a {
    font-size: 1.1rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 44px;
    /* 触摸目标优化 */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mega-menu-col a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
  }
}

@media (max-width: 480px) {
  .site-header {
    height: 60px;
  }

  .header-container {
    height: 60px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-subtitle {
    font-size: 0.5rem;
  }

  .mega-menu-panel {
    display: none !important;
    top: 60px;
    height: calc(100vh - 60px);
  }

  .mega-menu-inner {
    padding: 1.5rem 0.8rem;
  }

  .mega-menu-col a {
    font-size: 1rem;
    padding: 0.6rem;
  }
}

/* 触摸优化 - 保持原有交互逻辑 */
@media (hover: none) and (pointer: coarse) {
  .site-header:hover {
    backdrop-filter: blur(10px);
    border-radius: 0;
  }

  .mega-menu-col a:hover {
    transform: none;
  }

  /* 触摸反馈优化 */
  .mega-menu-col a:active {
    opacity: 0.7;
    transform: scale(0.98);
  }

  /* 触摸设备不做整体上浮，避免误触位移 */
  .mega-menu-col:hover,
  .mega-menu-col.active,
  .mega-menu-col:focus-within {
    transform: none;
  }
}

/* 降低动画：尊重系统“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  .mega-menu-col {
    transition: none;
  }

  .mega-menu-col:hover,
  .mega-menu-col.active,
  .mega-menu-col:focus-within {
    transform: none;
  }
}
