// ==========================================================================
// Component: .expertise-list
// Two-column layout: left column scrolls (fixed items), right column is a
// single image, sticky for the whole list height.
// BEM Methodology: .expertise-list (Block) → .expertise-list__element
// ==========================================================================

@use '../base/variables' as *;
@use '../base/mixins' as *;

.expertise-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: $spacing-lg;
    margin: 0 auto $spacing-xl auto;

    @media (min-width: $breakpoint-md) {
        grid-template-columns: 2fr 2fr;
        align-items: start;
    }
}

.expertise-list__items {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    margin-bottom: auto;

    @media (min-width: $breakpoint-md) {
        order: 1;
    }
}

.expertise-list__image-col {
    @media (min-width: $breakpoint-md) {
        order: 2;
        position: sticky;
        top: 15vh;
        align-self: start;
    }
}

.expertise-list__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: color-mix(in srgb, $color-dark 5%, transparent);
    margin-bottom: $spacing-lg;
    max-height: calc(100vh - (#{$header-height-lg} * 2));

    @media (min-width: $breakpoint-md) {
        margin-bottom: 0;
    }
}

.expertise-list__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
