/* =========================================================
   recruit-faq.css
   - 採用FAQページ専用スタイル
   - アコーディオンUI / 数字見出し
   - Mobileレイアウト修正済み（回答エリア）
========================================================= */

/* --- Utilities --- */
.bg-gray {
  background-color: var(--color-gray-light);
  padding: 5rem 0;
}

/* ---------------------------------------------------------
   FAQ Category (数字デザイン)
--------------------------------------------------------- */
.faq-category {
  margin-bottom: 80px; /* カテゴリ間の余白 */
}
.faq-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1.4rem;
  color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-gray-border);
  padding-bottom: 15px;
  margin-bottom: 30px;
  font-weight: 700;
  display: flex;
  align-items: baseline; /* 数字と文字のベースラインを揃える */
  gap: 15px;
}

/* 数字のデザイン (01, 02...) */
.cat-num {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 2.2rem; /* 文字より大きく */
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  opacity: 0.25; /* 透けさせて背景のように見せる */
  position: relative;
  top: 3px;
}

/* ---------------------------------------------------------
   FAQ Accordion (details/summary)
--------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--color-gray-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
}

/* 開いている時のスタイル */
.faq-item[open] {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--color-primary-light);
}

/* --- 質問部分 (Summary) --- */
.faq-question {
  padding: 22px 60px 22px 25px; /* 右側に開閉アイコンのスペース確保 */
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  list-style: none; /* デフォルトの三角マーカーを消す */
  display: flex;
  align-items: flex-start;
  line-height: 1.6;
  transition: background-color 0.2s;
}
.faq-question:hover {
  background-color: #fcfcfc;
}
/* Webkit用デフォルトマーカー消去 */
.faq-question::-webkit-details-marker {
  display: none;
}

/* "Q." アイコン */
.q-icon {
  color: var(--color-primary);
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: 12px;
  flex-shrink: 0;
}

/* 開閉アイコン (+ / -) */
.toggle-icon {
  position: absolute;
  right: 25px;
  top: 50%; /* 常にエリアの縦中央 */
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
}
.toggle-icon::before,
.toggle-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-primary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 横棒 */
.toggle-icon::before {
  width: 100%;
  height: 2px;
  top: 8px;
  left: 0;
}
/* 縦棒 */
.toggle-icon::after {
  width: 2px;
  height: 100%;
  top: 0;
  left: 8px;
}

/* 開いている時は縦棒を回転させて「－」にする */
.faq-item[open] .toggle-icon::after {
  transform: rotate(90deg);
}

/* --- 回答部分 (Answer) --- */
.faq-answer {
  border-top: 1px solid #f0f0f0;
  background-color: #f9fbfd; /* ごく薄い青グレー */
  animation: slideDown 0.3s ease-out;
}

/* ★修正: Flex廃止、Block+Absoluteでレイアウト */
.answer-inner {
  position: relative; /* アイコン配置の基準点 */
  display: block; /* 縦積みにする */
  padding: 30px 25px 35px 60px; /* 左側にアイコン分の余白(60px)を確保 */
}

/* "A." アイコン (絶対配置) */
.a-icon {
  position: absolute;
  top: 30px; /* 親のpadding-topと同じ位置 */
  left: 25px; /* 左端からの距離 */

  color: #ff5252; /* 回答は赤系でアクセント */
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.6;
}

/* 回答テキスト */
.answer-inner p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 15px; /* 段落下の余白 */
}
.answer-inner p:last-child {
  margin-bottom: 0;
}

.answer-inner a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 700;
}

/* リスト (ol/ul) */
.answer-inner ul,
.answer-inner ol {
  margin-top: 10px;
  margin-bottom: 15px;
  margin-left: 0;
  padding-left: 1.5em; /* マーカー分のインデント */
  line-height: 1.8;
  color: var(--text-main);
}
.answer-inner li {
  margin-bottom: 5px;
}

/* 注釈 */
.note {
  font-size: 0.85rem;
  color: #666;
  display: block;
  margin-top: 5px;
}

/* --- テーブル (書類一覧など) --- */
.faq-table-wrap {
  margin-top: 20px;
  overflow-x: auto; /* スマホで横スクロール */
  width: 100%;
}
.faq-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ddd;
}
.faq-table th,
.faq-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  text-align: left;
  vertical-align: top;
}
.faq-table th {
  background-color: #eee;
  width: 30%;
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

/* --- Animation Keyframes --- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   Responsive (Mobile)
--------------------------------------------------------- */
@media (max-width: 600px) {
  /* 見出しの数字サイズ調整 */
  .category-title {
    font-size: 1.2rem;
    gap: 10px;
  }
  .cat-num {
    font-size: 1.8rem;
  }

  /* 質問エリア */
  .faq-question {
    padding-right: 50px;
    font-size: 1rem;
  }

  /* 回答エリア調整 */
  .answer-inner {
    /* 左余白を少し詰める: Icon(20px) + Space(30px) = 50px */
    padding: 25px 20px 30px 50px;
  }
  .a-icon {
    top: 25px;
    left: 20px;
  }

  /* テーブルのスマホ対応（縦積み） */
  .faq-table th,
  .faq-table td {
    display: block;
    width: 100%;
    border-bottom: none;
  }
  .faq-table th {
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
  }
  .faq-table td {
    border-bottom: 1px solid #ccc;
    padding-bottom: 20px;
  }
  .faq-table tr:last-child td {
    border-bottom: 1px solid #ddd;
  }
}
