/* ============================================================
   FAQ ページ固有スタイル
   共通トークン・共通コンポーネント(service-nav/header/footer/
   section-heading/btn)は css/style.css を参照。
   ============================================================ */

/* ===== FAQ 本体 ===== */
.faq {
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* リスト */
.faq-list {
  width: 1000px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 1項目 */
.faq-item {
  display: flex;
  flex-direction: column;
}

/* 質問行(トグルボタン) */
.faq-item__q {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 28px 22px;
  background: var(--bg-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.faq-item.is-open .faq-item__q {
  border-radius: 4px 4px 0 0;
}
.faq-item__question {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Q / A バッジ */
.faq-item__badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-white);
  font-family: var(--font-nimbus);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}
.faq-item__badge--q { background: var(--text-primary); }
.faq-item__badge--a { background: var(--primary-main); }

/* トグル(＋ / −) */
.faq-item__toggle {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}
.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--text-primary);
  transform: translate(-50%, -50%);
}
.faq-item__toggle::before { width: 16px; height: 2px; }  /* 横線 */
.faq-item__toggle::after  { width: 2px; height: 16px; }  /* 縦線 */
.faq-item.is-open .faq-item__toggle::after { opacity: 0; } /* 展開時は − */

/* 回答行 */
.faq-item__a {
  display: none;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 22px;
  background: var(--text-white);
  border: 4px solid var(--bg-primary);
  border-radius: 0 0 4px 4px;
}
.faq-item.is-open .faq-item__a { display: flex; }

.faq-item__answer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.faq-item__answer > p {
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
}

/* 回答内のブロック(小見出し + 本文) */
.faq-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-block__heading {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}
.faq-block p {
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
}

/* コードブロック(等幅ではなく通常フォント) */
.faq-code {
  margin-top: 4px;
  padding: 24px;
  background: var(--bg-primary);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 箇条書き(・) */
.faq-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
}
.faq-bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-primary);
}
.faq-bullets__title { font-weight: 700; }

/* 番号付き手順(1. 2.) */
.faq-steps {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: decimal;
}
.faq-steps > li {
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
}
.faq-steps .faq-code { margin-top: 12px; }

@media (max-width: 1040px) {
  .faq-list { width: 100%; padding-inline: 24px; }
}

/* ============================================================
   SP layout (max-width: 768px)
   Figma node 929:23574（375幅）に基づく。768px超では一切適用されない。
   ============================================================ */
@media (max-width: 768px) {

  body { display: flex; flex-direction: column; }
  .breadcrumb { order: 1; }
  .cta { order: 2; }
  .footer { order: 3; }

  /* ---- FAQ 本体（幅は既存の max-width:100% で自動fluid。paddingのみ上書き） ---- */
  .faq { width: 100%; padding: 64px 0; }

  .faq-list { padding-inline: clamp(16px, 3.4vw, 24px); }

  /* セクション見出し: Figmaは1行表示(nowrap)のため合わせる（.section-heading__title自体は
     共通コンポーネントなのでstyle.cssは編集せず、faq.css内でFAQページに限定して上書き） */
  .faq .section-heading__title { white-space: nowrap; }

  /* 質問行 */
  .faq-item__q { padding: 24px 20px; }
  .faq-item__question { font-size: 15px; }

  /* Q / A バッジ */
  .faq-item__badge { width: 24px; height: 24px; font-size: 18px; }

  /* トグル(＋ / −) */
  .faq-item__toggle { width: 20px; height: 20px; }
  .faq-item__toggle::before { width: 14px; height: 1.6px; }
  .faq-item__toggle::after { width: 1.6px; height: 14px; }

  /* SP では開いたときの回答エリアのパディングを調整 */
  .faq-item.is-open .faq-item__a { padding: 24px 20px; }

  /* 回答内テキスト */
  .faq-item__answer { gap: 20px; }
  .faq-item__answer > p,
  .faq-block p,
  .faq-bullets li,
  .faq-steps > li { font-size: 15px; line-height: 1.8; }
  .faq-block__heading { font-size: 15px; }
  .faq-code { padding: 16px; font-size: 15px; line-height: 1.8; }
  .faq-steps { padding-left: 20px; }
}
