/* 常见问题页面 */

.page-title {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  padding-bottom: 14px;
  padding-left: 16px;
  border-bottom: 3px solid var(--primary);
  border-left: 4px solid var(--primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.faq-list {
  display: flex;
  flex-direction: column;
  counter-reset: faq-num;
  /* 用 margin 做间距，兼容 Edge 等对 flex gap 支持不完整的浏览器 */
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.faq-question > span:first-child {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.faq-question > span:first-child::before {
  counter-increment: faq-num;
  content: counter(faq-num);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.faq-question:hover {
  background: var(--bg-page);
  color: var(--primary);
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 12px;
  position: relative;
}

.faq-question .faq-icon::before,
.faq-question .faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  transition: transform 0.2s;
}

.faq-question .faq-icon::before {
  width: 10px;
  height: 2px;
  margin-left: -5px;
  margin-top: -1px;
}

.faq-question .faq-icon::after {
  width: 2px;
  height: 10px;
  margin-left: -1px;
  margin-top: -5px;
}

.faq-item.open .faq-question .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}

.faq-answer p {
  margin: 0;
  padding: 0 24px 20px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  transition: max-height 0.35s ease-in;
}

@media (max-width: 768px) {
  .faq-question {
    padding: 16px 18px;
    font-size: 15px;
  }

  .faq-answer p {
    padding: 0 18px 16px 18px;
    font-size: 13px;
  }
}
