/* ============================================================
   UNNOA — FAQ PAGE
   FAQページ専用スタイル
============================================================ */

/* ============================================================
   基本設定
============================================================ */

:root {
  --faq-header-height: 96px;
  --faq-anchor-space: 32px;
  --faq-adminbar-height: 0px;
}

/* WordPressログイン中の管理バー */
body.admin-bar {
  --faq-adminbar-height: 32px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top:
    calc(
      var(--faq-header-height) +
      var(--faq-anchor-space) +
      var(--faq-adminbar-height)
    );
}

/* ============================================================
   PAGE HEADER
============================================================ */

.page-header {
  padding-top: var(--faq-header-height);
  overflow: hidden;
  background-color: #f7f7f6;
  border-bottom: 1px solid var(--color-border);
}

.page-header-inner {
  width: min(100% - 48px, 1100px);
  margin: 0 auto;
  padding: 64px 0 72px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.ph-text {
  max-width: 640px;
}

.ph-en {
  display: block;
  margin: 0 0 10px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.24em;
  color: var(--color-accent);
}

.ph-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-main);
}

/* ============================================================
   FAQ MAIN
============================================================ */

.faq-main {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.faq-section-inner {
  width: min(100% - 48px, 1024px);
  margin: 0 auto;
  padding: 80px 0 96px;
}

/* ============================================================
   FAQ INTRO
============================================================ */

.faq-intro {
  margin-bottom: 48px;
  text-align: center;
}

.faq-intro .tit {
  margin: 0;
}

.faq-intro .tit .jp {
  display: block;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-main);
}

.faq-lead {
  max-width: 720px;
  margin: 20px auto 0;
  font-size: 15px;
  line-height: 2;
  color: var(--color-sub);
}

/* ============================================================
   CATEGORY NAVIGATION
============================================================ */

.faq-category-nav {
  margin-bottom: 72px;
}

.faq-category-nav .list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
}

.faq-category-nav .list li {
  margin: 0;
  padding: 0;
}

.faq-category-nav .list a {
  min-height: 58px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #cdced3;
  border-radius: 100px;
  background-color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  color: var(--color-main);
  text-decoration: none;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.faq-category-nav .list a::after {
  content: "↓";
  margin-left: 8px;
  font-size: 13px;
  color: #02a55e;
}

.faq-category-nav .list a:hover {
  color: #ffffff;
  background-color: #02a55e;
  border-color: #02a55e;
  box-shadow: 0 8px 20px rgba(2, 165, 94, 0.16);
  transform: translateY(-2px);
}

.faq-category-nav .list a:hover::after {
  color: #ffffff;
}

.faq-category-nav .list a:focus-visible {
  outline: 3px solid rgba(2, 165, 94, 0.25);
  outline-offset: 3px;
}

/* ============================================================
   FAQ CATEGORY
   固定ヘッダーとWordPress管理バーの両方を補正
============================================================ */

.faq-category {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  scroll-margin-top:
    calc(
      var(--faq-header-height) +
      var(--faq-anchor-space) +
      var(--faq-adminbar-height)
    );
}

.faq-category + .faq-category {
  margin-top: 88px;
}

/*
  scroll-margin-topがテーマ側のCSSなどで効かない場合の保険。
  アンカー移動時に見出し上部へ仮想的な余白を作ります。
*/
.faq-category::before {
  content: "";
  display: block;
  height:
    calc(
      var(--faq-header-height) +
      var(--faq-anchor-space) +
      var(--faq-adminbar-height)
    );
  margin-top:
    calc(
      (
        var(--faq-header-height) +
        var(--faq-anchor-space) +
        var(--faq-adminbar-height)
      ) * -1
    );
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================
   CATEGORY HEADING
============================================================ */

.faq-category-heading {
  width: 100%;
  min-height: 78px;
  margin: 0 0 30px;
  padding: 10px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  box-sizing: border-box;
  border-bottom: 1px solid #e2e3e4;
}

.faq-category-heading::after {
  content: "";
  width: 72px;
  height: 3px;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 100px;
  background-color: #02a55e;
}

.faq-category-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border-radius: 50%;
  background-color: #eaf8f1;
}

.faq-category-icon svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: #02a55e;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-category-heading-text {
  flex: 1;
  min-width: 0;
}

.faq-category-en {
  display: block;
  margin: 0 0 4px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  color: #02a55e;
}

.faq-category-title {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(21px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--color-main);
}

.faq-category-title::before,
.faq-category-title::after {
  content: none;
  display: none;
}

/* ============================================================
   FAQ ACCORDION
============================================================ */

.faq {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
}

.faq-item {
  margin: 16px 0 0;
  padding: 0;
  line-height: 1.8;
  text-align: left;
}

.faq-item:first-child {
  margin-top: 0;
}

.faq-item dt {
  min-height: 66px;
  margin: 0;
  padding: 18px 72px 18px 62px;
  display: flex;
  align-items: center;
  position: relative;
  box-sizing: border-box;
  border: 1px solid #cdced3;
  border-radius: 18px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--color-main);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.faq-item dt::before {
  content: "Q.";
  position: absolute;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #0cba6e;
}

.faq-item dt::after {
  content: "＋";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  border-radius: 50%;
  background-color: #eff0f2;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-main);
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.faq-item dt:hover {
  border-color: #02a55e;
  box-shadow: 0 5px 16px rgba(2, 165, 94, 0.1);
}

.faq-item dt:focus-visible {
  outline: 3px solid rgba(2, 165, 94, 0.22);
  outline-offset: 3px;
}

.faq-item dt.is-open,
.faq-item dt.close {
  border-color: #02a55e;
  background-color: #f7fcf9;
}

.faq-item dt.is-open::after,
.faq-item dt.close::after {
  content: "－";
  color: #ffffff;
  background-color: #02a55e;
}

.faq-item dd {
  margin: 0;
  padding: 24px 32px 8px 62px;
  display: none;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-sub);
}

.faq-item dd p {
  margin: 0;
}

.faq-item dd p + p {
  margin-top: 14px;
}

.faq-item dd .red {
  font-weight: 700;
  color: #d94a4a;
}

.faq-item dd .ti {
  padding-left: 1em;
  display: block;
  font-size: 13px;
  line-height: 1.8;
  text-indent: -1em;
  color: #777777;
}

/* ============================================================
   FAQ CONTACT
============================================================ */

.faq-contact {
  max-width: 880px;
  margin: 88px auto 0;
  padding: 48px 40px;
  box-sizing: border-box;
  border-radius: 20px;
  background-color: #f7f7f6;
  text-align: center;
}

.faq-contact-text {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--color-sub);
}

.faq-contact-button {
  width: min(100%, 340px);
  min-height: 60px;
  margin: 28px auto 0;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #02a55e;
  border-radius: 100px;
  background-color: #02a55e;
  box-shadow: 0 8px 20px rgba(2, 165, 94, 0.2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  text-decoration: none;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.faq-contact-button::after {
  content: "→";
  margin-left: 12px;
  transition: transform 0.25s ease;
}

.faq-contact-button:hover {
  color: #02a55e;
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 165, 94, 0.16);
  transform: translateY(-2px);
}

.faq-contact-button:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   TABLET
============================================================ */

@media screen and (max-width: 1039px) {
  .faq-section-inner {
    width: min(100% - 40px, 1024px);
    padding: 64px 0 80px;
  }

  .faq-category + .faq-category {
    margin-top: 72px;
  }
}

/* ============================================================
   SMARTPHONE
============================================================ */

@media screen and (max-width: 768px) {
  :root {
    --faq-header-height: 60px;
    --faq-anchor-space: 20px;
  }

  body.admin-bar {
    --faq-adminbar-height: 46px;
  }

  .page-header {
    padding-top: var(--faq-header-height);
  }

  .page-header-inner {
    width: min(100% - 40px, 1100px);
    padding: 48px 0 52px;
  }

  .faq-section-inner {
    width: min(100% - 32px, 1024px);
    padding: 56px 0 64px;
  }

  .faq-intro {
    margin-bottom: 36px;
  }

  .faq-intro .tit .jp {
    font-size: 22px;
  }

  .faq-lead {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.9;
    text-align: left;
  }

  .faq-lead br {
    display: none;
  }

  .faq-category-nav {
    margin-bottom: 56px;
  }

  .faq-category-nav .list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .faq-category-nav .list a {
    min-height: 52px;
    padding: 10px 18px;
    font-size: 14px;
  }

  .faq-category + .faq-category {
    margin-top: 64px;
  }

  .faq-category-heading {
    min-height: 64px;
    margin-bottom: 22px;
    padding: 8px 0 16px;
    gap: 12px;
  }

  .faq-category-heading::after {
    width: 58px;
  }

  .faq-category-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-basis: 48px;
  }

  .faq-category-icon svg {
    width: 22px;
    height: 22px;
  }

  .faq-category-en {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .faq-category-title {
    font-size: 20px;
  }

  .faq-item {
    margin-top: 12px;
  }

  .faq-item dt {
    min-height: 62px;
    padding: 15px 54px 15px 48px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.6;
  }

  .faq-item dt::before {
    left: 17px;
    font-size: 17px;
  }

  .faq-item dt::after {
    width: 30px;
    height: 30px;
    right: 14px;
    font-size: 17px;
  }

  .faq-item dd {
    padding: 20px 12px 8px 18px;
    font-size: 14px;
    line-height: 1.9;
  }

  .faq-contact {
    margin-top: 64px;
    padding: 36px 22px;
    border-radius: 16px;
  }

  .faq-contact-text {
    font-size: 14px;
    text-align: left;
  }

  .faq-contact-button {
    min-height: 56px;
    margin-top: 24px;
    font-size: 15px;
  }
}

/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .faq-category-nav .list a,
  .faq-item dt,
  .faq-item dt::after,
  .faq-contact-button,
  .faq-contact-button::after {
    transition: none;
  }
}