/* FAQ - Preguntas Frecuentes — Figma node 172:2230（颜色） */

.page-section.faq-page {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.faq-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-category[hidden] {
  display: none !important;
}

.faq-category-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.faq-content {
  max-width: 1165px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-content .page-title {
  margin: 0 0 0.5rem;
  color: var(--color-black);
}

.faq-content .page-subtitle {
  margin: 0 0 2.5rem;
  color: var(--color-black);
}

/* 分类 Tab — 灰底条宽度随内容收缩（Figma） */
.faq-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 30px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.faq-tab {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  padding: 0 1.25rem;
  min-height: 40px;
  border: none;
  border-radius: 30px;
  background: transparent;
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.faq-tab:hover {
  opacity: 0.9;
}

.faq-tab.active {
  background: #ed6cfd;
  color: var(--white);
}

.faq-tab:focus-visible {
  outline: 2px solid #ed6cfd;
  outline-offset: 2px;
}

/* Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: #f2f5f4;
  border-radius: 20px;
  overflow: hidden;
  transition: background 0.2s;
}

.faq-item.is-expanded {
  background: #c1ff2e;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--color-black);
  cursor: pointer;
  text-align: left;
  border: none;
  background: none;
  width: 100%;
}

.faq-question:hover {
  opacity: 0.95;
}

.faq-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--color-black);
  transition: transform 0.2s;
}

.faq-item.is-expanded .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.375;
  color: var(--color-black);
  padding: 0 1.5rem 1.25rem;
  padding-top: 0;
}

.faq-answer-inner {
  padding-top: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0;
  padding: 1rem 0 0;
}

.faq-item:not(.is-expanded) .faq-answer {
  display: none;
}

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

  .faq-tabs {
    justify-content: flex-start;
  }

  .faq-tab {
    font-size: 14px;
    padding: 0 1rem;
    min-height: 36px;
  }
}
