/* ============================================================
   红色征程 · 历程页样式 history.css
   ============================================================ */

/* ---------- 时期导航 ---------- */
.era-nav-wrap {
  padding: 34px 0 0;
}
.era-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.era-btn {
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  transition: all .3s;
}
.era-btn small {
  display: block;
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 1px;
}
.era-btn:hover { border-color: var(--gold); color: var(--red); }
.era-btn.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: transparent;
  color: #fff;
}
.era-btn.active small { color: var(--gold-light); }

/* ---------- 时间轴 ---------- */
.timeline-section { padding-top: 44px; }
.timeline {
  position: relative;
  padding: 10px 0;
}
/* 中轴线 */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: linear-gradient(180deg,
    var(--gold) 0%, var(--red) 30%, var(--red) 70%, var(--gold) 100%);
  border-radius: 2px;
  opacity: .5;
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 44px 46px 0;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity .7s ease, transform .7s ease;
}
.tl-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.tl-item:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 46px 44px;
  transform: translateX(30px);
}
.tl-item:nth-child(even).visible { transform: translateX(0); }

/* 时间节点圆 */
.tl-node {
  position: absolute;
  top: 6px;
  right: -26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(109, 0, 5, .35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.tl-node span {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0;
}
.tl-item:nth-child(even) .tl-node {
  right: auto;
  left: -26px;
}
.tl-node-end {
  background: linear-gradient(135deg, var(--gold), #b8860b);
}

/* 卡片 */
.tl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  transition: transform .35s, box-shadow .35s;
  position: relative;
}
.tl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tl-item:nth-child(odd) .tl-card::after {
  content: "";
  position: absolute;
  right: -8px; top: 26px;
  width: 16px; height: 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.tl-item:nth-child(even) .tl-card::after {
  content: "";
  position: absolute;
  left: -8px; top: 26px;
  width: 16px; height: 16px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.tl-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--red);
  background: rgba(199, 0, 11, .08);
  border: 1px solid rgba(199, 0, 11, .22);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tl-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--red-dark);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.tl-card p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.9;
}
.tl-card img {
  margin-top: 14px;
  border-radius: 10px;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

/* 收尾卡 */
.tl-card-final {
  background: linear-gradient(135deg, var(--red-deep), var(--red-dark));
  border: none;
  text-align: center;
}
.tl-card-final::after { display: none !important; }
.tl-card-final h3 { color: var(--gold-light); }
.tl-card-final p { color: rgba(255, 255, 255, .9); margin-bottom: 18px; }

/* 筛选隐藏 */
.tl-item.filtered { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .timeline::before { left: 26px; }
  .tl-item,
  .tl-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 34px 64px;
    transform: translateX(24px);
  }
  .tl-item:nth-child(even).visible,
  .tl-item.visible { transform: translateX(0); }
  .tl-node,
  .tl-item:nth-child(even) .tl-node {
    left: 0;
    right: auto;
    width: 52px; height: 52px;
  }
  .tl-item:nth-child(odd) .tl-card::after,
  .tl-item:nth-child(even) .tl-card::after {
    left: -8px;
    right: auto;
    border: 0;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-right: 0;
    border-top: 0;
    transform: rotate(45deg);
  }
  .era-btn { padding: 8px 18px; font-size: 13px; }
}
