/* =============================================================================
   Recruit detail (Job Description) page
   Uses the site's tokens from style.css: --organe, --dark, --gray, fonts UTM_*
============================================================================= */
.jd-page {
    --jd-accent: var(--organe, #f7911d);
    --jd-accent-dark: #d9760a;
    --jd-accent-soft: #fff4e6;
    --jd-ink: var(--dark, #06191d);
    --jd-muted: #5f6b6d;
    --jd-line: #e6e8ea;
    --jd-surface: #ffffff;
    --jd-bg: #f6f7f8;
    --jd-open: #138a4b;
    --jd-open-soft: #e7f6ee;
    --jd-closed: #b42318;
    --jd-closed-soft: #fdecea;
    --jd-radius: 12px;

    display: flow-root;
    clear: both;
    width: 100%;
    background: var(--jd-bg);
    color: var(--jd-ink);
    padding: 24px 0 56px;
}

.jd-page .jd-container {
    width: auto;
    max-width: 1200px;
    padding: 0 16px;
}

/* ---------- Breadcrumb ---------- */
.jd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: var(--jd-muted);
    margin-bottom: 16px;
}

    .jd-breadcrumb a {
        color: var(--jd-muted);
        text-decoration: none;
    }

        .jd-breadcrumb a:hover {
            color: var(--jd-accent);
        }

.jd-breadcrumb-current {
    color: var(--jd-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60ch;
}

/* ---------- Header ---------- */
.jd-header {
    display: flex;
    gap: 32px;
    align-items: flex-end;
    justify-content: space-between;
    background: var(--jd-surface);
    border: 1px solid var(--jd-line);
    border-radius: var(--jd-radius);
    padding: 28px 32px;
}

.jd-header-main {
    min-width: 0;
    flex: 1;
}

.jd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.jd-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4;
    background: var(--jd-accent-soft);
    color: var(--jd-accent-dark);
}

.jd-tag--muted {
    background: #f1f2f3;
    color: var(--jd-muted);
}

.jd-tag--open {
    background: var(--jd-open-soft);
    color: var(--jd-open);
}

    .jd-tag--open i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 0 3px rgba(19, 138, 75, .18);
    }

.jd-tag--closed {
    background: var(--jd-closed-soft);
    color: var(--jd-closed);
}

.jd-title {
    font-family: UTM_AvoBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 32px;
    line-height: 1.25;
    margin: 0 0 18px;
    text-wrap: balance;
}

.jd-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 0;
    padding: 0;
}

.jd-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--jd-muted);
}

.jd-highlight--salary {
    color: var(--jd-accent-dark);
    font-family: UTM_AvoBold, Arial, sans-serif;
}

.jd-page svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jd-header-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 200px;
    text-align: center;
}

.jd-countdown {
    font-size: 13px;
    color: var(--jd-muted);
}

/* ---------- Buttons ---------- */
.jd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border-radius: 8px;
    font-family: UTM_AvoBold, Arial, sans-serif;
    font-size: 15px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.jd-btn--primary {
    background: var(--jd-accent);
    color: #fff;
    border: 1px solid var(--jd-accent);
}

    .jd-btn--primary:hover {
        background: var(--jd-accent-dark);
        border-color: var(--jd-accent-dark);
    }

.jd-btn--ghost {
    background: transparent;
    color: var(--jd-ink);
    border: 1px solid var(--jd-line);
}

    .jd-btn--ghost:hover {
        border-color: var(--jd-accent);
        color: var(--jd-accent-dark);
    }

.jd-btn--block {
    display: flex;
    width: 100%;
    margin-top: 20px;
}

.jd-btn:focus-visible,
.jd-related-link:focus-visible,
.jd-more:focus-visible,
.jd-breadcrumb a:focus-visible {
    outline: 3px solid rgba(247, 145, 29, .45);
    outline-offset: 2px;
}

/* ---------- Expired notice ---------- */
.jd-notice {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #f6c9c4;
    background: var(--jd-closed-soft);
    color: var(--jd-closed);
    font-size: 15px;
}

.jd-text-closed {
    color: var(--jd-closed);
}

/* ---------- Body ---------- */
.jd-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

.jd-main {
    background: var(--jd-surface);
    border: 1px solid var(--jd-line);
    border-radius: var(--jd-radius);
    padding: 8px 32px;
}

.jd-section {
    padding: 26px 0;
    border-bottom: 1px solid var(--jd-line);
}

    .jd-section:last-child {
        border-bottom: 0;
    }

.jd-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-family: UTM_AvoBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 20px;
}

.jd-section-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--jd-accent-soft);
    color: var(--jd-accent-dark);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* Rich text coming from the database (HTML) */
.jd-richtext {
    font-size: 15.5px;
    line-height: 1.75;
    color: #2b3638;
    max-width: 72ch;
}

    .jd-richtext p {
        margin: 0 0 10px;
    }

    .jd-richtext ul,
    .jd-richtext ol {
        margin: 0;
        padding-left: 0;
    }

        .jd-richtext ul li,
        .jd-richtext ol li {
            position: relative;
            padding-left: 22px;
            margin-bottom: 8px;
        }

        .jd-richtext ul li::before {
            content: "";
            position: absolute;
            left: 4px;
            top: .72em;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--jd-accent);
        }

        .jd-richtext ol {
            counter-reset: jd;
        }

            .jd-richtext ol li {
                counter-increment: jd;
            }

                .jd-richtext ol li::before {
                    content: counter(jd) ".";
                    position: absolute;
                    left: 0;
                    color: var(--jd-accent-dark);
                    font-family: UTM_AvoBold, Arial, sans-serif;
                }

    .jd-richtext a {
        color: var(--jd-accent-dark);
    }

    .jd-richtext b,
    .jd-richtext strong {
        font-family: UTM_AvoBold, Arial, sans-serif;
        font-weight: normal;
    }

.jd-apply .jd-btn {
    margin-top: 8px;
}

/* ---------- Sidebar ---------- */
.jd-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 90px;
}

.jd-card {
    background: var(--jd-surface);
    border: 1px solid var(--jd-line);
    border-radius: var(--jd-radius);
    padding: 22px 24px;
}

.jd-card-title {
    margin: 0 0 14px;
    font-family: UTM_AvoBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.jd-facts {
    margin: 0;
}

.jd-fact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--jd-line);
    font-size: 14.5px;
}

    .jd-fact:last-child {
        border-bottom: 0;
    }

    .jd-fact dt {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--jd-muted);
        flex: none;
    }

        .jd-fact dt svg {
            color: var(--jd-accent);
        }

    .jd-fact dd {
        margin: 0;
        text-align: right;
        font-family: UTM_AvoBold, Arial, sans-serif;
        min-width: 0;
        overflow-wrap: anywhere;
    }

.jd-related {
    margin: 0;
    padding: 0;
}

    .jd-related li {
        border-bottom: 1px solid var(--jd-line);
    }

        .jd-related li:last-child {
            border-bottom: 0;
        }

.jd-related-link {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

    .jd-related-link:hover .jd-related-title {
        color: var(--jd-accent-dark);
    }

.jd-related-title {
    display: block;
    font-family: UTM_AvoBold, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color .15s ease;
}

.jd-related-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 13px;
    color: var(--jd-muted);
}

.jd-related-salary {
    color: var(--jd-accent-dark);
}

.jd-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: var(--jd-accent-dark);
    text-decoration: none;
}

    .jd-more:hover {
        text-decoration: underline;
    }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .jd-body {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 860px) {
    .jd-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 22px 20px;
    }

    .jd-header-cta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        min-width: 0;
    }

        .jd-header-cta .jd-btn {
            flex: 1 1 160px;
        }

    .jd-countdown {
        order: 3;
        width: 100%;
    }

    .jd-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .jd-aside {
        position: static;
    }

    .jd-main {
        padding: 4px 20px;
    }
}

@media (max-width: 617px) {
    .jd-page {
        padding-top: 16px;
    }

    .jd-title {
        font-size: 24px;
    }

    .jd-highlights {
        flex-direction: column;
        gap: 8px;
    }

    .jd-section-title {
        font-size: 18px;
    }

    .jd-richtext {
        font-size: 15px;
    }

    .jd-card {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jd-btn,
    .jd-related-title {
        transition: none;
    }
}
