/* ===== About Text ===== */
.about-text {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-light);
  max-width: 900px;
}

.about-text p { margin-bottom: 16px; }

/* ===== Timeline ===== */
.timeline-section {
  padding: 80px 0;
  background: #f8fafc;
  overflow: visible;
}

.timeline-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text);
  padding: 0 20px;
}

.timeline-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  padding: 20px 0 24px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #e2e8f0;
}

.timeline-wrapper::-webkit-scrollbar { height: 6px; }
.timeline-wrapper::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 3px; }
.timeline-wrapper::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

.timeline-wrapper.dragging { cursor: grabbing; user-select: none; }

.timeline-track {
  position: relative;
  display: flex;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
  height: 400px;
  padding: 0 40px;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: translateY(-50%);
  border-radius: 2px;
  z-index: 1;
}

/* 每一列节点 */
.timeline-col {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* 列中心圆点，落在时间轴上 */
.timeline-col::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
  z-index: 4;
}

/* 上下各占一半高度 */
.col-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  overflow: visible;
  padding: 4px 0;
}

/* 上方区域：内容靠底部对齐（贴近时间轴） */
.col-above {
  justify-content: flex-end;
}

/* 下方区域：内容靠顶部对齐（贴近时间轴） */
.col-below {
  justify-content: flex-start;
}

/* 上方节点顺序：icon → 年份 → 描述 → 竖线 */
.col-above .node-icon { order: 1; }
.col-above .node-year { order: 2; }
.col-above .node-content { order: 3; }
.col-above .node-connector { order: 4; }

/* 下方节点顺序：竖线 → icon → 年份 → 描述 */
.col-below .node-connector { order: 1; }
.col-below .node-icon { order: 2; }
.col-below .node-year { order: 3; }
.col-below .node-content { order: 4; }

.node-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  background: #fff;
  box-shadow: 0 4px 20px rgba(212, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.node-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-col:hover .node-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(212, 0, 0, 0.35);
}

.node-year {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin: 10px 0 6px;
  letter-spacing: 1px;
  line-height: 1;
}

.node-content {
  font-size: 0.88rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.6;
  padding: 0 10px;
  max-width: 200px;
  margin-bottom: 8px;
}

/* 竖线连接至时间轴 */
.node-connector {
  width: 3px;
  height: 36px;
  background: var(--primary);
  opacity: 0.5;
  flex-shrink: 0;
}

.timeline-hint {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .timeline-section {
    padding: 48px 0;
  }

  .timeline-section h2 {
    font-size: 1.6rem;
    margin-bottom: 24px;
  }

  .timeline-wrapper {
    padding: 16px 0 20px;
    cursor: default;
  }

  .timeline-track {
    height: 460px;
    padding: 0 24px;
  }

  .timeline-line {
    left: 24px;
    right: 24px;
  }

  .timeline-col {
    width: 150px;
    flex-shrink: 0;
  }

  .node-year {
    font-size: 1.25rem;
    margin: 8px 0 4px;
  }

  .node-icon {
    width: 52px;
    height: 52px;
    border-width: 3px;
  }

  .node-content {
    font-size: 0.78rem;
    max-width: 140px;
    line-height: 1.5;
    margin-bottom: 6px;
  }

  .node-connector {
    height: 24px;
  }

  .timeline-col::after {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-hint {
    font-size: 0.8rem;
    padding: 0 20px;
  }
}
