/* =====================================================================
   faq-page.css — よくある質問（カテゴリ一覧）ページ用コンポーネント群
   Figma: miraAI_0713 / FAQ-CategorySearch (node 1934:17535)

   ・基本 = アコーディオンFAQ項目（Q/A ＋ ＋/− トグル）
   ・イレギュラー = 回答内に多様なコンテンツを持つバリエーション
       p-fq-cta      … CTAボタンブロック（＋補足リンク）
       p-fq-fund     … 出資金テーブル（地域×金額）
       p-fq-media    … テキスト＋画像 横並びブロック
       p-fq-contact  … 電話お問い合わせブロック（2カラム）
       p-fq-fees     … エリア別手数料リンクグリッド
       p-fq-conds    … 割引対象リスト

   開閉は header.js の [data-accordion] を共用（aria-expanded を切替）。
   高さ可変に対応するため grid-template-rows 0fr↔1fr で開閉する。
   ボタンは共通部品 c-btn を利用。接頭辞 p-fq は既存マーカーと非衝突。
   ===================================================================== */

/* ---------- ページ用コンテナ（各FAQカテゴリページ） ---------- */
/* p-gp--qa（クリーム地）の中でリストを中央寄せ。項目自体が白カード。 */
.p-fq-page {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 var(--container-pad);
}
/* デスクトップ: 白枠を他ページと同じ1200px幅に（container-pad 80pxを相殺） */
@media (min-width: 1024px) { .p-fq-page { padding-inline: 0; } }
/* QAリストの外側に白枠（サブページのみ。F05トップの検索結果には付与しない） */
.p-fq-page .p-fq {
  background: var(--container-white);
  border-radius: var(--radius-40);
  padding: var(--space-32) var(--space-24);
}
@media (min-width: 1024px) { .p-fq-page .p-fq { padding: var(--space-64); } }
@media (max-width: 599px) {
  .p-fq-page .p-fq { width: auto; margin-inline: calc(-1 * var(--container-pad)); border-radius: 0; }
  /* SP: 上下パディングを48pxに（左右24px維持） */
  .p-fq-page .p-fq { padding-block: var(--space-48); }
}

/* ---------- 検索結果（F05トップ） ---------- */
/* 該当なしメッセージ（Figma: 赤字・中央） */
.p-fq-noresult {
  text-align: center;
  font-size: 16px;
  line-height: 1.625;
  font-weight: var(--fw-light);
  color: var(--text-pink);
}
/* 検索結果アイテムは Q/A ピル無し。項目間 16px は p-fq__list を流用 */
.p-fq__list--result .p-fq__q { gap: var(--space-16); }

/* ---------- リスト / カテゴリ ---------- */
.p-fq { width: 100%; }
.p-fq__cat + .p-fq__cat { margin-top: var(--space-48); }
.p-fq__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* ---------- 項目（カード） ---------- */
.p-fq__item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-16);
  background: var(--container-white);
  transition: background-color .2s ease;
}
/* 開いている項目は薄ピーチ背景 */
.p-fq__item:has(.p-fq__q[aria-expanded="true"]) { background: #fcf5ea; }

/* 質問（トグルボタン） */
.p-fq__q {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  width: 100%;
  padding: var(--space-24);
  text-align: left;
  cursor: pointer;
}
.p-fq__qtext {
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 1.5;
  font-weight: var(--fw-bold);
  color: var(--text-default);
}

/* Q / A ラベル */
.p-fq__label {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  font-size: 14px;
  line-height: 1.4;
  font-weight: var(--fw-bold);
}
.p-fq__label--q { background: var(--color-primary-light);   color: var(--color-primary); }
.p-fq__label--a { background: var(--color-secondary-light); color: var(--text-orange); }
/* Q / A アイコンは非表示 */
.p-fq__label { display: none; }

/* ＋ / − トグル */
.p-fq__toggle {
  position: relative;
  flex: none;
  width: 24px; height: 24px;
}
.p-fq__toggle::before,
.p-fq__toggle::after {
  content: "";
  position: absolute;
  left: 3px; top: 11px;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
}
.p-fq__toggle::after { transform: rotate(90deg); transition: opacity .2s ease, transform .2s ease; }
.p-fq__q[aria-expanded="true"] .p-fq__toggle::after { opacity: 0; transform: rotate(0); }

/* 回答（開閉・高さ可変） */
.p-fq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.p-fq__q[aria-expanded="true"] + .p-fq__a { grid-template-rows: 1fr; }
.p-fq__a-clip { overflow: hidden; }
.p-fq__a-inner {
  display: flex;
  gap: var(--space-24);
  padding: 0 var(--space-24) var(--space-24);
}
.p-fq__abody {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);   /* 回答内の要素間マージン（Figma: 説明文↔テーブル/ボタン等=24px） */
}
.p-fq__text {
  font-size: 16px;
  line-height: 1.625;
  font-weight: var(--fw-light);
  color: var(--text-default);
}
/* 検索用ハッシュタグ（本文末尾・グレー表示。フォントは p-fq__text と同じ） */
.p-fq__searchtags { color: #847E75; }
/* テキストリンク（緑・下線） */
.p-fq__link {
  align-self: flex-start;
  color: var(--text-link);
  font-weight: var(--fw-bold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.p-fq__link:hover { text-decoration: none; }
/* 外部サイトへのリンクは末尾にブランクアイコン（16px四方・テキストから4px） */
.p-fq__link[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: -0.2em;
  background: url(../img/blank.svg) no-repeat center / contain;
}

/* =====================================================================
   イレギュラー・コンポーネント
   ===================================================================== */

/* ---------- p-fq-cta : CTAボタンブロック ---------- */
/* 回答本文中に置くCTA。左寄せで固定幅、行間は abody の gap を利用 */
.p-fq-cta {
  align-self: flex-start;
  min-width: 280px;
}
@media (max-width: 599px) {
  .p-fq-cta { width: 100%; min-width: 0; }
}

/* ---------- p-fq-fund : 出資金テーブル ---------- */
.p-fq-fund {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-8);
  overflow: hidden;
  table-layout: fixed;
}
.p-fq-fund th,
.p-fq-fund td {
  border-right: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: var(--space-12);
  vertical-align: middle;
}
.p-fq-fund tr > *:last-child { border-right: 0; }
.p-fq-fund tbody tr:last-child > * { border-bottom: 0; }
.p-fq-fund__th {
  background: #aba9a7;
  color: var(--text-white);
  font-size: 16px;
  line-height: 1.5;
  font-weight: var(--fw-bold);
  text-align: center;
}
.p-fq-fund thead th:first-child { width: 50%; }
.p-fq-fund tbody td { background: var(--container-white); }
.p-fq-fund__region {
  width: 50%;
  font-size: 16px;
  line-height: 1.5;
  font-weight: var(--fw-light);
  color: var(--text-default);
}
.p-fq-fund__price {
  text-align: center;
  white-space: nowrap;
}
.p-fq-fund__price b {
  font-size: 28px;
  line-height: 1.2;
  font-weight: var(--fw-bold);
  color: var(--text-default);
}
.p-fq-fund__yen {
  font-size: 16px;
  font-weight: var(--fw-bold);
  color: var(--text-default);
}

/* ---------- p-fq-media : テキスト＋画像 横並び ---------- */
.p-fq-media {
  display: flex;
  gap: var(--space-24);
  align-items: flex-start;
}
.p-fq-media__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1.625;
  font-weight: var(--fw-light);
  color: var(--text-default);
}
.p-fq-media__img {
  flex: none;
  width: 180px; height: 180px;
  border-radius: var(--radius-16);
  overflow: hidden;
  background: var(--border-light);
}
.p-fq-media__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 画像プレースホルダ（本番画像未書き出し用） */
.p-fq-media__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  background:
    repeating-linear-gradient(45deg, #ece7df 0 10px, #f4f0ea 10px 20px);
}
@media (max-width: 599px) {
  .p-fq-media { flex-direction: column; }
  /* SP: 正方形写真を切り取らず全体表示（横長固定高さ→正方形枠に） */
  .p-fq-media__img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* ---------- p-fq-contact : 電話お問い合わせ 2カラム ---------- */
.p-fq-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
}
.p-fq-contact__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.p-fq-contact__title {
  font-size: 16px;
  line-height: 1.625;
  font-weight: var(--fw-light);
  color: var(--text-default);
}
.p-fq-contact__tel {
  font-size: 16px;
  line-height: 1.5;
  font-weight: var(--fw-bold);
  color: var(--text-default);
}
.p-fq-contact__hours {
  margin-top: var(--space-4);
  font-size: 13px;
  line-height: 1.7;
  font-weight: var(--fw-light);
  color: var(--text-muted);
}
@media (max-width: 599px) {
  .p-fq-contact { grid-template-columns: 1fr; }
}

/* ---------- p-fq-fees : エリア別手数料リンクグリッド ---------- */
.p-fq-fees {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-16);
}
.p-fq-fees .c-btn { min-width: 0; width: 100%; }
@media (max-width: 1023px) {
  .p-fq-fees { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- p-fq-conds : 割引対象リスト ---------- */
.p-fq-conds {
  list-style: none;
  background: var(--container-white);
  border-radius: var(--radius-16);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.p-fq-conds__item {
  position: relative;
  padding-left: var(--space-16);
  font-size: 16px;
  line-height: 1.5;
  font-weight: var(--fw-light);
  color: var(--text-default);
}
.p-fq-conds__item::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--text-default);
}
