/* ================================================= ground rules
   共通・レイアウト設定
   ================================================= */
.faq-section {
  max-width: 900px;
  margin: 40px auto;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
}
@media screen and (max-width: 768px) {
  .faq-section {
    padding: 0 25px;
  }
}

/* ================================================= tab navigation
   タブメニューのスタイル
   ================================================= */
.tab-group {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
  border-bottom: 2px solid #f0f0f0;
}

.tab-item {
  padding: 15px 40px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #888;
  position: relative;
  transition: color 0.3s ease;
}
@media screen and (max-width: 768px) {
  .tab-item {
    padding: 5px 15px;
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
  }
}
.tab-item br {
  display: none;
}
@media screen and (max-width: 768px) {
  .tab-item br {
    display: block;
  }
}

/* マウスホバー時 */
.tab-item:hover {
  color: #39B67C;
}

/* アクティブなタブ（現在選択中） */
.tab-item.is-active {
  color: #39B67C;
}

/* アクティブなタブの下線 */
.tab-item.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px; /* 親のborder-bottomに重ねる */
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #39B67C;
}

/* ================================================= tab content display
   コンテンツの表示・非表示
   ================================================= */
.tab-content {
  display: none; /* 初期は非表示 */
}

.tab-content.is-active {
  display: block; /* アクティブ時のみ表示 */
  animation: faqFadeIn 0.6s ease forwards;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================= accordion
   アコーディオン（FAQ本体）
   ================================================= */
.faq-list {
  margin: 0;
  padding: 0;
}

.faq-item {
  border-bottom: 1px solid #e5e5e5;
}

/* 質問部分 (dt) */
.faq-question {
  position: relative;
  background-color: rgb(125 207 169 / 0.5);
  color: #333;
  margin: 8px 0;
  padding: 25px 60px 25px 20px;
  font-weight: bold;
  font-size: 17px;
  line-height: 1.5;
  transition: background-color 0.3s;
  cursor: pointer;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}
@media screen and (max-width: 768px) {
  .faq-question {
    padding: 15px 40px 15px 15px;
    font-size: 14px;
  }
}

.faq-question:hover {
  background-color: #c2ffe0;
}

/* ＋アイコンの作成 */
.faq-question::before,
.faq-question::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 50%;
  background-color: #39B67C;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@media screen and (max-width: 768px) {
  .faq-question::before {
    right: 15px;
  }
}

/* 横棒 */
.faq-question::before {
  width: 16px;
  height: 2px;
  margin-top: -1px;
}

/* 縦棒 */
.faq-question::after {
  width: 2px;
  height: 16px;
  margin-top: -8px;
  right: 32px; /* 中央に配置 */
}
@media screen and (max-width: 768px) {
  .faq-question::after {
    right: 22px;
  }
}

/* 開いた時のアイコン変化（縦棒を回転させて隠す） */
.faq-question.is-active::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* 回答部分 (dd) */
.faq-answer {
  margin: 0;
  padding: 0;
  max-height: 0;       /* 初期は高さを0にする */
  overflow: hidden;    /* はみ出しを隠す */
  opacity: 0;          /* 透明にする */
  background-color: #f9f9f9;
  /* ゆっくり開閉させる設定 */
  transition:
    max-height 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
}

/* 開いた状態の回答部分 */
.faq-answer.is-open {
  max-height: 1200px;  /* コンテンツ量に応じて十分な高さを設定 */
  opacity: 1;
}

/* 回答の中身の余白調整 */
.answer-inner {
  padding: 20px 20px 30px;
  line-height: 1.8;
  font-size: 16px;
  font-weight: 600;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}
@media screen and (max-width: 768px) {
	.answer-inner {
    padding: 15px 40px 15px 15px;
    font-size: 14px;
    line-height: 1.5;
  }
}

.answer-inner a:link{
  color: #39B67C;
  text-decoration: none;
}

.answer-inner p {
  margin: 0 0 1em;
}

.answer-inner p:last-child {
  margin-bottom: 0;
}
