/**
 * Vacancies overview (/vacatures/) — custom template.
 *
 * Values 1-on-1 from Elementor: page 11605 (post-11605.css), loop item 11611
 * (vacancy card) and the inline CSS of snippet #20 [vacancy_team_grid].
 * Info-row styles (.vacature-flex-row / .vacature-item) live in vacancy-card.css.
 *
 * Since 0.21.1 the spacing follows the newer pages: a 60 / 30 / 15 px gutter shared
 * by the hero and the list, one section rhythm (--r4y-vac-space) and room between
 * every heading and its text.
 *
 * NB: base.css resets h1–h3/p margins with `.r4y-template .r4y-main h2` (0,2,1).
 * Rules that set a margin on such an element start with `.r4y-template .r4y-vacancies`
 * (0,3,0), or the margin silently stays 0.
 */

/* Variables on <main>, not the body class, so builder pages get them too. */
.r4y-template .r4y-vacancies {
    --r4y-gutter: 60px;
    --r4y-vac-space: clamp(56px, 6vw, 96px);
}

/* ── Hero (#28bc293 / #0a94e4b) ─────────────────────────────────────── */
.r4y-template .r4y-vacancies__hero {
    margin-top: var(--r4y-space-2xl);
    padding-inline: var(--r4y-gutter); /* same left edge as the list below */
    background-color: var(--r4y-color-surface-alt);
}
.r4y-template .r4y-vacancies__hero-box {
    padding: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 60px);
    background-color: var(--r4y-color-surface-dark);
}
.r4y-template .r4y-vacancies .r4y-vacancies__title {
    margin: 0 0 20px;
    font-family: var(--r4y-font-heading);
    font-size: clamp(36px, 4vw, 56px);
    font-weight: var(--r4y-fw-semibold);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--r4y-color-on-dark);
}
.r4y-template .r4y-vacancies__intro {
    max-width: 68ch;
    font-family: var(--r4y-font-body);
    font-size: 17px;
    font-weight: var(--r4y-fw-light);
    line-height: 1.7;
    color: var(--r4y-color-on-dark);
}
.r4y-template .r4y-vacancies .r4y-vacancies__intro > * + * { margin-top: 1em; }
.r4y-template .r4y-vacancies__intro a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ── List section (#0281baf) ────────────────────────────────────────── */
.r4y-template .r4y-vacancies__list {
    padding: clamp(40px, 4vw, 56px) var(--r4y-gutter) var(--r4y-vac-space);
    background-color: var(--r4y-color-surface-alt);
}

/* ── Sector filter (chips) ──────────────────────────────────────────── */
.r4y-template .r4y-vacancy-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-margin-top: var(--r4y-space-2xl); /* below the overlaying header when scrolled to */
}
.r4y-template .r4y-vacancy-filter__label {
    margin: 0;
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-base);
    font-weight: var(--r4y-fw-semibold);
    line-height: 16px;
    color: var(--r4y-color-text);
}
.r4y-template .r4y-vacancy-filter__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--r4y-space-sm);
}
.r4y-template a.r4y-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--r4y-space-sm);
    padding: var(--r4y-space-sm) var(--r4y-space-md);
    border: 1px solid var(--r4y-kit-secondary);
    border-radius: var(--r4y-border-radius);
    background-color: var(--r4y-color-surface);
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-sm);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.2;
    color: var(--r4y-color-heading);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--r4y-transition), border-color var(--r4y-transition), color var(--r4y-transition);
}
.r4y-template a.r4y-chip:hover {
    border-color: var(--r4y-kit-primary);
    background-color: var(--r4y-color-surface-alt);
    color: var(--r4y-color-heading);
}
.r4y-template a.r4y-chip:focus-visible {
    outline: 2px solid var(--r4y-kit-secondary);
    outline-offset: 2px;
}
.r4y-template a.r4y-chip.is-active,
.r4y-template a.r4y-chip.is-active:hover {
    border-color: var(--r4y-kit-primary);
    background-color: var(--r4y-kit-primary);
    color: var(--r4y-color-on-dark);
}
.r4y-template .r4y-chip__count {
    min-width: 1.6em;
    padding: 2px 6px;
    border-radius: 999px;
    background-color: var(--r4y-color-surface-alt);
    font-size: var(--r4y-fs-xs);
    font-weight: var(--r4y-fw-semibold);
    line-height: 1.3;
    text-align: center;
    color: var(--r4y-kit-secondary);
}
.r4y-template .r4y-chip.is-active .r4y-chip__count {
    background-color: var(--r4y-kit-secondary);
    color: var(--r4y-color-on-dark);
}
.r4y-template .r4y-vacancies .r4y-vacancy-filter__status {
    margin: 0;
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-sm);
    font-weight: var(--r4y-fw-light);
    color: var(--r4y-color-text);
}

/* Results: loading state while the REST request runs */
.r4y-template .r4y-vacancies__results {
    transition: opacity 0.2s ease;
}
.r4y-template .r4y-vacancies__results.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Empty state ────────────────────────────────────────────────────── */
.r4y-template .r4y-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--r4y-space-md);
    margin-top: 40px;
    padding: var(--r4y-space-xl) var(--r4y-space-lg);
    background-color: var(--r4y-color-surface);
    box-shadow: var(--r4y-shadow-card);
    text-align: center;
}
.r4y-template .r4y-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--r4y-color-surface-alt);
    color: var(--r4y-kit-secondary);
}
.r4y-template .r4y-empty-state__icon svg {
    width: 26px;
    height: 26px;
}
.r4y-template .r4y-empty-state__title {
    margin: 0;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-2xl);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.2;
    color: var(--r4y-color-heading);
}
.r4y-template .r4y-empty-state__text {
    max-width: 560px;
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-base);
    font-weight: var(--r4y-fw-light);
    color: var(--r4y-color-text);
}
.r4y-template .r4y-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--r4y-space-md);
    margin-top: var(--r4y-space-sm);
}

@media (prefers-reduced-motion: reduce) {
    .r4y-template a.r4y-chip,
    .r4y-template .r4y-vacancies__results { transition: none; }
}

/* ── Team grid (snippet #20) ────────────────────────────────────────── */
.r4y-template .r4y-team-grid {
    width: 100%;
    margin-top: clamp(40px, 4vw, 56px);
}
.r4y-template .r4y-team-grid__group,
.r4y-template .r4y-team-grid__filled {
    width: 100%;
    margin-bottom: var(--r4y-vac-space);
}
.r4y-template .r4y-team-grid > :last-child { margin-bottom: 0; }
.r4y-template .r4y-team-grid__header,
.r4y-template .r4y-team-grid__filled-title {
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--r4y-color-divider);
}
.r4y-template .r4y-team-grid__header {
    display: flex;
    align-items: center;
    gap: 24px;
}
.r4y-template .r4y-team-grid__photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--r4y-border-radius);
}
.r4y-template .r4y-team-grid__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.r4y-template .r4y-team-grid__intro {
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-sm);
    letter-spacing: 0.08em;
    font-weight: var(--r4y-fw-bold);
    text-transform: uppercase;
    color: var(--r4y-color-highlight);
}
/* Live result: the Kit h2 rule wins over the snippet's font-size/weight, only the colour is !important. */
.r4y-template .r4y-team-grid__name {
    margin: 0;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-2xl);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.1;
    color: var(--r4y-kit-text);
}
.r4y-template a.r4y-team-grid__email {
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-base);
    font-weight: var(--r4y-fw-light);
    color: var(--r4y-kit-text);
    text-decoration: none;
}
.r4y-template .r4y-team-grid__filled-title h2 {
    margin: 0;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-2xl);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.2;
    color: var(--r4y-color-heading);
}

/* Grid */
.r4y-template .r4y-vacancy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch; /* equal cards per row; "Lees meer" lines up */
}

/* Layout "vertical": groups side by side, one column each */
.r4y-template .r4y-team-grid--vertical {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.r4y-template .r4y-team-grid--vertical .r4y-team-grid__group {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
}
.r4y-template .r4y-team-grid--vertical .r4y-team-grid__group .r4y-vacancy-grid {
    grid-template-columns: 1fr;
}
.r4y-template .r4y-team-grid--vertical .r4y-team-grid__filled {
    flex: 1 1 100%;
    max-width: 100%;
    clear: both;
}
.r4y-template .r4y-team-grid__filled .r4y-vacancy-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Vacancy card (loop item 11611) ─────────────────────────────────── */
.r4y-template .r4y-vacancy-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 350px;
    background-color: var(--r4y-color-surface);
    box-shadow: var(--r4y-shadow-card);
    color: var(--r4y-color-text);
    transition: box-shadow var(--r4y-transition);
}
.r4y-template .r4y-vacancy-card:hover,
.r4y-template .r4y-vacancy-card:focus-within {
    box-shadow: var(--r4y-shadow-card-hover);
}
/* Title link stretched over the whole card */
.r4y-template a.r4y-vacancy-card__link,
.r4y-template a.r4y-vacancy-card__link:hover,
.r4y-template a.r4y-vacancy-card__link:focus {
    color: inherit; /* beats .elementor-kit-3906 a / a:hover */
    text-decoration: none;
}
.r4y-template a.r4y-vacancy-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.r4y-template a.r4y-vacancy-card__link:focus-visible {
    outline: none;
}
.r4y-template a.r4y-vacancy-card__link:focus-visible::after {
    outline: 2px solid var(--r4y-kit-secondary);
    outline-offset: 3px;
}
.r4y-template .r4y-vacancy-card__media {
    display: flex;
    min-height: 250px;
}
.r4y-template .r4y-vacancy-card__image {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center center;
}
.r4y-template .r4y-vacancy-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 30px 30px;
}
.r4y-template .r4y-vacancy-card__status {
    display: flex;
    margin-bottom: 12px;
}
.r4y-template .r4y-main .r4y-vacancy-card__title {
    margin: 0 0 16px;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-2xl);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.15;
    color: var(--r4y-color-heading);
    text-wrap: balance;
}
.r4y-template .r4y-vacancy-card__meta {
    margin-bottom: 18px;
}
.r4y-template .r4y-vacancy-card__summary {
    margin-bottom: 20px;
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-base);
    font-weight: var(--r4y-fw-light);
    line-height: 1.6;
    color: var(--r4y-color-text);
}
.r4y-template .r4y-main .r4y-vacancy-card__more {
    margin: auto 0 0; /* "Lees meer" on the bottom edge, aligned across a row */
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-base);
    font-weight: var(--r4y-fw-medium);
    color: var(--r4y-color-highlight);
}

/* ── Tablet (≤1024) ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .r4y-template .r4y-vacancy-grid,
    .r4y-template .r4y-team-grid__filled .r4y-vacancy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .r4y-template .r4y-team-grid--vertical .r4y-team-grid__group {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ── Mobile (≤767) ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .r4y-template .r4y-vacancies {
        --r4y-gutter: 15px;
        --r4y-vac-space: 56px;
    }
    .r4y-template .r4y-vacancies__hero-box {
        padding: 36px 20px;
    }
    .r4y-template .r4y-vacancies .r4y-vacancies__title {
        margin-bottom: 16px;
        font-size: 32px;
    }
    .r4y-template .r4y-vacancies__intro {
        font-size: var(--r4y-fs-base);
    }
    .r4y-template .r4y-vacancies__list {
        padding-top: 32px;
    }
    /* Chips: one swipeable row instead of a tall wrapped block */
    .r4y-template .r4y-vacancy-filter__chips {
        flex-wrap: nowrap;
        margin-inline: calc(-1 * var(--r4y-gutter));
        padding: 2px var(--r4y-gutter) var(--r4y-space-xs);
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .r4y-template .r4y-vacancy-filter__chips::-webkit-scrollbar { display: none; }
    .r4y-template a.r4y-chip { scroll-snap-align: start; }

    .r4y-template .r4y-empty-state {
        padding: var(--r4y-space-lg) var(--r4y-space-md);
    }
    .r4y-template .r4y-empty-state__title {
        font-size: var(--r4y-fs-xl);
    }

    .r4y-template .r4y-vacancy-grid,
    .r4y-template .r4y-team-grid__filled .r4y-vacancy-grid {
        grid-template-columns: 1fr;
    }

    .r4y-template .r4y-vacancy-card__body {
        padding: 24px 20px;
    }
    .r4y-template .r4y-vacancy-card__badge {
        padding: var(--r4y-space-xs) var(--r4y-space-sm);
        font-size: var(--r4y-fs-xs);
    }
    .r4y-template .r4y-main .r4y-vacancy-card__title {
        font-size: var(--r4y-fs-xl);
    }
    .r4y-template .r4y-vacancy-card__summary {
        font-size: 15px;
    }
    .r4y-template .r4y-team-grid__header,
    .r4y-template .r4y-team-grid__filled-title {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    .r4y-template .r4y-team-grid__photo {
        width: 88px;
        height: 88px;
    }
    .r4y-template .r4y-team-grid__header { gap: 18px; }
}
