/**
 * Expertises overview — custom template.
 *
 * Values 1-on-1 from Elementor page 4849 (post-4849.css), section 4875 and
 * loop-item 4880 (inline <style id="loop-4880">), captured 2026-11-07.
 * Gutter: 60px, 15px on mobile (≤767).
 */

.r4y-template--expertise_archive { --r4y-gutter: 60px; }

/* ── Hero (#cbaad76 / #3a6e5a7): the Elementor header overlays the top ── */
/* Full-width boxed container: image + gradient over the whole width, content 1400px. */
.r4y-template .r4y-expertises__hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 600px;
    margin-top: -75px;
    padding: 0 var(--r4y-gutter) 90px; /* same left edge as the sections below */
    overflow: hidden; /* clips the slice */
    isolation: isolate;
}
/* Featured image of page 4849 as <img> (LCP, srcset), a cream gradient from the left over it. */
.r4y-template .r4y-expertises__hero-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.r4y-template .r4y-expertises__hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(90deg, #FFFAF7 20%, #FBF8F600 100%);
}
.r4y-template .r4y-expertises__hero-inner {
    position: relative;
}
.r4y-template .r4y-expertises__title {
    position: relative;
    font-family: var(--r4y-font-heading);
    font-size: 80px;
    font-weight: var(--r4y-fw-light);
    line-height: 1;
    color: var(--r4y-kit-primary);
}

/* The slice: same markup and values as the detail hero (expertise-single.css) — a
   1000×500 white block in a wrapper rotated −60°, clipped by the hero. Desktop and
   tablet; on mobile the hero itself gets the same 60° corner cut. */
.r4y-template .r4y-expertises__hero-slice {
    margin-top: 20px;
    rotate: -60deg;
    pointer-events: none;
}
.r4y-template .r4y-expertises__hero-slice > div {
    position: absolute;
    top: 33vw;
    right: -20vw;
    width: 1000px;
    height: 500px;
    background: var(--r4y-kit-white);
}

/* ── Intro (#5d6ca77) ─────────────────────────────────────────────────── */
.r4y-template .r4y-expertises__intro {
    margin-block: 60px;
}
.r4y-template .r4y-expertises__subtitle {
    margin-bottom: 20px;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-2xl);
    font-weight: var(--r4y-fw-regular);
    line-height: 1;
    color: var(--r4y-kit-primary);
}
.r4y-template .r4y-expertises__intro-text {
    max-width: 700px;
    font-weight: var(--r4y-fw-light);
}

/* ── Navigation + grid (#e7048c6, section 4875) — modernised (0.7.0, same sharp
   language as the detail page: no radius, gold top rule) ──
   Sticky crème panel; the link of the card in view gets a gold bar
   (.is-active, assets/js/expertises/expertise-overview.js). ≤1024: a row of chips. */
.r4y-template .r4y-expertises__list {
    margin-bottom: 120px;
}
.r4y-template .r4y-expertises__layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
}
.r4y-template .r4y-expertises__nav {
    position: sticky;
    top: 120px; /* Elementor sticky offset */
    flex: 0 0 260px;
    padding: 28px 24px;
    border-top: 2px solid var(--r4y-kit-secondary);
    background-color: var(--r4y-kit-accent);
}
.r4y-template .r4y-expertises__nav-title {
    margin-bottom: 16px;
    font-family: var(--r4y-font-body);
    font-size: 13px;
    font-weight: var(--r4y-fw-semibold);
    line-height: 1.3;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--r4y-kit-secondary);
}
.r4y-template .r4y-expertises__nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.r4y-template .r4y-expertises__nav-link {
    position: relative;
    display: block;
    padding: 9px 12px 9px 16px;
    font-family: var(--r4y-font-body);
    font-size: var(--r4y-fs-sm);
    font-weight: var(--r4y-fw-regular);
    line-height: 1.35;
    color: var(--r4y-color-muted);
    text-decoration: none;
    transition: background-color var(--r4y-transition), color var(--r4y-transition);
}
.r4y-template .r4y-expertises__nav-link::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 4px;
    width: 2px;
    background-color: var(--r4y-kit-secondary);
    transform: scaleY(0);
    transition: transform var(--r4y-transition) var(--r4y-ease-out);
}
.r4y-template .r4y-expertises__nav-link:hover,
.r4y-template .r4y-expertises__nav-link:focus-visible {
    background-color: var(--r4y-kit-white);
    color: var(--r4y-kit-primary);
    outline: none;
}
.r4y-template .r4y-expertises__nav-link:focus-visible {
    box-shadow: 0 0 0 3px var(--r4y-color-focus-ring);
}
.r4y-template .r4y-expertises__nav-link.is-active {
    background-color: var(--r4y-kit-white);
    font-weight: var(--r4y-fw-medium);
    color: var(--r4y-kit-primary);
}
.r4y-template .r4y-expertises__nav-link.is-active::before {
    transform: scaleY(1);
}

.r4y-template .r4y-expertises__grid {
    display: grid;
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    min-width: 0;
    gap: 32px;
    counter-reset: r4y-expertise;
}

/* ── Card (loop-item 4880) — modernised: sharp, numbered, alternating, all clickable ── */
.r4y-template .r4y-expertise-card {
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 360px;
    overflow: hidden;
    scroll-margin-top: 120px;
    border-top: 2px solid var(--r4y-kit-secondary);
    background-color: var(--r4y-kit-accent);
    counter-increment: r4y-expertise;
    transition: box-shadow 0.4s var(--r4y-ease-out), transform 0.4s var(--r4y-ease-out);
}
.r4y-template .r4y-expertise-card:nth-child(even) {
    flex-direction: row-reverse;
}
.r4y-template .r4y-expertise-card:hover,
.r4y-template .r4y-expertise-card:focus-within {
    box-shadow: 0 30px 60px -40px rgba(0, 37, 25, 0.5);
    transform: translateY(-3px);
}
.r4y-template .r4y-expertise-card__body {
    display: flex;
    flex: 1 1 52%;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 44px 48px;
}
.r4y-template .r4y-expertise-card__text {
    margin-bottom: 32px;
}
/* .r4y-expertise-card … beats base.css .r4y-main h2 { margin: 0 }. */
/* Number eyebrow (01, 02, …) from a CSS counter: no content, follows the order. */
.r4y-template .r4y-expertise-card__text::before {
    content: counter(r4y-expertise, decimal-leading-zero);
    display: block;
    margin-bottom: 14px;
    font-family: var(--r4y-font-body);
    font-size: 13px;
    font-weight: var(--r4y-fw-semibold);
    letter-spacing: 0.14em;
    color: var(--r4y-kit-secondary);
}
.r4y-template .r4y-expertise-card .r4y-expertise-card__title {
    margin-bottom: 18px;
    font-family: var(--r4y-font-heading);
    font-size: var(--r4y-fs-5xl);
    font-weight: var(--r4y-fw-light);
    line-height: 1.05;
    color: var(--r4y-kit-primary);
}
.r4y-template .r4y-expertise-card__desc {
    max-width: 60ch;
    font-weight: var(--r4y-fw-light);
    line-height: 1.65;
    color: var(--r4y-color-text);
}
.r4y-template .r4y-expertise-card__desc p:last-child { margin-bottom: 0; }

/* "Lees meer": sharp 48px button with an arrow; its ::after makes the whole card clickable.
   a.… beats base.css .r4y-template a.r4y-button. */
.r4y-template a.r4y-expertise-card__more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    height: 48px;
    padding: 0 22px;
    font-family: var(--r4y-font-body);
    font-weight: var(--r4y-fw-medium);
}
.r4y-template .r4y-expertise-card__more::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.r4y-template .r4y-expertise-card__more:focus-visible {
    outline: 2px solid var(--r4y-kit-secondary);
    outline-offset: 3px;
}
.r4y-template .r4y-expertise-card__arrow {
    display: inline-block;
    transition: transform var(--r4y-transition) var(--r4y-ease-out);
}
.r4y-template .r4y-expertise-card:hover a.r4y-expertise-card__more {
    background-color: var(--r4y-kit-secondary);
}
.r4y-template .r4y-expertise-card:hover .r4y-expertise-card__arrow {
    transform: translateX(4px);
}
.r4y-template .r4y-expertise-card__media {
    flex: 1 1 48%;
    min-width: 0;
    overflow: hidden;
}
.r4y-template .r4y-expertise-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.8s var(--r4y-ease-out);
}
.r4y-template .r4y-expertise-card:hover .r4y-expertise-card__image {
    transform: scale(1.04);
}

/* ── Laptop ≤1366 ─────────────────────────────────────────────────────── */
@media (max-width: 1366px) {
    .r4y-template .r4y-expertises__hero {
        min-height: 300px;
        padding: 120px var(--r4y-gutter) 0;
    }
    .r4y-template .r4y-expertises__title { font-size: 48px; }
    .r4y-template .r4y-expertises__nav { flex-basis: 230px; }
    .r4y-template .r4y-expertise-card__body { padding: 36px; }
}

/* ── Tablet ≤1024: navigation above the grid, not sticky ─────────────── */
@media (max-width: 1024px) {
    .r4y-template .r4y-expertises__layout { flex-direction: column; align-items: stretch; gap: 40px; }
    .r4y-template .r4y-expertises__nav { position: static; flex: none; padding: 0; background: none; }
    .r4y-template .r4y-expertises__nav-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .r4y-template .r4y-expertises__nav-link {
        padding: 8px 14px;
        border: 1px solid var(--r4y-color-field-border);

        background-color: var(--r4y-kit-white);
        color: var(--r4y-kit-primary);
    }
    .r4y-template .r4y-expertises__nav-link::before { display: none; }
    .r4y-template .r4y-expertises__nav-link:hover,
    .r4y-template .r4y-expertises__nav-link:focus-visible { border-color: var(--r4y-kit-secondary); }
}

/* ── Mobile ≤767 ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .r4y-template--expertise_archive { --r4y-gutter: 15px; }
    .r4y-template .r4y-expertises__hero {
        min-height: 500px;
        padding: 90px var(--r4y-gutter) 0;
    }
    .r4y-template .r4y-expertises__title { padding-bottom: 30px; font-size: var(--r4y-fs-4xl); }
    .r4y-template .r4y-expertises__hero {
        padding-bottom: 60px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 104px), calc(100% - 60px) 100%, 0 100%);
    }
    .r4y-template .r4y-expertises__hero-slice { display: none; }
    .r4y-template .r4y-expertises__list { margin-bottom: 30px; }
    .r4y-template .r4y-expertises__grid { gap: 24px; }
    .r4y-template .r4y-expertise-card,
    .r4y-template .r4y-expertise-card:nth-child(even) { flex-direction: column; min-height: 0; }
    .r4y-template .r4y-expertise-card__media { flex: none; order: -1; aspect-ratio: 16 / 10; }
    .r4y-template .r4y-expertise-card__body { flex: none; padding: 28px 22px; }
    .r4y-template .r4y-expertise-card .r4y-expertise-card__title { font-size: var(--r4y-fs-3xl); }
    .r4y-template a.r4y-expertise-card__more { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .r4y-template .r4y-expertise-card,
    .r4y-template .r4y-expertise-card__image,
    .r4y-template .r4y-expertise-card__arrow,
    .r4y-template .r4y-expertises__nav-link::before { transition: none; }
    .r4y-template .r4y-expertise-card:hover,
    .r4y-template .r4y-expertise-card:focus-within,
    .r4y-template .r4y-expertise-card:hover .r4y-expertise-card__image,
    .r4y-template .r4y-expertise-card:hover .r4y-expertise-card__arrow { transform: none; }
}
