/* ========================================================
 * faq.css
 * - FAQ単一（single-faq）
 * - FAQ一覧（/faq）
 * - FAQアーカイブ hero は診療科コラムアーカイブ準拠
 * ====================================================== */

/* ========================================================
 * 0. FAQカテゴリ共通カラーフック
 * ====================================================== */

.faq-category-color{
  background-color: var(--faq-bg);
  color: var(--faq-text);
}


/* ========================================================
 * 1. 単一FAQ記事（single-faq）
 * ====================================================== */

.faq-article__cats{
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
}

.faq-article__cat{
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3f9;
}

.faq-article__title{
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: var(--page-title-color, var(--brand));
}

.faq-article__question-label,
.faq-article__answer-label{
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
}

.faq-article__note{
  margin-top: 32px;
  padding: 16px 20px;
  border-left: 4px solid #004b8d;
  background: #f5f7fa;
}

.faq-article__note-title{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}


/* ========================================================
 * 2. FAQカテゴリ割り当て
 * ====================================================== */

.faq-cat-jushin       { --faq-bg: var(--faq-jushin-bg);       --faq-text: var(--faq-jushin-text); }
.faq-cat-gairai       { --faq-bg: var(--faq-gairai-bg);       --faq-text: var(--faq-gairai-text); }
.faq-cat-kensa        { --faq-bg: var(--faq-kensa-bg);        --faq-text: var(--faq-kensa-text); }
.faq-cat-nyuin        { --faq-bg: var(--faq-nyuin-bg);        --faq-text: var(--faq-nyuin-text); }
.faq-cat-menkai       { --faq-bg: var(--faq-menkai-bg);       --faq-text: var(--faq-menkai-text); }
.faq-cat-ryokin-hoken { --faq-bg: var(--faq-ryokin-hoken-bg); --faq-text: var(--faq-ryokin-hoken-text); }
.faq-cat-shindansho   { --faq-bg: var(--faq-shindansho-bg);   --faq-text: var(--faq-shindansho-text); }
.faq-cat-kusuri       { --faq-bg: var(--faq-kusuri-bg);       --faq-text: var(--faq-kusuri-text); }
.faq-cat-kyukyu       { --faq-bg: var(--faq-kyukyu-bg);       --faq-text: var(--faq-kyukyu-text); }
.faq-cat-iryo-renkei  { --faq-bg: var(--faq-iryo-renkei-bg);  --faq-text: var(--faq-iryo-renkei-text); }
.faq-cat-gan          { --faq-bg: var(--faq-gan-bg);          --faq-text: var(--faq-gan-text); }
.faq-cat-shisetsu     { --faq-bg: var(--faq-shisetsu-bg);     --faq-text: var(--faq-shisetsu-text); }
.faq-cat-sonota       { --faq-bg: var(--faq-sonota-bg);       --faq-text: var(--faq-sonota-text); }


/* ========================================================
 * 3. FAQ一覧ページ（/faq）
 * ====================================================== */

.site-main--faq-archive{
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  padding-bottom: 72px;
  overflow-x: clip;
}

@supports not (overflow-x: clip){
  .site-main--faq-archive{
    overflow-x: hidden;
  }
}

.site-main--faq-archive,
body.single-faq{
  --page-title-color: var(--brand);
}

.site-main--faq-archive .faq-archive-container{
  width: min(100%, 1120px);
  margin: 0 auto;
  padding-right: 20px;
  padding-left: 20px;
}

.site-main--faq-archive > .column-archive-hero,
.site-main--faq-archive > .column-archive-breadcrumb-wrap{
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.site-main--faq-archive .column-archive-hero{
  position: relative;
  min-height: 274px;
  overflow: hidden;
  background: #EDF3F5;
}

.site-main--faq-archive .column-archive-hero__inner{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: 1120px;
  height: 274px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-main--faq-archive .column-archive-hero__heading{
  max-width: 700px;
}

.site-main--faq-archive .column-archive-hero__title{
  margin: 0;
  color: #2F2F2F;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 500;
}

.site-main--faq-archive .column-archive-hero__bg{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.site-main--faq-archive .column-archive-hero__bg img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-main--faq-archive .column-archive-breadcrumb-wrap{
  padding: 20px 0 0;
  background: #fff;
}

.site-main--faq-archive .column-archive-breadcrumb{
  display: flex;
  justify-content: flex-end;
}

.site-main--faq-archive .column-archive-breadcrumb__list{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #6B6B6B;
  font-size: 14px;
  line-height: 1.6;
}

.site-main--faq-archive .column-archive-breadcrumb__item{
  display: inline-flex;
  align-items: center;
}

.site-main--faq-archive .column-archive-breadcrumb__item + .column-archive-breadcrumb__item::before{
  content: "/";
  margin-right: 14px;
  color: #9AA4AE;
}

.site-main--faq-archive .column-archive-breadcrumb__item a{
  color: #6B6B6B;
}

.site-main--faq-archive .column-archive-breadcrumb__item[aria-current="page"]{
  color: #1759A5;
}

.site-main--faq-archive .page-archive--faq{
  width: min(100%, 1120px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 0;
}


/* ========================================================
 * 4. 上部カテゴリナビ
 * ====================================================== */

.faq-global-nav{
  margin: 0 0 56px;
}

.faq-global-nav__list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}

.faq-global-nav__item{
  margin: 0;
}

.faq-global-nav__link{
  display: block;
  text-decoration: none !important;
}

.faq-global-nav__link:hover,
.faq-global-nav__link:focus-visible{
  text-decoration: none !important;
}

.faq-global-nav__badge{
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 57px;
  padding: 0 52px 0 18px;
  border: 1px solid #2D78D2;
  border-radius: 999px;
  background: #fff;
  color: #2F2F2F;
  box-shadow: none;
  transition:
    background-color .15s ease,
    color .15s ease,
    transform .12s ease;
  text-decoration: none !important;
}

.faq-global-nav__badge,
.faq-global-nav__badge *{
  text-decoration: none !important;
}

.faq-global-nav__link:hover .faq-global-nav__badge,
.faq-global-nav__link:focus-visible .faq-global-nav__badge{
  background: #4F93D8;
  color: #fff;
  transform: translateY(-1px);
}

.faq-global-nav__badge::after{
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1759A5;
  transform: translateY(-50%);
  transition: background-color .15s ease;
}

.faq-global-nav__badge::before{
  content: "";
  position: absolute;
  right: 19px;
  top: 50%;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-65%) rotate(45deg);
}

.faq-global-nav__link:hover .faq-global-nav__badge::after,
.faq-global-nav__link:focus-visible .faq-global-nav__badge::after{
  background: #2D78D2;
}

.faq-global-nav__name{
  display: block;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.faq-global-nav__count{
  display: none;
}


/* ========================================================
 * 5. セクション
 * ====================================================== */

.faq-archive-sections{
  display: grid;
  gap: 52px;
}

.faq-section{
  margin: 0;
  scroll-margin-top: 110px;
}

.faq-section__header{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #2F2F2F !important;
}

.faq-section__header::before{
  display: none;
}

.faq-section__title{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 18px;
  font-size: 24px;
  line-height: 1.5;
  font-weight: 400;
  color: #2F2F2F;
}

.faq-section__title::before{
  content: "";
  width: 10px;
  height: 30px;
  background: #1759A5;
  flex: 0 0 auto;
}

.faq-section__title::after{
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 10px;
  height: 10px;
  border-radius: 20px 20px 0 0;
  background: #30A229;
}


/* ========================================================
 * 6. FAQアコーディオン
 * ====================================================== */

.faq-section__list{
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.faq-article{
  border: 1px solid #2D78D2;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}

.faq-article + .faq-article{
  margin-top: 16px;
}

.faq-article__question{
  position: relative;
  width: 100%;
  min-height: 72px;
  padding: 18px 24px 18px 68px;
  text-align: left;
  display: flex;
  align-items: center;
  border: 0;
  background: #EEF3F6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
  color: #2F2F2F;
  box-sizing: border-box;
}

.faq-article__question::after{
  display: none;
}

.faq-article__q-icon{
  position: absolute;
  left: 16px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1759A5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 21px;
  line-height: 1;
  padding-bottom: 2px;
}

.faq-article__q-text{
  display: block;
  width: 100%;
  padding: 0;
  color: #2F2F2F;
  text-decoration: none !important;
  word-break: normal;
  overflow-wrap: break-word;
}

.faq-article__q-text::after{
  display: none !important;
}

.faq-article__question:hover .faq-article__q-text::after,
.faq-article__question:focus-visible .faq-article__q-text::after{
  display: none !important;
}

.faq-article__answer{
  height: 0;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transition:
    height 0.32s ease,
    opacity 0.2s ease;
}

.faq-article__answer-inner{
  position: relative;
  min-height: 72px;
  padding: 18px 24px 18px 68px;
  border-top: 1px solid #2D78D2;
  box-sizing: border-box;
  font-size: 18px;
  line-height: 1.7;
  color: #2F2F2F;
  word-break: normal;
  overflow-wrap: break-word;
}

.faq-article__answer-inner::before{
  content: "A";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2FA53A;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 21px;
  line-height: 1;
  padding-bottom: 2px;
  padding-left: 2px;
}

.faq-article__answer-inner p{
  margin: 0 0 10px;
}

.faq-article__answer-inner p:last-child{
  margin-bottom: 0;
}

.faq-article__answer-inner a{
  word-break: normal;
  overflow-wrap: anywhere;
}

.js-faq-item.is-open .faq-article__answer{
  opacity: 1;
}


/* ========================================================
 * 7. 空時
 * ====================================================== */

.faq-section__empty{
  margin: 0;
  font-size: 14px;
  color: #666;
}


/* ========================================================
 * 8. FAQ 右サポートナビ
 * ====================================================== */

.faq-support-nav{
  display: none;
}


/* =========================================================
 * 9. FAQ 注意事項（archive / taxonomy / single 共通）
 * ======================================================= */

.faq-notice{
  margin-top: 56px;
  padding: 0 0 16px;
}

.faq-notice__inner{
  max-width: 1100px;
  margin-inline: auto;
  padding: 16px;
  background: #f7f7f7;
  border-radius: 12px;
}

.faq-notice__title{
  margin: 0 0 10px;
  font-size: 16px;
}

.faq-notice__list{
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.faq-notice__item{
  position: relative;
  padding-left: 1.2em;
  margin: 0 0 8px;
  line-height: 1.7;
}

.faq-notice__item::before{
  content: "・";
  position: absolute;
  left: 0;
  top: 0;
}

.faq-notice__contact{
  margin: 10px 0 0;
  font-size: 14px;
}

/* ----------------------
   FAQ：＋ / − アイコン
---------------------- */
.faq-item__question {
  padding-right: 56px; /* 右にアイコン分余白 */
}

/* ＋表示（初期） */
.faq-article__question::after{
  display: block; /* ←これが重要 */
  content: "+";
  
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 400;
  color: #1759A5;
}
/* 開いたら − */
.js-faq-item.is-open .faq-article__question::after{
  content: "−";
}

/* ========================================================
 * 10. タブレット
 * ====================================================== */

@media (max-width: 1024px){
  .faq-global-nav__list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ========================================================
 * 11. モバイル
 * ====================================================== */

@media (max-width: 767px){
  .site-main--faq-archive{
    padding-bottom: 56px;
  }

  .site-main--faq-archive .column-archive-hero{
    min-height: 180px;
  }

  .site-main--faq-archive .column-archive-hero__inner{
    height: 180px;
    padding: 0 16px;
  }

  .site-main--faq-archive .column-archive-hero__title{
    font-size: 28px;
  }

  .site-main--faq-archive .column-archive-breadcrumb-wrap{
    padding-top: 14px;
  }

  .site-main--faq-archive .column-archive-breadcrumb{
    justify-content: flex-start;
  }

  .site-main--faq-archive .column-archive-breadcrumb__list{
    justify-content: flex-start;
    font-size: 12px;
    gap: 6px 10px;
  }

  .site-main--faq-archive .column-archive-breadcrumb__item + .column-archive-breadcrumb__item::before{
    margin-right: 10px;
  }

  .site-main--faq-archive .page-archive--faq{
    padding: 24px 16px 0;
  }

  .faq-global-nav{
    margin-bottom: 40px;
  }

  .faq-global-nav__list{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .faq-global-nav__badge{
    min-height: 57px;
    padding: 0 52px 0 16px;
  }

  .faq-global-nav__name{
    font-size: 20px;
  }

  .faq-archive-sections{
    gap: 40px;
  }

  .faq-section{
    scroll-margin-top: 90px;
  }

  .faq-section__header{
    gap: 8px;
    margin-bottom: 14px;
  }

  .faq-section__header::before{
    display: none;
  }

  .faq-section__title{
    display: block;
    margin: 40px 0 14px;
    padding-left: 22px;
    font-size: 20px;
    line-height: 1.4;
  }

  .faq-section__title::before{
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 10px;
    height: calc(100% - 0.2em);
    min-height: 30px;
  }

  .faq-section__title::after{
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
  }

  .faq-article + .faq-article{
    margin-top: 12px;
  }

  .faq-article{
    border-radius: 18px;
  }

  .faq-article__question{
    min-height: 60px;
    padding: 14px 16px 14px 54px;
    font-size: 14px;
    line-height: 1.7;
  }

  .faq-article__q-icon{
    left: 12px;
    top: 14px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .faq-article__answer-inner{
    min-height: 60px;
    padding: 14px 16px 14px 54px;
    font-size: 14px;
    line-height: 1.7;
  }

  .faq-article__answer-inner::before{
    left: 12px;
    top: 14px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .faq-notice{
    margin-top: 40px;
  }

  .faq-notice__inner{
    padding: 14px;
  }

  .faq-notice__title{
    font-size: 15px;
  }

  .faq-notice__contact{
    font-size: 13px;
  }
}