.faq-section {
  background-color: #f5f5f5;
}

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

@media screen and (max-width: 768px) {
  .faq-section__container {
    padding: 30px 15px;
  }
}

.faq-section__title {
  text-align: center;
  font-size: 4.8rem;
  font-weight: 700;
  margin: 0;
  margin-bottom: 20px;
  color: #505050;
}

.faq-section__description {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.6rem;
  color: #505050;
}

.faq-section__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media screen and (max-width: 768px) {
  .faq-section__grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .faq-section__title {
    font-size: 3.2rem;
  }
}

/* カテゴリレベル（1段目） */
.faq-section__category {
  background-color: #fff;
  border-radius: 8px;
  transition: all 0.3s ease;
  height: fit-content;
}

.faq-section__category-details {
  width: 100%;
}

.faq-section__category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #505050;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  user-select: none;
}

.faq-section__category-title:hover {
  background-color: #f5f5f5;
}

.faq-section__category-title::after {
  flex-shrink: 0;
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
  border-radius: 1px;
  transform: rotate(45deg);
  transition: all 0.3s ease;
}

.faq-section__category.active .faq-section__category-title::after {
  transform: rotate(135deg);
}

.faq-section__category-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-section__category.active .faq-section__category-content {
  max-height: 1000px;
  padding: 10px;
}

/* 質問レベル（2段目） */
.faq-section__item {
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-section__details {
  width: 100%;
}

.faq-section__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #505050;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.faq-section__question:hover {
  background-color: #f5f5f5;
}

.faq-section__question::after {
  flex-shrink: 0;
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
  border-radius: 1px;
  transform: rotate(45deg);
  transition: all 0.3s ease;
}

.faq-section__item.active {
  background-color: #f5f5f5;
}

.faq-section__item.active .faq-section__question::after {
  transform: rotate(135deg);
}

.faq-section__answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  font-size: 1.4rem;
  line-height: 1.6;
  color: #505050;
  padding: 0 1.5rem;
}

.faq-section__item.active .faq-section__answer {
  max-height: 1000px;
  padding: 10px 15px;
}

.faq-section__answer p {
  margin: 0;
}

.faq-section__answer ul,
.faq-section__answer ol {
  margin: 10px 0;
  padding-left: 20px;
}

.faq-section__answer li {
  margin-bottom: 5px;
}

/* アクセシビリティ */
.faq-section__question:focus,
.faq-section__category-title:focus {
  outline: 2px solid var(--color-button);
  outline-offset: 2px;
}

/* 小さい画面での調整 */
@media screen and (max-width: 480px) {
  .faq-section__category-title {
    padding: 15px;
    font-size: 1.6rem;
  }

  .faq-section__question {
    padding: 12px;
    font-size: 1.4rem;
  }

  .faq-section__answer {
    font-size: 1.3rem;
  }
}
