.faq-page-layout .footer_under {
  max-width: 100%;
}

.faq-page {
  --faq-red: #d80c18;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 56px;
  color: #161616;
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  line-height: 1.6;
}

.faq-page__intro {
  margin: 0 auto 40px;
  text-align: center;
}

.faq-page__intro h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
}

.faq-page__intro h1::after {
  display: block;
  width: 34px;
  height: 3px;
  margin: 6px auto 0;
  background: var(--faq-red);
  content: "";
}

.faq-page__intro p {
  margin: 34px 0;
  font-size: 16px;
  font-weight: 700;
}

.faq-page__nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 20px);
  margin: 0 0 56px;
  padding: 30px clamp(20px, 5.5vw, 78px);
  background: #fbd5d8;
}

.faq-page__nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 6px;
  border: 1px solid #222;
  border-radius: 3px;
  background: #fff;
  color: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
}

.faq-page__category-icon {
  display: block;
  width: var(--faq-icon-size, 18px);
  height: var(--faq-icon-size, 18px);
  flex: 0 0 var(--faq-icon-size, 18px);
  color: var(--faq-red);
}

.faq-page__nav a::after,
.faq-page__question summary::after {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background: url("../img/gnav/arrow_down.svg") center / contain no-repeat;
  content: "";
}

.faq-page__section {
  scroll-margin-top: 120px;
  margin-bottom: 40px;
}

.faq-page__section h2 {
  --faq-icon-size: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.faq-page__question {
  margin: 0 0 16px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #eee;
}

.faq-page__question[open] {
  border-color: var(--faq-red);
  background: #fff;
}

.faq-page__question summary {
  display: flex;
  min-height: 65px;
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  list-style: none;
  cursor: pointer;
}

.faq-page__question summary::-webkit-details-marker {
  display: none;
}

.faq-page__question summary::after {
  margin-left: auto;
}

.faq-page__question[open] summary::after {
  transform: rotate(180deg);
}

.faq-page__number {
  align-self: center;
  flex: 0 0 auto;
  color: var(--faq-red);
}

.faq-page__answer {
  margin: 0 24px;
  padding: 20px 0;
  border-top: 1px solid #aaa;
  font-size: 16px;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.faq-page__contact {
  padding: 32px 16px 38px;
  border: 1px solid #555;
  text-align: center;
}

.faq-page__contact h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.faq-page__contact p {
  margin: 12px 0 18px;
}

.faq-page__contact a {
  display: inline-block;
  padding: 12px 24px;
  background: var(--faq-red);
  color: #fff;
  font-weight: 700;
}

.faq-page__media {
  padding: 36px 24px;
  background: #333;
  text-align: center;
}

.faq-page__media a {
  display: inline-grid;
  justify-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.faq-page__media img {
  width: min(180px, 100%);
  height: auto;
}

.faq-page__media span {
  padding: 4px 14px;
  border: 1px solid currentColor;
}

@media (max-width: 834px) {
  .faq-page {
    width: calc(100% - 32px);
    padding-bottom: 36px;
    letter-spacing: 0.01em;
  }

  .faq-page__intro {
    margin-bottom: 28px;
    padding-top: 16px;
  }

  .faq-page__intro h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .faq-page__intro h1::after {
    width: 28px;
  }

  .faq-page__intro p {
    margin: 26px 0 0;
    font-size: 14px;
  }

  .faq-page .faq-page__social {
    display: none;
  }

  .faq-page__nav {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 28px;
    padding: 16px;
  }

  .faq-page__nav a {
    box-sizing: border-box;
    min-height: 42px;
    justify-content: flex-start;
    padding-inline: 24px;
    font-size: 14px;
  }

  .faq-page__nav a::after {
    margin-left: auto;
  }

  .faq-page__section {
    scroll-margin-top: 70px;
    margin-bottom: 28px;
  }

  .faq-page__section h2 {
    --faq-icon-size: 22px;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 22px;
  }

  .faq-page__question {
    margin-bottom: 10px;
  }

  .faq-page__question summary {
    min-height: 52px;
    padding: 12px 16px;
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .faq-page__answer {
    margin-inline: 16px;
    padding-block: 12px;
    font-size: 14px;
    white-space: pre-wrap;
  }

  .faq-page__contact {
    padding-block: 20px;
  }

  .faq-page__contact h2 {
    font-size: 17px;
  }

  .faq-page__contact p {
    font-size: 13px;
  }
}
