/* =================================================================
 * 1. ベース設定 (Reset/Typography)
 * ================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* カラーパレット */
    --color-primary: #007bff;
    /* メインカラー (ブルー) */
    --color-secondary: #6c757d;
    /* サブカラー (グレー) */
    --color-text-dark: #343a40;
    /* テキスト色 */
    --color-background-light: #f8f9fa;
    /* 背景色 (薄いグレー) */
    --color-border: #dee2e6;
    /* 境界線色 */

    /* フォント */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: #ffffff;
    /* 白背景 */
    margin: 0;
    padding: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

/* =================================================================
 * 2. レイアウト
 * ================================================================= */
.site-main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 15px;
}

.job-article {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* =================================================================
 * 3. サイトヘッダー
 * ================================================================= */
.site-header {
    background-color: var(--color-text-dark);
    color: #ffffff;
    padding: 20px 15px;
    border-bottom: 4px solid var(--color-primary);
}

.site-logo {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-logo a {
    color: #ffffff;
    text-decoration: none;
}

/* =================================================================
 * 4. 求人情報ヘッダー
 * ================================================================= */
.job-header {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.job-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 700;
}

.job-subtitle {
    font-size: 1rem;
    margin-top: 0;
    opacity: 0.8;
}

/* =================================================================
 * 5. セクション共通スタイル
 * ================================================================= */
.job-section {
    padding: 30px;
}

.job-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-dark);
    border-bottom: 3px solid var(--color-primary);
    /* 下線をメインカラーに */
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 20px;
}

.job-section p {
    margin-bottom: 0;
    white-space: pre-wrap;
    /* nl2brに対応 */
}

/* =================================================================
 * 6. 基本情報リスト (DL/DT/DD)
 * ================================================================= */

/* ベース（モバイル/共通）スタイル */
.job-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
    /* モバイルでは1カラム（キーと値が上下） */
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-border);
}

.job-info-list dt,
.job-info-list dd {
    margin: 0;
    padding: 12px 15px;
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    white-space: pre-wrap;
}

.job-info-list dt {
    font-weight: 700;
    color: var(--color-primary);
    background-color: var(--color-background-light);
    border-bottom: none;
    /* DDの下線に統一 */
}

.job-info-list dd {
    border-bottom: 1px solid var(--color-border);
}

/* -------------------------------------- */
/* PC表示（案件名以外を4カラム） */
/* -------------------------------------- */
@media (min-width: 768px) {

    .job-info-list {
        display: grid;
        /* Gridレイアウトに切り替え */
        border-top: none;

        /* 4つの均等なカラムを定義 */
        grid-template-columns: repeat(4, 1fr);
    }

    /* ----------------------------------- */
    /* 1. 案件名（最初の1ペア）を4カラム全体に表示 */
    /* ----------------------------------- */

    /* 案件名（キー）：4カラム全体 */
    .job-info-list dt:first-of-type {
        grid-column: 1 / span 4;
        /* 4カラム全体を使用 */
        border-top: 1px solid var(--color-border);
        border-right: none;
    }

    /* 案件名の値：4カラム全体 */
    .job-info-list dd:first-of-type {
        grid-column: 1 / span 4;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        /* 案件名と次の項目の区切り線 */
    }

    /* ----------------------------------- */
    /* 2. 残りの項目を4カラム表示（キーと値は上下） */
    /* ----------------------------------- */

    /* 案件名以外の全てのDT (キー) */
    .job-info-list dt:not(:first-of-type) {
        /* Gridの自動配置でDTが左から順に並びます */
        border-top: 1px solid var(--color-border);
        /* border-right: 1px solid var(--color-border); */
        text-align: center;
    }

    /* 案件名以外の全てのDD (値) */
    .job-info-list dd:not(:first-of-type) {
        /* Gridの自動配置でDTの次にDDが並びます */
        /* border-right: 1px solid var(--color-border); */
        border-bottom: 1px solid var(--color-border);
        text-align: center;

        /* キーと値が上下になるように、DTのすぐ下にDDを配置する */
        /* DTとDDが連続しているため、このままだと Grid は DT, DT, DT, DT, DD, DD, DD, DD と並べてしまいます。
           これを防ぐために、Gridのフローと高さを制御します。 */

        /* ここでは、キーと値が常に縦に並ぶように、Gridの配置を再調整します。 */
        grid-row: auto;
        /* Gridの行の高さを値に合わせて自動調整 */
    }

    /* 4つ目のDTとDDの右側の線を除去して、4カラムの区切りを作る */
    .job-info-list dt:nth-of-type(4n + 1):not(:first-of-type),
    /* 5, 9, 13...番目のDT */
    .job-info-list dd:nth-of-type(4n + 1):not(:first-of-type) {
        /* 5, 9, 13...番目のDD */
        border-right: none;
    }

    /* 案件名以外の項目のうち、最後の行のDDの下線を削除 */
    .job-info-list dd:nth-last-child(-n+4) {
        /* 最後の4つのDD（行の末尾）の下線を削除 */
        border-bottom: none;
    }

    /* DTとDDを強制的に縦に並べるためのGrid設定 */
    /* Gridの自動配置 (auto-flow) は基本的に横向きのため、縦に並べるにはHTML側の変更が最も確実です。
       HTML変更ができないため、Gridの row-start/end を使って見た目を整えますが、
       DTとDDの数がぴったり合わないと崩れるリスクがあります。
       
       ここでは、以前の3カラムの際と同様に、DTとDDを交互に並べ、
       長文になっても見た目が崩れないように、各DT/DDのセルの高さを揃える機能（align-items: stretch）は**使いません**。
       このため、**キーと値のセルが縦に伸びる**ことで、対応関係は維持されます。
    */
}

/* =================================================================
 * 7. モバイル対応 (480px以下)
 * ================================================================= */
@media (max-width: 480px) {
    .job-header {
        padding: 20px 15px;
    }

    .job-title {
        font-size: 1.5rem;
    }

    .job-section {
        padding: 20px 15px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

.cta-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 18px 0 10px
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06)
}

.cta-primary {
    background: #111;
    color: #fff
}

.cta-line {
    background: #06C755;
    color: #fff;
    border-color: rgba(0, 0, 0, .06)
}

.cta-sub {
    font-size: 12px;
    opacity: .8;
    margin-top: 6px
}

.cta-banner {
    margin: 22px 0;
    padding: 16px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .72));
    color: #fff;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap
}

.cta-banner strong {
    font-size: 16px
}

.cta-banner .cta-area {
    margin: 0
}

.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding: 10px
}

.sticky-cta .inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    gap: 10px
}

.sticky-cta a {
    flex: 1
}

@media (min-width: 900px) {
    .sticky-cta {
        display: none;
    }
}

body {
    padding-bottom: 72px;
}

/* 下部固定の分 */
@media (min-width: 900px) {
    body {
        padding-bottom: 0;
    }
}

/* CTAリンクはホバーしても下線を出さない */
.cta-area a,
.cta-banner a,
.sticky-cta a {
    text-decoration: none !important;
}

.cta-area a:hover,
.cta-banner a:hover,
.sticky-cta a:hover,
.cta-area a:focus,
.cta-banner a:focus,
.sticky-cta a:focus {
    text-decoration: none !important;
}

.site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    text-decoration: none;
    letter-spacing: .04em;
}

.site-logo:hover,
.site-logo:focus {
    text-decoration: none;
    opacity: .85;
}

.cta-sub {
    width: 100%;
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    text-align: center;
}

/* 中央寄せの基準を作る */
.cta-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    /* ← 真の中央 */
}

/* ボタン群そのもの */
.cta-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}