/**
 * page-hero block styles（由 style-index.css / style-index-ext.css 迁移拆分）
 */

@layer zj-block {
.zj-x-hero {
  display: grid;
  grid-template-columns: minmax(390px, 0.86fr) minmax(520px, 1.14fr);
  min-height: 520px;
  border-bottom: 1px solid var(--zjx-line);
  background: linear-gradient(90deg, #fff 0%, #fff 45%, #edf3f8 100%);
}
.zj-x-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 0 50px var(--zjx-gutter);
}
.zj-x-hero__title {
  max-width: 760px;
  margin: 0;
  color: var(--zjx-navy);
  font-size: clamp(40px, 4.2vw, 62px);
  line-height: 1.02;
}
.zj-x-hero__desc {
  max-width: 660px;
  margin: 22px 0 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.58;
}
.zj-x-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.zj-x-hero__points span {
  padding: 8px 14px;
  color: var(--zjx-navy);
  font-size: 13px;
  font-weight: 750;
  background: var(--zjx-action-tint);
  border: 1px solid rgba(237, 28, 36, 0.28);
  border-radius: 4px;
}
.zj-x-hero__media {
  position: relative;
  min-height: 480px;
  margin: 0;
  overflow: hidden;
}
.zj-x-hero__media img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.zj-x-hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 31, 73, 0.16), rgba(7, 31, 73, 0.02));
}
.zj-x-hero__media figcaption {
  position: absolute;
  right: 36px;
  bottom: 32px;
  width: min(390px, calc(100% - 72px));
  padding: 22px;
  color: var(--zjx-white);
  background: rgba(7, 31, 73, 0.93);
  border-left: 5px solid var(--zjx-action);
  box-shadow: var(--zjx-shadow);
}
.zj-x-hero__media figcaption strong {
  display: block;
  color: var(--zjx-action);
  font-size: 18px;
}
.zj-x-hero__media figcaption span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}
.zj-x-hero--gallery {
  grid-template-columns: minmax(390px, 1fr) minmax(460px, 1fr);
  align-items: center;
}
.zj-x-hero__gallery {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 40px var(--zjx-gutter) 40px 0;
  /* 容器查询:让缩略图栏高度可以用本容器宽度换算出大图高度 */
  container-type: inline-size;
}
.zj-x-hero__gallery--thumbs-right .zj-x-hero__thumbs {
  order: 2;
}
.zj-x-hero__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: calc((100cqw - 106px) / 1.5);
}
.zj-x-hero__thumblist {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.zj-x-hero__thumblist::-webkit-scrollbar {
  display: none;
}
.zj-x-hero__thumbs button[data-gallery-to] {
  flex: 0 0 auto;
  width: 100%;
  /* 每张缩略图高 = 列表高的 1/N(N = 一屏张数):3 张图就 3 张占满,超过 4 张则滚动 */
  height: calc((100% - (var(--zjx-rail-visible, 4) - 1) * 10px) / var(--zjx-rail-visible, 4));
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #eef2f6;
  border: 1px solid var(--zjx-line);
}
.zj-x-hero__thumbs button[data-gallery-to].active {
  border-color: var(--zjx-action-dark);
  box-shadow: 0 0 0 1px var(--zjx-action-dark);
}
.zj-x-hero__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zj-x-rail-nav {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 100%;
  height: 22px;
  padding: 0;
  border: 1px solid var(--zjx-line);
  background: var(--zjx-white, #fff);
  color: var(--zjx-navy, #071f49);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.zj-x-rail-nav svg {
  width: 14px;
  height: 14px;
}
.zj-x-rail-nav:hover {
  background: var(--zjx-action-tint);
  border-color: var(--zjx-action-dark);
  color: var(--zjx-action-dark);
}
.zj-x-hero__stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--zjx-line);
  background: #eef2f6;
}
.zj-x-hero__track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.zj-x-hero__slide {
  flex: 0 0 100%;
  margin: 0;
  min-width: 0;
}
.zj-x-hero__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  object-fit: cover;
}
.zj-x-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 31, 73, 0.65);
  color: var(--zjx-white, #fff);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.zj-x-gallery-nav svg {
  width: 20px;
  height: 20px;
}
.zj-x-gallery-nav--prev {
  left: 14px;
}
.zj-x-gallery-nav--next {
  right: 14px;
}
.zj-x-hero__stage:hover .zj-x-gallery-nav,
.zj-x-hero__stage:focus-within .zj-x-gallery-nav {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.zj-x-gallery-nav:hover {
  background: var(--zjx-action);
}
.zj-x-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(7, 31, 73, 0.65);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.zj-x-hero__thumbs button[data-gallery-to] {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  opacity: 0.75;
}
.zj-x-hero__thumbs button[data-gallery-to]:hover,
.zj-x-hero__thumbs button[data-gallery-to].active {
  opacity: 1;
}
}

@layer zj-responsive {
@supports not (container-type: inline-size) {
  .zj-x-hero__thumbs {
    height: auto;
    max-height: 460px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .zj-x-hero__thumblist {
    scroll-behavior: auto;
  }
}
@media (max-width: 1040px) {
  .zj-x-hero,
  .zj-x-hero--gallery {
    grid-template-columns: 1fr;
  }
  .zj-x-hero__copy {
    padding: 44px var(--zjx-gutter);
  }
  .zj-x-hero__media {
    min-height: 320px;
  }
  .zj-x-hero__gallery,
  .zj-x-hero__gallery--thumbs-right {
    grid-template-columns: 1fr;
    padding: 0 var(--zjx-gutter) 32px;
  }
  .zj-x-hero__thumbs {
    order: 2;
    flex-direction: row;
    height: auto;
  }
  .zj-x-hero__thumblist {
    flex-direction: row;
    overflow-y: hidden;
    overflow-x: auto;
  }
  .zj-x-hero__thumbs button[data-gallery-to] {
    flex: 0 0 96px;
    height: auto;
  }
  .zj-x-hero__thumbs img {
    height: auto;
    aspect-ratio: 1.4 / 1;
  }
  .zj-x-rail-nav {
    display: none;
  }
}
@media (hover: none) {
  .zj-x-gallery-nav {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
}
