/* 首页专用样式：Banner、数据条、产品中心、关于、客户墙 */

/* Banner 轮播 */
.hero {
  position: relative;
  overflow: hidden;
  background: #eaf4ff;
  /* PC 首屏占满可视区（扣除固定导航），下拉才出现核心数据条 */
  height: calc(100vh - var(--header-h));
  min-height: 520px;
}

.hero-slider {
  position: relative;
  height: 100%;
}

.hero-slide {
  display: none;
  background-size: cover;
  background-position: center;
  height: 100%;
  padding: 40px 0 60px;
  box-sizing: border-box;
}

.hero-slide.active {
  /* 整屏内垂直居中文案与产品图 */
  display: flex;
  align-items: center;
  animation: heroIn 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Banner 内容分层进入，比单纯淡入更有层次 */
@keyframes heroIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-slide.active .hero-content {
  animation: slideUpIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-slide.active .hero-image {
  animation: slideRightIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRightIn {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-content h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.hero-content h1 .orange {
  color: var(--color-primary);
}

.hero-content h1 .blue {
  color: #000;
}

.hero-subtitle {
  font-size: 24px;
  color:#fff;
   margin-bottom: 12px;
    padding: 6px 14px;
    background: var(--color-blue);
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.5; display: inline-block;
}

.hero-desc {
  font-size: 24px;
  color: var(--color-muted);
  margin-bottom: 6px;color: #000;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  max-width: 480px;
}

.hero-tags span {
  padding: 6px 18px;
  background:none;
  border: 1px solid #000;
  /* 与 erp 页详情 Banner 一致的胶囊圆角 */
  border-radius: 999px;
  font-size: 18px;
  color: #000;
  transition: background 0.25s, border-color 0.25s, transform 0.25s, color 0.25s;
}

.hero-tags span:hover {
  background: #fff;
  border-color: rgba(0, 102, 204, 0.35);
  color: var(--color-blue);
  transform: translateY(-2px);
}

.hero-image {
  flex: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  /* 随视口缩放，整屏时产品图更饱满 */
  /* max-height: min(800px, 80vh); */
  width: auto;
  max-height: 85vh;
  max-width: 100%;
  object-fit: contain;
  /* 轻微上下浮动，让产品图更有生命力 */
  animation: floatY 4.5s ease-in-out infinite;
  filter: drop-shadow(0 16px 28px rgba(0, 60, 120, 0.18));
}

/* 第3张banner：文字上、图片下的布局 */
.hero-slide--stacked .hero-row {
  flex-direction: column;
  gap: 20px;
  padding: 30px 0;
}

.hero-slide--stacked .hero-content {
  flex: none;
  text-align: left;
  max-width: 900px;
  margin: 0 auto 0 0;
}

.hero-slide--stacked .hero-tags {
  justify-content: flex-start;
}

.hero-slide--stacked .hero-image {
  flex: none;
  width: 100%;
  max-height: 45vh;
  justify-content: flex-start;
}

.hero-slide--stacked .hero-image img {
  max-height: 40vh;
  max-width: 90%;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s, border-radius 0.3s;
}

.hero-dot:hover {
  background: #aaa;
}

.hero-dot.active {
  width: 24px;
  border-radius: 6px;
  background: var(--color-primary);
}

/* 数据条 */
.stats-bar {
  padding: 36px 0;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  background: #f7fafc;
}

.stat-item img {
  width: 71px;
  height: 82px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.stat-item:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: 18px;
  color:#000;
}

/* 产品中心 */
.products-center {
  padding: 60px 0 70px;
  background: var(--color-bg);
}

/* 方案轮播：左图（含方案组成）+ 右文案，分页叠在卡片内 */
.scheme-slider {
  position: relative;
  margin-bottom: 48px;
}

.scheme-track {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 20, 50, 0.18);
}

.scheme-slide {
  display: none;
  background: #0a1628;
  color: #fff;
}

.scheme-slide.active {
  display: flex;
  align-items: stretch;
  animation: schemeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes schemeIn {
  from {
    opacity: 0.35;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scheme-visual {
  flex: 1.65;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: #061018;
  display: flex;
  align-items: center;
}

.scheme-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.scheme-slide.active:hover .scheme-visual img {
  transform: scale(1.02);
}

.scheme-info {
  flex: 1;
  min-width: 280px;
  max-width: 420px;
  padding: 48px 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #0c1a30 0%, #0a1628 100%);
}

.scheme-info h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.scheme-info p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
  margin-bottom: 28px;
}

.scheme-info .btn-primary {
  align-self: flex-start;
}

/* 设计稿：浅色分页叠在深色卡片右下角 */
.scheme-nav {
  position: absolute;
  right: 28px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scheme-btn {
  width: auto;
  height: auto;
  padding: 0 4px;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, transform 0.2s ease;
}

.scheme-btn:hover {
  color: #fff;
  transform: scale(1.15);
  box-shadow: none;
  background: transparent;
}

.scheme-btn:active {
  transform: scale(0.96);
}

.scheme-page {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 1px;
  min-width: 28px;
  text-align: center;
}

/* 产品横向轮播：一次 3 张，两侧橙色圆钮 */
.product-carousel {
  position: relative;
  padding: 0 28px;
}

.product-carousel-view {
  overflow: hidden;
}

.product-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.product-carousel .product-card {
  flex: 0 0 calc((100% - 48px) / 3);
  margin: 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.product-carousel .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0, 60, 120, 0.12);
}

.product-carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(253, 86, 28, 0.35);
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.product-carousel-btn:hover {
  background: #e84a12;
  box-shadow: 0 6px 18px rgba(253, 86, 28, 0.45);
}

.product-carousel-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.product-carousel-btn.prev {
  left: -8px;
}

.product-carousel-btn.next {
  right: -8px;
}

.product-carousel-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 产品卡片（首页轮播与产品列表页共用基础样式） */
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
  display: block;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(0, 60, 120, 0.14);
}

.product-card-img {
  height: 200px;
  background: #0a1628;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}

.product-carousel .product-card-img {
  /* 按产品图比例撑满宽度，避免 contain 产生两侧黑边 */
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: transparent;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-carousel .product-card-img img {
  object-fit: cover;
  object-position: center center;
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 18px 16px 22px;
  text-align: center;
  background: #fff;
}

.product-card-body h4 {
  font-size: 26px;
  margin-bottom: 8px;
  transition: color 0.25s;
}

.product-card:hover .product-card-body h4 {
  color: var(--color-blue);
}

.product-card-body .more {
  font-size: 16px;
  color: var(--color-muted);
  transition: color 0.25s;
}

.product-card:hover .more {
  color: var(--color-primary);
}

/* 关于简介 */
.about-teaser {
  padding: 60px 0;
  background: linear-gradient(180deg, #2a3344 0%, #1e2533 100%);
  color: #fff;
  position: relative;
  /* 裁剪背景图 scale 放大溢出，避免整页出现横向滚动条 */
  overflow: hidden;
}

.about-teaser::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/home-AboutUs.jpg') center/cover;
  opacity: 0.25;
  transition: opacity 0.6s ease, transform 8s ease;
  transform: scale(1.02);
}

.about-teaser:hover::before {
  opacity: 0.32;
  transform: scale(1.06);
}

.about-teaser .container {
  position: relative;
  z-index: 1;
}

.about-teaser .section-title h2,
.about-teaser .section-title p {
  color: #fff;
}

.about-teaser .section-title p {
  opacity: 0.75;
}

.about-card {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  color: var(--color-text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.about-card:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.about-card-img {
  flex: 0 0 48%;
  overflow: hidden;
}

.about-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  transition: transform 0.6s ease;
}

.about-card:hover .about-card-img img {
  transform: scale(1.05);
}

.about-card-body {
  flex: 1;
  padding: 45px;
}

.about-card-body h3 {
  font-size: 24px;
  margin-bottom: 14px;
}

.about-card-body p {
  font-size: 16px;
  color: #000;
  line-height: 1.9;
  margin-bottom: 20px;
}

/* 合作客户 */
.partners {
  padding: 60px 0 70px;
  background: #fff;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.partner-item {
  height: 80px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s;
  overflow: hidden;
}

.partner-item:hover {
  box-shadow: 0 8px 22px rgba(0, 60, 120, 0.1);
  transform: translateY(-4px);
  border-color: #d6e6f5;
}

.partner-item img {
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.35s ease, filter 0.35s;
  filter: grayscale(0.15);
}

.partner-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.active,
  .hero-slide.active .hero-content,
  .hero-slide.active .hero-image,
  .scheme-slide.active,
  .hero-image img {
    animation: none;
  }

  .about-teaser:hover::before,
  .about-card:hover,
  .about-card:hover .about-card-img img {
    transform: none;
  }
}

@media (max-width: 1024px) {
  .scheme-slide.active {
    flex-direction: column;
  }

  .scheme-info {
    max-width: none;
    padding: 32px 28px 48px;
  }

  .scheme-visual,
  .scheme-visual img {
    min-height: 0;
  }

  /* 中屏一次露出 2 张 */
  .product-carousel .product-card {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (max-width: 768px) {
  /* 统一区块节奏，缩短整页滚动长度 */
  .products-center,
  .about-teaser,
  .partners {
    padding: 40px 0;
  }

  .stats-bar {
    padding: 24px 0;
  }

  /* H5 不占满屏，按内容自适应高度 */
  .hero {
    height: auto;
    min-height: 0;
  }

  /* H5：各帧叠在同一格，按最高一帧定高，切换不再跳高度 */
  .hero-slider {
    display: grid;
    height: auto;
    min-height: 0;
  }

  .hero-slide {
    grid-area: 1 / 1;
    /* 覆盖 PC 的 display:none，全部参与最高高度计算 */
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    height: auto;
    min-height: 0;
    z-index: 0;
    padding: 16px 0 40px;
  }

  .hero-slide.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
  }

  /* H5：文案在上、产品图在下（与 DOM 顺序一致） */
  .hero-row {
    flex-direction: column;
    gap: 14px;
    height: 100%;
  }

  .hero-content h1 {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .hero-desc {
    font-size: 13px;
  }

  /* 产品图区域定高，避免不同比例图片再拉高某一帧 */
  .hero-image {
    height: 155px;
    flex-shrink: 0;
  }

  .hero-image img {
    max-height: 155px;
    animation: none;
    filter: drop-shadow(0 8px 16px rgba(0, 60, 120, 0.14));
  }

  .hero-tags {
    max-width: none;
    gap: 6px;
    margin-top: 14px;
  }

  .hero-tags span {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* 第3张banner（上下布局）在移动端适配 */
  .hero-slide--stacked .hero-row {
    gap: 10px;
    padding: 10px 0;
  }

  .hero-slide--stacked .hero-content {
    text-align: left;
    max-width: 100%;
  }

  .hero-slide--stacked .hero-tags {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-slide--stacked .hero-image {
    max-height: none;
    height: 155px;
  }

  .hero-slide--stacked .hero-image img {
    max-height: 155px;
    max-width: 100%;
  }

  /* 数据条：图标与数字略收紧 */
  .stats-row {
    justify-content: space-between;
    gap: 12px;
  }

  .stat-item {
    flex: 1;
    min-width: 30%;
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 4px 6px;
  }

  .stat-item img {
    width: 40px;
    height: 40px;
  }

  .stat-num {
    font-size: 30px;
  }

  .stat-label {
    font-size: 12px;
  }

  /* 方案轮播：控高，避免单张刷半屏 */
  .scheme-slider {
    margin-bottom: 28px;
  }

  .scheme-visual img {
    max-height: 190px;
    width: 100%;
    object-fit: cover;
  }

  .scheme-info {
    padding: 18px 16px 40px;
  }

  .scheme-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  /* 详情页有完整说明，H5 截断长文降低卡片高度 */
  .scheme-info p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }

  .scheme-info .btn-primary {
    padding: 8px 20px;
    font-size: 13px;
  }

  .scheme-nav {
    right: 14px;
    bottom: 10px;
  }

  .product-carousel {
    padding: 0;
  }

  /* 产品卡：两列网格一次展示全部，隐藏翻页箭头 */
  .product-carousel-btn {
    display: none;
  }

  .product-carousel-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    transform: none !important;
  }

  .product-carousel .product-card {
    flex: unset;
    width: auto;
    margin: 0;
  }

  .product-carousel .product-card-img {
    aspect-ratio: 4 / 3;
  }

  .product-carousel .product-card-body {
    padding: 10px 8px 12px;
  }

  .product-carousel .product-card-body h4 {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .product-carousel .product-card-body .more {
    font-size: 12px;
  }

  /* 关于卡片：大楼图限高，正文截断保留入口 */
  .about-card {
    flex-direction: column;
  }

  .about-card-img img {
    min-height: 0;
    height: 170px;
    object-fit: cover;
  }

  .about-card-body {
    padding: 18px 16px 20px;
  }

  .about-card-body h3 {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .about-card-body p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }

  .about-card-body .btn-outline {
    padding: 8px 20px;
    font-size: 13px;
  }

  /* 客户墙：保持两列，收紧单元格高度 */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .partner-item {
    height: 60px;
    padding: 8px;
  }

  .partner-item img {
    max-height: 60px;
  }
}
