/* ========== 视频背景英雄图样式 ========== */

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 100vh; /* 改为 100vh，因为 header 已经 fixed 脱离文档流 */
  margin-top: -100px; /* 🔥 负边距让视频上移100px，滑到 header 后面 */
  padding-top: 100px; /* 🔥 内边距确保内容不被 header 遮挡 */
  overflow: hidden;
  background: #000;
  /* 防止闪烁：关键优化 */
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1; /* 🔥 确保在 header (z-index: 1000) 下方 */
}

/* ========== 视频背景层 ========== */
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* 防止闪烁 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* 添加背景颜色作为后备 */
  background-color: #000;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  object-fit: cover;
  /* 防止闪烁 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1;
  /* 确保视频显示 */
  display: block;
  opacity: 1;
}

/* 渐变遮罩层（从左到右）- 优化后更轻盈 */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.30) 50%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 1;
}

/* ========== 内容容器（固定不动） ========== */
.hero-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  /* 防止闪烁 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: auto;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  /* 防止闪烁 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ========== 顶部标签 ========== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 102, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.4);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.hero-badge-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========== 主标题 ========== */
.hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title-highlight {
  color: #00ffff;
  font-family: 'DINPro', 'Arial', sans-serif;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.4);
  font-weight: 900;
}

/* ========== 副标题 ========== */
.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-subtitle strong {
  color: #fff;
  font-weight: 600;
}

/* ========== 数据卡片 ========== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 32px 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0066ff, #00d4ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:hover {
  background: rgba(0, 102, 255, 0.2);
  transform: translateY(-8px);
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: 0 12px 40px rgba(0, 102, 255, 0.4),
              0 0 60px rgba(0, 212, 255, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  font-family: 'DINPro', 'Arial', sans-serif;
  margin-bottom: 12px;
  line-height: 1;
}

.stat-number .unit {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-left: 4px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========== CTA按钮 ========== */
.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #fff;
  border: 2px solid #0066ff;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.5);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.5),
                0 0 40px rgba(0, 102, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.7),
                0 0 60px rgba(0, 212, 255, 0.5),
                0 0 80px rgba(0, 212, 255, 0.3);
  }
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
  border-color: #00d4ff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 102, 255, 0.6),
              0 0 40px rgba(0, 212, 255, 0.5);
  animation: none;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-icon {
  position: relative;
  z-index: 1;
}

.btn-text {
  position: relative;
  z-index: 1;
}

/* ========== 联系信息栏 ========== */
.hero-contact {
  display: flex;
  gap: 30px;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  max-width: 900px;
  animation: fadeInUp 0.8s ease-out 1s both;
  /* 防止闪烁 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hero-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0; /* 防止溢出 */
}

.hero-contact .contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px; /* 防止缩小 */
  background: rgba(0, 102, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0; /* 防止图标缩小 */
}

.hero-contact .contact-item:hover .contact-icon {
  background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
  border-color: #00d4ff;
  transform: scale(1.1) rotate(5deg);
}

.hero-contact .contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0; /* 允许文字换行 */
}

.hero-contact .contact-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap; /* 标签不换行 */
}

.hero-contact .contact-value {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  word-break: break-word; /* 长文本换行 */
  overflow-wrap: break-word;
}

.hero-contact .contact-value a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-contact .contact-value a:hover {
  color: #00d4ff;
}

/* ========== 滚动提示 ========== */
.scroll-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  z-index: 20;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

.scroll-hint svg {
  width: 24px;
  height: 24px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .hero-content {
    padding: 0 30px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-contact {
    flex-wrap: wrap;
    gap: 20px;
  }

  .hero-contact .contact-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    min-height: 100vh;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-number {
    font-size: 28px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-contact {
    flex-direction: column;
    gap: 15px;
    padding: 20px 15px;
  }

  .hero-contact .contact-item {
    width: 100%;
    flex: none;
  }

  .scroll-hint {
    display: none;
  }

  /* 移动端视频优化 */
  .hero-video {
    /* 移动端可以考虑隐藏视频，只显示封面 */
    /* display: none; */
  }
}
