/* ==========================================================================
   Job-Teaser
   ========================================================================== */

/* Fellix Regular */
@font-face {
    font-family: 'Fellix';
    src: url('../fonts/felix/Fellix-Regular.otf') format('opentype'),
    url('../fonts/felix/Fellix-Regular.woff2') format('woff2'),
    url('../fonts/felix/Fellix-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}
/* Fellix Medium */
@font-face {
    font-family: 'Fellix';
    src: url('../fonts/felix/Fellix-Medium.woff2') format('woff2'),
    url('../fonts/felix/Fellix-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}
/* Fellix SemiBold */
@font-face {
    font-family: 'Fellix';
    src: url('../fonts/felix/Fellix-SemiBold.woff2') format('woff2'),
    url('../fonts/felix/Fellix-SemiBold.woff') format('woff');
    font-weight: 600;
    font-display: swap;
}
/* Fellix Bold */
@font-face {
    font-family: 'Fellix';
    src: url('../fonts/felix/Fellix-Bold.otf') format('opentype'),
    url('../fonts/felix/Fellix-Bold.woff2') format('woff2'),
    url('../fonts/felix/Fellix-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

:root {
    --teaser-primary: #cb003d;
    --teaser-card-bg: #ffffff;
    --teaser-text-light: #ffffff;
    --teaser-text-dark: #000000;
    --teaser-muted: rgb(203, 0, 61);
    --teaser-radius: 4px;
    --teaser-gap: 24px;
    --textFontSize: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: transparent;
}

body {
    font-family: 'Fellix', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.jobteaser {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--teaser-primary);
    padding: 24px;
}

.jobteaser__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--teaser-gap);
    margin-top: 32px;
    margin-bottom: 32px;
}

.jobteaser__title {
    color: var(--teaser-text-light);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 120%;
}

.jobteaser__list {
    display: flex;
    flex-direction: column;
    gap: var(--teaser-gap);
    margin-bottom: 32px;
}

/* Only ever show the first three job cards, even if more are rendered. */
.jobteaser__card:nth-of-type(n + 4) {
    display: none;
}

/* --------------------------------------------------------------------------
   Job card
   -------------------------------------------------------------------------- */
.jobteaser__card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 0;
    background-color: var(--teaser-card-bg);
    border: 5px solid rgba(162,178,200,.2);
    border-radius: 0;
    padding: 0;
    text-decoration: none;
    transition: all .4s cubic-bezier(.56,-.01,.56,.99);
    width: 100%;
}

.jobteaser__card:hover {
    border-color: #a2b2c8;
}

.jobteaser__card:hover .jobteaser__card-meta {
    color: rgb(162, 0, 49);
}

.jobteaser__card > div {
    padding: 24px;
    margin-bottom: 64px;
}

.jobteaser__card-meta {
    color: var(--teaser-muted);
    opacity: 0.5;
    margin: 0 0 32px;
    font-size: var(--textFontSize);
    transition: color 0.3s ease;
}

.jobteaser__card-title {
    color: var(--teaser-text-dark);
    font-size: 21px;
    font-weight: 500;
    margin: 0 0 8px;
    line-height: 120%;
}

/* --------------------------------------------------------------------------
   Links / buttons
   -------------------------------------------------------------------------- */
.jobteaser__link,
.jobteaser__cta {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: .5rem;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.jobteaser__cta {
    justify-content: flex-end;
    position: absolute;
    margin-left: 24px;
    margin-bottom: 24px;
    bottom: 0;
}

.jobteaser__link {
    color: var(--teaser-text-light);
    white-space: nowrap;
}

.jobteaser__cta {
    color: var(--teaser-text-dark);
    margin-top: 1.5rem;
}

.jobteaser__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    transition: transform .2s ease-in-out;
}

.jobteaser__empty {
    color: var(--teaser-text-light);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive: cards side by side from tablet up
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    :root {
        --textFontSize: 20px;
    }
    .jobteaser__card-title {
        font-size: 28px;
    }
    .jobteaser__title {
        font-size: 36px;
    }
    .jobteaser__list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .jobteaser__card {
        width: calc(50% - 1.2rem);
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .jobteaser {
        padding: 64px;
    }
    .jobteaser__card {
        margin-bottom: 0;
        width: calc(33% - 1.2rem);
    }
}