/* 常见问题模块：总览页、分簇页与首页入口卡片 */

/* ---------- 首页入口卡片 ---------- */

.faq-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 38px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(248, 252, 255, .82), rgba(214, 231, 248, .6));
  box-shadow: var(--shadow);
  backdrop-filter: blur(13px);
}

.faq-entry-card h2 {
  margin: 6px 0 10px;
  font-size: clamp(22px, 2.6vw, 30px);
}

.faq-entry-card p:last-of-type {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: var(--card-body-size);
}

.faq-entry-card .button {
  flex: none;
}

/* ---------- 总览页 ---------- */

.faq-hero {
  padding-block: 92px 44px;
}

.faq-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.1;
  letter-spacing: -.045em;
}

.faq-hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, #1a8fd4, #2563eb);
  background-clip: text;
  -webkit-background-clip: text;
}

.faq-hero > p:last-child {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.faq-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.faq-cluster-card {
  position: relative;
  display: block;
  padding: 30px 28px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(248, 252, 255, .78), rgba(210, 228, 245, .48));
  box-shadow: var(--shadow);
  backdrop-filter: blur(13px);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.faq-cluster-card:hover,
.faq-cluster-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(30, 80, 140, .14);
}

.faq-cluster-count {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 800;
}

.faq-cluster-card h2 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
}

.faq-cluster-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--card-body-size);
  line-height: 1.7;
}

.faq-index {
  padding: 82px 0 0;
}

.faq-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 44px;
}

.faq-index-group h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.faq-index-group h3 a {
  color: var(--ink);
  text-decoration: none;
}

.faq-index-group ul {
  margin: 0;
  padding-left: 18px;
}

.faq-index-group li {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.faq-index-group a {
  color: #2d5f8a;
  text-decoration: none;
}

.faq-index-group li a:hover {
  color: #1a6bb8;
  text-decoration: underline;
}

/* ---------- 分簇页 ---------- */

.faq-cluster-shell {
  width: min(calc(100% - 48px), 820px);
  padding-block: 46px 24px;
}

.faq-cluster-head h1 {
  margin: 10px 0 16px;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.faq-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.faq-switch a {
  padding: 7px 14px;
  border: 1px solid rgba(50, 110, 180, .22);
  border-radius: 999px;
  background: rgba(248, 252, 255, .6);
  color: #38566d;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}

.faq-switch a[aria-current="page"] {
  border-color: transparent;
  background: linear-gradient(135deg, #1a8fd4, #2563eb);
  color: #fff;
}

.faq-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item h2 {
  position: relative;
  margin: 0 0 14px;
  padding-left: 26px;
  font-size: 21px;
  line-height: 1.45;
}

.faq-item h2::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--violet);
  font: 800 17px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.faq-answer {
  padding-left: 26px;
  color: #33556f;
  font-size: 16.5px;
  line-height: 1.9;
}

.faq-answer p {
  margin: 0 0 14px;
}

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

.faq-answer strong {
  color: var(--ink);
  font-weight: 800;
}

.faq-answer a {
  color: #1a6bb8;
  font-weight: 700;
  text-underline-offset: 3px;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 8px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1060px) {
  .faq-cluster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .faq-cluster-grid,
  .faq-index-grid {
    grid-template-columns: 1fr;
  }

  .faq-entry-card {
    display: block;
    padding: 26px 24px;
  }

  .faq-entry-card .button {
    width: 100%;
    margin-top: 20px;
  }

  .faq-entry-card p:last-of-type {
    font-size: 15px;
  }

  .faq-hero {
    padding-block: 56px 32px;
  }

  .faq-hero > p:last-child,
  .faq-cluster-card p {
    font-size: 15px;
  }

  .faq-index {
    padding-top: 56px;
  }

  .faq-cluster-shell {
    width: calc(100% - 40px);
    padding-block: 30px 16px;
  }

  .faq-item h2 {
    font-size: 19px;
    padding-left: 22px;
  }

  .faq-answer {
    padding-left: 22px;
    font-size: 16px;
  }
}
