/* ==========================================================================
   如意约 · 常见问题页（FAQ）
   设计语言对齐 guides.css / contactus.css：
   白色卡片 + 圆角 16px + 品牌绿悬停，展开/收起用原生 <details>，
   内容始终存在于 HTML 中（可被搜索引擎与 AI 爬虫完整读取）。
   ========================================================================== */

/* 用 margin 而非 gap，便于分别控制「标题→首项」与「项→项」的间距比例：
   标题下留白 ≈ 22px，卡片之间 10px，形成"标题属于下一组"的视觉归属。 */
.faq-list {
  display: block;
}

.faq-card {
  margin-bottom: 10px;
}

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

.faq-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-card:hover {
  border-color: rgba(180, 239, 78, 0.55);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.08);
}

.faq-card[open] {
  border-color: rgba(180, 239, 78, 0.7);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

/* 问题行 */
.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.6;
  transition: background 0.2s ease;
}

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

.faq-q:hover {
  background: rgba(180, 239, 78, 0.07);
}

.faq-q:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
}

/* 展开图标 */
.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  /* 让图标垂直居中对齐问题首行文字（1rem × 1.6 行高 = 25.6px） */
  margin-top: -0.5px;
  border-radius: 8px;
  background: rgba(180, 239, 78, 0.18);
  color: #6ba32a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  transition: transform 0.25s ease, background 0.2s ease;
}

.faq-card[open] .faq-icon {
  transform: rotate(45deg);
  background: rgba(180, 239, 78, 0.45);
}

/* 答案 */
.faq-a {
  padding: 0 24px 22px;
  font-size: 0.9rem;
  line-height: 1.9;
  color: #5a6c7d;
}

.faq-a strong {
  color: #2c3e50;
  font-weight: 700;
}

/* 答案中「<br> + 粗体小标题」的分点写法：让小标题独立成行并留出上方间距，
   避免所有文字挤成一段（原先 <br> 只断行、不产生分点感）。 */
.faq-a br + strong {
  display: block;
  margin-top: 0.85rem;
}

.faq-a br + strong:first-child {
  margin-top: 0;
}

.faq-a a {
  color: #0070D6;
  text-decoration: none;
  font-weight: 600;
}

.faq-a a:hover {
  text-decoration: underline;
}

/* 底部行动块 */
.faq-cta {
  text-align: center;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 16px;
  padding: 32px 24px;
  margin-top: 2.25rem;
}

.faq-cta h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.faq-cta p {
  font-size: 0.88rem;
  color: #8c8c9e;
  margin: 0 0 18px;
  line-height: 1.7;
}

.faq-cta-btn {
  display: inline-block;
  background: var(--color-brand, #B4EF4E);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(180, 239, 78, 0.5);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .faq-q {
    padding: 17px 18px;
    font-size: 0.93rem;
    gap: 10px;
  }

  .faq-icon {
    width: 22px;
    height: 22px;
    font-size: 0.95rem;
    line-height: 22px;
    border-radius: 7px;
  }

  .faq-a {
    padding: 0 18px 19px;
    font-size: 0.86rem;
  }

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

@media (max-width: 480px) {
  .faq-q {
    padding: 15px 15px;
    font-size: 0.89rem;
  }

  .faq-a {
    padding: 0 15px 17px;
    font-size: 0.83rem;
  }
}
