/* ============================================================
   发展历程 · 横向时间轴（仅 /contact/ 的 #history 生效）
   结构：顶部 50/50 图文展示区 + 底部可横向滚动的年份轨道
   所有选择器一律以 .hist-h / .timeline 限定，不影响其它模块与页面
   旧版「垂直 3D 堆叠轮播」样式保留在 page-about.css 中但不再匹配本模块
   ============================================================ */

/* ---------- 顶部内容展示区：左图 50% / 右年份 + 描述 50% ---------- */
.hist-h-stage {
  display: grid;
  grid-template-columns: 50% 50%;
  align-items: center;
  margin-top: 56px;
}

.hist-h-media {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 32px;
}

.hist-h-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #EAF2FA, #DCE5F0);
  box-shadow: 0 22px 48px rgba(15, 26, 48, .13), 0 3px 10px rgba(15, 26, 48, .05);
}

/* 9 张图叠在同一格，切换只动 opacity + 轻微 scale，不重排不闪白 */
.hist-h-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .5s ease, transform 1.2s cubic-bezier(.22, .61, .36, 1);
}
.hist-h-shot img.is-on { opacity: 1; transform: scale(1); }

.hist-h-info {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-left: 64px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .32s ease, transform .32s ease;
}
/* 换内容前先淡出 + 下沉，换完再淡入 */
.hist-h-info.is-swap { opacity: 0; transform: translateY(14px); }

.hist-h-count {
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: .18em;
  color: #B3BDCC;
  font-variant-numeric: tabular-nums;
}
.hist-h-count b {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .02em;
}

.hist-h-year {
  font-family: var(--font-num);
  font-size: clamp(64px, 7vw, 104px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--brand);
  margin-top: 18px;
  font-variant-numeric: tabular-nums;
}
/* 「未来」是汉字，缩小一档避免撑破右半栏 */
.hist-h-year.is-text { font-size: clamp(54px, 6vw, 88px); }

.hist-h-title {
  margin: 26px 0 0;
  font-size: 24px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--t-title);
}
.hist-h-rule {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
  margin: 22px 0 20px;
}

.hist-h-desc { list-style: none; margin: 0; padding: 0; }
.hist-h-desc li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 28px;
  color: var(--t-body);
}
.hist-h-desc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .55;
}

/* ---------- 底部横向时间轴 ---------- */
.timeline {
  --tn-w: 176px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 72px;
}

.timeline-arrow {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #D8E3F3;
  box-shadow: 0 2px 10px rgba(15, 26, 48, .06);
  background: #fff;
  color: #5D82C8;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease,
              box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.timeline-arrow:hover:not(:disabled) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 61, 216, .28);
}
.timeline-arrow:active:not(:disabled) { transform: scale(.94); }
.timeline-arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.timeline-arrow:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.timeline-arrow svg { width: 17px; height: 17px; }

.timeline-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  /* 隐藏滚动条：Firefox / 旧 Edge / Chromium 三套都覆盖 */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 贯通横线：background-attachment 默认 scroll，横线固定在轨道可视区，
     内容横向滚动时圆点沿线上移动，不需要给每个节点单独画线段 */
  background: linear-gradient(#E6ECF6, #E6ECF6) 0 24px / 100% 2px no-repeat;
  padding: 18px 24px 22px;
}
.timeline-track::-webkit-scrollbar { display: none; }

.timeline-node {
  position: relative;
  flex: 0 0 auto;
  width: var(--tn-w);
  box-sizing: border-box;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.timeline-node:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
  border-radius: 10px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C9D4E5;
  box-shadow: 0 0 0 5px #fff;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.timeline-year {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #98A2B3;
  white-space: nowrap;
  transition: color .3s ease;
}

.timeline-node:hover .timeline-dot { background: #8FA9D8; }
.timeline-node:hover .timeline-year { color: #5D82C8; }

/* 选中态：圆点变主题蓝并放大，年份文字变蓝加粗 */
.timeline-node.is-active .timeline-dot {
  background: var(--brand);
  transform: scale(1.5);
  box-shadow: 0 0 0 5px #fff, 0 0 0 10px rgba(22, 61, 216, .12);
}
.timeline-node.is-active .timeline-year {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .hist-h-media { padding-right: 20px; }
  .hist-h-info { padding-left: 40px; }
  .hist-h-title { font-size: 21px; }
}
@media (max-width: 992px) {
  .hist-h-stage { grid-template-columns: 1fr; gap: 36px; }
  .hist-h-media { padding-right: 0; }
  .hist-h-info { padding-left: 0; }
  .timeline { --tn-w: 148px; gap: 12px; margin-top: 56px; }
  .timeline-arrow { flex-basis: 40px; width: 40px; height: 40px; }
}
@media (max-width: 600px) {
  .timeline { --tn-w: 104px; gap: 8px; }
  .timeline-year { font-size: 14px; }
  .hist-h-year { font-size: 60px; }
  .hist-h-title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hist-h-info,
  .hist-h-shot img,
  .timeline-dot,
  .timeline-year,
  .timeline-arrow { transition: none !important; }
}
