/*
    Block: Featured Post & CTAs
    Note: Selectors must start with .block-featured-post-ctas
*/

@layer blocks {
    .block-featured-post-ctas .text-content :is(h2, .h2) {
        text-wrap: balance;
        width: 80%;
        padding-bottom: 4.375rem;
    }

    .block-featured-post-ctas .main-wrapper {
        display: grid;
        grid-template-columns: 847fr 413fr;
        gap: 1.25rem;
        min-height: 31.25rem;
    }

    .block-featured-post-ctas .featured-post,
    .block-featured-post-ctas .cta {
        position: relative;
        border-radius: 0.5rem;
        overflow: hidden;
        background-color: transparent;
    }

    /* Featured post */

    .block-featured-post-ctas .featured-post .media-wrapper::after {
        position: absolute;
        content: '';
        inset: 0;
        background:
            linear-gradient(180deg, rgba(41, 32, 52, 0) 50.07%, #292034 100%),
            linear-gradient(0deg, rgba(41, 32, 52, 0.5), rgba(41, 32, 52, 0.5)),
            linear-gradient(237.67deg, rgba(41, 32, 52, 0) 30.62%, #292034 100%);
        mix-blend-mode: multiply;
    }

    .block-featured-post-ctas .post__title {
        margin-block: 0 1.875rem;
        text-wrap: balance;
    }

    .block-featured-post-ctas .post__excerpt {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-block: 1.875rem;
        text-wrap: balance;
        color: var(--c-white);
        font-size: var(--fs-13-15);
    }

    .block-featured-post-ctas .post-meta {
        gap: .75rem;
    }

    .block-featured-post-ctas .post__category {
        color: var(--c-secondary);
        font-size: var(--fs-11-12);
        font-weight: 500;
    }

    .block-featured-post-ctas .post__date {
        color: var(--c-dark-25-tint);
        font-size: var(--fs-11-12);
        font-weight: 500;
    }

    .block-featured-post-ctas .feature-tag {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        font-size: var(--fs-13-15);
        margin-bottom: auto;
        color: var(--c-white);
    }

    .block-featured-post-ctas .featured-post .data-wrapper {
        padding: 3.125rem;
        z-index: 1;
        position: absolute;
        inset: 0;
        overflow: hidden;
        width: 75%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .block-featured-post-ctas .featured-post .media-wrapper img {
        transition: transform 200ms ease-out;
    }

    .block-featured-post-ctas .featured-post:hover .media-wrapper img {
        transform: scale(1.05)
    }

    /* Star icon */

    .block-featured-post-ctas .feature-tag .star-icon {
        width: 1.875rem;
        height: 1.875rem;
        border-radius: 100vw;
        background-color: var(--c-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .block-featured-post-ctas .feature-tag .star-icon svg {
        color: var(--c-dark-purple);
        width: 0.9375rem;
        height: 0.9375rem;
    }

    .block-featured-post-ctas .hover-tile {
        --pad: 1.25rem;
        flex-basis: 100%;
        aspect-ratio: unset;
    }

    .block-featured-post-ctas .hover-tile .tile__icon {
        width: 1.9375rem;
        height: 1.9375rem;
    }

    .block-featured-post-ctas .hover-tile .tile__title {
        max-width: 12rem;
    }

    @media screen and (width <= 1200px) {
        .block-featured-post-ctas .featured-post .data-wrapper {
            width: 85%;
        }
    }

    @media screen and (width <= 920px) {
        .block-featured-post-ctas .featured-post .data-wrapper {
            width: 100%;
        }
    }

    @media screen and (width <= 620px) {
        .block-featured-post-ctas .text-content :is(h2, .h2) {
            padding-bottom: 2.5rem;
            width: 95%;
            text-wrap: unset;
        }
        .block-featured-post-ctas .main-wrapper {
            grid-template-columns: 1fr;
            gap: 0.625rem;
        }
        .block-featured-post-ctas .feature-tag {
            margin-bottom: 5rem;
        }
        .block-featured-post-ctas .featured-post .data-wrapper {
            position: static;
            padding: 1.25rem;
            height: 100%;
        }
        .block-featured-post-ctas .feature-tag .star-icon {
            width: 1.25rem;
            height: 1.25rem;
        }
        .block-featured-post-ctas .feature-tag .star-icon svg {
            width: .625rem;
            height: .625rem;
        }
        .block-featured-post-ctas .post__title {
            margin-block: 0 1.25rem;
        }
        .block-featured-post-ctas .post__excerpt {
            margin-block: 1.25rem;
            -webkit-line-clamp: 3;
            line-clamp: 3;
        }
        .block-featured-post-ctas .ctas-wrapper {
            flex-direction: row;
            gap: 0.625rem;
        }
        .block-featured-post-ctas .hover-tile {
            --pad: .9375rem;
            height: 12.5rem;
        }
        .block-featured-post-ctas .hover-tile .tile__icon {
            width: 1.625rem;
            height: 1.625rem;
        }
        .block-featured-post-ctas .hover-tile .data-wrapper {
            transform: translateY(var(--pad));
        }
        .block-featured-post-ctas .hover-tile:is(:hover, :focus-visible) .data-wrapper {
            transform: translateY(0);
        }
        .block-featured-post-ctas .hover-tile .tile__hover {
            max-height: 0;
        }
        .block-featured-post-ctas .hover-tile:is(:hover, :focus-visible) .tile__hover {
            max-height: var(--max-height, 2rem);
        }
    }

}
