/* トップページとFAQページで使う質問・回答の共通表示
 * 通常の指定 → 条件別の調整の順序を保っています。
 * @media は画面幅などの条件です。追記前に同じセレクター名を検索してください。
 */

/* よくあるご質問 */

.home-faq-all {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: 56px;
  padding: 0 18px 0 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  transition: color 0.4s,
    border-color 0.4s,
    box-shadow 0.4s,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.62);
  margin-top: auto;
  color: #fff;
  background: transparent;
}

.home-faq-all:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  background: #fff;
}

.home-faq-all b {
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.35s;
}

.home-faq-all:is(:hover, .is-hover):before,
.home-faq-all:focus-visible:before {
  transform: scaleX(1);
  transform-origin: left;
}

.home-faq-all:is(:hover, .is-hover) b,
.home-faq-all:focus-visible b {
  transform: translateX(5px);
}

/* 上下余白は index.css で指定 */
.home-faq-section {
  background: #e9eef1;
  color: var(--ink);
}

.home-faq-section > .container {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(24px, 4.5vw, 66px);
  align-items: start;
}

.home-faq-head {
  position: sticky;
  top: 142px;
  min-height: 430px;
  margin: 0;
  padding: clamp(34px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(145deg, #760000 0%, #8e0000 58%, #aa1117 100%);
  color: #fff;
  box-shadow: 0 24px 54px rgba(66, 9, 12, 0.2);
  overflow: hidden;
}

.home-faq-head:after {
  content: "?";
  position: absolute;
  right: -8px;
  bottom: -48px;
  font: 900 230px/1 Arial,
    sans-serif;
  color: rgba(255, 255, 255, 0.065);
  pointer-events: none;
}

.home-faq-head > div,
.home-faq-head > p,
.home-faq-head > .home-faq-all {
  position: relative;
  z-index: 1;
}

.home-faq-head .eyebrow {
  color: #f2c7c9;
}

.home-faq-head h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.28;
  letter-spacing: -0.035em;
  color: #fff;
}

.home-faq-head > p {
  margin: 24px 0 30px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 2;
  color: #f9f3f2;
}

.home-faq-all:is(:hover, .is-hover),
.home-faq-all:focus-visible {
  color: var(--red);
  border-color: #fff;
  box-shadow: 0 13px 30px rgba(45, 0, 0, 0.2);
  transform: translateY(-2px);
}

.home-faq-list {
  counter-reset: homefaq;
  display: grid;
  gap: 12px;
}

.home-faq-list .faq-item {
  counter-increment: homefaq;
  border: 1px solid #d8dee2;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 44, 52, 0.055);
  transition: border-color 0.35s,
    box-shadow 0.4s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-faq-list .faq-item:is(:hover, .is-hover) {
  border-color: #c1cbd1;
  box-shadow: 0 16px 34px rgba(31, 44, 52, 0.1);
  transform: translateY(-2px);
}

.home-faq-list .faq-item.is-open {
  border-color: #d8b5b6;
  box-shadow: 0 18px 40px rgba(83, 13, 17, 0.11);
}

.home-faq-list .faq-item > button {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  gap: 18px;
  min-height: 90px;
  padding: 17px 24px;
  background: transparent;
  color: var(--ink);
  font-size: clamp(14px, 1.35vw, 17px);
}

.home-faq-list .faq-item > button:before {
  /* 番号なしの「Q」のみ（FAQページと統一） */
  content: "Q";
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #f3e5e5;
  font: italic 900 18px/1 Georgia,
    serif;
  letter-spacing: 0;
  color: var(--red);
  transition: background 0.35s,
    color 0.35s;
}

.home-faq-list .faq-item > button:after {
  display: none;
}

.home-faq-list .faq-item > button:hover,
.home-faq-list .faq-item > button:focus-visible {
  padding-inline: 24px;
  color: var(--red);
}

.home-faq-list .faq-item.is-open > button:before {
  background: var(--red);
  color: #fff;
}

.home-faq-list .faq-item > button b {
  grid-column: 3;
  width: 38px;
  height: 38px;
  background: #eef1f3;
  border: 0;
  color: var(--red);
}

.home-faq-list .faq-item.is-open > button b {
  background: #171413;
  color: #fff;
}

.home-faq-list .faq-answer {
  transition: grid-template-rows 0.64s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s ease;
}

.home-faq-list .faq-answer > div {
  position: relative;
}

.home-faq-list .faq-answer p {
  position: relative;
  max-width: none;
  margin: 0 24px 0 98px;
  padding: 20px 24px 28px 48px;
  border-top: 1px solid #e5e8ea;
  color: #3f474c;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 2;
  transform: translateY(-9px);
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s ease;
}

.home-faq-list .faq-answer p:before {
  content: "A";
  position: absolute;
  left: 4px;
  top: 23px;
  font: italic 900 19px/1 Georgia,
    serif;
  color: var(--red);
}

.home-faq-list .faq-item.is-open .faq-answer p {
  transform: translateY(0);
}

.home-faq-mobile-link {
  display: none;
}

@media (max-width: 900px) {
  .home-faq-section > .container {
    grid-template-columns: 1fr;
  }

  .home-faq-head {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .home-faq-head > .home-faq-all {
    display: none;
  }

  .home-faq-mobile-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
  }

  .home-faq-mobile-link .home-faq-all {
    width: 100%;
    margin: 0;
    background: var(--red);
    border-color: var(--red);
    color: #fff;
  }

  .home-faq-mobile-link .home-faq-all:before {
    background: #000;
  }

  .home-faq-mobile-link .home-faq-all:is(:hover, .is-hover) {
    color: #fff;
    border-color: #000;
  }
}

@media (max-width: 650px) {
  .home-faq-head {
    padding: 30px 24px;
  }

  .home-faq-head h2 {
    font-size: 34px;
  }

  .home-faq-title-break {
    display: none;
  }

  .home-faq-head > p {
    margin-block: 18px 0;
    font-size: 12px;
  }

  .home-faq-lead-break {
    display: none;
  }

  .home-faq-head:after {
    font-size: 170px;
  }

  .home-faq-list {
    gap: 9px;
  }

  .home-faq-list .faq-item > button {
    grid-template-columns: 40px minmax(0, 1fr) 32px;
    gap: 10px;
    min-height: 76px;
    padding: 12px 14px;
    font-size: 13px;
  }

  .home-faq-list .faq-item > button:hover {
    padding-inline: 14px;
  }

  .home-faq-list .faq-item > button:before {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .home-faq-list .faq-item > button b {
    width: 30px;
    height: 30px;
  }

  .home-faq-list .faq-answer p {
    margin: 0 14px 0 54px;
    padding: 15px 10px 22px 35px;
    font-size: 12.5px;
    line-height: 1.9;
  }

  .home-faq-list .faq-answer p:before {
    left: 2px;
    top: 18px;
    font-size: 16px;
  }

  .home-faq-mobile-link .home-faq-all {
    width: 100%;
  }
}
