/* 首页 */

.home-hero {
  position: relative;
  /* 上拉到导航下方，让导航盖住 banner 顶部 */
  margin-top: calc(-1 * var(--header-h));
  height: calc(880 * var(--px));
  min-height: calc(var(--header-h) + 332 * var(--px) + 320 * var(--px));
  color: var(--white);
  overflow: hidden;
  background: #051e46;
}

.home-hero-slides {
  position: absolute;
  inset: 0;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  z-index: 0;
}

.home-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.home-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 30, 70, 0.55) 0%, rgba(5, 30, 70, 0.25) 50%, rgba(5, 30, 70, 0.1) 100%);
  pointer-events: none;
}

/* 设计稿：文案距左 250；进度条贴内容宽（1420）最右侧 */
.home-hero-inner {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: none;
  margin: 0;
  height: 100%;
  padding: calc(var(--header-h) + 232 * var(--px)) calc(40 * var(--px)) 0 calc(250 * var(--px));
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
}

.home-hero-copy {
  /* max-width: calc(720 * var(--px)); */
}

.home-hero-pager-wrap.container {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: var(--container);
  max-width: calc(100% - 40px);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.home-hero-pager {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(18 * var(--px));
  pointer-events: auto;
}

.home-hero-pager li {
  display: block;
  width: auto;
}

.home-hero-pager-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s ease;
}

.home-hero-pager-btn .num {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: max(14px, calc(16 * var(--px)));
  line-height: 1;
  letter-spacing: 0.02em;
}

.home-hero-pager-btn .bar {
  display: block;
  width: calc(18 * var(--px));
  height: 1px;
  margin-top: calc(10 * var(--px));
  background: currentColor;
  transition: width 0.3s ease;
}

.home-hero-pager-btn .bar i {
  display: none;
}

.home-hero-pager-btn.is-active,
.home-hero-pager-btn:hover {
  color: #ffffff;
}

.home-hero-pager-btn.is-active .bar {
  width: calc(56 * var(--px));
}

.home-hero h1,
.home-hero .hero-title {
  font-family: var(--font);
  font-size: max(24px, calc(48 * var(--px)));
  font-weight: 700; /* HarmonyOS Sans SC Bold */
  font-style: normal;
  color: #ffffff;
  line-height: 1;
  text-align: left;
  text-transform: none;
  margin: 0;
}

.home-hero .en {
  font-family: var(--font-en);
  font-weight: 700; /* Barlow Bold */
  font-size: max(24px, calc(48 * var(--px)));
  font-style: normal;
  color: #ffffff;
  line-height: 1;
  text-align: left;
  text-transform: none;
  margin: calc(20 * var(--px)) 0 calc(29 * var(--px));
}

.home-hero .desc {
  /* width: calc(615 * var(--px)); */
  max-width: 100%;
  min-height: calc(56 * var(--px));
  font-family: var(--font);
  font-size: max(16px, calc(20 * var(--px)));
  font-style: normal;
  color: #ffffff;
  text-align: left;
  text-transform: none;
  line-height: calc(28 * var(--px));
  margin: 0;
}

.home-hero .btn {
  margin-top: calc(50 * var(--px));
}

/* About */
.home-about {
  padding: 100px 0;
  background: var(--white);
}

.home-about-grid {
  display: grid;
  grid-template-columns: 1fr calc(700 * var(--px));
  gap: 70px;
  align-items: start; /* 标题与右侧图片顶部对齐 */
}

.home-about .headline {
  font-family: var(--font);
  font-size: max(22px, calc(40 * var(--px)));
  font-style: normal;
  color: #000000;
  line-height: calc(48 * var(--px));
  text-align: left;
  text-transform: none;
  margin-bottom: calc(46 * var(--px)); /* 主标题 → 正文 */
}

.home-about .text p {
  font-family: var(--font);
  font-size: max(14px, calc(16 * var(--px)));
  font-style: normal;
  color: #666666;
  text-align: left;
  text-transform: none;
  line-height: 1.8;
  margin-bottom: 0;
}

.home-about .btn {
  width: calc(191 * var(--px));
  height: calc(48 * var(--px));
  margin-top: calc(50 * var(--px));
  padding: 0 calc(18 * var(--px));
  justify-content: center;
  gap: calc(30 * var(--px));
  background: #133891;
  border-radius: calc(24 * var(--px));
  color: #ffffff;
}

.home-about .btn:hover {
  background: #0f2d75;
  color: #ffffff;
}

.home-about-pic {
  width: calc(700 * var(--px));
  height: calc(426 * var(--px));
  flex-shrink: 0;
  border-radius: calc(8 * var(--px));
  overflow: hidden;
}

.home-about-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Products */
.home-products {
  padding: 90px 0 100px;
  background: #053556 url("../images/首页/产品中心bg.png") center / cover no-repeat;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.home-products .sec-head .en-mark {
  color: rgba(255, 255, 255, 0.11); /* 白底板块同款：不透明度 11% */
}

.home-products .sec-head .cn {
  color: #ffffff;
  font-size: max(18px, calc(24 * var(--px)));
  font-weight: 700;
  line-height: calc(48 * var(--px));
}

.home-products-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(40 * var(--px));
  margin-bottom: calc(48 * var(--px));
}

.home-products-top .sec-head {
  flex-shrink: 0;
}

.home-products-tabs {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: calc(48 * var(--px));
  margin-bottom: 0;
}

.home-products-top .more {
  flex-shrink: 0;
}

.home-products-tabs a {
  position: relative;
  font-family: var(--font);
  font-size: max(14px, calc(16 * var(--px)));
  font-weight: 500; /* HarmonyOS Sans SC Medium */
  font-style: normal;
  color: #ffffff;
  text-align: left;
  text-transform: none;
  padding-bottom: calc(14 * var(--px));
  opacity: 0.55;
}

.home-products-tabs a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(6 * var(--px));
  height: calc(6 * var(--px));
  border-radius: 50%;
  background: #ffffff;
  transform: translateX(-50%) scale(0);
  transition: transform 0.2s ease;
}

.home-products-tabs a.active,
.home-products-tabs a:hover {
  opacity: 1;
}

.home-product-panels .product-grid[hidden],
.home-product-panels .product-grid[style*="display: none"] {
  display: none !important;
}

.home-products-tabs a.active::after,
.home-products-tabs a:hover::after {
  transform: translateX(-50%) scale(1);
}

.home-products .more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(191 * var(--px));
  height: calc(48 * var(--px));
  padding: 0 calc(18 * var(--px));
  gap: calc(30 * var(--px));
  box-sizing: border-box;
  background: transparent;
  border: calc(1 * var(--px)) solid #ffffff;
  border-radius: calc(24 * var(--px));
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--px)));
  font-style: normal;
  color: #ffffff;
  line-height: calc(33 * var(--px));
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.home-products .more:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, calc(340 * var(--px)));
  justify-content: space-between;
  gap: calc(20 * var(--px));
}

.product-card {
  width: calc(340 * var(--px));
  background: transparent;
  text-align: center;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(calc(-6 * var(--px)));
}

.product-card .pic {
  width: calc(340 * var(--px));
  height: calc(340 * var(--px));
  /* background: #f3f5f8; */
  border-radius: calc(8 * var(--px));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: calc(24 * var(--px)); */
  box-sizing: border-box;
}

.product-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .name {
  margin-top: calc(31 * var(--px));
  padding: 0;
  font-family: var(--font);
  font-size: max(14px, calc(16 * var(--px)));
  font-weight: 400;
  font-style: normal;
  color: #f8f9fd;
  text-align: center;
  text-transform: none;
  line-height: 1.5;
  min-height: 0;
}

/* Cases */
.home-cases {
  height: calc(1110 * var(--px));
  box-sizing: border-box;
  padding: calc(100 * var(--px)) 0 calc(80 * var(--px));
  background: #f5f6f8 url("../images/首页/工程案例bg.png") center bottom / cover no-repeat;
}

.home-cases-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.home-cases-top .more-cases {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(191 * var(--px));
  height: calc(48 * var(--px));
  padding: 0 calc(18 * var(--px));
  gap: calc(30 * var(--px));
  box-sizing: border-box;
  background: #f8f9fd;
  border: calc(2 * var(--px)) solid #dddddd;
  border-radius: calc(24 * var(--px));
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--px)));
  font-style: normal;
  color: #666666;
  line-height: calc(33 * var(--px));
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.home-cases-top .more-cases:hover {
  background: #f8f9fd;
  border-color: #dddddd;
  color: var(--primary);
}

.cases-slider .case-grid {
  margin-bottom: calc(40 * var(--px));
}

.case-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: calc(20 * var(--px));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.case-grid::-webkit-scrollbar {
  display: none;
}

.case-card {
  width: calc(460 * var(--px));
  flex: 0 0 calc(460 * var(--px));
  scroll-snap-align: start;
}

.case-card .pic {
  width: calc(460 * var(--px));
  height: calc(350 * var(--px));
  border-radius: calc(8 * var(--px));
  overflow: hidden;
}

.case-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.case-card .name {
  text-align: center;
  margin-top: calc(20 * var(--px));
  font-size: max(14px, calc(16 * var(--px)));
  font-weight: 500;
  color: var(--text-dark);
}

/* 进度条 + 箭头间距（样式在 common.css） */
.home-cases .cases-nav-row {
  margin-bottom: calc(40 * var(--px));
}

.client-list {
  /* border-top: 1px solid var(--border); */
  /* padding-top: 40px; */
}

.client-list h3 {
  font-family: var(--font);
  font-size: max(16px, calc(20 * var(--px)));
  font-weight: 700; /* HarmonyOS Sans SC Bold */
  font-style: normal;
  color: #1a3a8e;
  line-height: calc(48 * var(--px));
  text-align: left;
  text-transform: none;
  margin-bottom: calc(24 * var(--px));
}

.client-list ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, auto);
  grid-auto-flow: column;
  gap: calc(6 * var(--px)) calc(40 * var(--px));
}

.client-list li {
  font-family: var(--font);
  font-size: max(14px, calc(16 * var(--px)));
  font-style: normal;
  color: #666666;
  line-height: calc(32 * var(--px));
  text-align: left;
  text-transform: none;
}

/* News */
.home-news {
  padding: 80px 0 100px;
  background: #ffffff;
}

.home-news-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(24 * var(--px));
  margin-bottom: calc(48 * var(--px));
}

.home-news-top .sec-head {
  margin-bottom: 0;
}

.home-news-top .more-news {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(191 * var(--px));
  height: calc(48 * var(--px));
  padding: 0 calc(18 * var(--px));
  gap: calc(30 * var(--px));
  box-sizing: border-box;
  background: #ffffff;
  border: calc(2 * var(--px)) solid #dddddd;
  border-radius: calc(24 * var(--px));
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--px)));
  font-style: normal;
  color: var(--primary);
  line-height: calc(33 * var(--px));
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.home-news-top .more-news:hover {
  background: #ffffff;
  border-color: #dddddd;
  color: var(--primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, calc(340 * var(--px)));
  justify-content: space-between;
  gap: calc(20 * var(--px));
}

.news-card {
  width: calc(340 * var(--px));
  background: transparent;
  border-radius: 0;
  overflow: visible;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(calc(-4 * var(--px)));
  box-shadow: none;
}

.news-card .pic {
  width: calc(340 * var(--px));
  height: calc(240 * var(--px));
  border-radius: calc(8 * var(--px));
  overflow: hidden;
}

.news-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card .body {
  padding: 0;
}

.news-card .date {
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--px)));
  font-style: normal;
  color: #1a3a8e;
  line-height: calc(32 * var(--px));
  text-align: left;
  text-transform: none;
  margin-top: calc(25 * var(--px));
  margin-bottom: calc(22 * var(--px));
}

.news-card .title {
  font-family: var(--font);
  font-size: max(16px, calc(18 * var(--px)));
  font-weight: 700; /* HarmonyOS Sans SC Bold */
  font-style: normal;
  color: #000000;
  line-height: calc(24 * var(--px));
  text-align: left;
  text-transform: none;
  margin-bottom: calc(24 * var(--px));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .summary {
  font-family: var(--font);
  font-size: max(13px, calc(14 * var(--px)));
  font-style: normal;
  color: #999999;
  line-height: calc(24 * var(--px));
  text-align: left;
  text-transform: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .home-hero {
    height: 520px;
    min-height: 520px;
  }

  .home-hero-inner {
    padding: calc(var(--header-h) + 48px) 40px 0 48px;
  }

  .home-hero h1,
  .home-hero .hero-title,
  .home-hero .en {
    font-size: 28px;
    line-height: 1.25;
  }

  .home-hero .desc {
    font-size: 15px;
    line-height: 1.7;
    min-height: 0;
  }

  .home-about .btn {
    width: auto;
    min-width: 168px;
    height: 44px;
    padding: 0 20px;
    gap: 12px;
    white-space: nowrap;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
  }

  .product-card,
  .product-card .pic {
    width: 100%;
  }

  .product-card .pic {
    height: auto;
    aspect-ratio: 1;
  }

  .case-card,
  .case-card .pic {
    width: min(calc(460 * var(--px)), 100%);
  }

  .case-card {
    flex: 0 0 min(calc(460 * var(--px)), 80%);
  }

  .case-card .pic {
    height: auto;
    aspect-ratio: 460 / 350;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
  }

  .news-card,
  .news-card .pic {
    width: 100%;
  }

  .news-card .pic {
    height: auto;
    aspect-ratio: 340 / 240;
  }

  .home-about-grid {
    grid-template-columns: 1fr min(calc(700 * var(--px)), 46%);
    gap: 40px;
  }

  .home-about-pic {
    width: 100%;
    height: auto;
    aspect-ratio: 700 / 426;
  }

  .client-list ul {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

@media (max-width: 768px) {
  .home-hero {
    height: 460px;
    min-height: 460px;
  }

  .home-hero-inner.container {
    width: auto;
    max-width: none;
    margin-left: 16px;
    margin-right: 16px;
    /* 必须压过导航高度，避免文案顶进顶栏 */
    padding: calc(var(--header-h) + 28px) 0 0;
    align-items: flex-start;
    box-sizing: border-box;
  }

  .home-hero-pager-wrap.container {
    left: 0;
    right: 0;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 16px 0 0;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
  }

  .home-hero-pager {
    gap: 12px;
    align-items: flex-end;
  }

  .home-hero-pager-btn .bar {
    width: 12px;
    margin-top: 6px;
  }

  .home-hero-pager-btn.is-active .bar {
    width: 36px;
  }

  .home-hero-copy {
    max-width: calc(100% - 40px);
    padding-right: 8px;
  }

  .home-hero h1,
  .home-hero .hero-title,
  .home-hero .en {
    font-size: 20px;
    line-height: 1.3;
  }

  .home-hero .en {
    margin: 10px 0 14px;
  }

  .home-hero .desc,
  .home-hero p {
    font-size: 13px;
    line-height: 1.7;
    min-height: 0;
    margin-top: 0;
  }

  .home-hero .btn {
    margin-top: 20px;
  }

  .home-about,
  .home-products,
  .home-cases,
  .home-news,
  .home-clients {
    padding: 40px 0;
  }

  .home-cases {
    height: auto;
  }

  .home-about-grid,
  .product-grid,
  .case-grid,
  .news-grid,
  .client-list ul {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
    justify-content: stretch;
    gap: 20px;
  }

  .home-about .headline {
    font-size: 20px;
    line-height: 1.45;
    margin-bottom: 16px;
  }

  .home-about .text p {
    font-size: 14px;
    line-height: 1.75;
  }

  .home-about .btn {
    width: auto;
    min-width: 160px;
    height: 44px;
    margin-top: 24px;
    padding: 0 20px;
    gap: 12px;
    border-radius: 22px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
  }

  .home-about-pic {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 700 / 426;
  }

  /* 产品中心：标题 / Tab / 更多 分三行，避免挤叠 */
  .home-products-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 24px;
  }

  .home-products-top .sec-head {
    margin: 0;
  }

  .home-products .sec-head .en-mark {
    font-size: 28px;
    line-height: 1.1;
  }

  .home-products .sec-head .cn {
    margin-top: -8px;
    font-size: 18px;
    line-height: 1.4;
  }

  .home-products-top .more,
  .home-products .more {
    order: 2;
    align-self: flex-start;
    width: auto;
    min-width: 0;
    height: 40px;
    padding: 0 16px;
    gap: 10px;
    border-width: 1px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1;
  }

  .home-products-tabs {
    order: 3;
    flex: none;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    margin: 0 -4px;
    padding: 0 4px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .home-products-tabs::-webkit-scrollbar {
    display: none;
  }

  .home-products-tabs a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 14px 12px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0.65;
  }

  .home-products-tabs a::after {
    width: 6px;
    height: 6px;
    bottom: 2px;
  }

  .product-card,
  .product-card .pic {
    width: 100%;
    max-width: 100%;
  }

  .product-card .pic {
    height: auto;
    aspect-ratio: 1;
    border-radius: 8px;
  }

  .product-card .name {
    margin-top: 14px;
    padding: 0 4px;
    font-size: 15px;
    line-height: 1.5;
  }

  .home-cases-top,
  .home-news-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .home-cases-top .more-cases,
  .home-news-top .more-news {
    width: auto;
    height: 40px;
    padding: 0 16px;
    gap: 10px;
    border-width: 1px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1;
  }

  .case-card {
    flex: 0 0 min(82%, 320px);
  }

  .news-card,
  .news-card .pic {
    width: 100%;
  }

  .news-card .title {
    font-size: 16px;
    line-height: 1.4;
  }
}
