/* ==========================================================================
   Q&A Page Styles
   ========================================================================== */

.qa-page {
  max-width: calc(1000px + var(--pc-gutter) * 2);
  margin: 0 auto;
  padding: 80px var(--pc-gutter) 120px;
}

.qa-header {
  text-align: center;
  margin-bottom: 77px;
}

.qa-title {
  font-family: var(--font-en);
  font-size: 150px;
  font-weight: bold;
  line-height: 1;
}


/* --- Accordion List --- */
.qa-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid black;
}

.qa-item {
  border-bottom: 1px solid black;
}

.qa-question {
  display: flex;
  align-items: center;
  gap: 35.5px;
  padding: 30px 32px 38px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.qa-q,
.qa-a {
  font-family: var(--font-en);
  font-size: 55px;
  line-height: 1;
  flex-shrink: 0;
}

.qa-q-text {
  font-family: var(--font-jp);
  font-size: 24px;
  line-height: 27.38px;
  flex: 1;
}

.qa-toggle {
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  position: relative;
  margin: auto;
  transition: transform 0.4s ease-in-out;
  background: url(../img/qa/plus.svg) center center / contain no-repeat;
}

.qa-item.is-open .qa-toggle {
  transform: rotate(45deg);
}


/* --- Answer --- */
.qa-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  display: flex;
  flex-direction: row;
  gap: 35.5px;
  align-items: flex-start;
  margin: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
  padding: 0 32px;

  .qa-item.is-open & {
    max-height: 1000px;
    opacity: 1;
  }
}

.qa-a {
  padding-top: 2px;
}

.qa-a-body {
  flex: 1;
  font-family: var(--font-jp);
  padding-top: 24px;
  padding-bottom: 28px;
  margin: 0;

  display: flex;
  gap: 78.8px;

  & p {
    margin: 0;
    font-size: 18px;
    line-height: 30px;
  }

  .qa-image {
    flex-shrink: 0;
    width: var(--pc-width, 290px);
    height: auto;

    & img {
      width: 100%;
      height: auto;
      display: block;
    }
  }
}

.qa-modal-trigger {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-jp);
  font-size: 18px;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;

  &:hover {
    opacity: 0.6;
  }
}


/* === Modal === */
.qa-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;

  &.is-open {
    pointer-events: auto;
    opacity: 1;
  }
}

.qa-modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.qa-modal-box {
  position: relative;
  background: #F8F8F8;
  padding: 23.5px 114px 65.8px;

  max-width: 960px;
  width: 100%;
  aspect-ratio: 960 / 688;

  overflow-y: auto;
  z-index: 1;
  border-radius: 8px;
}

.qa-modal-close {
  position: absolute;
  top: 40px;
  right: 40px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  color: #000;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    opacity: 0.5;
  }
}

.qa-modal-image {
  width: 100%;
  height: auto;
  display: block;
}

/* === スマホ版 === */
@media screen and (max-width: 1170px) {
  .qa-page {
    padding: calc(80vw / var(--p)) var(--pc-gutter) calc(120vw / var(--p));
  }

  .qa-header {
    margin-bottom: calc(77vw / var(--p));
  }

  .qa-title {
    font-size: calc(150vw / var(--p));
  }

  .qa-question {
    gap: calc(35.5vw / var(--p));
    padding: calc(30vw / var(--p)) calc(32vw / var(--p)) calc(38vw / var(--p));
  }

  .qa-answer {
    gap: calc(35.5vw / var(--p));
    padding: 0 calc(32vw / var(--p));
  }

  .qa-a-body {
    padding-top: calc(24vw / var(--p));
    padding-bottom: calc(28vw / var(--p));

    p {
      font-size: calc(18vw / var(--p));
      line-height: calc(30vw / var(--p));
    }
  }

  .qa-q,
  .qa-a {
    font-size: calc(55vw / var(--p));
  }

  .qa-q-text {
    font-size: calc(24vw / var(--p));
    line-height: calc(27.38vw / var(--p));
  }

  .qa-modal-trigger {
    font-size: calc(18vw / var(--p));
    text-underline-offset: calc(3vw / var(--p));
  }
}

@media screen and (max-width: 768px) {
  .qa-page {
    padding: calc(55.5vw / var(--s)) var(--sp-gutter);
  }

  .qa-header {
    margin-bottom: calc(40vw / var(--s));
  }

  .qa-title {
    font-size: calc(103vw / var(--s));
  }

  .qa-question {
    gap: calc(21.5vw / var(--s));
    padding: calc(16vw / var(--s)) 0 calc(19vw / var(--s)) calc(10vw / var(--s));
  }

  .qa-q,
  .qa-a {
    font-size: calc(30vw / var(--s));
  }

  .qa-q-text {
    font-size: calc(14vw / var(--s));
    line-height: calc(27.38vw / var(--s));
  }

  .qa-toggle {
    width: calc(21vw / var(--s));
    height: calc(21vw / var(--s));
    background-image: url('../img/qa/plus-sp.svg');
  }

  .qa-answer {
    gap: calc(25vw / var(--s));
    padding: 0 0 0 calc(10vw / var(--s));
  }

  .qa-a {
    padding-top: calc(2vw / var(--s));
  }

  .qa-a-body {
    font-size: calc(13vw / var(--s));
    line-height: calc(21vw / var(--s));
    padding-top: calc(10vw / var(--s));
    padding-bottom: calc(40.3vw / var(--s));
    flex-direction: column;
    gap: calc(30vw / var(--s));

    p {
      font-size: calc(13vw / var(--s));
      line-height: calc(21vw / var(--s));
    }

    .qa-image {
      width: 100%;
      max-width: calc(200vw / var(--s));
    }
  }

  .qa-modal-trigger {
    font-size: calc(13vw / var(--s));
    text-underline-offset: calc(3vw / var(--s));
  }

  .qa-modal-box {
    padding: calc(47.7vw / var(--s)) calc(11.8vw / var(--s)) calc(47vw / var(--s)) calc(19.6vw / var(--s));
    margin: 0 var(--sp-gutter);
    border-radius: calc(8vw / var(--s));
    aspect-ratio: 331 / 696;
    max-height: 90vh;
  }

  .qa-modal-content {
    overflow: scroll;
    height: 100%;
  }

  .qa-modal-close {
    position: absolute;
    top: calc(14.5vw / var(--s));
    right: calc(17.5vw / var(--s));
    width: calc(20vw / var(--s));
    height: calc(20vw / var(--s));
    padding: 0;

    img {
      width: 100%;
      height: auto;
      display: block;
    }
  }
}