/* =========================================================
 * faq.css : 「09 よくある質問」ページ固有スタイル
 * デザイン基準: design-reference/09-faq-pc.png (1440x8717) / 09-faq-sp.png
 * 中央コンテンツ幅 1024 / PC左右余白 208px
 * base -> header -> footer -> cta -> faq -> spcv の順で読み込む
 * ========================================================= */

/* ----- ヒーローサブ ----- */
.faq-hero {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

@media (min-width: 1025px) {
  .faq-hero {
    height: 250px;
  }
}

.faq-hero__bg {
  position: absolute;
  inset: 0;
  /* Figma faq ヒーロー画像(5df65f9131・明るいデスク+ノートPC)。従来は別写真(暗い万年筆)だった＝2026-07-20差し替え。 */
  background-image: url("../images/faq/hero.jpg");
  background-size: cover;
  /* SP: Figmaクロップ(y中央帯)＝center。PCは下寄り(imageTransform y0.45–0.75)なので下記@mediaで65%。 */
  background-position: center;
}

@media (min-width: 1025px) {
  .faq-hero__bg {
    background-position: center 65%;
  }
}

.faq-hero__content {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-sp);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 1025px) {
  .faq-hero__content {
    padding-inline: 0;
    gap: 14px;
  }
}

.faq-hero__title {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 1.4px;
  /* 写真の左側が暗いため白抜き（暗い背景に暗い文字だと読めない） */
  color: var(--color-bg-white);
}

@media (min-width: 1025px) {
  .faq-hero__title {
    font-size: 40px;
    letter-spacing: 2px;
  }
}

.faq-hero__lead {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  /* 見出しと同じく白（暗い写真の上で読めるように） */
  color: var(--color-bg-white);
}

@media (min-width: 1025px) {
  .faq-hero__lead {
    font-size: 15px;
  }
}

/* SP: Figma SPヒーローは「よくある質問」タイトルのみ（リード無し）。実装は画像上にリードを重ねて
   いたが Figma SP に存在しない。DOMには残しSPでは非表示にする。2026-07-20是正。 */
@media (max-width: 1024px) {
  .faq-hero__lead {
    display: none;
  }
}

/* ----- 共通サブタイトル ----- */
.par-subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.par-subtitle__en {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 0;
  color: var(--color-accent);
}

@media (min-width: 1025px) {
  .par-subtitle__en {
    font-size: 16px;
    line-height: 28px;
  }
}

.par-subtitle__jp {
  color: var(--color-navy);
}

@media (min-width: 1025px) {
}

/* ----- FAQ 全体ラッパ ----- */
.faq {
  background: var(--color-bg-white);
  padding-top: 60px;
  padding-bottom: 100px;
}

@media (min-width: 1025px) {
  .faq {
    padding-top: 80px;
    padding-bottom: 130px;
  }
}

.faq__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-sp);
}

@media (min-width: 1025px) {
  .faq__inner {
    padding-inline: 0;
  }
}

/* ----- カテゴリタブ（ゴールドのピル・アンカーリンク）----- */
.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 1025px) {
  .faq-tabs {
    margin-top: 56px;
  }
}

.faq-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--color-bg-white); /* 濃ベージュ塗り+2px白枠 */
  background: var(--color-bg-deep-beige); /* #D3BF7C */
  color: var(--color-bg-white);
  text-align: center;
  transition: background var(--transition-base), transform var(--transition-base);
}

@media (min-width: 1025px) {
  .faq-tab {
    width: 200px;
  }
}

.faq-tab:hover {
  background: var(--color-accent); /* #C0AF72 */
}

/* SP: Figmaは均一幅170px・高さ30・radius50のピルを2列（列間10/行間4）で敷き詰める。
   従来は内容ハグ(可変幅)＋gap16で行間が大きく開いていた。2026-07-20是正。PCは200px幅（上記@media）。 */
@media (max-width: 1024px) {
  .faq-tabs {
    gap: 4px 10px;
    justify-content: space-between;
  }
  .faq-tab {
    /* 2列ぴったり。Figmaはピル170px×2列(container375)だが実装のtabsは段落幅343なので
       列間10pxを引いた半幅にして均一2列を担保する。 */
    flex: 0 0 calc((100% - 10px) / 2);
    width: calc((100% - 10px) / 2);
    box-sizing: border-box;
    min-height: 30px;
    padding: 4px 12px;
  }
}

/* ----- カテゴリブロック ----- */
.faq-category {
  margin-top: 56px;
}

@media (min-width: 1025px) {
  .faq-category {
    margin-top: 72px;
  }
}

.faq-category__title {
  scroll-margin-top: 120px;
  color: var(--color-text-black);
  margin-bottom: 20px;
}

@media (min-width: 1025px) {
  .faq-category__title {
    margin-bottom: 24px;
  }
}

/* ----- アコーディオン（details/summary）----- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1025px) {
  .faq-list {
    gap: 24px;
  }
}

.faq-item {
  background: transparent;
}

.faq-item__q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px; /* 短い質問は1行。chevron分の余白でテキスト幅が足りず溢れるのをgap縮小で防ぐ（長い質問は2行維持＝nowrapは不可） */
  min-height: 56px;
  padding: 16px 16px 16px 20px;
  background: var(--color-bg-blue-gray); /* #F0F2F5 */
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition-base);
}

@media (min-width: 1025px) {
  .faq-item__q {
    min-height: 72px;
    padding: 16px 16px 16px 28px;
  }
}

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

.faq-item__q:hover {
  background: #E7EAEF;
}

.faq-item__q-text {
  color: var(--color-text-black);
}

@media (min-width: 1025px) {
}

/* 丸い濃紺ボタン＋chevron */
.faq-item__icon {
  flex: 0 0 auto;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-navy); /* #00103E */
}

@media (min-width: 1025px) {
  .faq-item__icon {
    width: 40px;
    height: 40px;
  }
}

.faq-item__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-bg-white);
  border-bottom: 2px solid var(--color-bg-white);
  transform: translate(-50%, -70%) rotate(45deg); /* 下向き chevron */
  transition: transform var(--transition-base);
}

.faq-item[open] .faq-item__icon::before {
  transform: translate(-50%, -30%) rotate(225deg); /* 上向き chevron */
}

/* 回答本文 */
.faq-item__a {
  padding: 20px 20px 4px;
  color: var(--color-text-black);
}

@media (min-width: 1025px) {
  .faq-item__a {
    padding: 22px 28px 6px;
  }
}

.faq-item__a p {
  margin: 0;
}
