.faq-wrapper {
  font-family: "Zen Kaku Gothic New";
}

/* =====================================================
   FAQ  – layout
   ===================================================== */
.faq-wrapper {
  display: flex;
  gap: 50px;
  /* margin: 64px auto 96px;
  max-width: 1024px; */
  margin-left: 13%;
  margin-right: 13%;
  align-items: start;
  margin-bottom: 100px;
}
.faq-side {
  flex: 0 0 200px;
}
.faq-list {
  flex: 1;
}

/* ---- サイドバー ------------------------------------------------ */
.faq-side h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.faq-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.faq-side li:not(:last-child) {
  margin-bottom: 8px;
}

.faq-side a {
  display: block;
  text-decoration: none;
  text-align: center;
  border: 1px solid #d7c6c6;
  background: #f6f2f2;
  color: #333;
  font-size: 14px;
  padding: 8px 0;
  border-radius: 2px;
  transition: background 0.2s;
}
.faq-side a:hover {
  background: #eae5e5;
}
.faq-side a.is-active {
  background: #b32223;
  color: #fff;
  border-color: #b32223;
}

/* ---- アコーディオン ------------------------------------------------ */
.faq-accordion {
  margin: 0;
  padding: 0;
}
.faq-accordion dt {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 0 48px 18px 0;
  border-bottom: 1px dashed #b32223;
  border-image: repeating-linear-gradient(
      to right,
      #b32223 0,
      #b32223 6px,
      transparent 6px,
      transparent 12px
    )
    100% 1;
  line-height: 1.6;
  margin-bottom: 48px;
}
.faq-accordion dt.is-open {
  margin-bottom: 0;
}
.faq-accordion dt::after {
  content: "\f107"; /* FontAwesome chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 600;
  position: absolute;
  right: 20;
  top: 40%;
  transform: translateY(-50%);
  transition: transform 0.2s;
}
.faq-accordion dt.is-open::after {
  transform: translateY(-50%) rotate(180deg);
}

.faq-accordion dd {
  display: none;
  margin: 0;
  padding: 25px 0 60px;
  line-height: 1.8;
}
.faq-accordion dd.is-open {
  display: block;
}

/* ---- 見出し下の点線 ------------------------------------------------ */
.page-hero + .riat-breadcrumb + main .faq-list::before {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
}

/* =====================================================
   buttons / util
   ===================================================== */
.faq-a p:first-child {
  margin-top: 0;
}
.faq-a p:last-child {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 48px;
}

/* 質問行全体をフレックスにして gap で間隔を付ける */
.faq-q {
  display: flex; /* ← 追加 */
  align-items: center;
  gap: 10px; /* ← 右側の余白をこれで確保 */
  color: #b32223;
  letter-spacing: 2px;
  font-weight: 500;
  font-size: 24px;
}

.faq-a p {
  padding-top: 5px;
  padding-left: 30px;
  padding-right: 30px;
  font-weight: 500;
  letter-spacing: 2px;
}
/* Q マークのデザイン例 */
.q-design {
  font-weight: 500;
  color: #b32223;
  /* バッジ状にするなら
  background:#b32223; color:#fff; padding:2px 6px; border-radius:2px;
  */
}

/* -------------------------------------------------
   Sidebar Layout
-------------------------------------------------*/
.faq-side {
  flex: 0 0 250px;
  background: #fdf9f9;
  padding: 24px 20px;
}
.faq-side__head {
  font-size: 15px;
  font-weight: 700;
  margin: 30px 0 12px;
  position: relative;
  color: #5c1816;
  letter-spacing: 3px;
}
.faq-side__head::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  border-top: 1px dashed #b32223;
  border-image: repeating-linear-gradient(
      to right,
      #b32223 0,
      #b32223 8px,
      transparent 8px,
      transparent 16px
    )
    100% 1;
  margin-top: 12px;
}

/* ---------- Search box ---------- */
.search-form .search-field {
  position: relative;
  margin-bottom: 32px;
  width: 182px;
}
.search-form input[type="search"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #5c1816;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  height: 50px;
}
.search-form button {
  position: absolute;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 10px;
}

.icon-search {
  display: block;
  width: 12px;
  height: 12px;
  margin: 12px auto;
  background: url("data:image/svg+xml,%3Csvg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M505 442.7l-99.7-99.7c28.1-34.9 45-79 45-127.3 0-114.9-93.1-208-208-208S35 101 35 215.7 128.1 423.7 243 423.7c48.3 0 92.4-16.9 127.3-45l99.7 99.7c3.7 3.7 8.5 5.5 13.3 5.5s9.6-1.8 13.3-5.5c7.5-7.5 7.5-19.8 0-27.3zM243 383.7c-92.5 0-168-75.5-168-168S150.5 47.7 243 47.7s168 75.5 168 168-75.5 168-168 168z'/%3E%3C/svg%3E")
    no-repeat center/12px;
}

/* ---------- Category list ---------- */
.faq-cat__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.faq-cat__list li:not(:last-child) {
  margin-bottom: 8px;
}

.faq-cat__list a {
  display: block;
  text-align: center;
  padding: 10px 0;
  border: 1px solid #d7bcbc;
  border-radius: 2px;
  font-size: 14px;
  background: #ebc9c9;
  color: #fff; /* テキスト白 */
  transition: 0.2s;
}
.faq-cat__list a:hover {
  background: #d9b3b3;
}
.faq-cat__list a.is-active {
  background: #b32223;
  border-color: #b32223;
  font-weight: 700;
}

/* ─────────────────────────────
 *  FAQ 一覧ページの2カラムレイアウト
 * ──────────────────────────── */
/* .faq-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 3rem;
} */

/* ---- サイドバー ---- */
.faq-side {
  position: sticky; /* 追従させる肝 */
  top: 2rem; /* ← ヘッダー分だけ余白を空ける */
  align-self: start; /* grid アイテムとして上寄せ */

  /* スクロールしきれないほど長くなったら内部でスクロール */
  max-height: calc(100vh - 4rem); /* top + 余白を引いた高さ */
  overflow-y: auto; /* 可変で縦スクロール */
}

/* 通常状態 */
.faq-cat__list li a {
  display: block;
  padding: 0.6rem 1rem;
  background: #e7c1c1;
  border-radius: 4px;
  text-align: center;
  transition: 0.2s;
}

/* 選択中 */
.faq-cat__list li.is-active a {
  background: #a41010;
  color: #fff;
  font-weight: 700;
}

/* hover 共通 */
.faq-cat__list li a:hover {
  opacity: 0.8;
}

@media screen and (max-width: 768px) {
  .faq-wrapper {
    display: block;
    margin: 0 0 60px;
  }
  .faq-side {
    margin: 0 24px 24px;
    padding: 20px 20px;
    position: relative;
    top: 0;
  }
  .faq-side__head {
    margin-top: 0;
  }
  .faq-side h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  .search-form .search-field {
    width: 85%;
  }
  .faq-list {
    margin: 0 24px;
  }
  .riat-breadcrumb {
    margin-bottom: 0;
  }
  .faq-q {
    font-size: 16px;
  }
  .faq-a {
    font-size: 16px;
  }
  .faq-a p {
    padding-right: 0;
  }
  .search-form input[type="search"] {
    height: 50px;
  }
  .search-form button {
    background: none;
    width: 46px;
  }
  .faq-accordion {
    margin-top: 26px;
  }
  .faq-accordion dt {
    margin: 25px 0 10px;
    padding-bottom: 10px;
  }
  .faq-a p:last-child {
    font-size: 16px;
    font-weight: 500;
    line-height: 32px;
    padding-top: 20px;
  }
  .faq-accordion dd.is-open {
    padding: 0;
  }
  .is-open {
    margin-bottom: 0;
  }
  .faq-cat__list li.is-active a,
  .faq-cat__list li a {
    font-size: 20px !important;
  }
  .faq-side__head::after {
    margin-top: 20px;
  }
  .search-field {
    margin-bottom: 50px !important;
  }
}
