/* Post link block style: Post Snippet */

.wp-block-post-link.is-style-post-snippet {
    position: relative;
}

.wp-block-post-link.is-style-post-snippet .wp-block-post-featured-image {
    height: 100%;
    inset: 0;
    overflow: hidden;
    position: absolute;
    width: 100%;
    transform: translate3d(0,0,0);
}

.wp-block-post-link.is-style-post-snippet .wp-block-post-title,
.wp-block-post-link.is-style-post-snippet .snippet-content {
    position: relative;
    z-index: 1;
}

.wp-block-post-link.is-style-post-snippet .project-snippet-meta {
    background-color: rgba(0,0,0,0.16);
    backdrop-filter: blur(3px);
}

.wp-block-post-link.is-style-post-snippet .wp-block-post-featured-image > .wp-post-image {
    transition: transform 0.25s ease-out;
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:hover) .wp-block-post-featured-image > .wp-post-image {
    transform: scale(1.075);
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:active) .wp-block-post-featured-image > .wp-post-image {
    transform: scale(1.0875);
    transition-duration: 50ms;
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:hover)::before {
    opacity: 0.5;
    transition-duration: 50ms;
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:hover) .wp-block-post-featured-image::before,
.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:hover) .wp-block-post-featured-image::after {
    opacity: 0;
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:hover)::after {
    transform: translate(0.25em, -0.25em);
}

.wp-block-post-link.is-style-post-snippet:has(.wp-block-post-link__link:active)::after {
    transform: translate(0.375em, -0.375em);
    transition-duration: 50ms;
}

.wp-block-post-link.is-style-post-snippet .wp-block-post-featured-image::before,
.wp-block-post-link.is-style-post-snippet .wp-block-post-featured-image::after {
    transition: opacity 0.25s ease-out;
}

.wp-block-post-link.is-style-post-snippet::before {
    background: linear-gradient(180deg, transparent 20%, var(--wp--preset--color--contrast) 100%);
    content: '';
    height: 100%;
    inset: 0;
    opacity: 0.6;
    position: absolute;
    transition: opacity 0.25s ease-out;
    width: 100%;
    z-index: 1;
}

.wp-block-post-link.is-style-post-snippet::after {
    background-image: url(../icons/icon-arrow-up-right-white.svg);
    background-repeat: no-repeat;
    background-size: contain;
    height: 2.5rem;
    content: '';
    right: var(--wp--preset--spacing--40);
    position: absolute;
    top: var(--wp--preset--spacing--40);
    transition: transform 0.25s ease-out;
    width: 2.5rem;
    z-index: 1;
}


#related .wp-block-post-link.is-style-post-snippet {
    aspect-ratio: 16 / 9 !important;
}