@charset "UTF-8";

.hebang-certificates {
  --hebang-certificate-height: 520px;
  overflow: hidden;
  padding: 105px 0 95px;
  background: var(--hebang-color-primary-tint);
  color: var(--hebang-color-ink);
}

.hebang-certificates-head {
  max-width: 1362px;
  margin: 0 auto 28px;
  padding: 0 24px;
  text-align: center;
}

.hebang-certificates-eyebrow {
  margin: 0 0 12px;
  color: var(--hebang-color-primary-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hebang-certificates-head h2 {
  margin: 0;
  font-family: var(--hebang-font-heading);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.12;
}

.hebang-certificates-scene {
  position: relative;
  width: 100%;
  min-height: 560px;
  outline: none;
  touch-action: pan-y;
}

.hebang-certificates-scene:focus-visible {
  outline: 3px solid var(--hebang-color-primary-text);
  outline-offset: -5px;
}

.hebang-certificates-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  height: 560px;
  margin: 0;
  padding: 20px 24px;
  list-style: none;
}

.hebang-certificates-item {
  flex: 0 0 390px;
  height: 520px;
}

.hebang-certificates-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 7px;
  border: 5px solid var(--hebang-color-primary-dark);
  background: var(--hebang-color-white);
  box-shadow: 0 24px 38px var(--hebang-color-border-veil);
  cursor: pointer;
}

.hebang-certificates-card:focus-visible {
  outline: 3px solid var(--hebang-color-primary-text);
  outline-offset: 5px;
}

.hebang-certificates-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 无地址的脚本图片不占第二行，无脚本图片仍完整填充固定卡片。 */
.hebang-certificates-card img:not([src]) { display: none; }
.hebang-certificates-item:is(.is-loading, .is-error) .hebang-certificates-card > img { visibility: hidden; }
.hebang-certificates-placeholder { position: absolute; inset: 12px; display: grid; place-items: center; padding: 20px; color: var(--hebang-color-text); text-align: center; font-size: 14px; }
.hebang-certificates-placeholder[hidden] { display: none; }

.hebang-certificates-reflection {
  display: none;
}

/* 圆台与卡片共用场景坐标，底部留白容纳台沿和倒影，避免覆盖导航。 */
.hebang-certificates.is-ready .hebang-certificates-scene {
  isolation: isolate;
  padding-bottom: 70px;
}

.hebang-certificates.is-ready .hebang-certificates-scene::before,
.hebang-certificates.is-ready .hebang-certificates-scene::after {
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  content: "";
}

.hebang-certificates.is-ready .hebang-certificates-scene::before {
  z-index: -1;
  bottom: 28px;
  width: calc(100% - 48px);
  max-width: 1440px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #f8faf5 0%, #ffffff 58%, #f4f3ee 100%);
  box-shadow: 0 2px 0 #c8b998, 0 8px 0 #f3f0e8, 0 10px 0 #b9aa8c,
    0 22px 25px -12px rgba(64, 72, 42, 0.23);
}

.hebang-certificates.is-ready .hebang-certificates-scene::after {
  z-index: -2;
  bottom: 8px;
  width: calc(100% - 12px);
  max-width: 1480px;
  height: 244px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* 倒影随所属卡片一起变换，裁切和透明遮罩限制在台面内，不参与点击或朗读。 */
.hebang-certificates.is-ready .hebang-certificates-reflection {
  position: absolute;
  top: calc(100% + 5px);
  right: 7px;
  left: 7px;
  display: block;
  overflow: hidden;
  height: 62px;
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}

.hebang-certificates.is-ready .hebang-certificates-reflection img {
  height: calc(var(--hebang-certificate-height) - 24px);
  transform: scaleY(-1);
}

/* 初始化后用同一舞台叠放卡片，旋转与深度由当前索引同步计算。 */
.hebang-certificates.is-ready .hebang-certificates-list {
  position: relative;
  display: block;
  overflow: visible;
  padding: 0;
  perspective: 1150px;
}

.hebang-certificates.is-ready .hebang-certificates-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 390px;
  opacity: 0;
  pointer-events: none;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 500ms ease;
  will-change: transform;
}

.hebang-certificates.is-ready .hebang-certificates-item.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hebang-certificates-footer {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 1362px;
  margin: 0 auto;
  padding: 0 24px;
}

.hebang-certificates.is-ready .hebang-certificates-footer {
  display: flex;
}

.hebang-certificates-nav {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--hebang-color-border-input);
  border-radius: 50%;
  background: var(--hebang-color-surface);
  color: var(--hebang-color-ink);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.hebang-certificates-nav:is(:hover, :focus-visible) {
  background: var(--hebang-color-primary-dark);
  color: var(--hebang-color-white);
}

.hebang-certificates-nav:focus-visible {
  outline: 3px solid var(--hebang-color-primary-text);
  outline-offset: 3px;
}

.hebang-certificates-nav svg {
  width: 22px;
  height: 22px;
}

.hebang-certificates-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 190px;
  margin: 0;
  text-align: center;
}

.hebang-certificates-status [data-certificate-title] {
  font-weight: 700;
}

.hebang-certificates-status [data-certificate-count] {
  color: var(--hebang-color-text);
  font-size: 14px;
}

.hebang-certificates-marks-band {
  position: relative;
  z-index: 10;
  overflow: visible;
  width: 100%;
  height: 176px;
  margin: -88px 0;
  padding: 0;
  background: transparent;
  color: var(--hebang-color-ink);
}

.hebang-certificates-marks-inner {
  display: block;
  height: 100%;
  max-width: none;
  margin: 0 0 0 max(24px, calc((100vw - 1362px) / 2));
  padding: 20px 24px;
  border-radius: 30px 0 0 30px;
  background: var(--hebang-color-surface);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
}

.hebang-certificates-marks-label {
  display: flex;
  align-items: baseline;
  gap: 24px;
  width: 100%;
  padding-bottom: 12px;
}

.hebang-certificates-marks-band .hebang-certificates-eyebrow {
  margin: 0 0 8px;
}

.hebang-certificates-marks-viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

.hebang-certificates-marks-track {
  display: flex;
  width: max-content;
  animation: hebang-certificates-marks-marquee 80s linear infinite;
  will-change: transform;
}

.hebang-certificates-marks-set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.hebang-certificates-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 180px;
  height: 80px;
  margin: 0 28px;
  color: var(--hebang-color-text);
}

.hebang-certificates-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 先压暗中间色再提高对比，保留标志内的白色反白。 */
  filter: grayscale(1) brightness(0.65) contrast(6);
}

/* SVG 画布留白不同，按可见图形等比校正高度。 */
.hebang-certificates-mark--iso-9001 img {
  transform: translateY(-1px) scale(1.12);
}

.hebang-certificates-mark--iso-14001 img {
  transform: translateY(3px) scale(1.19);
}

.hebang-certificates-mark--ukca img {
  transform: scale(1.33);
}

.hebang-certificates-mark--ccc img {
  transform: scale(1.06);
}

/* 两组标志宽度相等，轨道移动半组宽度后首尾无缝衔接。 */
@keyframes hebang-certificates-marks-marquee {
  to {
    transform: translateX(-50%);
  }
}

.hebang-certificates-marks-band-copy {
  margin-left: 0;
}

/* 认证条不使用负边距，不会覆盖前后首页区块。 */
.hebang-certificates-marks-band + .hebang-certificates {
  margin-top: 0;
}

.hebang-certificates-marks-band {
  border-top: 1px solid var(--hebang-color-border-veil);
}

@media (width < 768px) {
  .hebang-certificates {
    --hebang-certificate-width: clamp(200px, 36vw, 220px);
    --hebang-certificate-height: calc(var(--hebang-certificate-width) * 1.414);
    padding: 32px 0;
  }

  .hebang-certificates-head {
    margin-bottom: 16px;
    padding-inline: var(--hebang-gutter);
  }

  .home .hebang-main .hebang-certificates-head h2 {
    font-size: var(--hebang-mobile-section-title);
    line-height: 1.3;
  }

  .home .hebang-main .hebang-certificates-head .hebang-certificates-eyebrow {
    margin-bottom: 8px;
  }

  .hebang-certificates-scene {
    min-height: calc(var(--hebang-certificate-height) + 20px);
  }

  .hebang-certificates-list {
    height: calc(var(--hebang-certificate-height) + 20px);
  }

  /* 窄屏缩浅圆台与倒影，保持弧线可见并为触摸导航留出间距。 */
  .hebang-certificates.is-ready .hebang-certificates-scene {
    padding-bottom: 26px;
  }

  .hebang-certificates.is-ready .hebang-certificates-scene::before {
    bottom: 16px;
    width: calc(100% - 24px);
    height: 82px;
    box-shadow: 0 2px 0 #c8b998, 0 5px 0 #f3f0e8, 0 7px 0 #b9aa8c,
      0 14px 18px -10px rgba(64, 72, 42, 0.18);
  }

  .hebang-certificates.is-ready .hebang-certificates-scene::after {
    bottom: 6px;
    width: calc(100% - 6px);
    height: 98px;
  }

  .hebang-certificates.is-ready .hebang-certificates-reflection {
    height: 24px;
    opacity: 0.12;
  }

  .hebang-certificates-item,
  .hebang-certificates.is-ready .hebang-certificates-item {
    width: var(--hebang-certificate-width);
    height: var(--hebang-certificate-height);
    flex-basis: var(--hebang-certificate-width);
  }

  .hebang-certificates-card {
    padding: 5px;
    border-width: 3px;
    box-shadow: 0 12px 24px var(--hebang-color-border-veil);
  }

  .hebang-certificates-footer {
    gap: 12px;
  }

  .hebang-certificates-nav {
    display: none;
  }

  .hebang-certificates-status {
    flex: 1;
    min-width: 0;
    max-width: 250px;
    font-size: 14px;
  }

  /* 两行状态预留高度，错误提示换行时保持下方区块位置。 */
  .hebang-certificates-status [data-certificate-title] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8em;
    line-height: 1.4;
  }

  .hebang-certificates-marks-band {
    height: 104px;
    margin: 0;
  }

  .hebang-certificates-marks-inner {
    display: block;
    margin: 0;
    padding: 16px;
    border-radius: 18px 0 0 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  }

  .hebang-certificates-marks-label {
    display: block;
    margin-bottom: 8px;
    padding-bottom: 0;
  }

  .home .hebang-main .hebang-certificates-marks-band .hebang-certificates-eyebrow {
    margin: 0;
    font-size: 12px;
  }

  .hebang-certificates-mark { width: 100px; height: 44px; margin: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .hebang-certificates.is-ready .hebang-certificates-item,
  .hebang-certificates-nav,
  .hebang-certificates-marks-track {
    transition: none;
    animation: none;
  }
}
