/**
 * DMG Job Search Styles
 */

.dmg-job-search-container {
    margin: 0 auto;
}

/* Search Form */
.dmg-job-search-form {
    /* display: flex;
    align-items: end; */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;

    font-family: "Outfit", sans-serif;

    @media screen and (max-width: 800px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.job-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;

    @media screen and (max-width: 800px) {
        grid-column: span 2;
    }
}

.job-form-group label {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.dmg-job-search-input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.dmg-job-search-input:focus {
    border-color: #0073aa;
}

.job-from-btns {
    display: flex;
    gap: 10px;
    align-items: end;
}

.dmg-job-search-button {
    height: 38px;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1;
    background-color: #004896;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dmg-job-search-button:hover {
    background-color: #005a87;
}

.dmg-job-clear {
    display: inline-block;
    height: 38px;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1.3;
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    border: 1px solid #fff;
}
.dmg-job-clear:hover {
    color: #004896;
    background-color: #e6edf5;
    border: 1px solid #004896;
}

/* ----------------------------------- Returned Job Results */

.dmg-job-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;

    @media screen and (max-width: 1000px) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    @media screen and (max-width: 600px) {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.dmg-job-item {
    /* padding: 20px; */
    /* background-color: #f9f9f9; */
    /* border: 1px solid #e5e5e5; */
    /* border-radius: 4px; */
    /* transition: box-shadow 0.3s ease; */

    font-family: "Outfit", sans-serif;
}

.dmg-job-item > a {
    @media screen and (max-width: 600px) {
        display: flex;
        justify-content: space-between;
        border-bottom: #e2e8f0 1px solid;
        gap: 10px;
        padding-bottom: 15px;
    }
}

.dmg-job-imgbox {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    overflow: hidden;
    border-radius: 5px;

    @media screen and (max-width: 600px) {
        display: none;
    }
}

.dmg-job-imgbox:hover img {
    transform: scale(1.05);
}

.dmg-job-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.dmg-job-title {
    margin: 0 0 10px;
    font-family: "Outfit", sans-serif;
    font-size: 16px;

    transition: all 0.2s ease;

    @media screen and (max-width: 600px) {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 70%;
    }
}
.dmg-job-title:hover {
    color: #004896;
}

.dmg-job-excerpt {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.dmg-job-meta {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 0 10px;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #888;
    z-index: 1;
}

.dmg-job-categories {
    font-family: "Outfit", sans-serif;
    margin-right: auto;
    z-index: 1;
    background-color: #ffc823;
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
}

.dmg-job-expiry-banner {
    font-family: "Outfit", sans-serif;
    z-index: 1;
    background-color: #004896;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;

    @media screen and (max-width: 600px) {
        display: none;
    }
}

/* .dmg-job-link:hover {
    background-color: #005a87;
    color: #fff;
} */

.dmg-no-jobs-found {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.dmg-job-categories-mobile {
    display: none;

    @media screen and (max-width: 600px) {
        display: inline-block;
        font-family: "Outfit", sans-serif;
        margin-right: auto;
        z-index: 1;
        background-color: #ffc823;
        color: #000;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 12px;
        line-height: 18px;
    }
}

.dmg-job-imgbox-mobile {
    display: none;
    width: 20%;
    transition: all 0.3s ease;
    border-radius: .375rem;
    overflow: hidden;

    @media screen and (max-width: 600px) {
        display: block;
    }
}

.dmg-job-img-mobile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* ----------------------------------- Ad box */

.dmg-job-ad-placeholder {
    background-color: #f1f5f9;
    border-radius: 4px;
    text-align: center;
}

.dmg-job-ad-placeholder p {
    font-family: "Outfit", sans-serif;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
}

.dmg-job-ad-placeholder-codebox {
    width: 100%;
}

/* ----------------------------------- Pagination */

.jobs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.jobs-pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    font-family: "Outfit", sans-serif;
    font-size: 16px;
    color: #000;
    background-color: #f5f5f5;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.jobs-pagination .page-numbers.next,
.jobs-pagination .page-numbers.prev {
    width: fit-content;
    padding: 0 8px;
}

.jobs-pagination .page-numbers:hover {
    background-color: #ffc823;
    border-color: #ffc823;
}

.jobs-pagination .page-numbers.current {
    background-color: #004896;
    border-color: #004896;
    color: #fff;
    cursor: default;
}

.jobs-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    cursor: default;
}

.jobs-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #333;
}

/* Loading state */
.dmg-job-results.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .dmg-job-search-form {
        flex-direction: column;
    }

    .dmg-job-search-button {
        width: 100%;
    }

    .dmg-job-meta {
        flex-direction: column;
        gap: 5px;
    }
}
