/* =========================================================
   Job Detail (Single) - scoped styles
   対象: /single.php の #jobdetail 配下のみ
   ========================================================= */

#jobdetail{
  --jd-primary: #013273;
  --jd-primary-2: #024d85;
  --jd-accent: #00a3ef;
  --jd-bg: #f6f8fb;
  --jd-border: #e6e9ef;
  --jd-text: #132238;
  --jd-muted: #333;
  --jd-radius: 3px;
  --jd-shadow: 0 10px 30px rgba(10, 20, 30, .06);

  color: var(--jd-text);
  margin: 24px auto 64px;
}

/* 余白の暴れを抑制（Lightningの.container入れ子対策） */
#jobdetail > #page02.container{
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* Links */
#jobdetail a{
  color: var(--jd-primary);
  text-decoration: none;
}
#jobdetail a:hover{
  text-decoration: underline;
}

/* =========================
   Hero
========================= */
#jobdetail #page02{
  margin-top: 8px;
  margin-bottom: 14px;
}

#jobdetail .text_icon{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#jobdetail .text_icon img{
  width: auto;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--jd-border);
}

/* =========================
   Featured image
========================= */
#jobdetail .main_photo{
  margin-top: 14px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--jd-border);
  box-shadow: var(--jd-shadow);
}
#jobdetail .main_photo img{
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   Sections
========================= */
#jobdetail .con_main{
  margin-top: 26px;
}

/* 見出し */
#jobdetail .con_main > h2{
  margin: 38px 0 14px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.3;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--jd-text);
}
#jobdetail .con_main > h2::before{
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--jd-primary), var(--jd-accent));
}

/* ブロック共通（カード化） */
#jobdetail .block01,
#jobdetail .block02,
#jobdetail .block03,
#jobdetail .block04,
#jobdetail .block05{
  background: #fff;
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius);
  padding: clamp(16px, 2.5vw, 28px);
  box-shadow: var(--jd-shadow);
}

/* =========================
   block01: オススメポイント
========================= */
#jobdetail .block01{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
#jobdetail .block01 dl{
  text-align: center;
  margin: 0;
  padding: 14px 16px;
  border-radius: 3px;
  background: var(--jd-bg);
  border: 1px solid var(--jd-border);
}
#jobdetail .block01 dt{
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: #3863D7;
  padding: .7em .5em;
  border-radius: 3px;
}
#jobdetail .block01 dd{
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--jd-text);
}
#jobdetail .block01 dd span{
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jd-muted);
}

/* =========================
   block02: 特典
========================= */
#jobdetail .block02 ol{
  margin:0 0 0 2em;
  padding: 0;
  display: grid;
  gap: 10px;
}
#jobdetail .block02 li{
  position: relative;
  font-weight: 600;
  font-size: 22px;
  padding: 0;
  margin: 0;
  line-height: 1.7;
}

/* =========================
   block03: お仕事内容
========================= */
#jobdetail .block03 dl{
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 3px;
  background: var(--jd-bg);
  border: 1px solid var(--jd-border);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px 16px;
}
#jobdetail .block03 dt{
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  background: #3863D7;
  border-radius: 3px;
  text-align: center;
}
#jobdetail .block03 dd{
  margin: 0;
  color: var(--jd-text);
}
#jobdetail .block03 dd ul{
  margin: 0;
  padding-left: 1.2em;
}
#jobdetail .block03 dd li{
  margin: 0 0 6px;
  font-weight: 600;
}

#jobdetail .block03 .text + .text{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--jd-border);
}
#jobdetail .block03 .text h3{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--jd-primary);
}
#jobdetail .block03 .text p{
  margin: 0;
  line-height: 1.85;
  color: var(--jd-text);
}

/* =========================
   block04: 勤務地（画像 / Map）
========================= */
#jobdetail .block04{
  gap: 16px;
  align-items: start;
}

#jobdetail .block04 .work_location_comment {
  margin-bottom: .5em;
}

#jobdetail .block04 img{
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--jd-border);
  display: block;
}

/* Map（single.php 内の <style> を削除するならここで統一） */
#jobdetail .acf-map{
  width: 100%;
  height: 360px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--jd-border);
  background: #eef2f7;
  position: relative;
}

/* 読み込み中 */
#jobdetail .acf-map.loading::before{
  content: "地図を読み込んでいます...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--jd-text);
  border: 1px solid var(--jd-border);
}

/* 読み込みエラー */
#jobdetail .acf-map.error::before{
  content: "地図を表示できませんでした";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: rgba(255, 240, 240, 0.92);
  padding: 14px 18px;
  border-radius: 3px;
  font-size: 13px;
  color: #b00020;
  text-align: center;
  width: min(480px, 90%);
  border: 1px solid #ffd7de;
}

/* JSが innerHTML でリンクを入れるケースの見た目 */
#jobdetail .acf-map.error a{
  display: inline-block;
  margin-top: 10px;
  color: var(--jd-primary);
  text-decoration: underline;
  font-weight: 800;
}

/* =========================
   block05: 募集内容
========================= */
#jobdetail .block05 > p{
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  color: var(--jd-text);
}

/* table */
#jobdetail .block05 table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--jd-border);
  border-radius: 3px;
  overflow: hidden;
}

#jobdetail .block05 th,
#jobdetail .block05 td{
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--jd-border);
}

#jobdetail .block05 tr:last-child th,
#jobdetail .block05 tr:last-child td{
  border-bottom: none;
}

#jobdetail .block05 th{
  width: 32%;
  background: var(--jd-bg);
  color: var(--jd-muted);
  font-weight: 900;
  letter-spacing: .02em;
}

#jobdetail .block05 td{
  background: #fff;
  color: var(--jd-text);
  line-height: 1.85;
}

#jobdetail .block05 td a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60%;
    margin: .7em auto;
    padding: .7em 2em;
    border: 1px solid #333;
    border-radius: 50vh;
    background-color: #fff;
    color: #333;
    font-size: 1em;
    font-weight: 600;
}

#jobdetail .block05 td a::after {
    transform: rotate(45deg);
    width: 5px;
    height: 5px;
    margin-left: 10px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    content: '';
}
#jobdetail .block05 td a:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* wpautop の p が table 内で二重にカード化しないように */
#jobdetail .block05 td p{
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
#jobdetail .block05 td p:last-child{ margin-bottom: 0; }

/* 応募ボタン */
#jobdetail .block05 a.btn1,
#jobdetail .block05 a.btn2{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  letter-spacing: .03em;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(1, 50, 115, .25);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  width: 50%;
  margin: 18px auto 0; /* 中央寄せ（左右auto） */
}
#jobdetail .block05 a.btn1 {
  background: var(--jd-primary);
}
#jobdetail .block05 a.btn2 {
  background: #D9010B;
}

#jobdetail .block05 a.btn1:hover,
#jobdetail .block05 a.btn2:hover{
  transform: translateY(-1px);
  text-decoration: none;
}
#jobdetail .block05 a.btn1:hover {
  background: var(--jd-primary-2);
}
#jobdetail .block05 a.btn2:hover {
  background: #C3010A;
}


#jobdetail .block05 a.btn1:active,
#jobdetail .block05 a.btn2:active{
  transform: translateY(0);
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px){
  #jobdetail .block05 a.btn1,
  #jobdetail .block05 a.btn2,
  #jobdetail .block05 td a {
      width: auto;
  }
  #jobdetail{
    margin: 16px auto 48px;
  }

  #jobdetail .block03 dl{
    grid-template-columns: 1fr;
  }

  #jobdetail .acf-map{
    height: 300px;
  }

  #jobdetail .block05 th{
    width: auto;
  }
  #jobdetail .block05 th,
  #jobdetail .block05 td{
    display: block;
    width: 100%;
  }
  #jobdetail .block05 th{
    border-bottom: 0;
    padding-bottom: 8px;
  }
  #jobdetail .block05 td{
    padding-top: 0;
  }
  #jobdetail .block05 > a{
    width: 100%;
  }
  #jobdetail .block02 li{
    font-size: 15px;
    line-height: 1.5;
  }

}
