/* ==========================================================================
   SIFF · 文章页（cms/chinese/content.html）
   与列表页共用 list-page.css 的框线、右侧浮动分享工具条；
   这里只放正文相关的版式。配色同首页：
     品牌红 #b61b11 / 墨色 #2c2c2a / 正文 #3f3e3a / 次级 #6f6e68
     暖白面 #f7f5f0 / 细分隔线 rgba(0,0,0,.12) / 标签底色 #f6f1e4 + #7a5c2e
   ========================================================================== */

/* ---------- 文章容器 ---------- */
.cms-page .article {
  width: 100%;
  min-height: 0;
  margin: 0;
  color: #2c2c2a;
  font-size: 16px;
}

/* 文章页不放栏目索引，正文直接从内容区顶部开始 */
.cms-page .content > .box:first-child {
  margin-top: 0;
}

.cms-page .article .wrapper {
  padding: 0;
  min-height: 0;
}

/* ---------- 标题区：标签 + 大标题 + 信息行（返回当前栏目 / 日期） ---------- */
.cms-page .article-head {
  position: relative;
}

.cms-page .article-tag {
  display: inline-block;
  margin-bottom: 16px;
  padding: 2px 10px;
  border-radius: 4px;
  background-color: #f6f1e4;
  color: #7a5c2e;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
}

.cms-page .article .article-title {
  margin: 0;
  padding: 0;
  color: #2c2c2a;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .01em;
  word-break: break-word;
}

.cms-page .article-meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-bottom: 16px;
  /* 分隔线由 ::after 绘制，以便做从左展开的进场动画 */
  border-bottom: 0;
}

.cms-page .article .time,
.cms-page .article-time {
  float: none;
  padding: 0;
  color: #a8a49c;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.cms-page .article-back {
  position: relative;
  padding-left: 22px;
  color: #6f6e68;
  font-size: 13px;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .2s ease;
}

.cms-page .article-back::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b61b11' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 8H3M7.2 3.6 2.8 8l4.4 4.4'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
  transition: transform .25s cubic-bezier(.22, .61, .36, 1);
}

.cms-page .article-back:hover {
  color: #b61b11;
}

.cms-page .article-back:hover::before {
  transform: translateX(-3px);
}

/* ---------- 正文 ---------- */
.cms-page .article .main_text {
  width: 100%;
  max-width: none;
  margin-top: 34px;
  padding-top: 0;
  color: #3f3e3a;
  font-size: 16px;
  line-height: 2;
  overflow-wrap: break-word;
  /* 正文在标题区之后进场 */
  animation: article-in .6s cubic-bezier(.22, .61, .36, 1) .22s both;
}

.cms-page .article .main_text section {
  margin: 0;
}

.cms-page .article .main_text p {
  margin: 0 0 20px;
}

.cms-page .article .main_text > *:first-child {
  margin-top: 0;
}

.cms-page .article .main_text > *:last-child {
  margin-bottom: 0;
}

.cms-page .article .main_text h1,
.cms-page .article .main_text h2 {
  margin: 40px 0 18px;
  padding-left: 13px;
  border-left: 3px solid #b61b11;
  color: #2c2c2a;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.6;
}

.cms-page .article .main_text h3,
.cms-page .article .main_text h4,
.cms-page .article .main_text h5 {
  margin: 30px 0 14px;
  color: #2c2c2a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.cms-page .article .main_text strong,
.cms-page .article .main_text b {
  color: #2c2c2a;
  font-weight: 600;
}

.cms-page .article .main_text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 26px auto;
  border-radius: 8px;
}

.cms-page .article .main_text a {
  color: #b61b11;
  text-decoration: none;
  border-bottom: 1px solid rgba(182, 27, 17, .35);
  transition: border-color .2s ease;
}

.cms-page .article .main_text a:hover {
  border-bottom-color: #b61b11;
}

.cms-page .article .main_text ul,
.cms-page .article .main_text ol {
  margin: 0 0 20px;
  padding-left: 24px;
  list-style: disc;
}

.cms-page .article .main_text ol {
  list-style: decimal;
}

.cms-page .article .main_text li {
  margin-bottom: 8px;
}

.cms-page .article .main_text blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  background-color: #f7f5f0;
  border-left: 3px solid #d9d4ca;
  border-radius: 0 8px 8px 0;
  color: #5f5e5a;
}

.cms-page .article .main_text table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.cms-page .article .main_text th,
.cms-page .article .main_text td {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  text-align: left;
}

.cms-page .article .main_text th {
  background-color: #f7f5f0;
  color: #2c2c2a;
  font-weight: 600;
}

.cms-page .article .main_text iframe,
.cms-page .article .main_text video {
  display: block;
  max-width: 100%;
  margin: 24px auto;
}

/* ---------- 出现动画：标题区逐项上浮，正文随后跟进 ---------- */
@keyframes article-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 标签 / 标题 / 信息行依次进场，形成阅读顺序上的引导 */
.cms-page .article-head > * {
  animation: article-in .52s cubic-bezier(.22, .61, .36, 1) both;
}

.cms-page .article-head > .article-title {
  animation-delay: .07s;
}

.cms-page .article-head > .article-meta {
  animation-delay: .14s;
}

/* 信息行下方的分隔线从左侧展开，收口标题区 */
.cms-page .article-meta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background-color: rgba(0, 0, 0, .12);
  transform-origin: left center;
  animation: article-rule-in .7s cubic-bezier(.22, .61, .36, 1) .18s both;
}

@keyframes article-rule-in {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cms-page .article-head > *,
  .cms-page .article .main_text,
  .cms-page .article-meta::after {
    animation: none;
  }
}

/* ---------- 适配 ---------- */
@media only screen and (max-width: 1440px) {
  .cms-page .article .article-title {
    font-size: 29px;
  }

  .cms-page .article .main_text {
    font-size: 15px;
  }
}

@media only screen and (max-width: 900px) {
  .cms-page .article .article-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .cms-page .article-tag {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .cms-page .article-meta {
    margin-top: 16px;
    padding-bottom: 12px;
  }

  .cms-page .article-time,
  .cms-page .article-back {
    font-size: 12px;
  }

  .cms-page .article .main_text {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.9;
    overflow-wrap: break-word;
  }

  .cms-page .article .main_text p {
    margin-bottom: 14px;
  }

  .cms-page .article .main_text h1,
  .cms-page .article .main_text h2 {
    margin: 26px 0 12px;
    padding-left: 10px;
    font-size: 18px;
  }

  .cms-page .article .main_text h3,
  .cms-page .article .main_text h4,
  .cms-page .article .main_text h5 {
    margin: 20px 0 10px;
    font-size: 16px;
  }

  .cms-page .article .main_text img {
    margin: 16px auto;
    border-radius: 6px;
  }

  .cms-page .article .main_text blockquote {
    margin: 18px 0;
    padding: 12px 14px;
  }

  .cms-page .article .main_text table {
    font-size: 13px;
  }

  /* 微信排版里常见的固定内边距，小屏会挤掉正文宽度 */
  .cms-page .article .main_text [style*="padding: 25px"],
  .cms-page .article .main_text [style*="padding:25px"] {
    padding: 14px !important;
  }
}
