/* ============================================================
   job.css — ダイワ装飾 募集要項ページ（営業部・工事部共通）
   デザイン基準: style.css のデザイン言語を踏襲
   フォント: 欧文 = Zalando Sans Expanded
             和文 = Noto Sans JP
   ============================================================ */

/* ============================================================
   CSS変数 (style.css と同一値で自己完結)
   ============================================================ */
:root {
  --color-main:         #005083;
  --color-dark:         #00478a;
  --color-text:         #333;
  --color-border:       #ddd;
  --color-border-entry: #4874a3;
  --color-hover-entry:  #bad4e8;
  --color-white:        #fff;
  --color-bg-light:     #f7f8fa;
  --color-error:        #c0392b;

  --font-en: 'Zalando Sans Expanded', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;

  --container-max: 1440px;
  --content-pad:   80px;
}

/* ============================================================
   Base
   ============================================================ */
body {
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   Header
   LP の style.css に準拠しつつ、ヒーローなし向けに背景を追加
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-white);
  padding: 35px 40px 24px 40px;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header__logo img {
  width: 240px;
  height: auto;
  display: block;
}

.header__entry-btn {
  position: absolute;
  top: -35px;
  right: -40px;
  width: 180px;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--color-white);
  background: var(--color-main);
  transition: background 0.25s ease;
}

.header__entry-btn:hover {
  background: var(--color-dark);
}

/* ============================================================
   コンテナ（内側の幅制限）
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

/* ============================================================
   セクション共通見出し (.sec-ttl)
   英大文字タイトル + 和文サブタイトル
   ============================================================ */
.sec-ttl {
  margin: 50px auto;
  text-align: center;
}

.sec-ttl h1,
.sec-ttl h2 {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(40px, 4.5vw, 64px);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.sec-ttl span {
  display: block;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ============================================================
   #description — ページタイトルバナー
   ============================================================ */
#description {
  background: var(--color-white);
  padding: 0;
}

#description .sec-ttl {
  margin-top: 80px;
}

#description .sec-ttl h1 {
  color: var(--color-main);
}

#description .sec-ttl span {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================================
   #requirements — 募集要項テーブル
   ============================================================ */
#requirements {
  background: var(--color-white);
  padding: 0;
}

/* 部署見出し "営業部" — 参照サイトと同デザイン、色のみネイビー */
.table-ttl {
  position: relative;
  margin: 50px auto 48px;
  text-align: center;
}

.table-ttl::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 100%;
  height: 1px;
  background: var(--color-main);
}

.table-ttl h2 {
  display: inline-block;
  position: relative;
  z-index: 1;
  padding: 0 15px;
  font-family: var(--font-jp);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-main);
  background: var(--color-white);
}

/* 定義リスト表 — 参照サイトと同構造、枠線のみネイビー */
.requirements-table dl {
  border: 1px solid var(--color-main);
}

.requirements-table dl > div {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-main);
}

.requirements-table dl > div:last-child {
  border-bottom: none;
}

.requirements-table dt {
  width: 25%;
  padding: 20px;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-main);
  flex-shrink: 0;
}

.requirements-table dd {
  width: 75%;
  padding: 20px 15px;
  border-left: 1px solid var(--color-main);
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
}

.requirements-table dd p {
  margin-bottom: 8px;
}

.requirements-table dd p:last-child {
  margin-bottom: 0;
}

.requirements-table dd ul {
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.requirements-table dd ul li {
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* ボタン "お問い合わせ・応募" — 参照サイトと同デザイン、色のみネイビー */
.requirements-btn {
  margin: 60px auto 90px;
  text-align: center;
}

.requirements-btn a {
  display: inline-block;
  width: 40%;
  padding: 15px 0;
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-main);
  background: var(--color-white);
  border: 1px solid var(--color-main);
  letter-spacing: 0.05em;
  transition: background 0.5s, color 0.5s;
}

.requirements-btn a:hover {
  color: var(--color-white);
  background: var(--color-main);
}

/* ============================================================
   #sitemap — サイトマップ
   ============================================================ */
#sitemap {
  background: var(--color-bg-light);
  padding: 30px 0 80px;
}

#sitemap .sec-ttl {
  margin-bottom: 48px;
}

#sitemap .sec-ttl h2 {
  color: var(--color-main);
}

#sitemap .sec-ttl span {
  color: var(--color-text);
}

.sitemap-main {
  max-width: 640px;
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
}

.sitemap-main > div {
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.sitemap-main > div a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 4px;
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.sitemap-main > div a::after {
  content: "→";
  font-family: var(--font-en);
  font-size: 1rem;
  display: flex;
  align-items: center;
  height: 20px;
  border-left: 1px solid var(--color-border);
  padding-left: 16px;
  transition: color 0.2s ease, border-left-color 0.2s ease;
}

.sitemap-main > div a:hover {
  color: var(--color-main);
}

.sitemap-main > div a:hover::after {
  color: var(--color-main);
  border-left-color: var(--color-main);
}

/* ============================================================
   Footer
   style.css の .footer 系を踏襲
   ============================================================ */
.footer {
  background: var(--color-white);
  padding: 60px 0 40px;
  position: relative;
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__logo {
  margin-bottom: 48px;
}

.footer__logo img {
  height: 17px;
  width: auto;
}

.footer__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.footer__address {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 16px;
}

/* フッターリンク（Official Site / google map） */
.footer__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* コーポボタン共通 (style.css の footer__corp-btn に準拠) */
.footer__corp-btn,
.footer__map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--color-main);
  color: var(--color-white);
  font-family: var(--font-jp);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 0.25s ease;
  gap: 16px;
}

.footer__corp-btn:hover,
.footer__map-btn:hover {
  background: var(--color-dark);
}

.footer__corp-btn-arrow {
  font-family: var(--font-en);
  font-size: 1rem;
  display: flex;
  align-items: center;
  height: 20px;
  border-left: 1px solid var(--color-white);
  padding-left: 14px;
}

/* PAGE TOP */
.page-top {
  position: absolute;
  right: 40px;
  bottom: 90px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--color-main);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.page-top:hover {
  opacity: 0.55;
}

.page-top__arrow {
  display: block;
  position: relative;
  width: 14px;
  height: 40px;
}

.page-top__arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--color-main);
  transform: translateX(-50%);
}

.page-top__arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--color-main);
}

/* ブランドラベル */
.footer__brand {
  position: absolute;
  right: 40px;
  bottom: 26px;
  font-family: var(--font-en);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text);
}

/* ============================================================
   #entry — エントリーフォーム
   .requirements-table と同じ枠線・配色を踏襲
   ============================================================ */

/* セクション自体の padding */
#entry {
  background: var(--color-white);
  padding: 0;
}

/* リード文 */
.entry-lead {
  margin: 0 0 48px;
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--color-text);
}

/* フォーム全体: 外枠（requirements-table dl と同じ枠線） */
.entry-form {
  border: 1px solid var(--color-main);
}

/* 各行 */
.form-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-main);
}

.form-row--last {
  border-bottom: none;
}

/* ラベル列 */
.form-label {
  width: 25%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-main);
  line-height: 1.5;
}

/* 必須バッジ */
.badge-required {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-jp);
  letter-spacing: 0.05em;
  color: var(--color-white);
  background: var(--color-main);
  border-radius: 2px;
  width: fit-content;
}

/* 任意バッジ */
.badge-optional {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-jp);
  letter-spacing: 0.05em;
  color: var(--color-main);
  background: var(--color-white);
  border: 1px solid var(--color-border-entry);
  border-radius: 2px;
  width: fit-content;
}

/* 入力欄列 */
.form-field {
  width: 75%;
  padding: 16px 20px;
  border-left: 1px solid var(--color-main);
  display: flex;
  align-items: center;
}

/* テキスト系インプット共通 */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="tel"]:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-main);
}

/* select: 矢印 */
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23005083' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* textarea */
.form-field textarea {
  resize: vertical;
  line-height: 1.8;
  align-self: stretch;
}

/* ラジオボタングループ */
.form-radio-group {
  display: flex;
  gap: 32px;
}

.form-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.form-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-main);
  cursor: pointer;
  flex-shrink: 0;
}

/* 住所複合フィールド */
.form-address {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.form-address__zip,
.form-address__pref,
.form-address__street {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-address__zip input[type="text"] {
  max-width: 200px;
}

.form-address__pref select {
  max-width: 200px;
}

.form-address__label {
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-main);
}

/* 住所フィールド内 input/select は form-field 直下と異なるため個別指定 */
.form-address input[type="text"],
.form-address select {
  padding: 10px 12px;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.form-address input[type="text"]:focus,
.form-address select:focus {
  border-color: var(--color-main);
}

.form-address select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23005083' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* 送信ボタン: .requirements-btn a と同一見た目を button にも適用 */
.requirements-btn button {
  display: inline-block;
  width: 40%;
  padding: 15px 0;
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-main);
  background: var(--color-white);
  border: 1px solid var(--color-main);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.5s, color 0.5s;
}

.requirements-btn button:hover {
  color: var(--color-white);
  background: var(--color-main);
}

/* ============================================================
   entry フォーム: サーバーサイド機能追加分（バリデーション/スパム対策/確認画面）
   ============================================================ */

/* ハニーポット欄: 人間には見えないがボットは埋めてしまう隠しフィールド */
.form-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* フィールドごとのエラーメッセージ */
.form-error {
  margin-top: 8px;
  font-family: var(--font-jp);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-error);
}

/* フォーム全体の共通エラー（送信前の注意喚起） */
.form-error-summary {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--color-error);
  background: #fdf1f0;
  font-family: var(--font-jp);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-error);
}

/* 確認画面: form-row を読み取り専用表示に流用 */
.form-value {
  width: 75%;
  padding: 16px 20px;
  border-left: 1px solid var(--color-main);
  display: flex;
  align-items: center;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.8;
  white-space: pre-wrap;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

.confirm-actions form {
  width: 40%;
}

.confirm-actions button {
  display: block;
  width: 100%;
  padding: 15px 0;
  text-align: center;
  font-family: var(--font-jp);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.5s, color 0.5s;
}

.confirm-actions .btn-back {
  color: var(--color-main);
  background: var(--color-white);
  border: 1px solid var(--color-main);
}

.confirm-actions .btn-back:hover {
  color: var(--color-white);
  background: var(--color-main);
}

.confirm-actions .btn-submit {
  color: var(--color-white);
  background: var(--color-main);
  border: 1px solid var(--color-main);
}

.confirm-actions .btn-submit:hover {
  background: var(--color-dark);
}

.entry-complete {
  padding: 0 20px 160px;
  text-align: center;
  font-family: var(--font-jp);
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text);
}

.entry-complete__label {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-jp);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 767px) {
  .confirm-actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .confirm-actions form {
    width: 100%;
  }

  .form-value {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .entry-complete {
    padding: 0 20px 100px;
  }
}

/* ============================================================
   Responsive — SP (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --content-pad: 20px;
  }

  /* Header */
  .header {
    padding: 16px 20px;
  }

  .header__logo img {
    width: 180px;
  }

  .header__entry-btn {
    top: -16px;
    right: -20px;
    width: 120px;
    height: 56px;
    font-size: 0.875rem;
    gap: 8px;
  }

  /* #description */
  #description {
    padding: 60px 0 56px;
  }

  .sec-ttl h1,
  .sec-ttl h2 {
    font-size: clamp(32px, 10vw, 48px);
  }

  /* #requirements */
  #requirements {
    padding: 56px 0 72px;
  }

  .table-ttl {
    margin-bottom: 32px;
  }

  /* テーブルを縦積みに */
  .requirements-table dl > div {
    flex-direction: column;
    align-items: stretch;
  }

  .requirements-table dt {
    width: 100%;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    padding: 12px 16px 8px;
  }

  .requirements-table dd {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-main);
    padding: 12px 16px;
    font-size: 0.875rem;
  }

  /* CTA ボタン */
  .requirements-btn a {
    width: 80%;
  }

  /* #entry — フォーム縦積み */
  #entry {
    padding: 0;
  }

  .entry-lead {
    margin-bottom: 32px;
    font-size: 0.875rem;
    text-align: left;
  }

  .form-row {
    flex-direction: column;
  }

  .form-label {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 8px;
    font-size: 0.8125rem;
  }

  .form-field {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-main);
    padding: 12px 16px;
  }

  .form-address__zip input[type="text"],
  .form-address__pref select {
    max-width: 100%;
    width: 100%;
  }

  .requirements-btn button {
    width: 80%;
  }

  /* #sitemap */
  #sitemap {
    padding: 56px 0 72px;
  }

  /* Footer */
  .footer {
    padding: 48px 0 100px;
  }

  /* page-top の縦帯（約34px幅）と重ならないよう右側に余白を確保 */
  .footer__links {
    flex-direction: column;
    padding-right: 44px;
  }

  .footer__corp-btn,
  .footer__map-btn {
    width: 100%;
    justify-content: space-between;
  }

  .page-top {
    right: 20px;
    bottom: 88px;
  }

  .footer__brand {
    right: 20px;
    bottom: 14px;
  }
}

/* ============================================================
   Responsive — Tablet (768px〜1099px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1099px) {
  :root {
    --content-pad: 40px;
  }

  /* Header */
  .header__entry-btn {
    width: 140px;
    height: 70px;
  }

  /* テーブルの dt 幅を縮小 */
  .requirements-table dt {
    width: 30%;
    padding: 20px 10px;
  }

  .requirements-table dd {
    width: 70%;
    padding: 20px 10px;
  }

  /* フォームのラベル幅も縮小 */
  .form-label {
    width: 30%;
    padding: 20px 10px;
  }

  .form-field {
    width: 70%;
    padding: 16px 10px;
  }

  /* #sitemap */
  .sitemap-main {
    max-width: 100%;
  }
}
