/* ============================================================
   components/timeline.css — Timeline (3 variants) — 时间轴
   从 style1.css 拆分 (2026-07-13)
   ============================================================ */

.timeline-section {
  background: var(--color-black);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(201, 169, 110, 0.3), rgba(201, 169, 110, 0.3), transparent);
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  .timeline::before {
    left: 20px;
  }
}

.timeline-item {
  position: relative;
  padding-bottom: 60px;
  display: flex;
  align-items: flex-start;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
  padding-right: 60px;
  padding-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
  padding-left: 60px;
}

.timeline-content {
  width: 50%;
}

@media (max-width: 767px) {
  .timeline-item,
  .timeline-item:nth-child(odd) {
    flex-direction: row;
    text-align: left;
  }

  .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: 100%;
    padding-left: 56px;
    padding-right: 0;
  }
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--color-gold);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(201, 169, 110, 0.4);
  z-index: 2;
}

@media (max-width: 767px) {
  .timeline-dot {
    left: 20px;
  }
}

.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 1.025rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
  font-weight: 300;
}

/* ===== Horizontal Timeline ===== */
.timeline-horizontal {
  margin-top: 80px;
}

.timeline-h-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  border: none;
}

.timeline-h-viewport::-webkit-scrollbar {
  display: none;
}

.timeline-h-viewport:active {
  cursor: grabbing;
}

.timeline-h-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 24px;
}

.timeline-h-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 169, 110, 0.65) 8%, rgba(201, 169, 110, 0.65) 92%, transparent 100%);
  box-shadow: 0 0 14px rgba(201, 169, 110, 0.25);
  transform: translateY(-50%);
  z-index: 1;
}

.timeline-h-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
}

.timeline-h-top,
.timeline-h-bottom {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}

.timeline-h-top {
  align-items: flex-end;
  padding-bottom: 18px;
}

.timeline-h-bottom {
  align-items: flex-start;
  padding-top: 18px;
}

.timeline-h-group {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 116.64%;
}

.timeline-h-top.timeline-h-group {
  justify-content: flex-start;
  padding-top: 24px;
  padding-bottom: 0;
}

/* ponytail: 第一个顶部节点内容不要压到时间轴中线以下 */
.timeline-h-track > .timeline-h-item:nth-child(2) .timeline-h-top.timeline-h-group {
  gap: 8px;
  padding-top: 14px;
  overflow: visible;
}

.timeline-h-track > .timeline-h-item:nth-child(2) .timeline-h-top .timeline-h-card::after {
  display: none;
}

.timeline-h-bottom.timeline-h-group {
  justify-content: flex-end;
  padding-bottom: 24px;
  padding-top: 0;
}

.timeline-h-year {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 24px rgba(201, 169, 110, 0.35);
}

.timeline-h-card {
  position: relative;
  width: 100%;
  max-width: 183.75px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-h-card::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 18px;
  background: rgba(201, 169, 110, 0.4);
  transform: translateX(-50%);
}

.timeline-h-top .timeline-h-card::after {
  bottom: -19px;
}

.timeline-h-bottom .timeline-h-card::after {
  top: -19px;
}

.timeline-h-item:hover .timeline-h-card,
.timeline-h-item.is-active .timeline-h-card {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 24px rgba(201, 169, 110, 0.08);
  transform: translateY(-3px);
}

.timeline-h-node {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 20px rgba(201, 169, 110, 0.5);
  z-index: 2;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  flex-shrink: 0;
}

/* ponytail: 强制第一个 timeline-h-node 与第三个保持同一水平中线 */
.timeline-h-track > .timeline-h-item:nth-child(2) .timeline-h-node {
  align-self: center;
}

.timeline-h-item:hover .timeline-h-node,
.timeline-h-item.is-active .timeline-h-node {
  transform: scale(1.35);
  box-shadow: 0 0 32px rgba(201, 169, 110, 0.8);
}

.timeline-h-title {
  font-size: 0.98175rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
}

.timeline-h-desc {
  font-size: 0.86625rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  font-weight: 300;
}

.timeline-h-item.is-active .timeline-h-desc {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1279px) {
  .timeline-h-track {
    justify-content: flex-start;
    min-width: max-content;
    padding: 50px 20px;
  }

  .timeline-h-item {
    flex: 0 0 210px;
    width: 210px;
    height: 340px;
  }

  .timeline-h-top {
    padding-bottom: 14px;
  }

  .timeline-h-bottom {
    padding-top: 14px;
  }

  .timeline-h-group {
    gap: 14px;
  }

  .timeline-h-top.timeline-h-group {
    padding-top: 20px;
  }

  .timeline-h-bottom.timeline-h-group {
    padding-bottom: 20px;
  }

  .timeline-h-year {
    font-size: 1.85rem;
  }

  .timeline-h-card {
    max-width: 183.75px;
    padding: 12px;
  }

  .timeline-h-title {
    font-size: 0.924rem;
  }

  .timeline-h-desc {
    font-size: 0.8085rem;
  }
}

@media (max-width: 767px) {
  .timeline-horizontal {
    margin-top: 60px;
  }

  .timeline-h-track {
    padding: 40px 16px;
  }

  .timeline-h-item {
    flex: 0 0 180px;
    width: 180px;
    height: 300px;
  }

  .timeline-h-top {
    padding-bottom: 12px;
  }

  .timeline-h-bottom {
    padding-top: 12px;
  }

  .timeline-h-group {
    gap: 12px;
  }

  .timeline-h-top.timeline-h-group {
    padding-top: 16px;
  }

  .timeline-h-bottom.timeline-h-group {
    padding-bottom: 16px;
  }

  .timeline-h-year {
    font-size: 1.6rem;
  }

  .timeline-h-card {
    max-width: 157.5px;
    padding: 10px;
  }

  .timeline-h-title {
    font-size: 0.86625rem;
  }

  .timeline-h-desc {
    font-size: 0.75075rem;
    line-height: 1.5;
  }
}

/* ===== Horizontal Timeline V2 (aa.png style) ===== */
.timeline-horizontal-v2 {
  margin-top: 80px;
}

.timeline-horizontal-v2 .timeline-h2-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.timeline-horizontal-v2 .timeline-h2-viewport::-webkit-scrollbar {
  display: none;
}

.timeline-horizontal-v2 .timeline-h2-viewport:active {
  cursor: grabbing;
}

.timeline-horizontal-v2 .timeline-h2-track {
  --timeline-h2-node-size: 56px;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 24px;
}

.timeline-horizontal-v2 .timeline-h2-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 169, 110, 0.85) 8%, rgba(201, 169, 110, 0.85) 92%, transparent 100%);
  box-shadow: 0 0 16px rgba(201, 169, 110, 0.3);
  transform: translateY(-50%);
  z-index: 1;
}

.timeline-horizontal-v2 .timeline-h2-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-snap-align: center;
}

.timeline-horizontal-v2 .timeline-h2-item--top {
  justify-content: flex-start;
}

.timeline-horizontal-v2 .timeline-h2-item--bottom {
  justify-content: flex-end;
}

.timeline-horizontal-v2 .timeline-h2-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 50%;
  justify-content: space-between;
}

.timeline-horizontal-v2 .timeline-h2-node {
  position: relative;
  width: var(--timeline-h2-node-size);
  height: var(--timeline-h2-node-size);
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-black);
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 22px rgba(201, 169, 110, 0.45);
  z-index: 2;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  flex-shrink: 0;
}

.timeline-horizontal-v2 .timeline-h2-connector {
  width: 2px;
  flex: 1 1 36px;
  min-height: 36px;
  background: rgba(201, 169, 110, 0.45);
}

.timeline-horizontal-v2 .timeline-h2-card {
  position: relative;
  width: 100%;
  max-width: 214.326px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-horizontal-v2 .timeline-h2-item:hover .timeline-h2-card,
.timeline-horizontal-v2 .timeline-h2-item.is-active .timeline-h2-card {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 24px rgba(201, 169, 110, 0.08);
  transform: translateY(-3px);
}

.timeline-horizontal-v2 .timeline-h2-item:hover .timeline-h2-node,
.timeline-horizontal-v2 .timeline-h2-item.is-active .timeline-h2-node {
  box-shadow: 0 0 34px rgba(201, 169, 110, 0.75);
}

.timeline-horizontal-v2 .timeline-h2-title {
  font-size: 0.98175rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
}

.timeline-horizontal-v2 .timeline-h2-desc {
  font-size: 0.86625rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  font-weight: 300;
}

.timeline-horizontal-v2 .timeline-h2-item.is-active .timeline-h2-desc {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1279px) {
  .timeline-horizontal-v2 .timeline-h2-track {
    --timeline-h2-node-size: 48px;
    justify-content: flex-start;
    min-width: max-content;
    padding: 0 20px;
  }

  .timeline-horizontal-v2 .timeline-h2-item {
    flex: 0 0 210px;
    width: 210px;
    height: 420px;
  }

  .timeline-horizontal-v2 .timeline-h2-node {
    font-size: 1.155rem;
  }

  .timeline-horizontal-v2 .timeline-h2-connector {
    min-height: 28px;
  }

  .timeline-horizontal-v2 .timeline-h2-card {
    max-width: 214.326px;
    padding: 12px;
  }

  .timeline-horizontal-v2 .timeline-h2-title {
    font-size: 0.924rem;
  }

  .timeline-horizontal-v2 .timeline-h2-desc {
    font-size: 0.8085rem;
  }
}

@media (max-width: 767px) {
  .timeline-horizontal-v2 {
    margin-top: 60px;
  }

  .timeline-horizontal-v2 .timeline-h2-track {
    --timeline-h2-node-size: 42px;
    padding: 0 16px;
  }

  .timeline-horizontal-v2 .timeline-h2-item {
    flex: 0 0 180px;
    width: 180px;
    height: 380px;
  }

  .timeline-horizontal-v2 .timeline-h2-node {
    font-size: 1.05rem;
  }

  .timeline-horizontal-v2 .timeline-h2-connector {
    min-height: 24px;
  }

  .timeline-horizontal-v2 .timeline-h2-card {
    max-width: 183.708px;
    padding: 10px;
  }

  .timeline-horizontal-v2 .timeline-h2-title {
    font-size: 0.86625rem;
  }

  .timeline-horizontal-v2 .timeline-h2-desc {
    font-size: 0.75075rem;
    line-height: 1.5;
  }
}

