@import "src/scss/core/mixin";
.featured-events {
    margin-bottom: toRem(171);
    @include mobile {
        margin-bottom: toRem(97);
    }
    h2,
    h3 {
        @include normalHeading();
        @include mobile {
            font-size: toRem(14);
        }
    }
    h3 {
        margin-bottom: 0;
    }
    .events-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: toRem(86) 1rem;
        justify-content: space-between;
        @include mobile {
            gap: toRem(40) toRem(12);
        }
    }
    .event {
        width: calc(50% - .5rem);
        @include mobile {
            width: calc(50% - 6px);
        }
        &.featured {
            width: 100%;
            h3 {
                max-width: toRem(382);
                @include mobile {
                    max-width: 100%;
                }
            }
            .event-heading {
                align-items: flex-end;
                height: auto;
                @include mobile {
                    align-items: flex-start;
                    gap: 0;
                }
                a.cta {
                    width: 50%;
                    @include mobile {
                        width: 100%;
                    }
                }
            }
            .event-image {
                >a {
                    max-height: max-content;
                    img {
                        height: max-content;
                    }
                }
            }
        }
        &.hover {
            .event-date,
            .event-heading {
                color: var(--color-text-hover);
            }
            .event-image {
                >a {
                    img {
                        transform: scale(1.05);
                    }
                }
            }
        }
    }
    .event-date,
    .event-heading {
        transition: .3s ease-in-out all;
    }
    .event-date {
        font-style: italic;
    }
    .event-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: toRem(14);
        @include mobile {
            flex-direction: column;
        }
        a.cta {
            @include linkWithArrow();
            @include lineClaim(2);
            position: relative;
            padding-left: toRem(28.8);
            width: 100%;
            &:before {
                position: absolute;
                left: 0;
                top: 5px;
            }
            &:hover,
            &:focus {
                &:after {
                    width: 2rem;
                }
            }
            &.hover {
                color: var(--color-text-hover);
                &:before {
                    background-position: center left toRem(5);
                    filter: invert(60%);
                }
            }
            @include mobile {
                padding-left: 1.25rem;
                &:before {
                    top: 50%;
                    transform: translate(0, -50%);
                }
            }
        }
        &:last-child {
            height: auto;
        }
    }
    .event-image {
        >a {
            display: block;
            min-height: 350px;
            max-height: 350px;
            position: relative;
            overflow: hidden;
            img {
                height: 350px;
                @include positionImage();
            }
            @include mobile {
                min-height: 126px;
                max-height: 126px;
                img {
                    height: 126px;
                }
            }
        }
        img {
            display: flex;
            will-change: transform;
            transition: transform .3s cubic-bezier(.23, 1, .32, 1);
            width: 100%;
        }
    }
}