/* ======================================================
   recruit.css（整頓版・全文）
   対象：
   - Recruit NEWS（採用情報・セミナー等の一覧）
   - 募集リンクボタン（縦1列＋中央寄せ）
   - Resident Diary（リンク行）
   - medical-staff（限定上書き）
====================================================== */


/* ======================================================
   1. Recruit NEWS（Base / full-bleed / list reset）
====================================================== */
.recruit-news{
  padding: 1px 0;
  background: rgba(30, 90, 170, 0.06);

  /* 共通制御変数 */
  --edge-gap: 16px;   /* 左右端 */
  --badge-w: 120px;   /* バッジ固定幅 */
}

/* Recruit NEWS：全幅背景（親が幅制限していても full-bleed）
   - recruit / medical-staff どちらでも同じ見た目に揃える */
.page-content .recruit-news{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.recruit-news .container{
  padding-bottom: 30px;
}

/* list-style 強制リセット
   ※ common.css（.page-content ul）の影響を遮断 */
.recruit-news .recruit-news__tablist,
.recruit-news .recruit-news__list{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* li の余計なマージンだけ消す（詰まり防止） */
.recruit-news .recruit-news__tablist > li,
.recruit-news .recruit-news__list > li{
  margin: 0;
}


/* ======================================================
   2. Section Header（NEWS見出し）
====================================================== */
.recruit-news .section-header{
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 30px 0 0;
  box-sizing: border-box;
}

.recruit-news .section-title{
  margin: 0; /* h2のデフォルト余白対策 */
  line-height: 1.2;
}


/* ======================================================
   3. Card
====================================================== */
.recruit-news__card{
  max-width: 980px;
  margin: 18px auto 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.recruit-news__inner{
  padding: 0;
  margin: 0;
}


/* ======================================================
   4. Tabs
====================================================== */
.recruit-news__tabs{
  margin: 0;
  padding: 0;
}

.recruit-news__tablist{
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.recruit-news__tabitem{
  flex: 1 1 0;
  min-width: 0;
}

.recruit-news__tab,
.recruit-news__tab:visited{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 6px;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;

  color: #fff !important;
  text-decoration: none !important;

  border-radius: 0;
  opacity: .95;
  transition: filter .15s ease, opacity .15s ease;

  box-shadow: inset -1px 0 0 rgba(255,255,255,.25);
}

.recruit-news__tabitem:last-child .recruit-news__tab{
  box-shadow: none;
}

.recruit-news__tab:hover{
  opacity: 1;
  filter: brightness(1.15);
}

.recruit-news__tab.is-active{
  opacity: 1;
  filter: brightness(1.08);
  position: relative;
}

/* タブ色 */
.recruit-news__tab.is-all{ background:#4bb3c5; }
.recruit-news__tab.is-recruit_notice{ background:#d55a7a; }
.recruit-news__tab.is-recruit_job{ background:#1f5aa6; }
.recruit-news__tab.is-recruit_tour{ background:#39b28a; }
.recruit-news__tab.is-recruit_seminar{ background:#e3a845; }
.recruit-news__tab.is-recruit_other{ background:#7a8aa0; }

/* アクティブ下線 */
.recruit-news__tab.is-active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: rgba(0,0,0,.25);
}


/* ======================================================
   5. Panel / List
====================================================== */
.recruit-news__panel{
  margin: 0;
  padding: 0 0 12px;
}

.recruit-news__list{
  margin: 0;
  padding: 0;
}

/* 1行：日付 / ジャンル / タイトル */
.recruit-news__item{
  display: grid;
  grid-template-columns: auto var(--badge-w) 1fr;
  align-items: center;
  column-gap: 12px;
  padding-block: 10px;
}

/* 日付 */
.recruit-news__date{
  padding-inline: 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0,0,0,.55);
  line-height: 1.2;
  white-space: nowrap;
  margin: 0;
}

/* バッジ */
.recruit-news__badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--badge-w);
  padding: 3px 10px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}

.recruit-news__badge.is-recruit_notice{ background:#d55a7a; }
.recruit-news__badge.is-recruit_job{ background:#1f5aa6; }
.recruit-news__badge.is-recruit_tour{ background:#39b28a; }
.recruit-news__badge.is-recruit_seminar{ background:#e3a845; }
.recruit-news__badge.is-recruit_other{ background:#7a8aa0; }

/* カテゴリ未設定時の空バッジ（幅だけ確保） */
.recruit-news__badge.is-empty{
  width: var(--badge-w);
  padding: 0;
  background: transparent;
}

/* タイトル（リンク）
   ※「1pxだけ下がって見える」を視覚補正：top:-1px */
.recruit-news .recruit-news__title{
  position: relative;
  top: -1px; /* ★ 1px調整（見た目のベースライン差を補正） */

  padding-inline: 16px 24px;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;

  color: #666 !important;
  text-decoration: none !important;

  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;

  text-align: justify;
}

/* タイトル：hover/focusで下線 */
.recruit-news .recruit-news__title:hover,
.recruit-news .recruit-news__title:focus-visible{
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* タイトル先頭の「重要」バッジ */
.recruit-news__title-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-right: 8px;
  padding: 2px 8px;

  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  background: var(--c-danger, #e11d48);
  color: #fff;
}


/* ======================================================
   6. More（一覧を見る）
====================================================== */
.recruit-news__more{
  display: flex;
  justify-content: flex-end;
  padding: 10px var(--edge-gap) 0;
}

.recruit-news__morelink{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  text-decoration: none !important;
  font-weight: 800;
  color: rgba(0,0,0,.65);
}

.recruit-news__morelink:hover,
.recruit-news__morelink:focus-visible{
  text-decoration: underline !important;
  text-underline-offset: 2px;
  color: rgba(0,0,0,.85);
}

.recruit-news__moreicon{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  position: relative;
  flex: 0 0 auto;
}

.recruit-news__moreicon::before{
  content: "";
  position: absolute;
  top: 8px;
  left: 7px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #fff;
}


/* ======================================================
   7. Responsive（Recruit NEWS）
====================================================== */
@media (max-width: 860px){
  .recruit-news__tablist{ flex-wrap: wrap; }
  .recruit-news__tabitem{ flex: 0 0 calc(100% / 3); }
}

@media (max-width: 520px){
  .recruit-news__tabitem{ flex: 0 0 50%; }
  .recruit-news__date{ font-size: 12px; }

  .recruit-news{
    --badge-w: 120px;
  }

  .recruit-news__item{
    grid-template-columns: 1fr var(--badge-w);
    grid-template-areas:
      "date  badge"
      "title title";
    row-gap: 6px;
    padding-inline: 16px;
  }

  .recruit-news__date{
    grid-area: date;
    padding-inline: 0;
    font-size: 12px;
  }

  .recruit-news__badge{
    grid-area: badge;
    justify-self: end;
  }

  .recruit-news .recruit-news__title{
    grid-area: title;
    padding-inline: 0;
    top: 0; /* SPは縦積みなので補正不要（不要なら -1px のままでもOK） */
  }
}


/* ======================================================
   8. Recruit：募集ボタン（共通）
   - 同期パターン（Group）に .recruit-buttons を付ける想定
   - 縦1列で押しやすさ優先
   - 左右中央寄せ／表示幅を統一
====================================================== */
.recruit-buttons{
  max-width: 980px;
  margin: 26px auto 10px;
  padding: 0 16px;
  box-sizing: border-box;
}

/* 縦積み＋中央寄せ */
.recruit-buttons > .wp-block-group__inner-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ボタン幅 */
.recruit-buttons .wp-block-button{
  margin: 0;
  width: 100%;
  max-width: 780px;
}

/* ボタン本体 */
.recruit-buttons .wp-block-button.tch-pill-btn > .wp-block-button__link{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 64px;
  padding: 12px 18px;

  border-radius: 999px;
  border: 2px solid var(--tch-pill-color);
  background: #fff;
  color: var(--tch-pill-color) !important;

  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;

  box-shadow: 0 2px 4px rgba(0,0,0,.04);
  transition:
    background-color .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    transform .1s ease;
}

.recruit-buttons .wp-block-button.tch-pill-btn > .wp-block-button__link:hover,
.recruit-buttons .wp-block-button.tch-pill-btn > .wp-block-button__link:focus-visible{
  background: var(--tch-pill-color);
  color: #fff !important;
  box-shadow: 0 4px 8px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

/* 色（ボタン側クラスで切替） */
.recruit-buttons .wp-block-button.tch-pill-btn--dept{
  --tch-pill-color: var(--tch-department, #4a90e2);
}
.recruit-buttons .wp-block-button.tch-pill-btn--support{
  --tch-pill-color: var(--tch-support-division, #F5A623);
}
.recruit-buttons .wp-block-button.tch-pill-btn--clinic{
  --tch-pill-color: var(--tch-special-clinic, #00856A);
}

/* スマホ */
@media (max-width: 600px){
  .recruit-buttons .wp-block-button{
    max-width: 100%;
  }
  .recruit-buttons .wp-block-button.tch-pill-btn > .wp-block-button__link{
    min-height: 56px;
    font-size: 16px;
    padding: 10px 14px;
  }
}


/* ======================================================
   9. Resident Diary（一覧リンク行）
   ※ recruit.css に入っていたため残す（将来分離してもOK）
====================================================== */
.archive-resident-diary .diary-link{
  display: grid;
  grid-template-columns: 120px 1fr 160px; /* 日付 / タイトル / 研修医名 */
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  text-decoration: none;
}

.archive-resident-diary .diary-resident{
  text-align: right;
  white-space: nowrap;
  color: #555;
  font-size: 14px;
}

@media (max-width: 640px){
  .archive-resident-diary .diary-link{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .archive-resident-diary .diary-resident{
    text-align: left;
  }
}


/* ======================================================
   10. medical-staff（限定上書き）
   - 採用ページには影響させない
   ※ 現状 “全幅化” は共通で入れているため、ここは補助のみ残す
====================================================== */
.page-medical-staff .recruit-news .section-header,
.page-medical-staff .recruit-news .recruit-news__card{
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.page-medical-staff .recruit-news h2.section-title{
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .04em;
}
