:root {
    --primary: #007f86;
    --primary-dark: #00636b;
    --green: #177a50;
    --green-soft: #daf3e5;

    --text: #171717;
    --muted: #667085;

    --border: #d9dee5;
    --soft-border: #e8eaed;

    --background: #ffffff;
    --soft: #f7f8f8;

    --radius: 18px;

    --shadow:
        0 10px 30px rgba(15, 23, 42, .06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background: #fff;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ==============================
   SEARCH HEADER
============================== */

.search-hero {
    padding:
        42px
        max(24px, calc((100vw - 1460px) / 2))
        38px;

    background: #f7f7f7;

    border-bottom:
        1px solid #eeeeee;
}

.brand-area {
    text-align: center;

    margin-bottom: 28px;
}

.brand {
    color: var(--primary);

    font-size: 29px;

    font-weight: 700;

    letter-spacing: -.04em;
}

.brand-area p {
    margin:
        8px 0 0;

    color: #667085;

    font-size: 15px;
}

.main-search {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        1px
        minmax(0, 1fr)
        185px;

    align-items: center;

    width:
        min(1000px, 100%);

    margin: auto;

    min-height: 74px;

    background: #fff;

    border:
        1px solid #dddddd;

    border-radius: 20px;

    overflow: hidden;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, .12);
}

.search-field {
    display: flex;

    align-items: center;

    gap: 15px;

    padding:
        0 24px;
}

.search-field input {
    width: 100%;

    height: 70px;

    padding: 0;

    border: 0;

    outline: 0;

    color: #222;

    background: transparent;

    font-size: 17px;
}

.search-field input::placeholder {
    color: #667085;
}

.field-icon,
.location-icon {
    color: #66b98c;

    font-size: 27px;

    flex-shrink: 0;
}

.search-divider {
    width: 1px;

    height: 44px;

    background: #d4d8de;
}

.search-button {
    align-self: stretch;

    border: 0;

    cursor: pointer;

    color: #fff;

    background: var(--primary);

    font-size: 17px;

    font-weight: 600;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    transition: .2s;
}

.search-button:hover {
    background:
        var(--primary-dark);
}

.search-button-icon {
    font-size: 25px;
}


/* ==============================
   MAIN JOB AREA
============================== */

.jobs-page {
    width:
        min(1460px, calc(100% - 40px));

    margin: auto;

    padding:
        30px 0 60px;
}

.results-heading {
    margin-bottom: 18px;
}

.results-heading h1 {
    margin:
        0 0 6px;

    font-size: 22px;

    font-weight: 600;
}

.results-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

.jobs-layout {
    display: grid;

    grid-template-columns:
        500px
        minmax(0, 1fr);

    gap: 30px;

    align-items: start;
}


/* ==============================
   JOB LIST
============================== */

.job-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.job-card {
    padding:
        25px 21px;

    background: #fff;

    border:
        1px solid var(--border);

    border-radius: 19px;

    cursor: pointer;

    transition:
        border-color .18s,
        box-shadow .18s,
        transform .18s;

    outline: 0;
}

.job-card:hover {
    border-color: #99bfc2;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, .05);
}

.job-card.selected {
    border:
        2px solid var(--primary);

    padding:
        24px 20px;

    box-shadow:
        0 6px 18px rgba(0, 127, 134, .08);
}

.card-company {
    margin:
        0 0 6px;

    color: #667085;

    font-size: 15px;
}

.job-card h2 {
    margin:
        0 0 18px;

    color: #111;

    font-size: 19px;

    font-weight: 600;

    line-height: 1.4;
}

.job-card.selected h2 {
    color:
        var(--primary);
}

.card-location {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #344054;

    font-size: 15px;

    line-height: 1.5;
}

.pin {
    color: #66b98c;

    font-size: 22px;
}

.card-badges {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;
}

.employment-badge {
    display: inline-flex;

    align-items: center;

    min-height: 31px;

    padding:
        6px 13px;

    color: #175c3b;

    background:
        var(--green-soft);

    border-radius: 10px;

    font-size: 13px;

    font-weight: 600;
}


/* ==============================
   RIGHT JOB DETAIL
============================== */

.job-detail-panel {
    position: sticky;

    top: 20px;

    height:
        calc(100vh - 40px);

    min-height: 650px;

    overflow: hidden;

    background: #fff;

    border:
        1px solid var(--soft-border);

    border-radius: 18px;

    box-shadow:
        0 3px 12px rgba(15, 23, 42, .025);
}

.selected-job {
    height: 100%;

    display: flex;

    flex-direction: column;
}

.selected-job-header {
    padding:
        31px 30px;

    border-bottom:
        1px solid #e4e7ec;
}

.detail-company {
    margin:
        0 0 7px;

    color: #667085;

    font-size: 15px;
}

.selected-job-header h2 {
    margin:
        0 0 17px;

    font-size: 24px;

    line-height: 1.3;

    font-weight: 600;

    letter-spacing: -.025em;
}

.detail-location {
    display: flex;

    align-items: center;

    gap: 7px;

    color: #475467;

    font-size: 15px;
}

.detail-location span {
    color: #66b98c;

    font-size: 23px;
}

.detail-badges {
    margin-top: 15px;
}

.apply-button {
    display: inline-flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    margin-top: 24px;

    min-width: 145px;

    min-height: 54px;

    padding:
        0 26px;

    border-radius: 999px;

    color: #fff;

    background:
        var(--primary);

    font-weight: 600;

    transition: .2s;
}

.apply-button:hover {
    background:
        var(--primary-dark);

    transform:
        translateY(-1px);
}

.apply-button span {
    font-size: 24px;
}

.selected-description {
    padding:
        30px;

    overflow-y: auto;

    flex: 1;
}

.selected-description h3 {
    margin:
        0 0 20px;

    font-size: 20px;
}

.description-text {
    color: #344054;

    font-size: 15.5px;

    line-height: 1.75;

    overflow-wrap: anywhere;
}

.description-text p {
    margin:
        0 0 18px;
}

.detail-placeholder,
.detail-error,
.loading-card,
.no-results {
    min-height: 200px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 30px;

    color: #667085;
}

.loading-card,
.no-results {
    background: #fff;

    border:
        1px solid var(--border);

    border-radius: 18px;
}

.no-results h3 {
    margin:
        0 0 7px;

    color: #222;
}

.no-results p {
    margin: 0;
}

.loading-spinner {
    width: 30px;

    height: 30px;

    border:
        3px solid #e4e7ec;

    border-top-color:
        var(--primary);

    border-radius: 50%;

    animation:
        spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform:
            rotate(360deg);
    }
}

.load-more-container {
    padding:
        20px 0;

    text-align: center;
}

.load-more-button {
    padding:
        12px 22px;

    border:
        1px solid #ccd2d9;

    border-radius: 999px;

    background: #fff;

    cursor: pointer;

    font-weight: 600;
}


/* ==============================
   FOOTER
============================== */

.site-footer {
    width:
        min(1460px, calc(100% - 40px));

    margin: auto;

    padding:
        25px 0 35px;

    border-top:
        1px solid #eee;

    display: flex;

    justify-content: space-between;

    gap: 20px;

    color: #667085;

    font-size: 13px;
}


/* ==============================
   APPLICATION PAGE
============================== */

.application-page {
    background:
        #f7f8fa;
}

.application-header {
    width:
        min(1450px, calc(100% - 40px));

    min-height: 76px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.back-link {
    color: #475467;

    font-size: 14px;

    font-weight: 500;
}

.application-layout {
    width:
        min(1450px, calc(100% - 40px));

    margin: auto;

    padding:
        15px 0 60px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(420px, .9fr);

    gap: 28px;

    align-items: start;
}

.application-job,
.application-form-card {
    background: #fff;

    border:
        1px solid #e4e7ec;

    border-radius: 20px;
}

.application-job {
    overflow: hidden;
}

.application-job-heading {
    padding: 32px;

    border-bottom:
        1px solid #e4e7ec;
}

.application-job-heading h1 {
    margin:
        7px 0 15px;

    font-size: 30px;

    line-height: 1.25;

    letter-spacing: -.035em;
}

.application-location {
    color: #475467;

    margin:
        0 0 15px;
}

.application-description {
    padding: 32px;
}

.application-description h2 {
    margin:
        0 0 22px;

    font-size: 21px;
}

.application-form-card {
    position: sticky;

    top: 20px;

    padding: 30px;
}

.form-heading {
    margin-bottom: 27px;
}

.form-heading > span {
    color:
        var(--primary);

    font-size: 13px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .06em;
}

.form-heading h2 {
    margin:
        7px 0 8px;

    font-size: 27px;

    letter-spacing: -.035em;
}

.form-heading p {
    margin: 0;

    color: #667085;

    font-size: 14px;

    line-height: 1.6;
}

.form-row {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;
}

.form-field {
    margin-bottom: 17px;
}

.form-field label {
    display: block;

    margin-bottom: 7px;

    color: #344054;

    font-size: 13px;

    font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;

    border:
        1px solid #d0d5dd;

    border-radius: 10px;

    background: #fff;

    color: #101828;

    outline: none;

    transition: .18s;
}

.form-field input,
.form-field select {
    height: 48px;

    padding:
        0 13px;
}

.form-field textarea {
    padding: 13px;

    resize: vertical;

    line-height: 1.6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px rgba(0, 127, 134, .10);
}

.resume-upload {
    padding: 17px;

    border:
        1px dashed #b9c1cb;

    border-radius: 12px;

    background: #fafbfc;
}

.resume-upload input {
    height: auto;

    padding: 0;

    border: 0;
}

.resume-upload p {
    margin:
        8px 0 0;

    color: #667085;

    font-size: 12px;
}

.consent-check {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin:
        4px 0 20px;

    color: #667085;

    font-size: 12.5px;

    line-height: 1.55;
}

.consent-check input {
    margin-top: 3px;

    flex-shrink: 0;
}

.submit-application {
    width: 100%;

    min-height: 53px;

    border: 0;

    border-radius: 11px;

    cursor: pointer;

    color: #fff;

    background:
        var(--primary);

    font-weight: 600;

    font-size: 15px;
}

.submit-application:hover {
    background:
        var(--primary-dark);
}

.submit-application:disabled {
    opacity: .6;

    cursor: wait;
}

.form-message {
    margin-bottom: 20px;

    padding: 13px 15px;

    border-radius: 10px;

    font-size: 13px;

    line-height: 1.5;
}

.form-message.error {
    color: #9b1c1c;

    background: #fff1f1;

    border:
        1px solid #ffc9c9;
}


/* ==============================
   SUCCESS
============================== */

.success-page {
    min-height: 100vh;

    display: grid;

    place-items: center;

    padding: 25px;

    background:
        #f6f8f8;
}

.success-card {
    width:
        min(580px, 100%);

    padding:
        55px 40px;

    text-align: center;

    background: #fff;

    border:
        1px solid #e4e7ec;

    border-radius: 22px;

    box-shadow:
        var(--shadow);
}

.success-icon {
    width: 65px;

    height: 65px;

    margin:
        0 auto 20px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    color: #fff;

    background:
        var(--primary);

    font-size: 30px;
}

.success-label {
    color:
        var(--green);

    font-size: 13px;

    font-weight: 600;

    text-transform: uppercase;
}

.success-card h1 {
    margin:
        10px 0;

    font-size: 32px;
}

.success-card p {
    color: #667085;

    line-height: 1.7;
}


/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 1050px) {

    .jobs-layout {
        grid-template-columns:
            400px
            minmax(0, 1fr);
    }

    .application-layout {
        grid-template-columns:
            1fr;
    }

    .application-form-card {
        position: static;
    }
}


@media (max-width: 800px) {

    .main-search {
        grid-template-columns:
            1fr;

        border-radius: 16px;
    }

    .search-divider {
        display: none;
    }

    .search-field {
        border-bottom:
            1px solid #eee;
    }

    .search-button {
        min-height: 58px;
    }

    .jobs-layout {
        display: block;
    }

    .job-detail-panel {
        display: none;
    }

    .job-card {
        position: relative;
    }

    .job-card::after {
        content: "View →";

        display: block;

        margin-top: 16px;

        color:
            var(--primary);

        font-size: 13px;

        font-weight: 600;
    }

    .site-footer {
        flex-direction: column;
    }
}


@media (max-width: 600px) {

    .search-hero {
        padding:
            28px 14px;
    }

    .jobs-page,
    .site-footer,
    .application-header,
    .application-layout {
        width:
            calc(100% - 28px);
    }

    .brand {
        font-size: 25px;
    }

    .results-heading h1 {
        font-size: 20px;
    }

    .job-card {
        border-radius: 15px;

        padding: 20px 17px;
    }

    .job-card.selected {
        padding: 19px 16px;
    }

    .application-job-heading,
    .application-description,
    .application-form-card {
        padding: 22px 18px;
    }

    .application-job-heading h1 {
        font-size: 25px;
    }

    .form-row {
        grid-template-columns:
            1fr;

        gap: 0;
    }

    .success-card {
        padding:
            40px 22px;
    }
}