/*
 * 文件: css/home/home-index.css
 * 引用: index.html
 * 依赖: header.css, solutions-zsolu.css, kh-about-video.css
 * 区块: #home-brand | .home-about（含 .home-factory）| .home-honors（含 .home-stats）
 * JS 注入类: .home-factory__strip、.home-brand-typed-*、.typed-cursor
 */

.home-page {
  --home-accent: #f60;
  --home-primary: #1d5198;
}

/* ========== 首屏轮播 #home-brand ========== */
#home-brand {
  --home-brand-tab-reserve: 96px;
  overflow-x: clip;
  padding: 0;
}

#home-brand .hd-banner__tabs--many .zsolu-tab-label {
  font-size: 12px;
}

@media (max-width: 992px) {
  #home-brand .hd-banner__tabs--many li {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 12px;
  }
}

#home-brand .home-brand__slider,
#home-brand .solutions-zsolu-page {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-bottom: 0;
  box-sizing: border-box;
}

#home-brand .zSolu .solu {
  display: grid;
  grid-template: 1fr / 1fr;
  height: var(--zsolu-hero-height, 720px);
  margin-top: 0;
}

#home-brand .zSolu .solu .bd {
  grid-area: 1 / 1;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 1;
}

#home-brand .hd.hd--banner {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: stretch;
  position: relative;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  bottom: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
  z-index: 11;
}

#home-brand .hd-banner__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 20px var(--zsolu-strip-inset) 16px;
  overflow-x: auto;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

#home-brand .hd-banner__tabs::-webkit-scrollbar {
  height: 4px;
}

#home-brand .hd-banner__tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

#home-brand .hd.hd--banner li {
  flex: 1 1 auto;
  min-width: max-content;
  height: auto;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

#home-brand .hd.hd--banner li .zsolu-tab-icon {
  font-size: 22px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

#home-brand .hd.hd--banner li .zsolu-tab-label {
  white-space: nowrap;
}

#home-brand .hd.hd--banner li.on {
  height: auto;
  color: #fff;
  background: rgba(29, 81, 152, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
  border-bottom: none;
  box-shadow:
    inset 0 -3px 0 var(--home-accent),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

#home-brand .hd.hd--banner li.on .zsolu-tab-icon {
  color: #fff;
}

#home-brand .hd.hd--banner li:hover:not(.on) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#home-brand .hd.hd--banner li:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#home-brand .zSolu .solu .bd .showDiv .bg {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.2) 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

#home-brand .zSolu .solu .bd .showDiv .wz {
  left: 0;
  right: 0;
  width: 100%;
  max-width: min(var(--kh-shell-max, 1450px), 100%);
  margin-left: auto;
  margin-right: auto;
  top: 0;
  bottom: var(--home-brand-tab-reserve);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--kh-shell-pad-x);
  box-sizing: border-box;
  transform: none;
  pointer-events: none;
}

#home-brand .home-brand__actions,
#home-brand .home-brand__cta {
  pointer-events: auto;
}

#home-brand .zSolu .solu .bd .showDiv.is-active .wz {
  opacity: 1;
  padding-top: 0;
  padding-bottom: 0;
}

#home-brand .zSolu .solu .bd .showDiv .wz .home-brand__title,
#home-brand .zSolu .solu .bd .showDiv .wz h5 {
  width: 100%;
  margin: 0;
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1.15;
  text-align: center;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

#home-brand .zSolu .solu .bd .showDiv .wz .w {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(15px, 1.8vw, 22px);
  line-height: 1.65;
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

#home-brand .home-brand__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

#home-brand .home-brand__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

#home-brand .home-brand__cta--primary {
  background: var(--home-accent);
  color: #fff;
  border: 1px solid transparent;
}

#home-brand .home-brand__cta--primary:hover {
  background: #e55a00;
  color: #fff;
  transform: translateY(-2px);
}

#home-brand .home-brand__cta--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#home-brand .home-brand__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

#home-brand .home-brand__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

#home-brand .home-brand-typed-title,
#home-brand .home-brand-typed-desc {
  display: inline;
}

#home-brand .typed-cursor {
  color: #fff;
  opacity: 1;
  font-weight: 300;
}

/* ========== 企业简介 ========== */
.home-about {
  background-color: #0f3460;
  background-image: url(../../index/assets/about-bg.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 56px 0;
  color: #fff;
}

.home-about__intro {
  display: grid;
  grid-template-columns: minmax(0, 635px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.home-about__side {
  width: 100%;
  max-width: 635px;
}

.home-about__side .about-company-video {
  max-width: 635px;
}

.home-about__side .about-company-video__trigger {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.home-about__side .about-company-video__play {
  background: rgba(15, 52, 96, 0.35);
}

.home-about__side .about-company-video__trigger:hover .about-company-video__play,
.home-about__side .about-company-video__trigger:focus-visible .about-company-video__play {
  background: rgba(15, 52, 96, 0.5);
}

.home-about__text h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
}

.home-about__text p {
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.92);
}

.home-about__text a {
  color: var(--home-accent);
  font-weight: 600;
}

.home-about__text a:hover {
  text-decoration: underline;
}

/* 工厂实景横滚 */
.home-factory {
  overflow: hidden;
}

.home-factory__track {
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home-factory__track[data-factory-ready="1"] {
  overflow: hidden;
  cursor: default;
}

.home-factory__strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: max-content;
  will-change: transform;
}

.home-factory__card {
  flex: 0 0 254px;
  margin: 0;
  background: #fff;
  color: #333;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.home-factory__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 254 / 182;
  object-fit: cover;
}

.home-factory__card h5 {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .home-factory__track[data-factory-ready="1"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-factory__strip {
    will-change: auto;
  }
}

/* ========== 资质荣誉 ========== */
.home-honors {
  padding: 56px 0 64px;
  background: #fff;
}

.home-honors__heading {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.home-honors__carousel {
  position: relative;
  margin-top: 32px;
  padding: 0 48px;
}

.home-honors__viewport {
  overflow: hidden;
}

.home-honors__list {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.45s ease;
  will-change: transform;
}

.home-honors__list li {
  flex: 0 0 192px;
}

.home-honors__list img {
  display: block;
  width: 192px;
  height: 260px;
  object-fit: cover;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}

.home-honors__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(29, 81, 152, 0.12);
  cursor: pointer;
  transition: background 0.2s;
}

.home-honors__nav:hover {
  background: rgba(29, 81, 152, 0.22);
}

.home-honors__nav::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-top: 2px solid var(--home-primary);
  border-right: 2px solid var(--home-primary);
}

.home-honors__nav--prev {
  left: 0;
}

.home-honors__nav--prev::before {
  transform: translateX(2px) rotate(-135deg);
}

.home-honors__nav--next {
  right: 0;
}

.home-honors__nav--next::before {
  transform: translateX(-2px) rotate(45deg);
}

/* 数据条 */
.home-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid #eee;
}

.home-stats__item {
  flex: 1 1 20%;
  min-width: 140px;
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  border-left: 1px solid #eee;
  box-sizing: border-box;
}

.home-stats__item:first-child {
  border-left: none;
}

.home-stats__item dt {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  color: #333;
}

.home-stats__num {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  color: var(--home-accent);
  line-height: 1;
}

.home-stats__item dd {
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
  #home-brand .hd-banner__tabs {
    padding: 16px var(--kh-shell-pad-x) 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  #home-brand .hd.hd--banner li {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    padding: 8px 10px;
    font-size: 12px;
  }

  #home-brand .hd.hd--banner li .zsolu-tab-icon {
    font-size: 18px;
  }

  .home-about__intro {
    grid-template-columns: 1fr;
  }

  .home-about__side {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .home-about {
    padding: 40px 0;
  }

  .home-honors__carousel {
    padding: 0 40px;
  }

  .home-stats__item {
    flex: 1 1 50%;
    border-left: none;
    border-top: 1px solid #eee;
  }

  .home-stats__item:nth-child(odd) {
    border-right: 1px solid #eee;
  }

  .home-stats__item:nth-child(-n + 2) {
    border-top: none;
  }
}

@media (max-width: 576px) {
  #home-brand .home-brand__actions {
    margin-top: 20px;
    gap: 10px;
  }

  #home-brand .home-brand__cta {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  #home-brand .hd.hd--banner li {
    flex: 1 1 calc(50% - 6px);
  }

  #home-brand .hd.hd--banner li .zsolu-tab-label {
    font-size: 11px;
  }

  .home-stats__item {
    flex: 1 1 100%;
    border-right: none !important;
  }

  .home-honors__carousel {
    padding: 0 36px;
  }
}
