/* ==========================================================================
   AntCMS - 文章/技术正文详情页专属样式 (article-detail.css)
   基于 demo knowledge-detail.html 模块化提取
   包含：面包屑、Hero标题区、双列文章布局、正文排版 (Prose)、
         右侧粘性目录大纲 (TOC)、提示框、相关设备/视频网格、
         常见问题 FAQ 与底部咨询行动条 (CTA Band)
   ========================================================================== */

/* ===== 面包屑导航 ===== */
.breadcrumb {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted, #667085);
}
.breadcrumb a {
  color: inherit;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--brand, #0f62fe);
}
.breadcrumb .crumb-sep {
  margin: 0 7px;
  color: #98a2b3;
}
.breadcrumb .crumb-cur {
  color: var(--text, #101828);
  font-weight: 600;
}

/* ===== 首屏 Hero 区域 ===== */
.hero {
  padding: 8px 0 30px;
  border-bottom: 1px solid #eef2f6;
}
.hero small {
  display: block;
  color: var(--brand, #0f62fe);
  font-weight: 900;
  letter-spacing: 1.15px;
  font-size: 12px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.18;
  margin: 8px 0 12px;
  color: var(--text, #101828);
  font-weight: 800;
}
.hero p {
  max-width: 860px;
  color: var(--muted, #667085);
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ===== 通用板块样式与标题 ===== */
.sec {
  padding: 64px 0;
}
.soft {
  background: var(--soft, #f7f9fc);
}
.sh {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.sh small {
  display: block;
  color: var(--brand, #0f62fe);
  font-weight: 900;
  letter-spacing: 1.15px;
  font-size: 12px;
  text-transform: uppercase;
}
.sh h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 6px 0 0;
  color: var(--text, #101828);
  font-weight: 800;
}

/* ===== 双列文章主体布局 ===== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 36px;
  align-items: start;
}
.article-main {
  min-width: 0;
}

/* ===== 右侧粘性文章目录 (TOC) ===== */
.toc {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.03);
}
.toc h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text, #101828);
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f6;
}
.toc a {
  display: block;
  font-size: 13.5px;
  color: #475467;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
  transition: all 0.2s ease;
  line-height: 1.5;
}
.toc a:hover,
.toc a.active {
  color: var(--brand, #0f62fe);
  font-weight: 700;
  padding-left: 6px;
}
.toc a:last-child {
  border-bottom: 0;
}

/* ===== 正文排版 (Article Content) ===== */
.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: #344054;
}
.article-content .notice {
  border-left: 4px solid var(--brand, #0f62fe);
  background: #f6f9ff;
  padding: 16px 20px;
  border-radius: 0 14px 14px 0;
  margin: 10px 0 28px;
  font-size: 14.5px;
  color: #2d3748;
  line-height: 1.7;
}
.article-content h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 36px 0 14px;
  color: var(--text, #101828);
  line-height: 1.35;
  scroll-margin-top: 100px;
}
.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 26px 0 12px;
  color: var(--text, #101828);
  scroll-margin-top: 100px;
}
.article-content p {
  color: #475467;
  margin: 0 0 16px;
  line-height: 1.8;
}
.article-content ul,
.article-content ol {
  color: #475467;
  margin: 0 0 20px;
  padding-left: 24px;
}
.article-content li {
  margin-bottom: 6px;
  line-height: 1.75;
}
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 18px 0;
  display: block;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
}

/* ===== 相关设备卡片网格 ===== */
.product-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.item {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.03);
}
.item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}
.item .pic {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #edf1f5, #c9d1da);
}
.item .pic:before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 14%;
  height: 36%;
  border-radius: 14px;
  background: linear-gradient(145deg, #d7dde4, #7f8b99);
}
.item .pic:after {
  content: "";
  position: absolute;
  right: 17%;
  top: 18%;
  width: 24%;
  height: 44%;
  border-radius: 10px;
  background: linear-gradient(145deg, #e5eaf0, #8995a3);
}
.item .pic img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
  position: relative;
  z-index: 2;
  margin: 0;
  border-radius: 0;
}
.item .video-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #283a55, #0d1625);
  position: relative;
  overflow: hidden;
}
.item .video-thumb img,
.item .video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
  pointer-events: none;
}
.item .video-thumb:before {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(2px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 2;
}
.item .body {
  padding: 16px;
}
.item small {
  color: var(--brand, #0f62fe);
  font-weight: 900;
  font-size: 12px;
  display: block;
}
.item h3 {
  font-size: 16px;
  line-height: 1.45;
  margin: 6px 0 6px;
  font-weight: 700;
  color: var(--text, #101828);
}
.item p {
  font-size: 12.5px;
  color: var(--muted, #667085);
  margin: 0;
  line-height: 1.6;
}

/* ===== 常见问题 FAQ ===== */
.faq details {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 14px;
  padding: 16px 20px;
  background: #fff;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq details:hover {
  border-color: #cbd5e1;
}
.faq details[open] {
  border-color: var(--brand, #0f62fe);
  box-shadow: 0 4px 14px rgba(15, 98, 254, 0.06);
}
.faq summary {
  font-weight: 800;
  cursor: pointer;
  color: var(--text, #101828);
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:after {
  content: "+";
  color: #98a2b3;
  font-size: 18px;
  transition: transform 0.2s;
}
.faq details[open] summary:after {
  content: "－";
  color: var(--brand, #0f62fe);
}
.faq p {
  font-size: 14px;
  color: var(--muted, #667085);
  margin: 10px 0 0;
  line-height: 1.7;
}

/* ===== 底部行动呼吁横幅 (Band CTA) ===== */
.band {
  margin: 40px auto 68px;
  background: linear-gradient(135deg, #0f62fe, #1649a7);
  color: #fff;
  border-radius: 24px;
  padding: 38px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 16px 36px rgba(15, 98, 254, 0.18);
}
.band h2 {
  font-size: 28px;
  margin: 0 0 6px;
  font-weight: 800;
}
.band p {
  margin: 0;
  color: #dbe7ff;
  font-size: 15px;
}
.btn-light {
  background: #fff;
  color: #101828;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.btn-light:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

/* ==========================================================================
   移动端与自适应防护规则 (严格遵照 web_1_template_guide.md 规范)
   ========================================================================== */
@media (max-width: 1000px) {
  .container {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
    margin-bottom: 24px;
  }
  .product-grid,
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
    margin-left: auto;
    margin-right: auto;
  }
  .breadcrumb {
    padding: 14px 0;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 14px;
  }
  .sec {
    padding: 48px 0;
  }
  .sh {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .sh h2 {
    font-size: 24px;
  }
  .product-grid,
  .video-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .band {
    margin-bottom: 50px;
    padding: 28px 22px;
    align-items: flex-start;
    flex-direction: column;
  }
  .band h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .product-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
}
