/* ==========================================================================
   AntCMS - 技术中心/文章列表页专属样式 (article-list.css)
   基于 demo knowledge.html 提取规范化设计
   包含：面包屑、Hero标题区、侧边分类树、胶囊筛选条、文本优先横向卡片、
         分页组件、技术内容定位策略板块与常见问题 FAQ
   ========================================================================== */

/* ===== 面包屑导航 ===== */
.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-size: 12px;
  font-weight: 900;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.15;
  margin: 8px 0 10px;
  color: var(--text, #101828);
  font-weight: 800;
}
.hero p {
  max-width: 840px;
  color: var(--muted, #667085);
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ===== 主体两列布局 ===== */
.main {
  padding: 38px 0 70px;
}
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ===== 侧边栏分类导航 ===== */
.side {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  padding-bottom: 10px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.03);
}
.sidehead {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line, #e4e7ec);
}
.sidehead small {
  display: block;
  color: var(--brand, #0f62fe);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.sidehead h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 3px 0 0;
  color: var(--text, #101828);
}
.sg {
  margin: 14px 12px;
  border: 1px solid #eef1f5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.sg h3 {
  margin: 0;
  padding: 12px 14px;
  background: linear-gradient(#f8fbff, #f3f7fd);
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}
.sg a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  font-size: 14px;
  color: #344054;
  border-top: 1px solid #f1f4f9;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sg a:first-child {
  border-top: none;
}
.sg a:after {
  content: "›";
  color: #98a2b3;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s;
}
.sg a.active,
.sg a:hover {
  color: var(--brand, #0f62fe);
  font-weight: 700;
  background: #f0f7ff;
}
.sg a.active {
  border-left: 3px solid var(--brand, #0f62fe);
  padding-left: 15px;
}
.sg a.active:after,
.sg a:hover:after {
  transform: translateX(3px);
  color: var(--brand, #0f62fe);
}

/* ===== 内容区头部与筛选条 ===== */
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.head h2 {
  font-size: 26px;
  margin: 0;
  font-weight: 800;
  color: var(--text, #101828);
}
.head p {
  font-size: 13px;
  color: var(--muted, #667085);
  margin: 4px 0 0;
}
.head .count {
  font-size: 13px;
  color: var(--muted, #667085);
  white-space: nowrap;
}

.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 16px;
  margin-bottom: 22px;
  scrollbar-width: none;
  background: #fff;
}
.filters::-webkit-scrollbar {
  display: none;
}
.fb {
  flex: 0 0 auto;
  border: 0;
  background: #f8fafc;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #475467;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.fb.on,
.fb:hover {
  background: var(--brand, #0f62fe);
  color: #fff;
}

/* ===== 文本优先横向卡片列表 (Text-first Grid) ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.grid .card {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.03);
}
.grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}
.grid .card > a {
  display: flex;
  height: 100%;
  color: inherit;
}
.grid .body {
  width: 100%;
  min-height: 0;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  grid-template-areas: "cat title more" "tags desc more";
  column-gap: 20px;
  row-gap: 4px;
  align-items: center;
}
.grid .cat {
  grid-area: cat;
  align-self: start;
  font-size: 11px;
  color: var(--brand, #0f62fe);
  font-weight: 900;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.grid .body h3 {
  grid-area: title;
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text, #101828);
  font-weight: 700;
  transition: color 0.2s;
}
.grid .card:hover .body h3 {
  color: var(--brand, #0f62fe);
}
.grid .body p {
  grid-area: desc;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted, #667085);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid .tags {
  grid-area: tags;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.grid .tags span {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
}
.grid .more {
  grid-area: more;
  margin: 0;
  padding: 0;
  align-self: center;
  white-space: nowrap;
  font-size: 13px;
  color: var(--brand, #0f62fe);
  font-weight: 800;
}

/* ===== 分页组件 (Pagination) ===== */
.pg {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 36px;
}
.pg a,
.pg span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #475467;
  text-decoration: none;
  transition: all 0.2s;
  background: #fff;
}
.pg a:hover {
  border-color: var(--brand, #0f62fe);
  color: var(--brand, #0f62fe);
}
.pg .on {
  background: var(--brand, #0f62fe);
  color: #fff;
  border-color: var(--brand, #0f62fe);
}

/* ===== 内容定位与策略板块 ===== */
.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;
  font-weight: 800;
  margin: 6px 0 0;
  color: var(--text, #101828);
}
.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lc {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.03);
}
.lc small {
  color: var(--brand, #0f62fe);
  font-weight: 900;
  font-size: 12px;
  display: block;
}
.lc h3 {
  font-size: 17px;
  margin: 8px 0 6px;
  font-weight: 800;
  color: var(--text, #101828);
}
.lc p {
  font-size: 13px;
  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;
}

/* ==========================================================================
   移动端与自适应防护规则 (严格遵照 web_1_template_guide.md 规范)
   ========================================================================== */
@media (max-width: 1000px) {
  .container,
  .container.layout {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
  }
  .layout {
    display: block;
  }
  .side {
    display: none;
  }
}

@media (max-width: 720px) {
  .container,
  .container.layout {
    width: calc(100% - 28px);
    margin-left: auto;
    margin-right: auto;
  }
  .breadcrumb {
    padding: 14px 0;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 14px;
  }
  .main {
    padding: 24px 0 50px;
  }
  .head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .grid .body {
    display: flex;
    min-height: 0;
    padding: 15px;
    flex-direction: column;
    align-items: stretch;
  }
  .grid .body h3 {
    min-height: 0;
    margin: 7px 0 8px;
    font-size: 15px;
  }
  .grid .body p {
    display: block;
    margin: 0 0 12px;
  }
  .grid .tags span {
    display: none;
  }
  .grid .tags span:first-child {
    display: inline-block;
  }
  .grid .more {
    margin-top: 12px;
  }
  .sec {
    padding: 48px 0;
  }
  .sh {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .sh h2 {
    font-size: 24px;
  }
  .links {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
