/* ============================================================
 * pages/about/history.css  发展历程页样式
 * ========================================================== */
.page-about-history .about-banner {
  background-image: url('../images/about/about_banner@2x.webp');
}
.page-about-history .about-banner::after {
  background: linear-gradient(180deg, rgba(7,30,77,.66), rgba(7,30,77,.5));
}
.inner-banner__slash { color: var(--color-primary); margin-right: 6px; }

.history { padding: 0 6.25rem; position: relative; margin-top: 4rem; }
.history__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--sp-6); gap: var(--sp-4);
}

/* ---------------- 箭头 ---------------- */
.history__arrows {
  display: flex;
  gap: var(--sp-3);
  position: absolute;
  top: 0;
  right: 6.25rem;
  z-index: 20;
}
.history__arrows .pd-arrow,
.history__arrows .history__arrow {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px;
  background-size: 42% auto;
  border: 1px solid #2C5ABB;
  box-shadow: 0 0 0 6px rgba(31, 111, 229, .08);
  cursor: pointer;
}
.history__arrows .pd-arrow:hover {
  background-color: #255ac7;
  transform: scale(1.08);
  box-shadow: 0 0 0 8px rgba(31, 111, 229, .18);
}
.history__arrow img { width: 18px; height: 18px; object-fit: contain; }

/* ============================================================
 * 卡片舞台：PC 3 个固定位置 1fr 2fr 1fr
 * ========================================================== */
.history__stage {
  margin-top: 3.13rem;
  padding: var(--sp-4) 0 var(--sp-6);
  cursor: grab;
  user-select: none;
}
.history__stage:active { cursor: grabbing; }

.history__track {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  align-items: stretch;
  width: 100%;
}

.history__track .hcard {
  position: relative;
  height: 35.13rem;
  min-width: 0;
  transition: all .5s var(--ease-out);
}

.history__track .hcard .hcard__inner {
  position: relative;
  height: 100%;
  width: 100%;
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  padding: 2.38rem;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  transition: background .5s, box-shadow .5s, padding .5s;
}

.hcard__year {
  font-family: OPPOSans;
  font-weight: 500;
  font-size: 2rem;
  color: #1E4EB4;
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcard__text {
  margin-top: var(--sp-3);
  font-family: PingFang;
  font-weight: 500;
  font-size: 1rem;
  color: #333333;
  line-height: 2.25rem;
  transition: opacity .4s;
}
.hcard__media {
  width: 16.08rem;
  height: 10.49rem;
  margin-top: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #1E4EB4;
  transition: all .5s var(--ease-out);
}
.hcard__media img { width: 100%; height: 100%; object-fit: cover; }

/* ★ 中间高亮 */
.history__track .hcard.is-center .hcard__inner {
  padding: 3.33rem 1.66rem;
  background: var(--color-primary-light);
  background-image: url('../images/common/back.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-md);
}
.history__track .hcard.is-center .hcard__year {
  font-size: 2.5rem;
  color: #1E4EB4;
}
.history__track .hcard.is-center .hcard__media {
  width: 28.01rem;
  height: 18.27rem;
  opacity: 1;
}

.history__track .hcard__media-img {
  display: flex;
  justify-content: flex-end;
}

/* ---------------- 时间轴 ---------------- */
.history__timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-6);
  margin-bottom: 4.81rem;
  padding: 0 var(--sp-4);
  height: 80px;
}
.history__line {
  position: absolute;
  top: 50%;
  left: var(--sp-4);
  right: var(--sp-4);
  height: 2px;
  margin-top: -1px;
  background: #e2e8f2;
  z-index: 0;
}
.history__progress {
  display: block;
  height: 100%;
  background: var(--color-primary);
  width: 0;
  transition: width .5s var(--ease-out);
}
.tnode {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tnode__label {
  position: absolute;
  bottom: calc(50% + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: var(--fs-xs);
  line-height: 1;
  color: var(--text-light);
  transition: color .3s;
  white-space: nowrap;
}
.tnode__dot {
  position: relative;
  z-index: 2;
  width: 0.88rem;
  height: 0.88rem;
  background: #D6DBED;
  border-radius: 50%;
  transition: all .3s;
}
.tnode.is-active .tnode__label {
  color: #fff;
  font-weight: 700;
  bottom: 50%;
  transform: translate(-50%, 50%);
  z-index: 3;
  width: 2.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tnode.is-active .tnode__dot {
  width: 2.99rem;
  height: 2.99rem;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(31,111,229,.18);
}

/* ============================================================
 * 平板：1024 以下（仍然 3 个，缩小）
 * ========================================================== */
@media (max-width: 1024px) {
  .history { padding: var(--sp-8) 2rem; }
  .history__arrows { position: static; justify-content: flex-end; margin-top: 1rem; }
  .history__stage { margin-top: 2rem; padding: 0; }
  .history__track { gap: 24px; }
  .history__track .hcard { height: 24rem; }
  .hcard__inner { padding: 1.5rem; }
  .hcard__year { font-size: 1.5rem; }
  .history__track .hcard.is-center .hcard__year { font-size: 1.8rem; }
  .hcard__text { font-size: 0.875rem; line-height: 1.8; }
  .hcard__media { width: 10rem; height: 6.5rem; }
  .history__track .hcard.is-center .hcard__media { width: 18rem; height: 11.5rem; }
   .history__timeline {
    position: relative;
    display: flex;
    flex-wrap: nowrap;                /* 不换行 */
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    height: 80px;
    padding: 0 var(--sp-4);
    margin-top: var(--sp-6);
    margin-bottom: 3rem;
    overflow-x: auto;                 /* ★ 横向滚动 */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .history__timeline::-webkit-scrollbar { display: none; }

  .history__line {
    display: block;
    position: absolute;
    top: 50%;
    left: var(--sp-4);
    right: var(--sp-4);
    height: 2px;
    margin-top: -1px;
    background: #e2e8f2;
    z-index: 0;
  }

  .history__progress {
    display: block;
    height: 100%;
    background: var(--color-primary);
    width: 0;
    transition: width .5s var(--ease-out);
  }

  .tnode {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin: 0 20px;                  /* ★ 节点间距 */
    position: relative;
    z-index: 2;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tnode__label { /* 保持 PC 样式 */ }
  .tnode__dot   { /* 保持 PC 样式 */ }
  .tnode.is-active .tnode__label { /* 保持 PC 样式 */ }
  .tnode.is-active .tnode__dot   { /* 保持 PC 样式 */ }
}

/* ============================================================
 * 手机：768 以下（只显示 1 个 + 时间轴横向滚动）
 * ========================================================== */
@media (max-width: 768px) {
  .history { padding: var(--sp-8) 1rem; }

  /* ★ 卡片区：只显示 1 个 */
  .history__track {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .history__track .hcard { height: auto; min-height: 20rem; }

  .hcard__inner { padding: 1.25rem; border-radius: 0.75rem; }
  .hcard__year { font-size: 1.25rem; }
  .history__track .hcard.is-center .hcard__year { font-size: 1.375rem; }
  .hcard__text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.7;
  }
  .hcard__media,
  .history__track .hcard.is-center .hcard__media {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    margin-top: 1rem;
  }

  /* ★ 时间轴：和 PC 完全一样的样式，只是横向滚动 */
  .history__timeline {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    height: 80px;
    padding: 0 var(--sp-4);
    margin-top: var(--sp-6);
    margin-bottom: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .history__timeline::-webkit-scrollbar { display: none; }

  /* ★ 保持和 PC 一样的线 */
  .history__line {
    display: block;
    position: absolute;
    top: 50%;
    left: var(--sp-4);
    right: var(--sp-4);
    height: 2px;
    margin-top: -1px;
    background: #e2e8f2;
    z-index: 0;
  }

  .history__progress {
    display: block;
    height: 100%;
    background: var(--color-primary);
    width: 0;
    transition: width .5s var(--ease-out);
  }

  /* ★ 每个 tnode 不压缩，保持 48px 宽，和 PC 一样，加左右间距 */
  .tnode {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin: 0 24px;                /* ★ 节点间距拉开 */
    position: relative;
    z-index: 2;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tnode__label {
    position: absolute;
    bottom: calc(50% + 18px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--text-light);
    transition: color .3s;
    white-space: nowrap;
  }
  .tnode__dot {
    position: relative;
    z-index: 2;
    width: 0.88rem;
    height: 0.88rem;
    background: #D6DBED;
    border-radius: 50%;
    transition: all .3s;
  }
  .tnode.is-active .tnode__label {
    color: #fff;
    font-weight: 700;
    bottom: 50%;
    transform: translate(-50%, 50%);
    z-index: 3;
    width: 2.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tnode.is-active .tnode__dot {
    width: 2.99rem;
    height: 2.99rem;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(31,111,229,.18);
  }

  .tnode::after {
    display: none !important;
  }
}

/* ============================================================
 * 手机：500 以下（节点间距再拉开，标签不叠）
 * ========================================================== */
@media (max-width: 500px) {
  .tnode {
    margin: 0 40px;               /* ★ 500 以下间距更大 */
  }
  .tnode__label {
    font-size: 0.75rem;
  }
}