/**
 * jazz-timeline 时间轴 rem 适配（1rem = 100px，与 fontsize.js 一致）
 */
.development-history .jazz-timeline {
  position: relative;
  --tl-branch: 0.5rem;
  --tl-dot: 0.38rem;
  --tl-row: 0.38rem;
  /* 内容区与横线间距：横线长度 + 圆点半径 + 小间隙 */
  --tl-side: calc(var(--tl-branch) + var(--tl-dot) / 2 + 0.06rem);
}

.development-history .jazz-timeline:before {
  margin-left: -0.02rem;
  width: 0.04rem;
  border-radius: 0.02rem;
  left: 50%;
}

.development-history .jazz-timeline .timeline-post {
  position: relative;
  box-sizing: border-box;
}

.development-history .jazz-timeline .timeline-post:nth-child(even) {
  padding: 0 var(--tl-side) 0.5rem 0;
}

.development-history .jazz-timeline .timeline-post:nth-child(odd) {
  margin-left: 50%;
  padding: 0 0 0.5rem var(--tl-side);
}

.development-history .jazz-timeline .timeline-post:last-child,
.development-history .jazz-timeline .timeline-post:nth-child(odd):last-child {
  padding-bottom: 0;
}

/* 年份圆点：与标题行垂直居中对齐 */
.development-history .jazz-timeline .timeline-post .timeline-icon.icon-dot-full {
  position: absolute;
  top: 0;
  width: var(--tl-dot);
  height: var(--tl-dot);
  line-height: var(--tl-dot);
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  z-index: 10;
}

.development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full {
  left: 100%;
  transform: translateX(-50%);
}

.development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full {
  left: 0;
  transform: translateX(-50%);
}

.development-history .jazz-timeline .timeline-post .timeline-icon.icon-dot-full img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 横向连接线：从中线连到内容区，长度与红框间距一致 */
.development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full::after {
  position: absolute;
  content: "";
  top: 50%;
  width: var(--tl-branch);
  height: 0.03rem;
  left: 100%;
  background: #D20001;
  transform: translateY(-50%);
}

.development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full::before {
  position: absolute;
  content: "";
  top: 50%;
  width: var(--tl-branch);
  height: 0.03rem;
  right: 100%;
  left: auto;
  background: #D20001;
  transform: translateY(-50%);
}

.development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full::after,
.development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full::before {
  z-index: 1;
}

.development-history .jazz-timeline .timeline-post .timeline-content {
  overflow: visible;
  position: relative;
  z-index: 2;
}

/* 左列内容靠右对齐，贴近中线并保持统一间距 */
.development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-content {
  margin-left: auto;
  text-align: right;
}

.development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-content {
  margin-right: auto;
  text-align: left;
}

.development-history .jazz-timeline .timeline-post .timeline-content .content-title {
  font-size: 0.24rem;
  margin: 0 0 0.12rem;
  height: var(--tl-row);
  line-height: var(--tl-row);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-content .content-title {
  text-align: right !important;
  justify-content: flex-end;
}

.development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-content .content-title {
  text-align: left !important;
  justify-content: flex-start;
}

.development-history .jazz-timeline .timeline-post .timeline-content p,
.development-history .jazz-timeline .timeline-post .timeline-content .content-text {
  margin: 0.1rem 0;
  line-height: 0.28rem;
  font-size: 0.16rem;
  font-weight: 400;
  color: #333;
  word-break: break-word;
}

.development-history .jazz-timeline .timeline-post .timeline-content .content-details {
  margin: 0;
  line-height: 1.6;
}

.development-history .jazz-timeline .timeline-post .timeline-content img {
  max-width: 48%;
  border-radius: 0.03rem;
}

.development-history .yearimg-box {
  margin-top: 0.16rem;
  flex-wrap: wrap;
  gap: 0.12rem;
  display: flex;
}

.development-history .jazz-timeline .timeline-post:nth-child(even) .yearimg-box {
  justify-content: flex-end;
}

.development-history .yearimg-box img {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: cover;
  margin-right: 0;
}

@media (max-width: 1024px) {
  .development-history .jazz-timeline {
    --tl-branch: 0.4rem;
    --tl-dot: 0.38rem;
    /* 圆点中心 + 半径 + 横线 + 与文字间距 */
    --tl-pad: calc(0.19rem + var(--tl-dot) / 2 + var(--tl-branch) + 0.14rem);
  }

  .development-history .jazz-timeline:before {
    left: 0.19rem;
    margin-left: 0;
  }

  .development-history .jazz-timeline .timeline-post,
  .development-history .jazz-timeline .timeline-post:nth-child(even),
  .development-history .jazz-timeline .timeline-post:nth-child(odd) {
    margin: 0;
    margin-left: 0;
    padding: 0 0 0.3rem var(--tl-pad);
    width: 100%;
  }

  .development-history .jazz-timeline .timeline-post .timeline-icon.icon-dot-full,
  .development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full {
    left: 0.19rem;
    transform: translateX(-50%);
  }

  /* 隐藏桌面端左侧横线 */
  .development-history .jazz-timeline .timeline-post .timeline-icon.icon-dot-full::before,
  .development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full::before,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full::before {
    display: none !important;
    content: none !important;
  }

  /* 所有年份统一向右画横线 */
  .development-history .jazz-timeline .timeline-post .timeline-icon.icon-dot-full::after,
  .development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-icon.icon-dot-full::after,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-icon.icon-dot-full::after {
    display: block !important;
    content: "" !important;
    position: absolute;
    top: 50%;
    left: 100%;
    right: auto;
    width: var(--tl-branch);
    height: 0.03rem;
    background: #D20001;
    transform: translateY(-50%);
    z-index: 1;
  }

  .development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-content,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .development-history .jazz-timeline .timeline-post .timeline-content .content-title,
  .development-history .jazz-timeline .timeline-post:nth-child(even) .timeline-content .content-title,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .timeline-content .content-title {
    text-align: left !important;
    justify-content: flex-start;
    font-size: 0.28rem;
    line-height: 0.42rem;
    height: auto;
    min-height: 0.42rem;
  }

  .development-history .jazz-timeline .timeline-post .timeline-content p,
  .development-history .jazz-timeline .timeline-post .timeline-content .content-text,
  .development-history .jazz-timeline .timeline-post .timeline-content .content-details {
    font-size: 0.26rem;
    line-height: 0.3rem;
  }

  .development-history .jazz-timeline .timeline-post:nth-child(even) .yearimg-box,
  .development-history .jazz-timeline .timeline-post:nth-child(odd) .yearimg-box {
    justify-content: flex-start;
  }

  .development-history .yearimg-box img,
  .development-history .jazz-timeline .timeline-post .timeline-content img {
    width: auto;
    max-width: 48%;
    height: auto !important;
    max-height: none !important;
  }
}
