/* ==========================================================================
   原启生物 · 发展历程（横向钟摆时间轴）
   --------------------------------------------------------------------------
   · 纯 HTML + CSS 实现，无 JS、无图片依赖
   · 设计基准宽度 1920px，整节高度 < 1080px（1920×1080 下实测约 880px）
   · 响应式：clamp() 等比缩放 + 1024px / 640px 断点
   · 品牌色取自 oricell.com 官网：蓝 #0070c0 → 绿 #6ee2b1 渐变
   --------------------------------------------------------------------------
   常用调节（改 .history-section 上的变量即可）：
   · 滚动速度：history.html 底部 JS 中 SPEED = 40（单位 px/s），改大加快，改小放慢
   · 卡片宽度  --his-card-w
   · 卡片间距  --his-card-gap
   ========================================================================== */

/* ------------------------------ 作用域重置 ------------------------------ */
.history-section,
.history-section *,
.history-section *::before,
.history-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ------------------------------ 区块与变量 ------------------------------ */
.history-section {
  /* 品牌色（与 oricell.com 保持一致） */
  --his-blue: #0070c0;        /* 主蓝 */
  --his-green: #6ee2b1;       /* 主绿 */
  --his-year: #378de8;        /* 年份数字蓝 */
  --his-text: #333333;        /* 标题文字 */
  --his-text-sub: #4a5561;    /* 正文文字 */
  --his-border: #e6e9eb;      /* 卡片描边（同官网时间轴底线灰） */
  --his-bg: #fbfbfb;          /* 区块背景（同官网 sec5 背景） */

  /* 尺寸变量：以 1920px 设计稿为基准，随视口等比缩放 */
  --his-card-w: clamp(272px, 20.833vw, 400px);      /* 年份卡片宽 400px@1920 */
  --his-card-gap: clamp(24px, 2.083vw, 40px);       /* 卡片间距 40px@1920 */
  --his-card-pad-x: clamp(18px, 1.25vw, 24px);
  --his-card-pad-y: clamp(18px, 1.146vw, 22px);
  --his-evt-size: clamp(12px, 0.781vw, 15px);       /* 事件字号 15px@1920 */
  --his-evt-lh: 1.6;
  --his-evt-gap: clamp(7px, 0.521vw, 10px);         /* 事件行距 10px@1920 */
  --his-year-size: clamp(24px, 1.875vw, 36px);      /* 年份字号 36px@1920 */
  --his-year-gap: clamp(6px, 0.521vw, 10px);        /* 节点到年份间距 10px@1920 */
  --his-node: clamp(12px, 0.833vw, 16px);           /* 轴上节点直径 */
  --his-connector: clamp(18px, 1.563vw, 30px);      /* 卡片与轴线连接线高 */

  position: relative;
  background: var(--his-bg);
  padding: clamp(36px, 3.333vw, 64px) 0 clamp(32px, 3.125vw, 60px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "roboto", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--his-text);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------ 标题区 ------------------------------ */
.history-head {
  width: min(1520px, 100% - clamp(32px, 4.167vw, 80px));
  margin: 0 auto clamp(26px, 2.344vw, 45px);
  flex-shrink: 0;
}

.history-head h3 {
  font-size: clamp(26px, 2.396vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--his-text);
}

/* ------------------------------ 时间轴视口 ------------------------------ */
.history-timeline {
  position: relative;
  overflow: hidden;
  padding-top: clamp(10px, 0.781vw, 15px);
  padding-left: clamp(24px, 2.5vw, 48px);
  padding-right: clamp(24px, 2.5vw, 48px);
  flex: 1;
  display: flex;
  align-items: center;
  cursor: grab;
}

.history-timeline.dragging {
  cursor: grabbing;
}

/* ------------------------------ 滚动轨道 ------------------------------ */
.history-track {
  display: flex;
  width: max-content;
  position: relative;
  z-index: 1;
}

.history-group {
  display: flex;
  align-items: stretch;   /* 各卡片等高，内容多的卡片撑开整行高度 */
  flex-shrink: 0;
}

/* ------------------------------ 年份卡片 ------------------------------ */
.year-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--his-card-w);
  margin-right: var(--his-card-gap);
  flex-shrink: 0;
}

.year-card-body {
  flex: 1 1 auto;          /* 撑满卡片等高，确保每张卡完整容纳内容 */
  width: 100%;
  background: #fff;
  border: 1px solid var(--his-border);
  border-radius: 10px;
  padding: var(--his-card-pad-y) var(--his-card-pad-x);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.year-card:hover .year-card-body {
  transform: translateY(-4px);
  border-color: rgba(0, 112, 192, 0.3);
  box-shadow: 0 12px 28px rgba(0, 112, 192, 0.1);
}

/* ------------------------------ 事件列表 ------------------------------ */
.event-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--his-evt-gap);
}

.event-list li {
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, 0.469vw, 9px);
}

/* 事件圆点 */
.event-list li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: calc(var(--his-evt-size) * var(--his-evt-lh) / 2 - 3.5px);
  background: linear-gradient(135deg, var(--his-blue), var(--his-green));
  opacity: 0.8;
}

.event-list p {
  flex: 1;
  min-width: 0;
  font-size: var(--his-evt-size);
  line-height: var(--his-evt-lh);
  color: var(--his-text-sub);
  text-align: justify;
  overflow-wrap: break-word;
}

/* 月份徽章 */
.evt-month {
  display: inline-block;
  font-style: normal;
  font-weight: 700;
  font-size: 0.88em;
  line-height: 1.7;
  padding: 0 0.55em;
  margin-right: 0.5em;
  border-radius: 999px;
  background: rgba(0, 112, 192, 0.08);
  color: var(--his-blue);
}

/* ------------------------------ 轴线连接件与节点 ------------------------------ */
.year-connector {
  flex-shrink: 0;
  width: 2px;
  height: var(--his-connector);
  background: linear-gradient(180deg, var(--his-blue), var(--his-green));
  opacity: 0.45;
}

.year-node {
  flex-shrink: 0;
  width: var(--his-node);
  height: var(--his-node);
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(135deg, var(--his-blue), var(--his-green));
  box-shadow: 0 0 0 1px rgba(0, 112, 192, 0.28), 0 2px 6px rgba(0, 112, 192, 0.25);
}

/* ------------------------------ 年份标签（位于节点正下方） ------------------------------ */
.year-label {
  margin-top: var(--his-year-gap);
  font-family: "Robotobold", Roboto, "Helvetica Neue", Arial, "微软雅黑", sans-serif;
  font-size: var(--his-year-size);
  font-weight: 700;
  line-height: 1;
  color: var(--his-year);
}

/* ------------------------------ 贯穿轴线（JS 定位 --line-top） ------------------------------ */
.history-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--line-top, 50%);
  height: 2px;
  background: linear-gradient(90deg, var(--his-blue), var(--his-green));
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

/* ------------------------------ 响应式 ------------------------------ */
/* 平板（对齐官网 1024px 断点） */
@media (max-width: 1024px) {
  .history-section {
    --his-card-w: clamp(264px, 34vw, 320px);
  }

  .history-head {
    width: min(1520px, 100% - 48px);
  }
}

/* 手机 */
@media (max-width: 640px) {
  .history-section {
    --his-card-w: min(78vw, 300px);
    --his-card-gap: 20px;
    --his-evt-size: 13px;
    --his-year-size: 24px;
  }
}

/* 用户偏好减少动画：不做自动滚动，允许手动横向滑动 */
@media (prefers-reduced-motion: reduce) {
  .history-timeline {
    overflow-x: auto;
    cursor: auto;
    scrollbar-width: none;
  }

  .history-timeline::-webkit-scrollbar {
    display: none;
  }

  .history-track {
    transform: none !important;
  }
}
