.image-card-flex {
    justify-content: center;
    row-gap: 12px;
}

.image-card {
    display: block;
    height: 286px;
    position: relative;
}

.image-card__front {
    height: 100%;
    transform: rotateY(0);
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    position: relative;
}

.image-card img {
    border-radius: var(--border-radius);
}

.image-card__details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;    
    padding: 0 35px 25px;
    z-index: 1;
    text-align: center;
}

.image-card__front::before{
    content: '';
    position: absolute;
    width: 100%;
    height: 115px;
    background: linear-gradient(180deg, rgba(31, 47, 77, 0.00) 0%, rgba(31, 47, 77, 0.50) 40%, rgba(31, 47, 77, 0.75) 70%, rgba(31, 47, 77, 0.75) 100%);
    left: 0;
    bottom: 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border-bottom: 4px solid var(--light-orange);
}

.image-card__title {
    margin: 0;
    color: var(--white);
    font-size: 16px;
    line-height: 1.2em;
}


.image-card-slider {
    font-size: 0;
    padding-bottom: 50px;
    margin: 0 -10px;

    .slick-list {
        margin-bottom: -10px;
    }
}

.image-card-item {
    padding: 0 10px;
}

.image-card__back .image-card__hover {
    max-height: 160px;
    overflow: hidden;
    padding-right: 20px;
    position: relative;
    right: -11px;

    .scrollbar-track-y {
        opacity: 1;
    }

    .scrollbar-thumb {
        background-color: var(--light-orange);
    }
}

.image-card__hover__link {
    margin-top: 20px;

    .btn-tertiary {
        color: var(--white);
        &:hover {
            &::before {
                background: var(--white);
            }
        }
    }
}

.image-card__back {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1;
    text-align: center;
    padding: 25px 35px;

    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: rotateY(-180deg);
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);

    &:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0.9;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(31, 47, 77, 0.95) 0%, rgba(31, 47, 77, 0.95) 100%);
        z-index: 1;
        border-radius: var(--border-radius);
        overflow: hidden;
    }

    .image-card__hover {
        display: block;

        p {
            line-height: 1.3;
        }
    }

    > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        position: absolute;
        top: 0;
        left: 0;
        border-radius: var(--border-radius);
        overflow: hidden;
    }

    .image-card__hover,
    .image-card__title {
        position: relative;
        z-index: 3;
    }
}

.bg-blue {
    .image-card__back {
        &:before {
            background: var(--light-blue-gradient);
        }
    }

    .image-card__back {
        .image-card__title,
        p,
        .btn-tertiary {
            color: var(--secondary-color);
        }
    }
}

@media (min-width: 768px) {

    .image-card-flex {
        row-gap: 20px;
        margin: 0 -10px;
    }

    .image-card-flex > * {
        padding: 0 10px;
    }

    .image-card {
        height: 278px;
    }


    .image-card__front::before{
        height: 120px;
    }

    .image-card__title {
        font-size: 20px;
    }

}


@media (min-width: 1200px) {
    .image-card-flex {
        row-gap: 32px;
        margin: 0 -16px;
    }

    .image-card-flex > * {
        padding: 0 16px;
    }

    .image-card {
        height: 335px;
        transform-style: preserve-3d;
        backface-visibility: hidden;
        perspective: 1000px;
        transform: rotateY(0);
        transition: transform 0.3s ease-in-out;
    }

    .image-card__front,
    .image-card__back {
        transform-style: preserve-3d;
        backface-visibility: hidden;
    }

    .image-card__front::before{
        height: 122px;
    }

    .image-card__title {
        font-size: 22px;
    }

    .image-card:hover {
        .image-card__back {
            transform: rotateY(0deg);
            z-index: 1;
        }

        .image-card__front {
            transform: rotateY(180deg);
        }
    }

    .image-card__hover {
        display: none;
        color: var(--white);
        margin-top: 20px;
    }

    .image-card__hover .btn-tertiary {
        color: var(--light-blue);
        margin-left: 11px;
    }

    .image-card__hover .btn-tertiary:hover::before {
        background: var(--light-blue);
    }

    .image-card-slider {
        margin: 0 -16px;

        .slick-list {
            margin-bottom: -16px;
        }
    }

    .image-card-item {
        padding: 0 16px;
    }

    .image-card__details,
    .image-card__title,
    .image-card__back .image-card__hover {
        transform: translateZ(60px) scale(0.94);
    }

    .image-card-slider {
        margin-block: -30px;

        .slick-list {
            padding-block: 30px;
            margin-bottom: -30px;
        }
    }
}