/* articleDetail.html 页面专用样式
   仅作用于 .article-detail-page，避免影响其它页面 */

/* 仅隐藏右侧搜索框（其它右侧模块保留） */
.article-detail-page .rc-right .rc-toolbar {
  display: none;
}

.ad-breadcrumb {
    font-size: 14px;
}

/* 主体居中版式 */
.article-detail-page .ad-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 34px 0 28px;
}

.article-detail-page .ad-title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  color: #333333;
}

.article-detail-page .ad-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  font-size: 14px;
  color: #999999;
}

.article-detail-page .ad-meta-tag-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.article-detail-page .ad-meta-tag-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #999999;
}

.article-detail-page .ad-meta-tag-group .ad-meta-tag {
  margin-left: 0;
}

.article-detail-page .ad-meta-tag-label::before {
  content: none;
  width: 16px;
  height: 16px;
  display: inline-block;
  background: url("../img/knowledge-article-icon-tag@2x.png") center center / 16px 16px no-repeat;
}

.article-detail-page .ad-meta-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  background: #F0F4FC;
  color: #4983F2;
  font-size: 14px;
}

.article-detail-page .ad-meta-time::before,
.article-detail-page .ad-meta-view::before {
  content: none;
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.article-detail-page .ad-meta-time::before {
  background-image: url("../img/knowledge-article-icon-time@2x.png");
}

.article-detail-page .ad-meta-view::before {
  background-image: url("../img/knowledge-article-icon-read@2x.png");
}

/* 用真正 img 图标替代 ::before，便于你调“图标位置/上边距”，且不影响整行布局高度 */
.article-detail-page .ad-meta-time,
.article-detail-page .ad-meta-view {
  display: inline-flex;
  align-items: center;
}

.article-detail-page .ad-meta-icon {
  display: block;
  position: relative;
  top: 2px; /* 视觉微调：等价于“图标上边距”，但不改变整行布局 */
}
.resource-center-page .rc-side-box {
    margin-top: 60px;
}

.article-detail-page .ad-meta-icon-tag {
  width: 16px;
  height: 16px;
  margin-bottom: 3px;
}
.resource-center-page .rc-board {
  padding-top: 21px !important;
}

.article-detail-page .ad-meta-icon-time,
.article-detail-page .ad-meta-icon-view {
  width: 16px;
  height: 16px;
  margin-bottom: 3px;
  margin-right: 5px; /* 对齐之前 ::before 的 spacing */
}

.ad-meta-icon-view {
   width: 19px !important;
}

/* 专家卡片（胶囊形） */
.article-detail-page .ad-expert-card {
  display: flex;
  align-items: center;
  gap: 45px;
  padding: 16px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #D7E9FF 0%, #EAF4FF 100%);
  margin: 0 auto 57px;
}

.article-detail-page .ad-expert-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.article-detail-page .ad-expert-info {
  min-width: 0;
  margin-top: 12px;
}

.article-detail-page .ad-expert-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.article-detail-page .ad-expert-avatar {
  width: 101px;
  height: 101px;
  border-radius: 50%;
  background: #ffffff url("../img/article-detail-avatarpic.png") center center / cover no-repeat;
  flex-shrink: 0;
}

.article-detail-page .ad-expert-name {
  font-size: 22px;
  font-weight: bold;
  color: #333333;
  line-height: 1.2;
}

.article-detail-page .ad-expert-desc {
  display: none;
  margin: 0;
  font-size: 12px;
  color: #333333;
}

.article-detail-page .ad-expert-subdesc {
  margin-top: 11px;
  font-size: 14px;
  color: #333333;
  line-height: 20px;
  /* 限制宽度以便在“与成”附近自然换行 */
  max-width: 42.5ch;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.article-detail-page .ad-expert-subdesc-pc {
  display: inline;
}

.article-detail-page .ad-expert-subdesc-mobile {
  display: none;
}

.article-detail-page .ad-expert-right {
  display: flex;
  align-items: center;
  gap: 35px;
  flex-shrink: 0;
}

.article-detail-page .ad-expert-qr {
  width: 99px;
  height: 99px;
  border-radius: 6px;
  background: #ffffff url("../img/knowledge-article-expert-QR@2x.png") center center / cover no-repeat;
}

.article-detail-page .ad-expert-consult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding-left: 16px;
  padding-right: 26px;
  border-radius: 21px;
  background: #1264E2;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
  gap: 8px;
}

.article-detail-page .ad-expert-consult::before {
  content: "";
  width: 20px;
  height: 20px;
  background: url("../img/knowledge-article-icon-consult@2x.png") center center / 20px 20px no-repeat;
}

/* 正文渲染区域 */
.article-detail-page .ad-content {
  font-size: 16px;
  line-height: 28px;
  color: #333333;
}

.article-detail-page .ad-content p {
  margin: 0 0 18px;
}

.article-detail-page .ad-content img,
.article-detail-page .ad-content video,
.article-detail-page .ad-content iframe {
  max-width: 100%;
  height: auto;
}

.article-detail-page .ad-figure {
  margin: 6px 0 18px;
}

.article-detail-page .ad-figure img {
  display: block;
  width: 560px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 6px;
}

/* 底部上下篇 */
.article-detail-page .ad-pager {
  margin-top: 18px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.article-detail-page .ad-pager-item {
  min-width: 0;
  font-size: 14px;
  color: #1264e2; /* 标题/动态内容保持原来的蓝色 */
  text-decoration: none;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.article-detail-page .ad-pager-item:last-child {
  text-align: right;
}

.article-detail-page .ad-pager-label {
  color: #979797;
  flex-shrink: 0;
}

.article-detail-page .ad-pager-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-detail-page .ad-pager-item:last-child {
  justify-content: flex-end;
}

/* 免责声明块（与截图一致：浅灰背景） */
.article-detail-page .ad-disclaimer {
  margin-top: 30px;
  padding: 11px 15px 8px 18px;
  border: 1px solid #EFEFEF;
  background: #EFEFEF;
  border-radius: 4px;
}

.article-detail-page .ad-disclaimer p {
  margin: 0;
  font-size: 14px;
  line-height: 23px;
  color: #999999;
}

.article-detail-page .ad-disclaimer a {
  color: #999999;
  text-decoration: none;
}

.article-detail-page .ad-disclaimer a:hover {
  text-decoration: underline;
}

/* 移动端（与站点一致：按 rem 缩放） */
@media (max-width: 1024px) {
  /* 仅本页移动端：与站点统一 1rem=37.5px 的写法 */
  .article-detail-page .rc-wrap.rc-board {
    padding-top: 0.506667rem;
  }
  .article-detail-page .rc-hero {
    display: none;
  }

  .article-detail-page .rc-main {
    padding-top: 1.44rem; /* 73px */
  }

  .article-detail-page .ad-breadcrumb {
    padding: 0 0.4rem;
    font-size: 0.32rem; /* 12px */
    color: #999999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .article-detail-page .ad-breadcrumb a,
  .article-detail-page .ad-breadcrumb-sep,
  .article-detail-page .ad-breadcrumb-current {
    color: #999999;
    text-decoration: none;
  }

  .article-detail-page .ad-breadcrumb-sep {
    margin: 0;
  }

  .article-detail-page .ad-main {
    max-width: 100%;
    box-sizing: border-box;
  }

  .article-detail-page .rc-left {
    width: 100%;
    min-width: 0;
  }

  .article-detail-page .ad-main {
    padding: 0.586667rem 0 0.64rem;
  }

  .article-detail-page .ad-title {
    font-size: 0.586667rem;
    margin-bottom: 0.426667rem;
    font-weight: bold;
    padding: 0 0.4rem;
  }

  .article-detail-page .ad-meta {
    flex-wrap: wrap;
    gap: 0.24rem;
    margin-bottom: 0.35135rem;
    padding: 0 0.4rem;
    justify-content: flex-start; /* 左对齐 */
  }

  /* 移动端不展示“热门标签：吉核机器人” */
  .article-detail-page .ad-meta-tag-group {
    display: none;
  }

  .article-detail-page .ad-meta-time,
  .article-detail-page .ad-meta-view {
    font-size: 0.32rem; /* 12px */
    color: #999999;
  }

  /* 移动端：用 img 图标替代 ::before，对齐到你之前的 15px/18px 尺寸 */
  .article-detail-page .ad-meta-icon {
    top: 0.053333rem; /* 2px @ 1rem=37.5px */
  }

  .article-detail-page .ad-meta-icon-time {
    width: 0.4rem;  /* 15px */
    height: 0.4rem; /* 15px */
    margin-right: 0.133333rem; /* 5px */
  }

  .article-detail-page .ad-meta-icon-view {
    width: 0.48rem;  /* 18px */
    height: 0.4rem;  /* 15px */
    margin-right: 0.133333rem; /* 5px */
  }

  .article-detail-page .ad-meta-time::before {
    width: 0.4rem;  /* 15px */
    height: 0.4rem; /* 15px */
    background-size: 0.4rem 0.4rem;
  }

  .article-detail-page .ad-meta-view::before {
    width: 0.48rem;  /* 18px */
    height: 0.4rem;  /* 15px */
    background-size: 0.48rem 0.4rem;
  }

  .article-detail-page .ad-meta-tag {
    height: 0.587rem;       /* 22px */
    padding: 0 0.267rem;    /* 10px */
    font-size: 0.32rem;     /* 12px */
  }
  
  .article-detail-page .ad-expert-info {
      max-width: 5.13rem;
      margin-top: 0;
  }

  .article-detail-page .ad-expert-card {
    margin-left: 0.26667rem;
    margin-right: 0.26667rem;
    box-sizing: border-box;
    border-radius: 0.213rem;
    padding-left: 0.21333rem;
    height: 1.986667rem;
    /* padding-right: 0.77333rem; */
    margin-bottom: 0.53333rem;
    border-radius: 1rem 1rem 1rem 1rem;
    flex-wrap: nowrap;
    align-items: center;
  }
  .article-detail-page .ad-expert-card {
      gap: 0.37333rem;
  }
  .article-detail-page .ad-expert-left {
    gap: 0.32rem;
    align-items: flex-start; /* 顶部对齐：专家标题首行与头像上边缘平齐 */
  }

  .article-detail-page .ad-expert-head {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.106667rem;
  }

  .article-detail-page .ad-expert-avatar {
    width: 1.186667rem;  /* 44px */
    height: 1.186667rem; /* 44px */
  }

  .article-detail-page .ad-expert-name {
    font-size: 0.386667rem; /* 16px */
    margin-right: 0;
  }

  .article-detail-page .ad-expert-desc {
    display: inline;
    font-size: 0.32rem; /* 12px */
    margin: 0;
    color: #333333;
    margin-left: 0.16rem;
    white-space: nowrap;
  }

  .article-detail-page .ad-expert-subdesc {
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 0.293333rem; /* 14px */
    line-height: 0.386667rem; /* 23px */
    margin-top: 0.106667rem; /* 9px */
  }

  .article-detail-page .ad-expert-subdesc-pc {
    display: none;
  }

  .article-detail-page .ad-expert-subdesc-mobile {
    display: inline;
  }

  .article-detail-page .ad-expert-right {
    gap: 0.32rem;
  }

  .article-detail-page .ad-expert-qr {
    display: none; /* 移动端按截图不显示二维码，避免横向溢出 */
  }

  .article-detail-page .ad-expert-consult {
    width: 1.53333rem;
    height: 1.24rem;
    padding: 0;
    border-radius: 0.2rem;
    font-size: 0.29333rem;
    flex-direction: column;
    gap: 0.17333rem;
  }

  .article-detail-page .ad-expert-consult::before {
    width: 0.48rem;
    height: 0.48rem;
    background-size: 0.48rem 0.48rem;
  }

  .article-detail-page .ad-content {
    padding: 0 0.4rem;
    font-size: 0.373rem; /* 14px */
    line-height: 0.613rem; /* 23px */
  }

  .article-detail-page .ad-figure img {
    width: 100%;
  }

  .article-detail-page .ad-pager {
    margin: 0.48rem 0.4rem 0;
    padding: 0;
  }

  /* 移动端上一篇/下一篇：两列布局 + 标签在上（灰色）+ 标题在下（蓝色） */
  .article-detail-page .ad-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.64rem;
  }

  .article-detail-page .ad-pager-item {
    display: grid;
    align-content: start;
    gap: 0.24rem;
    font-size: 0.373rem; /* 14px */
    color: inherit;
    text-decoration: none;
  }

  .article-detail-page .ad-pager-label {
    font-size: 0.373rem; /* 14px */
    color: #999999;
  }

  .article-detail-page .ad-pager-label::after {
    content: "：";
  }

  .article-detail-page .ad-pager-title {
    font-size: 0.4rem; /* 15px */
    color: #666666;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }

  /* 左右图标：与第一行（label）对齐 */
  .article-detail-page .ad-pager-item:first-child {
    grid-template-columns: 0.4rem 1fr; /* 15px 图标 + 文本 */
    column-gap: 0.24rem;
    justify-items: start;
    text-align: left;
  }

  .article-detail-page .ad-pager-item:first-child::before {
    content: "";
    grid-row: 1 / span 2;
    width: 0.4rem;  /* 15px */
    height: 0.4rem; /* 15px */
    margin-top: -0.25rem; /* 轻微对齐到第一行 */
    background: url("../img/knowledge-article-list-page-previous@2x.png") center center / 0.4rem 0.4rem no-repeat;
  }

  .article-detail-page .ad-pager-item:first-child .ad-pager-label,
  .article-detail-page .ad-pager-item:first-child .ad-pager-title {
    grid-column: 2;
  }

  .article-detail-page .ad-pager-item:last-child {
    grid-template-columns: 1fr 0.4rem; /* 文本 + 15px 图标 */
    column-gap: 0.24rem;
    justify-items: end;
    text-align: right;
  }

  .article-detail-page .ad-pager-item:last-child::after {
    content: "";
    grid-row: 1 / span 2;
    grid-column: 2;
    width: 0.4rem;  /* 15px */
    height: 0.4rem; /* 15px */
    margin-top: -0.25rem;
    background: url("../img/knowledge-article-list-page-next@2x.png") center center / 0.4rem 0.4rem no-repeat;
  }

  .article-detail-page .ad-disclaimer {
    margin: 0.48rem 0.4rem 0;
    padding: 0.29333rem 0.106667rem 0.266667rem 0.4rem;
    border-radius: 0.107rem;
  }

  .article-detail-page .ad-disclaimer p {
    font-size: 0.346667rem; /* 14px */
    line-height: 0.613rem; /* 23px */
  }
}

/* ---------- 文章正文目录（PC 左侧固定，豆包式） ---------- */
.article-detail-page .ad-content h1,
.article-detail-page .ad-content h2,
.article-detail-page .ad-content h3,
.article-detail-page .ad-content h4 {
  scroll-margin-top: 96px;
}

@keyframes ad-heading-toc-flash {
  0% {
    background-color: rgba(18, 100, 226, 0.28);
    box-shadow: 0 0 0 2px rgba(73, 131, 242, 0.35);
  }
  45% {
    background-color: rgba(18, 100, 226, 0.12);
    box-shadow: 0 0 0 1px rgba(73, 131, 242, 0.2);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.article-detail-page .ad-content h1.ad-heading-toc-flash,
.article-detail-page .ad-content h2.ad-heading-toc-flash,
.article-detail-page .ad-content h3.ad-heading-toc-flash,
.article-detail-page .ad-content h4.ad-heading-toc-flash {
  border-radius: 4px;
  animation: ad-heading-toc-flash 1.15s ease-out forwards;
}

.article-detail-page .ad-article-toc {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  /* 宽度随目录标题文案伸缩，过长时由 max-width 限制 */
  width: max-content;
  min-width: 150px;
  max-width: 300px;
  max-height: min(520px, 72vh);
  /* border: 1px solid #eeeeee; */
  border-right: none;
  /* 仅左上、左下圆角，右侧贴齐视口 */
  border-radius: 6px 0 0 6px;
  background: #ffffff;
  box-shadow: 0px 0px 6px rgba(72, 72, 72, 0.16);
  overflow: hidden;
}

.article-detail-page .ad-article-toc[hidden] {
  display: none !important;
}

.article-detail-page .ad-article-toc-head {
  flex-shrink: 0;
  padding: 11px 0 10px 15px;
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  text-align: left;
  background: linear-gradient( 132deg, #D0E8FF 0%, #EFF7FF 48.76%, #E2F1FF 77.74%, #F4F9FF 100%);
}

.article-detail-page .ad-article-toc-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  text-align: left;
}

.article-detail-page .ad-article-toc-list {
  margin: 0;
  padding: 8px 0 10px;
  list-style: none;
  text-align: left;
}

.article-detail-page .ad-article-toc-item {
  margin: 0;
}

.article-detail-page .ad-article-toc-link {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #333333;
  text-decoration: none;
  word-break: break-word;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
}

.article-detail-page .ad-article-toc-link:hover {
  color: #1264e2;
  background: rgba(18, 100, 226, 0.06);
}

.article-detail-page .ad-article-toc-link.is-active {
  color: #1264e2;
  font-weight: 500;
}

/* 选中态统一为品牌蓝（覆盖 h1~h4 各级的默认字色） */
.article-detail-page .ad-article-toc .ad-article-toc-level-1 .ad-article-toc-link.is-active,
.article-detail-page .ad-article-toc .ad-article-toc-level-2 .ad-article-toc-link.is-active,
.article-detail-page .ad-article-toc .ad-article-toc-level-3 .ad-article-toc-link.is-active,
.article-detail-page .ad-article-toc .ad-article-toc-level-4 .ad-article-toc-link.is-active {
  color: #1264e2;
}

/* h1：目录主标题，仅展示正文标题原文（编号由富文本自带） */
.article-detail-page .ad-article-toc-level-1 .ad-article-toc-link {
  font-size: 14px;
  font-weight: 600;
  color: #222222;
  text-align: left;
  padding: 10px 14px 6px;
}

.article-detail-page .ad-article-toc-level-1:first-child .ad-article-toc-link {
  padding-top: 8px;
  padding-left: 14px;
  padding-right: 14px;
}

/* h2：次级小标题，左对齐（与主标题同一起始边，多行也从左侧顶齐） */
.article-detail-page .ad-article-toc-level-2 .ad-article-toc-link {
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  text-align: left;
  padding: 8px 16px;
}

.article-detail-page .ad-article-toc-level-3 .ad-article-toc-link {
  padding: 10px 14px 10px 22px;
  font-size: 12px;
  color: #444444;
  text-align: left;
}

.article-detail-page .ad-article-toc-level-4 .ad-article-toc-link {
  padding: 8px 14px 8px 30px;
  font-size: 12px;
  color: #555555;
  text-align: left;
}

/* 目录仅 PC 端展示，平板/手机不展示 */
@media (max-width: 1279px) {
  .article-detail-page .ad-article-toc {
    display: none !important;
  }
}

/* 之前误加的全局 rc-right 规则会影响其它页面，已移除 */
