﻿/* ============================================
   首页专用样式
   ============================================ */

/* Hero区 */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(57, 73, 171, 0.3) 0%, transparent 50%);
}

.hero-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  color: var(--white);
  z-index: 1;
  padding: var(--spacing-xl) var(--spacing-md);
  flex: 1 1 100%;
}

.hero-title {
  font-size: var(--font-xxxl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: var(--font-xl);
  font-weight: 300;
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-video-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto var(--spacing-xl);
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 1.2s ease 0.4s both;
  background: #000;
}

.hero-video-container::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 比例 */
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}

/* 视频封面 */
.video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
  transition: opacity var(--transition-normal);
}

.video-poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-poster .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.video-poster:hover .play-button {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-poster .play-button svg {
  margin-left: 4px;
}

/* 视频控制器 */
.video-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.video-controls.hide-cursor {
  cursor: none;
}

.video-controls.fade-out .video-control-bar {
  opacity: 0;
}

/* 大播放按钮 */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  z-index: 2;
}

.video-play-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 底部控制栏 */
.video-control-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 40px 20px 15px;
  transition: opacity var(--transition-normal);
  z-index: 3;
}

/* 进度条 */
.progress-bar {
  position: relative;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: height var(--transition-fast);
}

.progress-bar:hover {
  height: 7px;
}

.progress-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--primary-purple-blue);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--transition-fast);
  left: 0%;
}

.progress-bar:hover .progress-handle {
  opacity: 1;
}

/* 控制按钮组 */
.control-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-left,
.control-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border-radius: 4px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.control-btn svg {
  display: block;
}

.control-btn .hidden {
  display: none;
}

/* 时间显示 */
.time-display {
  color: white;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* 音量控制 */
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 0;
  overflow: hidden;
  transition: width var(--transition-normal);
}

.volume-control:hover .volume-slider {
  width: 60px;
}

.volume-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
}

.volume-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 100%;
  transition: width var(--transition-fast);
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* 核心数据展示 */
.stats-section {
  padding: var(--spacing-xxl) 0;
  background: var(--light-gray);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.stat-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  color: var(--primary-purple-blue);
  margin-bottom: var(--spacing-md);
  display: flex;
  justify-content: center;
}

.stat-number {
  font-size: var(--font-xxxl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  line-height: 1;
}

.stat-suffix {
  font-size: var(--font-xxl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-left: 4px;
}

.stat-label {
  font-size: var(--font-lg);
  color: var(--dark-gray);
  margin-top: var(--spacing-sm);
  font-weight: 500;
}

/* ========== 产品轮播区 ========== */
.products-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 300vw; /* 3个板块，每个100vw */
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  position: relative;
  min-width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 复用 Hero 区背景样式 */
.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  z-index: -1;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(57, 73, 171, 0.3) 0%, transparent 50%);
}

/* 复用 Hero 区内容样式 */
.slide-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  color: var(--white);
  z-index: 1;
  padding: var(--spacing-xl) var(--spacing-md);
  flex: 1 1 100%;
}

.slide-title {
  font-size: var(--font-xxxl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
}

.slide-subtitle {
  font-size: var(--font-xl);
  font-weight: 300;
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  animation: fadeInUp 1s ease 0.2s both;
}

/* 视频容器 - 复用原样式 */
.slide-video-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto var(--spacing-xl);
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 1.2s ease 0.4s both;
  background: #000;
}

.slide-video-container::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.slide-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}

/* 静态图片样式 */
.slide-static-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 视频左右板块布局 */
.video-panel-layout {
  width: 100%;
  margin: 0 auto var(--spacing-xl);
  display: flex;
  align-items: stretch;
  gap: var(--spacing-lg);
}

.video-panel-layout .slide-video-container {
  flex: 1 1 0%;
  max-width: none;
  margin: 0;
}

.video-side-panel {
  flex: 0 0 210px;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  text-align: left;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-height: 320px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.video-side-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-lg);
}

.video-side-panel-left {
  background: linear-gradient(160deg, rgba(63, 81, 181, 0.95), rgba(26, 35, 126, 0.85));
}

.video-side-panel-right {
  background: linear-gradient(160deg, rgba(120, 134, 203, 0.95), rgba(63, 81, 181, 0.85));
}

.video-panel-tag {
  font-size: var(--font-xs);
  letter-spacing: 0.08em;
  opacity: 0.85;
  text-transform: uppercase;
}

.video-panel-title {
  font-size: var(--font-xl);
  font-weight: 700;
  line-height: 1.2;
}

.video-panel-desc {
  font-size: var(--font-md);
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
}

.video-panel-link {
  font-size: var(--font-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 导航按钮 */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-prev {
  left: 30px;
}

.carousel-nav-next {
  right: 30px;
}

/* 指示器 */
.carousel-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

.indicator.active {
  background: var(--white);
  width: 32px;
  border-radius: 6px;
}

/* 媒体报道模块 */
.media-section {
  padding: var(--spacing-xxl) 0;
  background: var(--light-gray);
}

.section-title {
  font-size: var(--font-xxl);
  font-weight: 700;
  color: var(--black);
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: var(--font-md);
  color: var(--gray);
  margin-bottom: var(--spacing-xl);
}

.media-scroll-container {
  position: relative;
  overflow: hidden;
}

.media-grid {
  display: flex;
  gap: var(--spacing-lg);
  padding: var(--spacing-sm) 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding-bottom: var(--spacing-sm);
}

.media-grid:active {
  cursor: grabbing;
}

/* 自定义滚动条样式 */
.media-grid::-webkit-scrollbar {
  height: 8px;
}

.media-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.media-grid::-webkit-scrollbar-thumb {
  background: var(--primary-purple-blue);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.media-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

.media-card {
  flex: 0 0 auto;
  width: 350px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.media-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* 图片预览弹窗 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.image-preview-modal.active {
  display: flex;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .hero-video-container {
    width: 100%;
    margin: 0 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-card {
    width: 300px;
  }

  .media-card img {
    height: 350px;
  }

  .video-panel-layout {
    flex-direction: column;
  }

  .video-side-panel {
    flex: 1 1 auto;
    min-height: auto;
    padding: var(--spacing-md);
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
  /* === 手机端板块响应式优化 - 开始 === */

  /* 强制隐藏横向滚动 */
  body,
  .products-carousel,
  .carousel-container {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* 修复板块高度 - 允许自适应 */
  .carousel-slide {
    height: auto;
    min-height: calc(100vh - var(--mobile-tabbar-height));
    overflow-x: hidden !important;  /* 强制：隐藏横向溢出 */
  }

  /* 移除container的左右padding - 强制 */
  .slide-content.container {
    padding: var(--spacing-md) 0 !important;  /* 强制：上下16px，左右0 */
    width: 100% !important;
    max-width: 100% !important;  /* 强制：移除1200px限制 */
    margin: 0 auto !important;
  }

  /* 优化标题间距 */
  .slide-title {
    margin-bottom: var(--spacing-xs);  /* 8px */
    font-size: var(--font-lg);  /* 18px */
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    padding: 0 10px;  /* 标题左右10px边距 */
  }

  .slide-subtitle {
    margin-bottom: var(--spacing-md);  /* 16px */
    font-size: var(--font-sm);  /* 14px */
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    padding: 0 10px;  /* 副标题左右10px边距 */
  }

  /* 缩小播放按钮 */
  .play-button {
    width: 64px !important;
    height: 64px !important;
  }

  .play-button svg {
    width: 40px;
    height: 40px;
  }

  /* 静态图片自适应 - 强制不溢出 */
  .slide-static-image {
    object-fit: contain !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* 确保视频封面图片也不溢出 - 强制 */
  .video-poster img {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* 确保iframe视频不溢出 - 强制 */
  .slide-video {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* 视频和图片容器 - 强制限制宽度为屏幕宽度-20px */
  .slide-video-container {
    width: calc(100vw - 20px) !important;  /* 强制：屏幕宽度 - 20px */
    max-width: calc(100vw - 20px) !important;  /* 强制：最大宽度限制 */
    margin: 0 auto var(--spacing-sm) !important;  /* 强制：居中 */
    padding: 0 !important;  /* 强制：移除padding */
    box-sizing: border-box !important;
  }

  /* 调整视频容器宽高比 - 减小高度 */
  .slide-video-container::before {
    padding-top: 50% !important;  /* 强制：2:1 宽高比 */
  }

  /* 减小底部按钮间距 */
  .slide-content .mt-lg {
    margin-top: var(--spacing-sm);  /* 16px */
  }

  /* 减小按钮padding，强制确保在屏幕内 */
  .slide-content .btn {
    padding: var(--spacing-xs) var(--spacing-md) !important;  /* 8px 24px */
    font-size: var(--font-sm) !important;  /* 14px */
    margin: 0 10px !important;  /* 强制：左右各10px边距 */
    max-width: calc(100vw - 20px) !important;  /* 强制：最大宽度 */
    box-sizing: border-box !important;
  }

  /* 确保导航按钮可见 */
  .carousel-nav {
    width: 50px;
    height: 50px;
    z-index: 10;
  }

  .carousel-nav-prev {
    left: 15px;
  }

  .carousel-nav-next {
    right: 15px;
  }
  /* === 手机端板块响应式优化 - 结束 === */

  .hero-section {
    min-height: calc(100vh - var(--mobile-tabbar-height));
  }

  .hero-title {
    font-size: var(--font-xxl);
  }

  .hero-subtitle {
    font-size: var(--font-lg);
  }

  .hero-video-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto var(--spacing-lg);
  }

  .video-control-btn {
    width: 60px;
    height: 60px;
  }

  .video-control-btn svg {
    width: 32px;
    height: 32px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .stat-card {
    padding: var(--spacing-lg);
  }

  .stat-number {
    font-size: var(--font-xxl);
  }

  .stat-suffix {
    font-size: var(--font-xl);
  }

  .section-title {
    font-size: var(--font-xl);
  }

  .media-card {
    width: 280px;
  }

  .media-card img {
    height: 300px;
  }

  .modal-content {
    max-width: 95%;
  }

  .modal-content img {
    max-height: 60vh;
  }

  .modal-close {
    top: -40px;
    width: 36px;
    height: 36px;
  }

  /* 手机端 - 隐藏左右预览 */
  .carousel-slide.left-preview,
  .carousel-slide.right-preview {
    display: none;
  }

  .carousel-slide.center {
    transform: scale(1);
  }
}



