/* ==========================================================================
   faq.css —— 常见问题页专用样式（仅 faq.html 引入）
   配色沿用站点主题：#0070c0 主色 / #f6ba18 点缀
   结构：顶部切换卡（tab）+ 面板内钢琴键手风琴（details/summary）
   无第三方依赖，切换逻辑见页面内联脚本
   ========================================================================== */

/* ---------- 顶部说明 ---------- */
.faq-wrap {
  padding: 4px 0 40px;
}

.faq-intro {
  padding: 0 0 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e8e8e8;
}

.faq-intro h1 {
  font-size: 22px;
  color: #242424;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: .02em;
}

.faq-intro h1::after {
  content: '';
  display: block;
  width: 46px;
  height: 3px;
  background: #f6ba18;
  margin-top: 10px;
}

.faq-intro p {
  font-size: 14px;
  line-height: 1.9;
  color: #898989;
  margin: 0;
}

/* ==========================================================================
   切换卡
   ========================================================================== */
.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid #0070c0;
  scroll-margin-top: 92px;   /* 吸顶导航下滚动定位不遮挡 */
}

.faq-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 8px;
  margin: 0;
  border: 1px solid #e8e8e8;
  border-bottom: 0;
  border-right: 0;
  background: #f7f9fb;
  color: #5a626b;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: background .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.faq-tab:first-child {
  border-left: 1px solid #e8e8e8;
}

.faq-tab:hover {
  background: #eef5fc;
  color: #0070c0;
}

.faq-tab:focus-visible {
  box-shadow: inset 0 0 0 2px #f6ba18;
}

/* 选中态：像被按下的键 */
.faq-tab.is-active {
  background: #0070c0;
  border-color: #0070c0;
  color: #fff;
}

.faq-tab.is-active:hover {
  background: #0070c0;
  color: #fff;
}

/* ==========================================================================
   面板：每个切换卡独占整行
   ========================================================================== */
.faq-panels {
  border: 1px solid #e8e8e8;
  border-top: 0;
  background: #fff;
  padding: 22px 22px 26px;
}

.faq-panel {
  display: none;
}

.faq-panel.is-active {
  display: block;
}

.faq-panel-lead {
  font-size: 13.5px;
  line-height: 1.9;
  color: #8b939c;
  margin: 0 0 16px;
  padding-left: 11px;
  border-left: 3px solid #f6ba18;
}

/* ---------- 分组（保留给面板内多段使用） ---------- */
.faq-group {
  margin-bottom: 0;
}

.faq-group-title {
  font-size: 17px;
  color: #242424;
  font-weight: 700;
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid #0070c0;
  line-height: 1.2;
}

.faq-group-title span {
  color: #0070c0;
  font-family: Arial, Helvetica, sans-serif;
  margin-right: 8px;
  letter-spacing: .06em;
}

/* ---------- 钢琴键：每一问就是一键 ---------- */
.faq-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-bottom: 0;
  border-left: 3px solid #e8e8e8;
  transition: background .18s ease, border-color .18s ease;
}

.faq-item:first-of-type {
  border-radius: 2px 2px 0 0;
}

.faq-item:last-of-type {
  border-bottom: 1px solid #e8e8e8;
  border-radius: 0 0 2px 2px;
}

.faq-item + .faq-item {
  border-top: 1px solid #e8e8e8;
}

.faq-item:hover {
  background: #f7fbff;
  border-left-color: #f6ba18;
}

.faq-item[open] {
  background: #f7fbff;
  border-left-color: #0070c0;
}

/* ---------- 问题行 ---------- */
.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 46px 16px 16px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
  color: #282f39;
  font-weight: 600;
  list-style: none;
  position: relative;
  outline: none;
  transition: color .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::marker {
  content: '';
}

.faq-item[open] .faq-q,
.faq-item:hover .faq-q {
  color: #0070c0;
}

.faq-no {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
  background: #bfc5cc;
  border-radius: 2px;
  margin-top: 1px;
  transition: background .18s ease;
}

.faq-item[open] .faq-no,
.faq-item:hover .faq-no {
  background: #0070c0;
}

.faq-t {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- 加号 / 减号 ---------- */
.faq-q::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(#9aa3ad, #9aa3ad) center/14px 2px no-repeat,
    linear-gradient(#9aa3ad, #9aa3ad) center/2px 14px no-repeat;
  transition: transform .2s ease, opacity .2s ease;
}

.faq-item[open] .faq-q::after {
  background:
    linear-gradient(#0070c0, #0070c0) center/14px 2px no-repeat;
  transform: rotate(180deg);
}

/* ---------- 答案 ---------- */
.faq-a {
  padding: 14px 46px 18px 62px;
  font-size: 14px;
  line-height: 1.95;
  color: #666;
  border-top: 1px dashed #e2e8ef;
  margin: 0 16px;
}

.faq-a p {
  margin: 0 0 10px;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-a strong {
  color: #282f39;
  font-weight: 600;
}

.faq-a ul {
  margin: 0 0 10px;
  padding-left: 18px;
  list-style: disc;
}

.faq-a li {
  margin-bottom: 4px;
}

/* ---------- 底部引导 ---------- */
.faq-cta {
  margin-top: 26px;
  padding: 22px 24px;
  background: #f7f9fb;
  border-left: 3px solid #f6ba18;
  border-radius: 2px;
}

.faq-cta h3 {
  font-size: 16px;
  color: #242424;
  margin: 0 0 8px;
  font-weight: 700;
}

.faq-cta p {
  font-size: 14px;
  color: #898989;
  line-height: 1.9;
  margin: 0 0 14px;
}

.faq-cta a.faq-btn {
  display: inline-block;
  padding: 9px 26px;
  background: #0070c0;
  color: #fff;
  font-size: 14px;
  border-radius: 2px;
  text-decoration: none;
  transition: background .18s ease;
}

.faq-cta a.faq-btn:hover {
  background: #005c9e;
  color: #fff;
}

/* ==========================================================================
   响应式（仅本页，不触碰 rwd.css）
   ========================================================================== */
@media (max-width: 992px) {
  .faq-panels {
    padding: 18px 16px 20px;
  }

  .faq-q {
    padding: 14px 42px 14px 14px;
    font-size: 14.5px;
  }

  .faq-a {
    padding: 12px 14px 16px;
    margin: 0 14px;
    font-size: 13.5px;
  }
}

@media (max-width: 768px) {
  /* 5 个分类在窄屏改为单行横向滑动，不换行堆高 */
  .faq-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .faq-tabs::-webkit-scrollbar {
    display: none;
  }

  .faq-tab {
    flex: 0 0 auto;
    padding: 12px 15px;
    font-size: 14px;
  }

  .about_banner .display-1 {
    font-size: 44px;
    line-height: 1.25;
  }

  .about_banner .display-1 p {
    width: auto !important;
    max-width: 66% !important;
    line-height: 1.7;
  }

  .faq-intro h1 {
    font-size: 19px;
  }

  .faq-panel-lead {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .faq-q {
    padding: 13px 40px 13px 12px;
    gap: 9px;
    font-size: 14px;
  }

  .faq-no {
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 11px;
  }

  .faq-a {
    margin: 0 12px;
    padding: 12px 12px 14px;
    font-size: 13px;
    line-height: 1.9;
  }

  .faq-cta {
    padding: 18px 16px;
  }
}

@media (max-width: 480px) {
  .faq-panels {
    padding: 14px 12px 16px;
  }

  .faq-q {
    font-size: 13.5px;
  }

  .faq-a {
    font-size: 12.5px;
  }
}
