.job-listings {
    padding: 5rem 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Image slider — full-width, no white background
   ========================================================================== */

.job-listings__slider {
    overflow: hidden;
    padding: 0 2rem;

    @media (max-width: 767px) {
        padding: 0;
    }
}

.job-listings__track {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;

    &::-webkit-scrollbar {
        display: none;
    }
}

.job-listings__slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    /* Definite height (matches a 4:3 box at the slide's rendered width).
       Avoids the aspect-ratio-in-flex-scroller bug where the track reserves
       extra height until a scroll forces a relayout. */
    height: 75vw;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    @media (min-width: 768px) {
        flex: 0 0 calc((100% - 3rem) / 2.5);
        /* slide width ≈ (100vw - 7rem) / 2.5 → ×3/4 for 4:3 */
        height: calc(30vw - 2.1rem);
    }
}

/* Header — white panel, headline + copy only
   ========================================================================== */

.job-listings__header {
    max-width: 1000px;
    margin: 0 auto;
    width: calc(100% - 4rem);
    background-color: var(--color-white);
    border-radius: 25px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    @media (min-width: 768px) {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }

    @media (max-width: 767px) {
        box-sizing: border-box;
        padding: 1.5rem;
        width: 100%;
    }
}

.job-listings__headline {
    font-family: 'Domine', serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--color-navy);
    margin: 0;
    line-height: 1.2;

    @media (min-width: 768px) {
        flex: 0 0 280px;
    }
}

.job-listings__copy {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;

    @media (min-width: 768px) {
        flex: 1;
    }

    & p:first-child { margin-top: 0; }
    & p:last-child  { margin-bottom: 0; }
}

/* Job list — no white background
   ========================================================================== */

.job-listings__list-wrap {
    max-width: 1000px;
    margin: 0 auto;
    width: calc(100% - 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;

    @media (max-width: 767px) {
        width: 100%;
    }
}

.job-listings__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.job-listings__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(19, 41, 75, 0.15);

    &:first-child {
        border-top: 1px solid rgba(19, 41, 75, 0.15);
    }

    @media (max-width: 599px) {
        flex-direction: column;
        align-items: flex-start;
    }
}

.job-listings__item-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.job-listings__item-title {
    font-family: 'Domine', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-navy);
}

.job-listings__item-location {
    font-size: 0.75rem;
    font-weight: 500;
    color: #13294B;
}

.job-listings__item-apply {
    flex-shrink: 0;
}

/* Slider arrows
   ========================================================================== */

.job-listings__arrows {
    display: none;
}

@media (min-width: 768px) {
    .job-listings__arrows {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-top: 1.25rem;
    }
}

.job-listings__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: 1.5px solid rgba(19, 41, 75, 0.35);
    border-radius: 50%;
    color: var(--color-navy);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.job-listings__arrow:hover {
    background: rgba(19, 41, 75, 0.08);
    border-color: var(--color-navy);
}

.job-listings__arrow:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* CTA button
   ========================================================================== */

.job-listings__cta {
    display: flex;
    justify-content: center;
}

.job-listings__cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background-color: var(--color-navy);
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.2s ease;

    &:hover {
        background-color: var(--color-gold);
    }
}
