.jobs-page {
    background: #f6fffa;
    min-height: calc(100vh - 70px);
    min-height: calc(100dvh - 70px);
    padding: 52px 0 80px;
}

.jobs-hero {
    background: linear-gradient(135deg, #0b6972 0%, #0f7d84 35%, #19a0a7 100%);
    color: #fff;
    border-radius: 26px;
    padding: 54px 52px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(11, 105, 114, 0.18);
}

.jobs-hero::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -140px;
    right: -50px;
}

.jobs-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    bottom: -110px;
    left: 58%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #dffcf5;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 8px 14px;
}

.jobs-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: -0.04em;
}

.jobs-hero p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 700px;
}

.jobs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    padding: 0 4px;
}

.jobs-count {
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    background: #dff7f7;
    border: 1px solid rgba(12, 139, 149, 0.18);
    border-radius: 12px;
    color: #0d5c63;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.jobs-count strong {
    color: #0f172a;
}

.jobs-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #c9e6e8;
    background: #fff;
    color: #0d5c63;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    appearance: none;
    cursor: pointer;
}

.jobs-contact-link:hover,
.jobs-contact-link:focus-visible {
    background: #0d5c63;
    color: #fff;
    border-color: #0d5c63;
    transform: translateY(-1px);
    outline: none;
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dfece9;
    border-radius: 26px;
    padding: 18px 18px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
    cursor: pointer;
}

.job-card:focus-visible {
    outline: 3px solid rgba(13, 92, 99, 0.25);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .job-card:hover {
        transform: translateY(-2px);
        border-color: #bfdfe1;
        box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
    }
}

.job-card-main {
    display: grid;
    grid-template-columns: minmax(320px, 1.2fr) minmax(0, 1.4fr);
    align-items: stretch;
    gap: 26px;
}

.job-thumbnail-wrap {
    position: relative;
    width: 100%;
    min-height: 270px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #edf8f8, #f5f7fa);
    border: 1px solid #dfeaf0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.job-thumbnail-image {
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    display: block;
}

.job-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 190px;
    font-size: 2.5rem;
    color: #8ca0a8;
}

.job-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 4px 6px 0;
}

.job-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.job-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #edf7f6;
    color: #0d5c63;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid #d7eeef;
}

.job-badge-primary {
    background: #0d5c63;
    color: #fff;
    border-color: #0d5c63;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.job-title {
    color: #0f172a;
    font-size: clamp(1.2rem, 1.7vw, 2rem);
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 0.9rem;
}

.job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.job-meta-item i {
    color: #0d5c63;
    font-size: 0.85rem;
}

.job-summary {
    margin: 0 0 18px;
    color: #48586d;
    line-height: 1.65;
    font-size: 1.04rem;
    max-width: 58ch;
}

.job-salary-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #475569;
}

.job-salary-line span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: #64748b;
}

.job-salary-line strong {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.job-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 6px;
}

.job-mini-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    gap: 18px;
    flex-wrap: wrap;
}

.job-mini-item {
    min-width: 0;
    text-align: left;
    padding: 0;
    background: transparent;
    border: none;
}

.job-mini-item:last-child {
    margin-left: auto;
}

.job-mini-label {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 3px;
    font-weight: 800;
}

.job-mini-item strong {
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
}

.job-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.btn-view-job {
    border: 1px solid #d4dde2;
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.btn-view-job:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    transform: translateY(-1px);
}

.empty-state {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
    border: 1px dashed #c8dfe2;
    border-radius: 24px;
    padding: 72px 30px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.empty-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #edf8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #0d5c63;
    font-size: 1.8rem;
    border: 1px solid #d6eff0;
}

.empty-state h3 {
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    margin: 0 auto 20px;
    max-width: 520px;
    line-height: 1.7;
}

.empty-state-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #0d5c63;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.empty-state-link:hover,
.empty-state-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(13, 92, 99, 0.2);
    color: #fff;
    outline: none;
}

/* Job Details Modal */

.job-modal .modal-content {
    border: none;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.18);
}

.job-modal .modal-dialog {
    max-width: min(1100px, calc(100% - 3rem));
}

.job-modal .modal-header {
    background: linear-gradient(135deg, #0b2f3d 0%, #0d3f4f 100%);
    color: #fff;
    padding: 18px 20px 16px;
    border: none;
    align-items: flex-start;
    gap: 22px;
    position: relative;
}

.job-modal .modal-header.job-modal-header {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    align-items: center;
    width: 100%;
    padding-right: 52px;
}

.job-modal-visual {
    width: 100%;
    min-height: 180px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
}

.job-modal-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #e9f0f2;
}

.job-modal-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.75);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.job-modal .modal-header .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.9;
    margin: 0;
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
}

.modal-job-header {
    display: flex;
    gap: 16px;
    align-items: center;
    min-width: 0;
}

.modal-header-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.modal-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-header-salary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

.modal-header-salary strong {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #fff;
    font-weight: 800;
}

.modal-job-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.modal-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 0;
}

.modal-job-meta .job-meta-item {
    color: rgba(255, 255, 255, 0.8);
}

.modal-job-meta .job-meta-item i {
    color: rgba(255, 255, 255, 0.9);
}

.job-meta-salary {
    color: #ffffff;
    font-weight: 700;
}

.salary-label {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.82);
}

.modal-timestamps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.timestamp-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
}

.timestamp-item i {
    font-size: 0.66rem;
}

.job-modal .modal-body {
    padding: 26px 28px 18px;
    background: #ffffff;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.detail-section p {
    color: #475569;
    line-height: 1.75;
    white-space: pre-line;
    margin: 0;
    font-size: 1.02rem;
}

.requirements {
    color: #475569;
    line-height: 1.75;
    white-space: pre-line;
}

.job-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
    background: #f7faf8;
    border: 1px solid #e5ece9;
    border-radius: 12px;
    padding: 12px 14px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    color: #3c4f5f;
    border: 1px solid #e7edf0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.requirements-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #475569;
    line-height: 1.8;
}

.requirements-list li {
    margin-bottom: 8px;
}

.modal-footer {
    padding: 18px 28px 24px;
    border-top: 1px solid #edf2f7;
    background: #ffffff;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer .btn {
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 700;
}

.modal-footer .btn-outline-secondary {
    border-color: #d8e2ea;
    color: #0f172a;
}

.modal-footer .btn-dark {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.hr-contact-modal .modal-content {
    border: none;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.hr-contact-modal .modal-header {
    background: linear-gradient(135deg, #0d5c63 0%, #0b6d72 100%);
    color: #fff;
    padding: 22px 24px;
    border: none;
}

.hr-contact-modal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.9;
}

.modal-kicker {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.hr-contact-modal h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.hr-contact-modal .modal-body {
    padding: 24px;
}

.hr-contact-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.hr-contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #dff7f7;
    color: #0d5c63;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.hr-contact-item label {
    display: block;
    margin: 0 0 4px;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.hr-contact-item p {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.5;
}

.hr-contact-modal .modal-footer {
    padding: 18px 24px 22px;
}

/* ==========================================================================
   Responsive ladder — Careers page
   XXL >=1400 | XL 1200-1399 (base) | LG <=1199 | MD <=991 | SM <=767
   XS <=575 | XXS <=400 | Tiny <=360 | + landscape, touch, reduced motion
   ========================================================================== */

/* ---------- XXL: large desktops (>= 1400px) ---------- */
@media (min-width: 1400px) {
    .jobs-page {
        padding: 60px 0 96px;
    }

    .jobs-hero {
        padding: 64px 60px;
    }

    .job-list {
        gap: 24px;
    }

    .job-card-main {
        grid-template-columns: minmax(360px, 1.1fr) minmax(0, 1.5fr);
        gap: 32px;
    }

    .job-thumbnail-wrap,
    .job-thumbnail-image {
        min-height: 300px;
    }
}

/* ---------- LG: laptops / small desktops (<= 1199.98px) ---------- */
@media (max-width: 1199.98px) {
    .jobs-page {
        padding: 44px 0 72px;
    }

    .jobs-hero {
        padding: 46px 40px;
        border-radius: 22px;
    }

    .jobs-hero p {
        font-size: 1.02rem;
    }

    .job-card-main {
        grid-template-columns: minmax(280px, 1fr) minmax(0, 1.25fr);
        gap: 22px;
    }

    .job-thumbnail-wrap,
    .job-thumbnail-image {
        min-height: 235px;
    }

    .job-summary {
        font-size: 1rem;
    }

    .job-modal .modal-header.job-modal-header {
        grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    }

    .modal-job-header h2 {
        font-size: 1.6rem;
    }
}

/* ---------- MD: tablets (<= 991.98px) ---------- */
@media (max-width: 991.98px) {
    .jobs-page {
        padding: 38px 0 64px;
    }

    .jobs-hero {
        padding: 42px 34px;
        margin-bottom: 24px;
    }

    .jobs-hero::before {
        width: 240px;
        height: 240px;
        top: -120px;
        right: -60px;
    }

    .jobs-hero::after {
        width: 170px;
        height: 170px;
        bottom: -90px;
        left: 62%;
    }

    .hero-content {
        max-width: 100%;
    }

    /* Card switches from side-by-side to a stacked banner layout */
    .job-card {
        padding: 16px;
        border-radius: 22px;
    }

    .job-card-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .job-thumbnail-wrap {
        min-height: 0;
        aspect-ratio: 16 / 9;
        max-height: 280px;
        border-radius: 16px;
    }

    .job-thumbnail-image {
        min-height: 0;
        height: 100%;
        aspect-ratio: auto;
    }

    .job-thumbnail-placeholder {
        min-height: 0;
    }

    .job-content {
        padding: 0;
        justify-content: flex-start;
    }

    /* Modal header stacks too */
    .job-modal .modal-header.job-modal-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 16px 16px 18px;
    }

    .job-modal-visual {
        position: relative;
        min-height: 0;
        aspect-ratio: 16 / 9;
        max-height: 220px;
        border-radius: 14px;
    }

    .job-modal-thumb {
        height: 100%;
    }

    /* Close button now sits over artwork — give it a readable chip */
    .job-modal .modal-header .btn-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        filter: none;
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.92);
        box-shadow: 0 4px 12px rgba(8, 30, 38, 0.3);
    }

    .modal-job-header h2 {
        font-size: 1.5rem;
    }
}

/* ---------- SM: large phones / small tablets (<= 767.98px) ---------- */
@media (max-width: 767.98px) {
    .jobs-page {
        padding: 30px 0 52px;
    }

    .jobs-hero {
        padding: 34px 24px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    .jobs-hero h1 {
        font-size: clamp(1.7rem, 6.4vw, 2.3rem);
        margin-bottom: 14px;
    }

    .jobs-hero p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .hero-label {
        font-size: 0.72rem;
        padding: 7px 12px;
        margin-bottom: 14px;
    }

    .jobs-hero::before {
        width: 190px;
        height: 190px;
        top: -100px;
        right: -70px;
    }

    .jobs-hero::after {
        display: none;
    }

    .jobs-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
        padding: 0;
    }

    .jobs-count {
        font-size: 0.9rem;
    }

    .count-badge {
        min-width: 40px;
        height: 40px;
    }

    .jobs-contact-link {
        width: 100%;
        justify-content: center;
        padding: 11px 16px;
    }

    .job-list {
        gap: 16px;
    }

    .job-card {
        padding: 14px;
        border-radius: 20px;
    }

    .job-card-main {
        gap: 14px;
    }

    .job-thumbnail-wrap {
        max-height: 210px;
    }

    .job-card-header {
        gap: 8px;
        margin-bottom: 10px;
    }

    .job-badge {
        padding: 6px 12px;
        font-size: 0.64rem;
    }

    .job-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .job-meta {
        gap: 8px 14px;
        margin-bottom: 12px;
        font-size: 0.85rem;
    }

    .job-summary {
        margin-bottom: 14px;
        font-size: 0.95rem;
    }

    .job-mini-list {
        gap: 12px;
    }

    .empty-state {
        padding: 48px 20px;
        border-radius: 20px;
    }

    .empty-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .empty-state h3 {
        font-size: 1.2rem;
    }

    .empty-state p {
        font-size: 0.94rem;
    }

    .empty-state-link {
        width: 100%;
        justify-content: center;
    }

    .job-modal .modal-content,
    .hr-contact-modal .modal-content {
        border-radius: 18px;
    }

    .job-modal .modal-body {
        padding: 20px 18px 14px;
    }

    .detail-section {
        margin-bottom: 22px;
    }

    .detail-section h4 {
        font-size: 1.1rem;
    }

    .detail-section p,
    .requirements-list {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Short measures make ragged edges and orphans obvious; let the browser
       balance headings and avoid stranding a single word on the last line. */
    /* Not the hero h1 — balancing splits it "Find your / next opportunity." */
    .job-title,
    .modal-job-header h2,
    .empty-state h3 {
        text-wrap: balance;
    }

    .jobs-hero p,
    .job-summary,
    .detail-section p,
    .requirements-list li,
    .empty-state p {
        text-wrap: pretty;
    }

    /* A pasted URL or long email in a job description must not widen the modal */
    .job-summary,
    .detail-section p,
    .requirements-list li,
    .job-meta-item {
        overflow-wrap: break-word;
    }

    .modal-job-header h2 {
        font-size: 1.35rem;
    }

    .modal-job-meta {
        gap: 8px 14px;
        font-size: 0.85rem;
    }

    .modal-footer {
        padding: 14px 18px 18px;
        gap: 10px;
    }

    .hr-contact-modal .modal-header {
        padding: 18px;
    }

    .hr-contact-modal h3 {
        font-size: 1.2rem;
    }

    .hr-contact-modal .modal-body {
        padding: 18px;
    }

    .hr-contact-item {
        padding: 14px;
        gap: 12px;
    }

    .hr-contact-modal .modal-footer {
        padding: 14px 18px 18px;
    }
}

/* ---------- XS: phones (<= 575.98px) ---------- */
@media (max-width: 575.98px) {
    .jobs-page {
        padding: 24px 0 44px;
    }

    .jobs-hero {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .jobs-hero h1 {
        letter-spacing: -0.02em;
    }

    .jobs-hero p {
        font-size: 0.94rem;
    }

    .job-card {
        padding: 12px;
        border-radius: 18px;
    }

    .job-thumbnail-wrap {
        max-height: 190px;
        border-radius: 14px;
    }

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

    .job-meta {
        gap: 6px 12px;
        font-size: 0.82rem;
    }

    .job-salary-line {
        margin-bottom: 10px;
    }

    .job-mini-list {
        gap: 10px 16px;
    }

    .job-mini-item:last-child {
        margin-left: 0;
    }

    .job-modal .modal-dialog,
    .hr-contact-modal .modal-dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .job-modal .modal-content,
    .hr-contact-modal .modal-content {
        border-radius: 16px;
    }

    .job-modal .modal-header.job-modal-header {
        padding: 14px 14px 16px;
        gap: 14px;
    }

    .job-modal-visual {
        max-height: 170px;
    }

    .modal-job-tags {
        gap: 8px;
    }

    .modal-header-copy {
        gap: 6px;
    }

    .modal-job-header h2 {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    /* Flow the meta inline and let it wrap: four short items cost four lines
       stacked, but only two wrapped, which is ~60px of the modal back. */
    .modal-job-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px 12px;
        font-size: 0.8rem;
    }

    .modal-job-meta .job-meta-item {
        gap: 6px;
    }

    .modal-timestamps {
        gap: 5px;
    }

    .timestamp-item {
        padding: 3px 8px;
        font-size: 0.62rem;
    }

    .job-modal .modal-body {
        padding: 18px 14px 12px;
    }

    /* Keep 15px copy — tighten the leading instead of the type */
    .detail-section {
        margin-bottom: 18px;
    }

    .detail-section h4 {
        margin-bottom: 8px;
    }

    .detail-section p,
    .requirements-list {
        line-height: 1.62;
    }

    .requirements-list {
        padding-left: 1.05rem;
    }

    .requirements-list li {
        margin-bottom: 6px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 14px;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        text-align: center;
    }

    .hr-contact-card {
        gap: 12px;
    }

    .hr-contact-item {
        padding: 12px;
        border-radius: 14px;
    }

    .hr-contact-icon {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }

    .hr-contact-item p {
        font-size: 0.92rem;
        overflow-wrap: anywhere;
    }
}

/* ---------- XXS: small phones (<= 400px) ---------- */
@media (max-width: 400px) {
    .jobs-page {
        padding: 20px 0 40px;
    }

    .jobs-hero {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .jobs-hero h1 {
        font-size: clamp(1.45rem, 7.4vw, 1.9rem);
    }

    .hero-label {
        padding: 6px 10px;
        font-size: 0.66rem;
        letter-spacing: 0.6px;
    }

    .jobs-count {
        gap: 8px;
        font-size: 0.85rem;
    }

    .count-badge {
        min-width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .job-card {
        padding: 10px;
        border-radius: 16px;
    }

    .job-thumbnail-wrap {
        max-height: 160px;
    }

    .job-badge {
        padding: 5px 10px;
        font-size: 0.6rem;
        letter-spacing: 0.04em;
    }

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

    .job-summary {
        font-size: 0.9rem;
    }

    .job-mini-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .empty-state {
        padding: 36px 14px;
    }

    .job-modal .modal-body {
        padding: 16px 12px 10px;
    }

    .detail-section h4 {
        font-size: 1.02rem;
    }

    .detail-section p,
    .requirements-list {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .modal-job-meta {
        gap: 4px 10px;
        font-size: 0.76rem;
    }

    .timestamp-item {
        padding: 3px 7px;
        font-size: 0.6rem;
    }

    .hr-contact-item p {
        font-size: 0.86rem;
    }
}

/* ---------- Tiny: <= 360px (Fold cover screen, older handsets) ---------- */
@media (max-width: 360px) {
    .jobs-hero {
        padding: 20px 14px;
    }

    .jobs-hero p {
        font-size: 0.88rem;
    }

    .job-meta {
        font-size: 0.78rem;
    }

    .job-thumbnail-wrap {
        max-height: 140px;
    }

    .job-modal .modal-header.job-modal-header {
        padding: 12px 12px 14px;
    }

    .job-modal-visual {
        max-height: 140px;
    }

    .modal-job-header h2 {
        font-size: 1.08rem;
    }

    .hr-contact-item {
        padding: 10px;
        gap: 10px;
    }
}

/* ---------- Short viewports (phones/tablets in landscape) ---------- */
@media (max-height: 540px) and (orientation: landscape) {
    .job-modal .modal-dialog,
    .hr-contact-modal .modal-dialog {
        max-width: min(1100px, calc(100% - 1.5rem));
        margin: 0.5rem auto;
    }

    .job-modal .modal-dialog-scrollable .modal-content {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    /* Wide-but-short: put the artwork back beside the copy */
    .job-modal .modal-header.job-modal-header {
        grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
        gap: 14px;
        padding: 12px 44px 12px 14px;
    }

    .job-modal-visual {
        max-height: 120px;
    }

    .modal-header-copy {
        gap: 5px;
    }

    .modal-job-tags .job-badge {
        padding: 4px 10px;
        font-size: 0.6rem;
    }

    .modal-job-header h2 {
        font-size: 1.15rem;
    }

    .modal-job-meta {
        flex-direction: row;
        gap: 6px 14px;
    }

    .modal-timestamps {
        margin-top: 0;
    }

    .timestamp-item {
        padding: 3px 8px;
        font-size: 0.62rem;
    }

    .job-modal .modal-body {
        padding: 14px 16px 10px;
    }

    .modal-footer {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    .modal-footer .btn {
        width: auto;
    }
}

/* ---------- Touch devices: no hover, so give press feedback instead ---------- */
@media (hover: none) {
    .job-card {
        -webkit-tap-highlight-color: rgba(13, 92, 99, 0.12);
    }

    .job-card:active {
        border-color: #bfdfe1;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    }

    .jobs-contact-link:active,
    .empty-state-link:active {
        transform: translateY(1px);
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .job-card,
    .jobs-contact-link,
    .empty-state-link,
    .btn-view-job {
        transition: none;
    }
}

/* ---------- Mobile: job-details modal drops its thumbnail ----------
   On phones the artwork only pushes the actual job details below the fold,
   and it is already visible on the card behind the modal. Placed last so it
   also overrides the short-landscape block above. */
@media (max-width: 767.98px) {
    .job-modal-visual {
        display: none;
    }

    .job-modal .modal-header.job-modal-header {
        grid-template-columns: minmax(0, 1fr);
        padding-right: 46px;
    }

    /* Close button is back over the dark header, not artwork — drop the chip */
    .job-modal .modal-header .btn-close {
        top: 14px;
        right: 14px;
        width: 1em;
        height: 1em;
        border-radius: 0;
        background-color: transparent;
        box-shadow: none;
        filter: invert(1) grayscale(1);
        opacity: 0.9;
    }
}
