.link-image {
    position: relative;
    display: flex;
    flex: 1;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.link-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-link-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 40px;
    background-color: var(--wp--preset--color--blue);
    color: white;
    padding: 20px;
    box-sizing: border-box;
    min-height: calc(0% - 40px);
    justify-content: space-between;
    display: flex;
    flex-direction: column;
    transition: min-height 0.5s ease-in-out;
}

span.button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.link-image:hover span.button,
.swiper-slide-active .link-image span.button {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    transition-delay: 0.3s;
}

.link-image:hover .image-link-content,
.swiper-slide-active .link-image .image-link-content {
    min-height: calc(100% - 40px);
}

@media not all and (min-width: 1024px) {

    .link-image,
    .swiper-slide-active .link-image {
        aspect-ratio: unset;
        min-height: 350px;
        width: 100%;
    }

    .image-link-content,
    .swiper-slide-active .image-link-content {
        height: fit-content;
        max-height: 100%;
    }

    span.button {
        position: static;
        opacity: 1;
        padding: 6px 0px;
    }

    .link-image:hover .image-link-content,
    .swiper-slide-active .link-image .image-link-content {
        min-height: unset;
    }

}

@media not all and (min-width: 640px) {

    .link-image,
    .swiper-slide-active .link-image {
        aspect-ratio: unset;
        min-height: 300px;
        width: 100%;
    }
}