/* ==========================================================================
   faq.css — よくあるご質問ページ (faq.html) 専用
   接頭辞 .faq- / スコープ .faq-page

   デザイン: Figma 38:336 → 342:6880
   差し色の緑は #65AB6A（--green-leaf）。Figmaの実物を画素解析して確定した値。
   タイトルの下地と右上の飾りは、ブランドの LAYER OBJECTS（いびつな丸）を
   この色で塗って使っている（assets/faq/deco-badge.svg / faq-decor-small.svg）。
   ========================================================================== */

.faq-page {
  padding-bottom: 0;
}

/* =============== 背景装飾 =============== */
/* デザインの 342:7517（#EDE3D2 の有機的な4つの塊）。
   SVGが取得できなかったので、原寸レンダリングから切り出したPNGを敷いている。
   位置はデザインの y567（＝実装 y511、ヘッダー分の56pxを引いた値）に合わせる */
.faq-decor {
  position: absolute;
  left: 0;
  top: 511px;
  z-index: 0;
  width: 390px;
  height: 2286px;
  pointer-events: none;
}
.faq-decor img { width: 390px; height: 2286px; }

/* =============== ヒーロー =============== */
/* デザインの写真帯は y111..357 の247px */
.faq-hero {
  position: relative;
  z-index: 1;
  width: 390px;
  height: 247px;
}
.faq-hero__photo {
  width: 390px;
  height: 247px;
  object-fit: cover;
}

/* 右上の小さな飾り。LAYER OBJECTS のひとつ */
.faq-hero__decor {
  position: absolute;
  left: 329px;
  top: -4px;
  width: 61px;
  height: 62px;
}

/* タイトルの下地。LAYER OBJECTS のいびつな丸を敷いて、その中に白文字を置く */
.faq-hero__badge {
  position: absolute;
  left: -14px;
  top: 129px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 164px;
  height: 166px;
}
.faq-hero__badge-bg {
  position: absolute;
  inset: 0;
  width: 164px;
  height: 166px;
  z-index: 0;
}
.faq-hero__en,
.faq-hero__ja {
  position: relative;
  z-index: 1;
  color: #fff;
}
.faq-hero__en {
  font-family: var(--font-kurumilk);
  font-size: 40px;
  line-height: 1;
  letter-spacing: 2px;
}
.faq-hero__ja {
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
}

/* =============== カテゴリの絞り込み =============== */
.faq-cat,
.faq-list,
.faq-contact {
  position: relative;
  z-index: 1;
}

.faq-cat {
  margin-top: 32px;
  text-align: center;
}

/* デザイン実測: 幅151px・字の高さ21px、書体は kurumilk、色は本文と同じ濃さ */
.faq-cat__label {
  font-family: var(--font-kurumilk);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--dark);
}

/* デザイン実測: 並びは x57..333（幅276px）の2段、段の間隔は30px。
   1段目は2つ、2段目は3つで、どちらも左右の端がそろう */
.faq-cat__row {
  display: flex;
  justify-content: space-between;
  width: 276px;
  margin: 0 auto;
  list-style: none;
}
.faq-cat__row:first-child { margin-top: 24px; }
.faq-cat__row + .faq-cat__row { margin-top: 15px; }

/* 「すべて」は絞り込みの解除なので、他と分けて1行まるごと使う（中央寄せ） */
.faq-cat__row--all { justify-content: center; }

/* 頭の丸はデザインの15pxの円。ラジオボタンの形で、選択中だけ緑で塗る。
   実測: 枠 #898989 / 選択中の塗り #539158 / 中の点は地色 #F4F2F0（直径約7.5px） */
.faq-cat__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  font-family: var(--font-zenmaru);
  font-size: 13px;
  line-height: 1.4;
  color: var(--dark);
  white-space: nowrap;
}
.faq-cat__btn::before {
  content: '';
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1px solid #898989;
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
}
.faq-cat__btn.is-current::before {
  border-color: #539158;
  background: radial-gradient(circle, var(--bg-color) 0 3.7px, #539158 3.7px);
}

.faq-cat__btn.is-current {
  font-weight: 700;
}

/* =============== 質問一覧 =============== */
/* デザインでは最初の見出しが y525（実装 y469）に来る */
.faq-list {
  margin-top: 40px;
}

.faq-group + .faq-group {
  margin-top: 46px;
}

/* 見出し。くすんだ緑の下地に白抜き文字。
   左端は画面外へ抜けていて、角が丸いのは右上だけ */
.faq-group__title {
  display: flex;
  align-items: center;
  justify-content: center;
  /* デザインの幅は204pxだが、「ニューボーンフォトについて」のように
     長い見出しでははみ出すので、中身に合わせて伸ばす */
  width: fit-content;
  min-width: 204px;
  max-width: 340px;
  padding-right: 22px;
  padding-left: 22px;
  height: 56px;
  white-space: nowrap;
  margin-left: -3px;
  padding-bottom: 2px;
  border-radius: 0 28px 0 0;
  background: var(--green-leaf);
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
}

/* ---- 1問 ---- */
.faq-item {
  width: 331px;
  margin: 20px auto 0;
}
/* 見出しの直後だけ、デザインどおり少し広く空ける（見出し下端580→Q 613） */
.faq-group__title + .faq-item { margin-top: 29px; }

/* デザインでは質問が回答パネルより39px内側に入っている */
.faq-item__q {
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: start;
  gap: 8px;
  width: 100%;
  padding: 0 8px 0 39px;
  text-align: left;
}

/* デザイン実測: 35x34の枠に、細い線の大きな Q。色は本文と同じ濃さ。
   丸ゴシックの太字ではないので、システムのゴシックを細字で使う */
.faq-item__mark {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-weight: 300;
  font-size: 34px;
  line-height: 1;
  color: var(--dark);
}

/* デザインの質問文は太字ではない（幅210px / 14文字 = 15px） */
.faq-item__text {
  font-family: var(--font-zenmaru);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dark);
}

/* 開閉の矢印。デザインでは質問の下の中央に置かれている */
.faq-item__arrow {
  grid-column: 1 / -1;
  justify-self: center;
  width: 18px;
  height: 9px;
  margin-top: 12px;
  background: var(--brown);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 0.25s ease;
}
.faq-item.is-open .faq-item__arrow {
  transform: rotate(180deg);
}

/* 回答。閉じているあいだは行の高さを0にして畳む。
   この畳み方は中の要素が1つでないと崩れるので、__a-inner で包んでいる */
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  /* 左右の余白はここに置く（横方向は高さに影響しないため）。
     上下の余白を内側に置くと畳んでも余白ぶんの高さが残ってしまう */
  padding: 0 33px;
  border-radius: 20px;
  background: #fff;
  transition: grid-template-rows 0.25s ease, margin-top 0.25s ease;
  overflow: hidden;
}
.faq-item.is-open .faq-item__a {
  grid-template-rows: 1fr;
  margin-top: 14px;
}
.faq-item__a-inner {
  min-height: 0;
  overflow: hidden;
}
/* 上下の余白はマージンで。畳んだときは一緒に潰れる。
   デザイン実測: パネル 331x310、文字は12行で行送り20px、
   上に32px・下に36pxの余白 */
.faq-item__a-inner > :first-child { margin-top: 32px; }
.faq-item__a-inner > :last-child  { margin-bottom: 36px; }
.faq-item__a p {
  font-family: var(--font-zenmaru);
  font-size: 13px;
  /* 13px x 1.54 = 20px。1.9だと24.7pxで間延びしていた */
  line-height: 1.54;
  color: var(--dark);
}
/* デザインは段落が分かれていない1つの文章。
   読みやすさのため段落は残しつつ、間は詰めている */
.faq-item__a p + p {
  margin-top: 4px;
}
/* 現行サイトから移した回答には、リンク（レンタル衣装ページ）と
   強調（キャンセル料の期限など）が入っている */
.faq-item__a a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-item__a strong {
  font-weight: 700;
}

/* =============== 解決しないとき =============== */
.faq-contact {
  margin-top: 60px;
  text-align: center;
}
.faq-contact__lead {
  font-family: var(--font-zenmaru);
  font-size: 13px;
  line-height: 1.9;
  color: var(--dark);
}
.faq-contact__line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.faq-contact__line img { width: 56px; height: 56px; }

.faq-page .footer {
  margin-top: 80px;
}
