/* recruitment.css */

:root {
  --page-bg:#ffffff;
  --surface:#ffffff;
  --text:#333333;
  --heading:#164f78;
  --muted:#667680;
  --accent:#177ab5;
  --accent-dark:#125f8c;
  --accent-light:#eef7fb;
  --line:#cfdde5;
  --line-light:#e3ebef;
  --header-bg:#eaf5fa;
  --facility-bg:#f6fafc;

  /* 募集終了：コントラスト改善 */
  --closed-bg:#f5f6f7;
  --closed-text:#5f6b72;
  --closed-line:#66747c;

  --pdf:#9e3027;
  --pdf-bg:#f9e8e6;
  --word:#245e9c;
  --word-bg:#e7eff9;
  --excel:#256b43;
  --excel-bg:#e5f2e9;
  --error-bg:#fff0ef;
  --error-text:#a22b23;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  color:var(--text);
  font-family:"Yu Gothic","YuGothic","Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;
  font-size:16px;
  line-height:1.7;
  background:var(--page-bg);
  -webkit-font-smoothing:antialiased;
}

* {
  box-sizing:border-box;
}

[hidden] {
  display:none !important;
}


/* ==============================
   Recruitment
============================== */

.recruitment {
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:42px 20px 72px;
}


/* ==============================
   Header
============================== */

.recruitment-header {
  margin-bottom:28px;
  padding-bottom:18px;
  border-bottom:3px solid var(--accent);
}

.recruitment-title {
  margin:0;
  color:var(--heading);
  font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Hiragino Mincho Pro",serif;
  font-size:2rem;
  font-weight:600;
  line-height:1.45;
  letter-spacing:.06em;
}

.recruitment-lead {
  margin:9px 0 0;
  color:#52636e;
  font-size:14px;
}

.recruitment-status {
  margin:13px 0 0;
  color:var(--muted);
  font-size:13px;
}

.recruitment-status strong {
  color:var(--accent-dark);
}

.recruitment-status-note {
  display:block;
  margin-top:2px;
  font-size:12px;
}


/* ==============================
   Notice
============================== */

.recruitment-notice {
  margin-bottom:24px;
  padding:14px 17px;
  background:var(--accent-light);
  border:1px solid #cfe5ef;
  border-left:4px solid var(--accent);
}

.recruitment-notice a {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--accent-dark);
  font-size:14px;
  font-weight:700;
  text-decoration:none;
}

.recruitment-notice a:hover {
  text-decoration:underline;
}


/* ==============================
   Desktop table
============================== */

.recruitment-desktop {
  display:block;
}

.recruitment-table-wrap {
  width:100%;
  border:1px solid var(--line);
}

.recruitment-table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  background:#fff;
}

.recruitment-table th,
.recruitment-table td {
  padding:15px 13px;
  text-align:center;
  vertical-align:middle;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.recruitment-table th:last-child,
.recruitment-table td:last-child {
  border-right:none;
}

.recruitment-table tbody tr:last-child td {
  border-bottom:none;
}

.recruitment-table th {
  color:var(--heading);
  font-size:14px;
  font-weight:700;
  letter-spacing:.03em;
  background:var(--header-bg);
}

.recruitment-table th:nth-child(1) {
  width:20%;
}

.recruitment-table th:nth-child(2) {
  width:26%;
}

.recruitment-table th:nth-child(3) {
  width:12%;
}

.recruitment-table th:nth-child(4) {
  width:21%;
}

.recruitment-table th:nth-child(5) {
  width:21%;
}

.recruitment-table tbody tr {
  transition:background-color .15s;
}

.recruitment-table tbody tr:not(.is-closed):hover td:not(.facility-cell) {
  background:#fbfdfe;
}


/* ==============================
   Facility
============================== */

.facility-cell {
  color:#30444f;
  font-weight:700;
  background:var(--facility-bg);
}

.facility-cell a {
  color:#30444f;
  text-decoration:none;
}

.facility-cell a:hover {
  color:var(--accent-dark);
  text-decoration:underline;
}


/* ==============================
   Job information
============================== */

.job-title {
  color:#263e4e;
  font-weight:700;
}

.employment-type {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:400;
}

.job-count {
  white-space:nowrap;
}

.deadline-label {
  display:block;
  margin-bottom:2px;
  color:var(--muted);
  font-size:11px;
}

.deadline-date {
  color:#293f4d;
  font-size:14px;
  font-weight:700;
}


/* ==============================
   Document links
============================== */

.document-links {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
}

.document-link {
  min-height:38px;
  padding:7px 9px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--accent-dark);
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  text-align:left;
  text-decoration:none;
  background:#fff;
  border:1px solid #cadee8;
  border-radius:3px;
  transition:
    color .15s,
    background-color .15s,
    border-color .15s;
}

.document-link:hover {
  color:#fff;
  background:var(--accent);
  border-color:var(--accent);
}

.document-type {
  flex:0 0 auto;
  min-width:39px;
  padding:3px 4px;
  color:#4d5b64;
  font-size:9px;
  line-height:1;
  text-align:center;
  background:#edf1f3;
  border-radius:2px;
}

.document-type.is-pdf {
  color:var(--pdf);
  background:var(--pdf-bg);
}

.document-type.is-word {
  color:var(--word);
  background:var(--word-bg);
}

.document-type.is-excel {
  color:var(--excel);
  background:var(--excel-bg);
}

.document-link:hover .document-type {
  color:var(--accent-dark);
  background:#fff;
}

.document-name {
  flex:1;
  min-width:0;
}


/* ==============================
   Closed recruitment
============================== */

.recruitment-table tr.is-closed td:not(.facility-cell) {
  color:var(--closed-text);
  background:var(--closed-bg);
}

.recruitment-table tr.is-closed .job-title,
.recruitment-table tr.is-closed .deadline-date {
  color:var(--closed-text);
}

.closed-label {
  display:inline-block;
  margin-bottom:5px;
  padding:3px 8px;
  color:#fff;
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  background:var(--closed-line);
  border-radius:2px;
}

.recruitment-table tr.is-closed .document-link {
  color:var(--closed-text);
  background:#fff;
  border-color:#d5dde1;
}

.recruitment-table tr.is-closed .document-link:hover {
  color:#fff;
  background:#66747c;
  border-color:#66747c;
}

.no-recruitment {
  color:var(--muted);
  font-size:14px;
}


/* ==============================
   Mobile
============================== */

.recruitment-mobile {
  display:none;
}

.mobile-facility {
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:5px;
}

.mobile-facility + .mobile-facility {
  margin-top:18px;
}

.mobile-facility-heading {
  margin:0;
  padding:12px 15px;
  color:var(--heading);
  font-size:15px;
  font-weight:700;
  line-height:1.6;
  background:var(--header-bg);
  border-bottom:1px solid #cbdfe8;
}

.mobile-facility-heading a {
  color:var(--heading);
  text-decoration:none;
}

.mobile-facility-heading a:hover {
  text-decoration:underline;
}

.mobile-jobs {
  display:flex;
  flex-direction:column;
}

.mobile-job {
  padding:16px 15px 15px;
  background:#fff;
}

.mobile-job + .mobile-job {
  border-top:1px solid var(--line);
}

.mobile-job.is-closed {
  background:var(--closed-bg);
}

.mobile-job-heading {
  margin:0;
  color:#263e4e;
  font-size:17px;
  font-weight:700;
  line-height:1.6;
}

.mobile-job.is-closed .mobile-job-heading {
  color:var(--closed-text);
}

.mobile-employment-type {
  margin:2px 0 0;
  color:var(--muted);
  font-size:12px;
}


/* ==============================
   Mobile meta information
============================== */

.mobile-job-meta {
  margin:13px 0 0;
  display:grid;
  grid-template-columns:minmax(90px,.8fr) minmax(0,1.3fr);
  background:#f8fbfc;
  border:1px solid var(--line-light);
}

.mobile-job.is-closed .mobile-job-meta {
  background:#eceff1;
  border-color:#dce2e5;
}

.mobile-meta-item {
  min-width:0;
  padding:10px 12px;
}

.mobile-meta-item + .mobile-meta-item {
  border-left:1px solid var(--line-light);
}

.mobile-meta-label {
  display:block;
  margin-bottom:2px;
  color:var(--muted);
  font-size:10px;
}

.mobile-meta-value {
  display:block;
  color:#293f4d;
  font-size:14px;
  font-weight:700;
  overflow-wrap:anywhere;
}

.mobile-job.is-closed .mobile-meta-value {
  color:var(--closed-text);
}

.mobile-documents {
  margin-top:13px;
}

.mobile-documents-label {
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.mobile-no-recruitment {
  margin:0;
  padding:17px 15px;
  color:var(--muted);
  font-size:14px;
  background:#fafcfd;
}


/* ==============================
   Error
============================== */

.recruitment-error {
  margin-bottom:22px;
  padding:15px 18px;
  color:var(--error-text);
  font-size:14px;
  background:var(--error-bg);
  border:2px solid var(--error-text);
}

.recruitment-error strong {
  display:block;
  margin-bottom:4px;
}

.recruitment-error ul {
  margin:0;
  padding-left:1.4em;
}


/* ==============================
   Keyboard focus
============================== */

.recruitment a:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:3px;
}


/* ==============================
   Visually hidden
============================== */

.visually-hidden {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}


/* ==============================
   Responsive
============================== */

@media (max-width:700px) {

  .recruitment {
    padding:24px 13px 50px;
  }

  .recruitment-header {
    margin-bottom:21px;
    padding-bottom:14px;
  }

  .recruitment-title {
    font-size:1.5rem;
    line-height:1.5;
    letter-spacing:.04em;
  }

  .recruitment-lead {
    font-size:13px;
    line-height:1.8;
  }

  .recruitment-status {
    margin-top:11px;
    font-size:12px;
  }

  .recruitment-notice {
    margin-bottom:20px;
    padding:12px 14px;
  }

  .recruitment-notice a {
    align-items:flex-start;
    font-size:13px;
  }

  .recruitment-desktop {
    display:none;
  }

  .recruitment-mobile {
    display:block;
  }

  .document-link {
    min-height:42px;
    padding:9px 11px;
  }
}


/* ==============================
   Reduced motion
============================== */

@media (prefers-reduced-motion:reduce) {

  html {
    scroll-behavior:auto;
  }

  .recruitment * {
    transition:none !important;
  }
}