/* ======================================
   关投强 - FAQ 常见问题专题页
   ====================================== */

/* banner：与「联系我们 / GEO发稿 / 媒体资源 / 媒体资讯」等页共用 common.css 的 .page-banner
   （深海军蓝→宝蓝渐变 + 白字 + 淡蓝强调色；小标签用 .hero-eyebrow）。
   2026-09-12 由原「浅底 + 橙色强调」改版 —— 用户要求与联系我们专题页效果一致。
   本文件只负责 FAQ 专属构件（搜索框 / 署名行），底色与字号不再在这里定义。 */
.faq-hero .lead {
  font-size: 18px;
  color: var(--c-dark-on-sub);
  max-width: 720px;
  line-height: 1.7;
}

/* 搜索框：深底上保留白底输入（对比度最高）；图标是单色线性 SVG，不用 emoji */
.faq-search {
  max-width: 580px;
  margin: 32px 0 0;
  position: relative;
}

.faq-search input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font-size: 15px;
  background: #fff;
  color: var(--c-text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.faq-search input::placeholder { color: var(--c-text-mute); }

.faq-search input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(0,82,217, .3);
}

.faq-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--c-text-mute);
  pointer-events: none;
}

/* 分类导航 */
.faq-nav {
  background: #fff;
  border-bottom: 1px solid #F0F0F0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.faq-nav-list {
  display: flex;
  gap: 6px;
  padding: 16px 0;
  overflow-x: auto;
  white-space: nowrap;
}

/* 9 个 chip 要在 1200px 容器里**正好排满一行**（超出会变成横向滚动，
   窄屏下看不到后面的分类）。2026-10-12 由 11 个减为 9 个，同步收窄内边距。 */
.faq-nav-list a {
  flex-shrink: 0;
  padding: 8px 13px;
  border-radius: 999px;
  background: #f5f7fb;
  color: var(--c-text);
  font-size: 13.5px;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid transparent;
}

.faq-nav-list a:hover {
  background: #ECF2FE;
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* 本页说明（不承诺结果的口径声明 + 品牌主体）
   ⚠ 对比度实算（WCAG 2.1，浅底区块）：正文 #666666 / #ECF2FE = 5.11:1（AA 正文 ≥4.5 ✔），
      加粗主体 #1A1A1A / #ECF2FE = 15.5:1（AAA ✔）。改色请重算，_verify_dark 不覆盖浅色块。 */
.faq-note {
  margin: 28px 0 4px;
  padding: 16px 20px;
  background: var(--c-primary-light);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--c-text-sub);
}

.faq-note strong { color: var(--c-text); font-weight: 700; }

/* 「本页说明」做成一枚小药丸，避免和正文首句挤成「本页说明本页由…」
   对比度实算：#FFFFFF / #0052D9 = 6.54:1（AA ✔） */
.faq-note > strong:first-child {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--c-primary);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.8;
  vertical-align: 1px;
}

/* 分类区块 */
.faq-section {
  padding: 48px 0;
  border-bottom: 1px solid #F0F0F0;
  scroll-margin-top: 76px;   /* 锚点跳转避开 sticky 分类导航 */
}

.faq-section:last-child { border-bottom: none; }

.faq-section .sec-head {
  margin-bottom: 32px;
}

.faq-section .sec-head h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-section .sec-head h2 .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-primary), #3071E8);
  color: #fff;
  font-size: 20px;
}

.faq-section .sec-head h2 .badge.acc { background: linear-gradient(135deg, var(--c-accent), #FFB84D); }
.faq-section .sec-head h2 .badge.grn { background: linear-gradient(135deg, var(--c-success), #43C69B); }
.faq-section .sec-head h2 .badge.gray { background: linear-gradient(135deg, #6C7A93, #98A5BD); }

.faq-section .sec-head .sec-sub {
  color: var(--c-text-mute);
  font-size: 14px;
  padding-left: 52px;
}

/* ======================================================================
   单个 Q&A
   2026-10-12 版式改造：答案**平铺展开**（对齐参照页的形式），去掉折叠箭头与 is-open。
   一条答案的结构：一句结论(.fa-lead) → 标签化分点 → 要点列表(.fa-ul) →
   对照表(.fa-table) → 提示块(.fa-tip)。
   对比度实算（浅底区块，_verify_dark 不覆盖）：
     · 正文      #666666 / #FFFFFF = 5.74:1（AA ✔）
     · 结论条    #1A1A1A / #ECF2FE = 15.5:1（AAA ✔）
     · 提示块    #666666 / #FFF6E6 = 5.35:1（AA ✔）· 标签 #1A1A1A = 16.2:1
     · 表头      #1A1A1A / #ECF2FE = 15.5:1（AAA ✔）
     · 锚点数    #0052D9 / #FFFFFF = 6.54:1（AA ✔，hover/focus 才显现）
   ====================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid #F0F0F0;
  border-radius: 14px;
  padding: 20px 22px 6px;
  transition: border-color .2s, box-shadow .2s;
  scroll-margin-top: 92px;
}

.faq-item:hover {
  border-color: #DCE4F2;
  box-shadow: 0 6px 20px rgba(0,82,217, .06);
}

.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.6;
}

.faq-q .num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), #3071E8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.faq-q .q-text { flex: 1; }

/* 单条问题的锚点：平时淡出减少 60 条问题的视觉噪声，hover / 键盘聚焦时显现。
   功能冗余度：即使完全不用它，分类导航 #sec-* 也能到达同一区域。 */
.faq-q .faq-anchor {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  color: var(--c-primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  transition: opacity .2s;
}

.faq-item:hover .faq-anchor,
.faq-q .faq-anchor:focus-visible { opacity: 1; }

.faq-a {
  padding: 10px 0 16px 42px;
  color: var(--c-text-sub);
  line-height: 1.9;
  font-size: 14.5px;
}

.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a strong { color: var(--c-text); font-weight: 700; }
.faq-a .hl { color: var(--c-accent-dark); font-weight: 700; }

/* 一句结论：左侧强调条 + 浅蓝底，便于 60 条问答里扫读 */
.faq-a .fa-lead {
  background: var(--c-primary-light);
  border-left: 3px solid var(--c-primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  color: var(--c-text);
}

/* 要点列表（不要用 ul 默认圆点，圆点用 ::before 自己画，保持颜色可控） */
.faq-a .fa-ul {
  margin: 0 0 10px;
  padding-left: 2px;
  list-style: none;
}

.faq-a .fa-ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.faq-a .fa-ul li:last-child { margin-bottom: 0; }

.faq-a .fa-ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-primary);
  opacity: .55;
}

/* 提示块 */
.faq-a .fa-tip {
  background: var(--c-accent-light);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
}

.faq-a .fa-tip strong { color: var(--c-text); }

/* 对照表：窄屏在卡片内横向滚动，不撑破页面 */
.faq-a .fa-tcap {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 8px;
}

.faq-a .fa-table-wrap {
  margin: 0 0 12px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.faq-a .fa-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.7;
}

.faq-a .fa-table th,
.faq-a .fa-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-line);
}

.faq-a .fa-table th {
  background: var(--c-primary-light);
  color: var(--c-text);
  font-weight: 700;
  white-space: nowrap;
}

.faq-a .fa-table tbody tr:last-child td { border-bottom: none; }

/* 关键词搜索：只切 hidden 属性（显式写 display:none，避免被作者样式盖掉） */
.faq-item[hidden],
.faq-section[hidden],
.faq-empty[hidden] { display: none; }

/* 搜索无结果时的空状态 */
.faq-empty {
  padding: 72px 24px 80px;
  text-align: center;
  color: var(--c-text-mute);
}
.faq-empty svg { width: 40px; height: 40px; color: #C3CBD9; }
.faq-empty p { margin: 14px 0 0; font-size: 15px; }
.faq-empty a { color: var(--c-primary); font-weight: 600; }

/* 底部 CTA */
.faq-cta {
  background: linear-gradient(135deg, var(--c-primary) 0%, #3071E8 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.faq-cta h2 {
  font-size: 30px;
  margin: 0 0 12px;
  font-weight: 800;
}

.faq-cta p {
  font-size: 16px;
  opacity: .92;
  margin: 0 0 28px;
}

.faq-cta .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.faq-cta .btn-white {
  background: #fff;
  color: var(--c-primary);
  padding: 12px 32px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.faq-cta .btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 10px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
}

@media (max-width: 768px) {
  /* banner 的 h1 字号由 common.css 的 .page-banner 断点统一处理（30px） */
  .faq-section { padding: 32px 0; }
  .faq-item { padding: 16px 16px 4px; }
  .faq-q { font-size: 15px; gap: 10px; }
  .faq-a { padding: 8px 0 14px 38px; }
  .faq-byline { gap: 6px 16px; }
  .faq-note { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .faq-q { font-size: 14px; }
  .faq-a { padding-left: 0; padding-right: 0; font-size: 13.5px; }
  .faq-section { padding: 24px 0; }
  .faq-note { font-size: 13px; }
}

/* ===== EEAT：内容审核与更新署名（深底浅字，随 banner 一起改深色）===== */
.faq-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--c-dark-on-sub);
}

.faq-byline span { display: inline-flex; align-items: center; gap: 6px; }

.faq-byline .byline-icon {
    width: 14px;
    height: 14px;
    color: var(--c-dark-on-hi);
    flex-shrink: 0;
}
