﻿/* Owl layout - do not force the stage into flex */
.latest-jobs-carousel .owl-stage {
    display: block;
}

.latest-jobs-carousel .owl-item {
    height: auto;
}

.latest-jobs-carousel .item {
    width: 100%;
    padding: 8px;
}

/* Main card */
.latest-jobs-carousel .latest-job-card {
    width: 100%;
    min-width: 0;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(30, 50, 80, .06);
}

    /* CRITICAL FIX: link must stack all card sections vertically */
    .latest-jobs-carousel .latest-job-card > a {
        display: flex;
        flex-direction: column !important;
        width: 100%;
        height: 100%;
        flex: 1;
        min-width: 0;
        text-decoration: none !important;
        color: inherit;
    }

/* Header */
.latest-jobs-carousel .latest-job-top {
    width: 100%;
    display: block;
    min-width: 0;
    min-height: auto;
    padding: 20px;
}

/* Details */
.latest-jobs-carousel .latest-job-content {
    width: 100%;
    display: block;
    flex: 1 0 auto;
    min-width: 0;
    padding: 12px 20px 20px;
}

/* Details list */
.latest-jobs-carousel .latest-job-info {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 12px 0;
}

    .latest-jobs-carousel .latest-job-info li {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
        display: flex;
        align-items: center;
        min-width: 0;
        box-sizing: border-box;
        padding-right: 8px;
        list-style: none;
        font-size: 13px;
        line-height: 1.5;
    }

        .latest-jobs-carousel .latest-job-info li.full {
            width: 100%;
            max-width: 100%;
            flex-basis: 100%;
        }

        .latest-jobs-carousel .latest-job-info li i {
            flex: 0 0 28px;
            width: 28px;
            height: 28px;
            margin-right: 8px;
        }

        .latest-jobs-carousel .latest-job-info li span {
            flex: 1;
            min-width: 0;
            overflow-wrap: anywhere;
            word-break: normal;
        }

/* Footer */
.latest-jobs-carousel .latest-job-footer {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    margin-top: auto;
    box-sizing: border-box;
}

/* Hover */
.latest-jobs-carousel .latest-job-card {
    transition: transform .25s ease, box-shadow .25s ease;
}

    .latest-jobs-carousel .latest-job-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(30, 50, 80, .12);
    }

@media (max-width: 575px) {

    .latest-jobs-carousel .latest-job-card {
        min-height: 360px;
    }

        .latest-jobs-carousel .latest-job-card > a {
            flex-direction: column !important;
        }

    .latest-jobs-carousel .latest-job-top,
    .latest-jobs-carousel .latest-job-content {
        width: 100%;
    }

    .latest-jobs-carousel .latest-job-info li {
        width: 50%;
        max-width: 50%;
        flex-basis: 50%;
    }

        .latest-jobs-carousel .latest-job-info li.full {
            width: 100%;
            max-width: 100%;
            flex-basis: 100%;
        }
}

/* ===== Latest Jobs Section ===== */

.latest-jobs-section {
    background: #f5f7fb;
    padding: 35px 0 25px;
}

.latest-jobs-heading {
    text-align: center;
    margin-bottom: 30px;
}

    .latest-jobs-heading h2 {
        font-size: 28px;
        font-weight: 700;
        color: #172b4d;
        margin: 0 0 8px;
    }

    .latest-jobs-heading p {
        font-size: 14px;
        color: #7b8798;
        margin: 0;
    }

/* ===== Owl Carousel ===== */

.latest-jobs-carousel {
    position: relative;
    padding: 10px 5px 42px;
}

    .latest-jobs-carousel .owl-stage {
        display: flex;
    }

    .latest-jobs-carousel .owl-item {
        display: flex;
        height: auto;
    }

    .latest-jobs-carousel .item {
        width: 100%;
        display: flex;
        padding: 8px;
    }

    .latest-jobs-carousel .latest-job-card {
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 390px;
        background: #fff;
        border-radius: 15px;
        border: 1px solid #e8edf4;
        overflow: hidden;
        box-shadow: 0 4px 18px rgba(30, 50, 80, .05);
        transition: transform .25s ease, box-shadow .25s ease;
    }

        .latest-jobs-carousel .latest-job-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 28px rgba(30, 50, 80, .12);
        }

/* ===== Card Header ===== */

.latest-job-top {
    padding: 20px 20px 15px;
    position: relative;
    min-height: 150px;
}

.latest-job-icon {
    width: 58px;
    height: 58px;
    padding: 9px;
    background: #eff5ff;
    border-radius: 14px;
    border: 1px solid #dce8ff;
    object-fit: contain;
}

.latest-job-title {
    font-size: 17px;
    font-weight: 700;
    color: #1768df;
    margin: 12px 0 5px;
    line-height: 1.5;
    text-align: center;
}

.latest-job-company {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.latest-job-function {
    color: #0b0c0e;
    /*background: #eff5ff;*/
    border-radius: 5px;
    padding: 5px 5px;
    font-size: 12px;
    text-align: center;
}

/* ===== Featured badge ===== */

/*.latest-job-ribbon {
    position: absolute;
    top: 17px;
    right: 15px;
    background: #e8f8ee;
    color: #16a34a;
    border-radius: 20px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
}*/

.latest-job-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    background: linear-gradient(135deg, #16c784, #0eb56d);
    color: #ffffff;
    padding: 8px 14px 8px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    border-radius: 14px 0 12px 0;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(22, 199, 132, .18);
}

    .latest-job-ribbon i {
        margin-right: 5px;
        color: #ffffff;
    }

/* ===== Job details ===== */

.latest-job-content {
    padding: 10px 20px 18px;
    flex: 1;
}

.latest-job-info {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 12px 0;
}

    .latest-job-info li {
        width: 50%;
        display: flex;
        align-items: center;
        list-style: none;
        font-size: 13px;
        color: #475467;
        padding-right: 8px;
        min-width: 0;
    }

        .latest-job-info li.full {
            width: 100%;
        }

        .latest-job-info li i {
            width: 28px;
            height: 28px;
            min-width: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: #f2f6fc;
            margin-right: 8px;
        }

        .latest-job-info li span {
            white-space: normal;
            word-break: break-word;
        }

/* ===== Card footer ===== */

.latest-job-footer {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 7px;
    background: #f9fafc;
    border-top: 1px solid #edf0f5;
    padding: 13px 8px;
    margin-top: auto;
}

    .latest-job-footer span {
        font-size: 12px;
        color: #475467;
        white-space: nowrap;
    }

    /*.latest-job-footer i {
        color: #3978f6;
        margin-right: 4px;
    }*/

    .latest-job-footer a:hover {
        color: #fff;
        padding: 5px;
        border-radius: 10px;
        text-decoration: none;
        background: #dc3545;
    }

  
/* ===== Carousel arrows ===== */

.latest-jobs-carousel .owl-nav {
    margin: 0;
}

    .latest-jobs-carousel .owl-nav button.owl-prev,
    .latest-jobs-carousel .owl-nav button.owl-next {
        position: absolute;
        top: 42%;
        width: 38px;
        height: 38px;
        border-radius: 50% !important;
        background: #fff !important;
        color: #1768df !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
        font-size: 22px !important;
        line-height: 35px !important;
        transition: all .2s ease;
        z-index: 5;
    }

    .latest-jobs-carousel .owl-nav button.owl-prev {
        left: -25px;
    }

    .latest-jobs-carousel .owl-nav button.owl-next {
        right: -25px;
    }

    .latest-jobs-carousel .owl-nav button:hover {
        background: #1768df !important;
        color: #fff !important;
    }

    .latest-jobs-carousel .owl-nav button.disabled {
        opacity: .35;
        cursor: default;
    }

/* ===== Dots ===== */

.latest-jobs-carousel .owl-dots {
    text-align: center;
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
}

    .latest-jobs-carousel .owl-dots .owl-dot span {
        width: 8px;
        height: 8px;
        background: #cbd5e1;
        margin: 5px 7px;
        display: block;
        border-radius: 50%;
        transition: all .2s ease;
    }

    .latest-jobs-carousel .owl-dots .owl-dot.active span {
        width: 22px;
        border-radius: 10px;
        background: #1768df;
    }

/* ===== Tablet ===== */

@media (max-width: 991px) {
    .latest-jobs-section {
        padding: 28px 0 20px;
    }

    .latest-jobs-carousel .owl-nav button.owl-prev {
        left: 0;
    }

    .latest-jobs-carousel .owl-nav button.owl-next {
        right: 0;
    }
}

/* ===== Mobile ===== */

@media (max-width: 575px) {
    .latest-jobs-heading h2 {
        font-size: 23px;
    }

    .latest-jobs-heading p {
        font-size: 12px;
    }

    .latest-jobs-carousel {
        padding-left: 25px;
        padding-right: 25px;
    }

        .latest-jobs-carousel .item {
            padding: 5px;
        }

        .latest-jobs-carousel .latest-job-card {
            min-height: 360px;
        }

    .latest-job-top {
        padding: 17px;
    }

    .latest-job-content {
        padding: 10px 15px 15px;
    }

    .latest-job-info li {
        font-size: 12px;
    }

    .latest-job-footer {
        justify-content: space-between;
    }

        .latest-job-footer span {
            font-size: 11px;
        }

    .latest-jobs-carousel .owl-nav button.owl-prev {
        left: -2px;
    }

    .latest-jobs-carousel .owl-nav button.owl-next {
        right: -2px;
    }
}
