/* =========================================================
   recruit.css
   求人一覧・求人詳細ページ専用スタイル
   ※ style.css（共通トークン／header・footer・nav・about-table等）
     を先に読み込んだ上で使用してください。既存のCSS変数
     （--primary, --primary-light, --text-dark, --text-muted,
     --bg-light, --white, --container-width, --transition）を
     そのまま利用しています。
   ========================================================= */

/* --- ページ共通：現在地のナビゲーション表示 --- */
.nav-list a.is-current {
  color: var(--primary);
}
.nav-list a.is-current::after {
  transform: scaleX(1);
}

/* --- ブレッドクラム --- */
.breadcrumb {
  padding: 0;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.breadcrumb .sep {
  margin: 0 0.5rem;
  color: #ccc;
}

/* --- 見出しバランス調整（英字を小さく、日本語見出しを大きく） --- */
.section-title-en {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}
.section-title-ja {
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
}

/* --- ページ見出し直下のリード文 --- */
.job-lead {
  color: var(--text-muted);
  max-width: 640px;
  margin: -1.5rem 0 2.5rem;
  font-size: 0.95rem;
}

/* --- 一覧ページ：絞り込み結果が0件のときの表示 --- */
.job-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem 1rem;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 8px;
}

/* =========================================================
   求人一覧ページ
   ========================================================= */

/* 検索・絞り込み（1つの折りたたみブロックに統合） */
.job-filters {
  background: var(--white);
  border: 1px solid #e0e4f0;
  border-left: 5px solid var(--primary);
  border-radius: 4px;
  margin-bottom: 2.5rem;
}
.job-filters summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 1.75rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.job-filters summary::-webkit-details-marker {
  display: none;
}
.job-filters summary::after {
  content: "絞り込む ▾";
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.job-filters[open] summary::after {
  content: "閉じる ▴";
}
#job-filters-form {
  padding: 0 1.75rem 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem 2rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}
.job-filter-group--keyword {
  grid-column: 1 / -1;
}
#job-filters-form .job-filter-group--keyword input {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--white);
}
#job-filters-form .job-filter-group--keyword input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
#job-filters-form button[type="submit"] {
  grid-column: 1 / -1;
}

/* 汎用ボタン（recruit__btn のサイズバリエーション） */
.recruit__btn--sm {
  width: auto;
  max-width: none;
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.9rem;
}
.recruit__btn--outline {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.recruit__btn--outline:hover {
  background: var(--primary-light);
  opacity: 1;
  text-decoration: none;
}
.recruit__btn--block {
  display: block;
  width: 100%;
  max-width: none;
}

/* 一覧レイアウト（デフォルト＝スマホ幅：絞り込みブロックの下に求人リストが並ぶ1カラム） */
.job-layout {
  display: block;
}

/* PC幅：絞り込みを常時表示の左サイドバーにし、開閉はできないようにする */
@media (min-width: 769px) {
  .job-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .job-filters {
    margin-bottom: 0;
    position: sticky;
    top: 140px;
  }
  .job-filters summary {
    cursor: default;
    pointer-events: none;
  }
  .job-filters summary::after {
    display: none;
  }
}

.job-filter-group__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}
.job-filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  cursor: pointer;
}
.job-filter-group input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

/* 結果件数・並び替え */
.job-result-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.job-result-meta strong {
  color: var(--primary);
  font-size: 1.15rem;
}

/* 求人カード */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.job-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 200px;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}
.job-card[hidden] {
  display: none;
}
.job-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(58, 72, 127, 0.12);
}
.job-card__body {
  padding: 1.5rem 1.75rem;
}
.job-card__type {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.job-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}
.job-card__title a {
  color: var(--text-dark);
  text-decoration: none;
}
.job-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.job-card__title a:hover {
  color: var(--primary);
}
.job-card__company {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -0.3rem 0 0.6rem;
}
.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.job-card__tags .tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-light);
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}
.job-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 56ch;
}
.job-card__pay {
  border-left: 1px solid #eee;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  padding: 1.5rem;
  text-align: center;
}
.job-card__pay-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.job-card__pay-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.3rem;
  border-bottom: 3px double var(--primary);
  padding-bottom: 2px;
}
.job-card__pay-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.job-card__arrow {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
}

/* ページネーション */
.job-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.job-pagination a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--white);
  text-decoration: none;
}
.job-pagination a.is-current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 700;
}
.job-pagination a:hover:not(.is-current) {
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================================================
   求人詳細ページ
   ========================================================= */

.job-detail-header {
  background: var(--white);
  border: 1px solid #e0e4f0;
  border-top: 4px solid var(--primary);
  border-radius: 4px;
  padding: 2rem 2.25rem;
  margin-bottom: 2.5rem;
}
.job-detail-no {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.job-detail-no strong {
  color: var(--primary);
}
.job-detail-header h1 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 1rem;
  max-width: 32ch;
}
.job-detail-company {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: -0.6rem 0 1rem;
}
.job-detail-header .job-card__tags {
  margin-bottom: 0;
}
.job-detail-header .job-card__type {
  margin-bottom: 0;
}

.job-detail-section {
  margin-bottom: 2.5rem;
}
.job-detail-section h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #eee;
}
.job-detail-section ul {
  padding-left: 1.2em;
  font-size: 0.92rem;
}
.job-detail-section li {
  margin-bottom: 0.5rem;
}
.job-detail-section li:last-child {
  margin-bottom: 0;
}
.job-detail-section p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* 選考の流れ：装飾は付けず、番号付きの文章だけで表示 */
.selection-flow {
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.selection-flow li {
  font-size: 0.92rem;
}

/* 応募CTA（ページ下部） */
.apply-cta {
  text-align: center;
  background: var(--bg-light);
  border: 1px solid #e0e4f0;
  border-radius: 8px;
  padding: 2.5rem 2rem;
}
.apply-cta h3 {
  border-bottom: none;
  padding-bottom: 0;
}
.apply-cta p {
  max-width: 52ch;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
}
.apply-cta .recruit__btn {
  max-width: 360px;
  margin: 0 auto;
}

/* 担当者コメント（margin-info__text）：style.css側の margin-bottom を
   job-detail内ではリセットする（後ろに要素が続かないため余白が不要） */
.job-detail-section .margin-info__text {
  margin-bottom: 0;
}

/* 関連する求人 */
.related-jobs {
  margin-top: 1rem;
}
.related-jobs h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.related-card {
  display: block;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(58, 72, 127, 0.1);
}
.related-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0.6rem 0;
  line-height: 1.5;
}
.related-card .pay {
  font-weight: 700;
  color: var(--primary);
}

/* モバイル用固定応募バー */
.mobile-apply-bar {
  display: none;
}

/* =========================================================
   レスポンシブ（768px：既存style.cssと同じブレークポイント）
   ========================================================= */
@media (max-width: 768px) {
  #job-filters-form {
    grid-template-columns: 1fr;
  }
  .job-card {
    grid-template-columns: 1fr;
  }
  .job-card__pay {
    border-left: none;
    border-top: 1px solid #eee;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 1rem 1.75rem;
  }
  .job-detail-body {
    padding-bottom: 100px; /* モバイル下部固定バーと重ならないよう余白を確保 */
  }
  .mobile-apply-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-top: 1px solid #eee;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  }
  .mobile-apply-bar__pay {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
  }
  .mobile-apply-bar .recruit__btn--sm {
    flex: 1;
    text-align: center;
    padding: 0.85rem;
  }
}
