
/* FAQ Section */
.faq {
  background: #FFFFFF;
}

/* FAQ Tab Title */
.faq-tab__title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: 2rem;
  color: #3739A4;
  text-align: center;
  margin-bottom: 30px;
}
.faq-tab__title img {
  width: 24px;
  height: auto;
}

/* FAQ Tabs - 4列表示 */
.faq-tabs {
  flex-wrap: wrap;
  padding: 0 !important;
}

.faq-tabs .common__tab {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
}
.faq-tabs .common__tab::after {
  position: static;
  bottom: auto;
  left: auto;
  margin: 0 auto;
  transform: none;
}

.faq-tabs .common__tab .faq-tab__text {
  line-height: 1.25;
  font-size: 1.33rem;
  display: inline-block;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

.faq-tabs .common__tab:nth-child(4n) {
  border-right: none;
}

.faq-tabs .common__tab:nth-child(n+5) {
  border-top: 1px solid #9CA3AF;
}

@media (max-width: 767px) {
  .common__tabs.faq-tabs {
    flex-direction: row;
  }
  
  .faq-tabs .common__tab {
    flex: 0 0 100%;
    max-width: 50%;
    padding: 10px 5px;
    gap: 10px;
    border-right: none !important;
    border-bottom: 1px solid #9CA3AF;
  }
  .faq-tabs .common__tab span {
    font-size: 1.66rem;
  }
  .faq-tabs .common__tab .faq-tab__text {
    font-size: 1.08rem;
  }
  .faq-tabs .common__tab::after {
    width: 11px;
  }
  .faq-tabs .common__tab:nth-child(even) {
    border-left: 1px solid #9CA3AF;
  }
  .faq-tabs .common__tab:nth-child(4n) {
    border-right: none;
  }
  .faq-tabs .common__tab:nth-child(n+5) {
    border-top: none;
  }
  .faq-tabs .common__tab:nth-child(7),
  .faq-tabs .common__tab:last-child {
    border-bottom: none;
  }
}

.faq .container {
  padding: 50px 0 80px;
}

/* FAQ Section with scroll offset */
.faq-section {
  scroll-margin-top: 140px; /* Offset for fixed header */
}

.faq-section:not(:first-of-type) {
  padding-top: 40px; /* Add padding between sections */
}

.faq__item {
  width: 100%;
  box-shadow: 2px 2px 10px 0px #0000000D;
  margin-bottom: 30px;
  padding: 0 58px;
}

.faq__question {
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: 1.71rem;
  color: #3739A4;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 33px 0 26px;
}

.faq__icon {
  width: 22px;
  height: 11px;
  transition: transform 0.3s ease;
}

.faq__item.open .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 0;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-size: 1.29rem;
  color: #374151;
}

.faq__answer a {
  text-decoration: underline;
  color: #3739A4;
}

.faq__answer a:hover {
  opacity: 0.8;
}

.faq__item.open .faq__answer {
  max-height: 500px;
  padding: 26px 0 33px;
  border-top: 1px solid #000000;
}

@media (max-width: 767px) {
  .faq__item {
    padding: 0 15px;
  }
  .faq__question,
  .faq__item.open .faq__answer {
    padding: 15px 0;
  }
  .faq__question {
    font-size: 1.33rem;
  }
}