@charset "UTF-8";

/* ---------- ページ全体 ---------- */
/* ブラウザ標準の余白を消し、共通ヘッダ・フッタを画面幅いっぱいに表示する
   ※共通CSSでリセット済みの場合は削除可 */
html,
body {
  margin: 0;
  padding: 0;
}

/* ---------- 配色（パンくずと本文で共有） ---------- */
.faq-breadcrumb,
.faq {
  --faq-main: #164f63;
  --faq-accent: #c8102e;
  --faq-border: #d5dee2;
  --faq-bg: #f3f7f8;
  --faq-text: #333;
  --faq-link: #0b5fa5;
  --faq-focus: #f0a500;
}

/* ---------- パンくずリスト ---------- */
.faq-breadcrumb {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px 0;
  font-size: 12px;
  line-height: 1.6;
  box-sizing: border-box;
}
.faq-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.faq-breadcrumb__item { color: #666; }
.faq-breadcrumb__item + .faq-breadcrumb__item::before {
  content: "\FF1E";            /* ＞（非対応ブラウザ用） */
  content: "\FF1E" / "";       /* ＞（読み上げ対象外） */
  margin: 0 6px;
  color: #999;
}
.faq-breadcrumb__item a { color: var(--faq-link); text-decoration: underline; }
.faq-breadcrumb__item a:hover { text-decoration: none; }

/* ---------- 本文エリア ---------- */
.faq {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  color: var(--faq-text);
  font-size: 15px;
  line-height: 1.8;
  box-sizing: border-box;
  interpolate-size: allow-keywords;   /* 開閉アニメーション用（対応ブラウザのみ） */
}
.faq *,
.faq *::before,
.faq *::after { box-sizing: inherit; }
.faq [hidden] { display: none !important; }

.faq__title {
  margin: 0 0 16px;
  color: var(--faq-main);
  font-size: 22px;
  line-height: 1.5;
  font-weight: bold;
}

/* ---------- 検索・絞り込み ---------- */
.faq__tools {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 6px;
  background: var(--faq-bg);
}

.faq-search__label {
  display: block;
  margin: 0 0 4px;
  color: var(--faq-main);
  font-size: 13px;
  font-weight: bold;
}
.faq-search__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #8fa3ab;
  border-radius: 4px;
  background: #fff;
  color: var(--faq-text);
  font-family: inherit;
  font-size: 16px;              /* iOSで入力時に拡大されないよう16px以上 */
  line-height: 1.5;
}

.faq-cat {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
.faq-cat__btn {
  padding: 4px 12px;
  border: 1px solid var(--faq-main);
  border-radius: 999px;
  background: #fff;
  color: var(--faq-main);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}
.faq-cat__btn:hover { background: #e3ecef; }
.faq-cat__btn[aria-pressed="true"] {
  background: var(--faq-main);
  color: #fff;
}

.faq__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0 0;
}
.faq__count {
  margin: 0;
  font-size: 13px;
}

/* すべて開く／閉じる・条件をクリア */
.faq__toggle-all,
.faq__reset {
  padding: 6px 14px;
  border: 1px solid var(--faq-main);
  border-radius: 4px;
  background: #fff;
  color: var(--faq-main);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.faq__toggle-all:hover,
.faq__reset:hover { background: #e3ecef; }

/* フォーカス表示 */
.faq-search__input:focus-visible,
.faq-cat__btn:focus-visible,
.faq__toggle-all:focus-visible,
.faq__reset:focus-visible {
  outline: 3px solid var(--faq-focus);
  outline-offset: 2px;
}

/* 該当なし */
.faq__empty {
  padding: 32px 16px;
  border-bottom: 1px solid var(--faq-border);
  text-align: center;
}
.faq__empty p { margin: 0 0 12px; }

/* ---------- FAQ項目 ---------- */
.faq__list { border-top: 1px solid var(--faq-border); }

.faq-item {
  border-bottom: 1px solid var(--faq-border);
  scroll-margin-top: 80px;      /* ヘッダが固定表示の場合は高さに合わせて調整 */
}

/* 質問 */
.faq-item__q {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 16px 40px 16px 4px;
  cursor: pointer;
  list-style: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q:hover { background: var(--faq-bg); }
.faq-item__q:focus-visible {
  outline: 3px solid var(--faq-focus);
  outline-offset: -3px;
}

/* 開閉アイコン（＋／－） */
.faq-item__q::before,
.faq-item__q::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 2px;
  margin-top: -1px;             /* 線の太さの半分だけ上げて中央にそろえる */
  background: var(--faq-main);
  transition: transform .2s;
}
.faq-item__q::after { transform: rotate(90deg); }
.faq-item[open] > .faq-item__q::after { transform: rotate(0deg); }

/* Q / A マーク */
.faq-item__mark {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 28px;
  text-align: center;
}
.faq-item__q .faq-item__mark { background: var(--faq-main); }
.faq-item__a .faq-item__mark { background: var(--faq-accent); }

.faq-item__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.faq-item__cat {
  align-self: flex-start;
  padding: 0 8px;
  border-radius: 3px;
  background: var(--faq-bg);
  color: var(--faq-main);
  font-size: 12px;
  line-height: 1.8;
}
.faq-item__title {
  color: var(--faq-main);
  font-weight: bold;
}

/* 回答 */
.faq-item__a {
  display: flex;
  gap: 12px;
  padding: 0 4px 20px;
}
.faq-item__text {
  min-width: 0;
  padding-top: 1px;
  overflow-wrap: anywhere;      /* 長いURLの折り返し */
}
.faq-item__text > * { margin: 0; }
.faq-item__text > * + * { margin-top: .8em; }
.faq-item__text a { color: var(--faq-link); text-decoration: underline; }
.faq-item__text a:hover { text-decoration: none; }

/* 回答内の小見出し（【増員】など） */
.faq-item__text > .faq-item__sub {
  margin-top: 1.2em;
  color: var(--faq-main);
  font-weight: bold;
}
.faq-item__text > .faq-item__sub:first-child { margin-top: 0; }
.faq-item__text > .faq-item__sub + * { margin-top: .2em; }

/* 回答内の小見出し（第2階層：「・JTBトラベルメンバーのお客様」など） */
.faq-item__text > .faq-item__sub2 {
  margin-top: 1em;
  font-weight: bold;
}
.faq-item__text > .faq-item__sub2 + * { margin-top: .2em; }

/* 回答内の注記（※） */
.faq-item__notes {
  padding: 0;
  list-style: none;
  font-size: .93em;
}
.faq-item__notes li {
  padding-left: 1em;
  text-indent: -1em;            /* ※の2行目以降をそろえる */
}

/* 箇条書き（「・」や「1.」を原稿どおり残すため記号なし・ぶら下げ） */
.faq-item__list {
  padding: 0;
  list-style: none;
}
.faq-item__list li {
  padding-left: 1em;
  text-indent: -1em;
}

/* 強調（原稿の赤字）・下線・マーカー */
.faq-em {
  color: var(--faq-accent);
  font-style: normal;
}
.faq-u { text-decoration: underline; }
.faq-item__text mark {
  padding: 0 .1em;
  background: #fff3b0;
  color: inherit;
}

/* 画面例の画像 */
.faq-item__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  border: 1px solid var(--faq-border);
}

/* 回答内の折りたたみ（手順の詳細など） */
.faq-sub {
  border: 1px solid var(--faq-border);
  border-radius: 4px;
}
.faq-sub > summary {
  padding: 8px 12px;
  background: var(--faq-bg);
  color: var(--faq-main);
  font-weight: bold;
  cursor: pointer;
}
.faq-sub > summary:focus-visible {
  outline: 3px solid var(--faq-focus);
  outline-offset: -3px;
}
.faq-sub__body { padding: 12px; }
.faq-sub__body > * { margin: 0; }
.faq-sub__body > * + * { margin-top: .8em; }

/* 重要なお知らせ（障害告知など） */
.faq-item--notice {
  border-left: 4px solid var(--faq-accent);
  background: #fff8f8;
}
.faq-item--notice .faq-item__cat {
  background: var(--faq-accent);
  color: #fff;
}

/* ---------- 開閉アニメーション（対応ブラウザのみ。非対応では従来どおり瞬時に開閉） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .25s ease, content-visibility .25s allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; }
}

/* 動きを減らす設定の場合 */
@media (prefers-reduced-motion: reduce) {
  .faq-item__q::before,
  .faq-item__q::after { transition: none; }
}

/* ---------- PC表示 ---------- */
@media (min-width: 768px) {
  .faq-breadcrumb { font-size: 13px; }
  .faq { font-size: 16px; }
  .faq__title { font-size: 26px; }
  .faq__tools { padding: 20px 24px; }
  .faq-item__q { padding: 18px 48px 18px 8px; }
  .faq-item__a { padding: 0 8px 24px; }
}

/* ---------- 印刷 ---------- */
@media print {
  .faq-breadcrumb,
  .faq__tools,
  .faq__empty { display: none !important; }
  .faq-item { break-inside: avoid; }
  .faq-item__q { padding-right: 4px; }
  .faq-item__q::before,
  .faq-item__q::after { display: none; }
  .faq-item::details-content { block-size: auto; transition: none; }
  .faq-item__img { max-height: 200px; }
}
