/* ===== 共通 ===== */
:root {
  --container-max: 800px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  color: #111827;

  /* サイト全体（FAQ本体）の標準フォント：システムゴシック */
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Kaku Gothic Pro",
    "Yu Gothic UI",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    sans-serif;
}

.site-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  width: 100%;
}

.page-main {
  flex: 1;
}

/* ===== ヘッダー（左上ロゴ） ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 0;
  text-decoration: none;
}

.site-logo {
  width: 130px; /* PC版：最大130px */
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .site-logo {
    width: 96px; /* スマホで小さく */
  }
}

/* ===== FAQ ===== */
.faq {
  padding: 24px 0 40px;
}

.faq__title {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 800;
  text-align: left;
}

@media (max-width: 600px) {
  .faq__title {
    font-size: 1.7rem;
  }
}

/* FAQ 冒頭リード文 */
.faq__lead {
  margin: 0 0 18px;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* 検索窓 */
.faq__search {
  margin: 0 0 14px;
}

.faq__searchInput {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
}

/* FAQリスト */
.faq__list {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
}

/* ===== 大カテゴリ（カテゴリー） ===== */
.faq-cat {
  margin: 10px 0;
}

.faq-cat__btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 18px 18px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  text-align: left;
}

@media (max-width: 600px) {
  .faq-cat__btn {
    font-size: 1.15rem;
    padding: 16px 16px;
  }
}

/* + / - */
.faq-cat__btn::after {
  content: "+";
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.faq-cat__btn[aria-expanded="true"]::after {
  content: "−";
}

/* カテゴリー別カラー */
.faq-cat__btn[data-cat="観賞魚用品"] { background: #3d59ec; }
.faq-cat__btn[data-cat="爬虫類用品"] { background: #d42d19; }
.faq-cat__btn[data-cat="小動物用品"] { background: #e96623; }
.faq-cat__btn[data-cat="小鳥用品"] { background: #398c23; }
.faq-cat__btn[data-cat="その他"]     { background: #3b82f6; }
.faq-cat__btn[data-cat="品質基準"] { background: #909090; }

/* カテゴリ内パネル（アニメーション対象） */
.faq-cat__panel {
  overflow: hidden;
  transition: height 260ms ease, opacity 260ms ease;
}

/* ===== Q / A ===== */
.faq__item {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

/* Qボタン：グレー背景・黒文字 */
.faq__q {
  width: 100%;
  border: none;
  cursor: pointer;
  background: #e5e7eb; /* グレー */
  color: #111827;      /* 黒 */
  padding: 16px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;

  border-bottom: 1px solid #ffffff; /* QとQの間の白線 */
}

@media (max-width: 600px) {
  .faq__q {
    font-size: 1.05rem;
    padding: 14px 14px;
  }
}

/* 折り返し時も左揃えにする */
.faq__q span {
  text-align: left;
  flex: 1;
}

/* Qの + / - */
.faq__q::after {
  content: "+";
  margin-left: 12px;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.faq__q[aria-expanded="true"]::after {
  content: "−";
}

/* Aパネル（アニメーション対象） */
.faq__a {
  overflow: hidden;
  background: #ffffff;
  transition: height 260ms ease, opacity 260ms ease;
}

.faq__aInner {
  padding: 12px 16px 16px;
  color: #374151;
  line-height: 1.9;
}

/* 回答内リンク（任意） */
.faq__aInner a {
  color: #0ea5e9;
  text-decoration: underline;
}
.faq__aInner a:hover {
  filter: brightness(0.9);
}

/* ===== お問い合わせボタン ===== */
.faq {
  padding-bottom: 120px;
}

.faq__contact {
  position: fixed;
  right: 24px;
  bottom: max(40px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  z-index: 1000;
  width: auto;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.faq__contactBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  max-width: 100%;
  padding: 16px 22px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  color: #ffffff;
  background: #4a90e2;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  pointer-events: auto;
  white-space: nowrap;
}

.faq__contactBtn:hover {
  filter: brightness(0.95);
}

@media (max-width: 600px) {
  .faq {
    padding-bottom: 124px;
  }

  .page-main {
    padding-bottom: 112px;
    box-sizing: border-box;
  }

  .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .faq__contact {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(243, 244, 246, 0.96), rgba(243, 244, 246, 0));
  }

  .faq__contactBtn {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: 14px 18px;
    font-size: 1rem;
    white-space: normal;
  }
}

/* ===== フッター（中央） ===== */
.site-footer {
  margin-top: auto;
  padding: 22px 0;
  text-align: center;
  background: transparent;
}

.site-footer__copy {
  margin: 0;
  font-family:
    "Hiragino Maru Gothic ProN",
    "Hiragino Maru Gothic Pro",
    "Yu Gothic UI",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #6b7280;
}

/* アニメーション無効化設定 */
@media (prefers-reduced-motion: reduce) {
  .faq-cat__panel,
  .faq__a {
    transition: none;
  }
}
