/* BLOCK: Related Posts */

.block-related-posts .swiper {
    overflow: visible;
}

.block-related-posts .swiper-wrapper {
    margin-inline: calc(-1 * var(--offset));
    padding-inline: var(--offset);
}

.block-related-posts .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 5rem;
    gap: 1.5rem;
}

.block-related-posts .text-content > * {
    margin: 0;
}

.block-related-posts .text-content > :not(:last-child) {
    margin-bottom: 2.5rem;
}

.block-related-posts .text-content > :is(h1, h2, h3, .h1, .h2, .h3):not(:last-child) {
    margin-bottom: 3.125rem;
}

.block-related-posts .post {
    background-color: #F1EEFF;
    border-radius: 1.5rem;
    overflow: hidden;
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    transition: background-color 100ms ease-out;
}

.block-related-posts .post:is(:hover, :focus-within) {
    background-color: var(--c-light-purple);
}

.block-related-posts .post--image {
    width: 100%;
    height: auto;
    aspect-ratio: 1.768;
    object-fit: cover;
    margin-bottom: 2.5rem;
}

.block-related-posts .post--secondary .post--image svg {
    transform: translate(40%, -50%);
}

.block-related-posts .post > :not(.post--image) {
    margin-inline: 2.5rem;
}

.block-related-posts .post--meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: var(--font-12-9);
    font-weight: 500;
    line-height: 1.1;
}

.block-related-posts .post--category {
    font-weight: 600;
    color: var(--color, var(--c-primary));
}

.block-related-posts .post--primary .post--category {
    --color: #8EE36A;
}

.block-related-posts .post--secondary .post--category {
    --color: var(--c-tertiary);
}

.block-related-posts .post--title {
    margin-block: 1.5rem 2.5rem;
}

.block-related-posts .post--link {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.125rem;
    text-wrap: nowrap;
    color: currentColor;
    border: 1px solid currentColor;
    border-radius: 0.625rem;
    font-size: var(--font-15-11);
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    transition: 100ms ease-out;
    transition-property: background-color, color;
}

.block-related-posts .post:is(:hover, :focus-within) .post--link {
    color: var(--c-text-light);
    background-color: var(--c-text-dark);
}

.block-related-posts .post.is-dark:is(:hover, :focus-within) .post--link {
    color: var(--c-text-dark);
    background-color: var(--c-text-light);
    border-color: var(--c-text-light);
}

.block-related-posts .swiper-pagination {
    position: relative !important;
    border-radius: var(--radius-20);
    overflow: hidden;
}

.block-related-posts .swiper-pagination-progressbar-fill {
    background: var(--c-primary);
    border-radius: var(--radius-20);
}

.block-related-posts .cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9375rem;
}

.block-related-posts .cta-buttons--mobile {
    display: none;
    margin-top: 2.5rem;
    width: 15.875rem;
    max-width: 100%;
    margin-inline: auto;
}

.block-related-posts .cta-buttons--mobile > * {
    width: 100%;
}

@media screen and (width <= 1024px) {
    .block-related-posts .post {
        padding-bottom: 1.5rem;
    }
    .block-related-posts .post--image {
        margin-bottom: 1.5rem;
    }
    .block-related-posts .post > :not(.post--image) {
        margin-inline: 1.5rem;
    }
    .block-related-posts .post--title {
        margin-top: 1.25rem;
    }
}

@media screen and (width <= 920px) {
    .block-related-posts .content-wrapper .header {
        align-items: flex-end;
        margin-bottom: 2.5rem;
    }
    .block-related-posts .footer {
        margin-top: 1.875rem;
    }
}

@media screen and (width <= 620px) {
    .block-related-posts .text-content {
        width: 100%;
        text-align: center;
    }
    .block-related-posts .text-content > :not(:last-child) {
        margin-bottom: 1.5rem;
    }
    .block-related-posts .text-content > :is(h1, h2, h3, .h1, .h2, .h3):not(:last-child) {
        margin-bottom: 2.5rem;
    }
    .block-related-posts .cta-buttons--desktop {
        display: none;
    }
    .block-related-posts .cta-buttons--mobile {
        display: flex;
    }
    .block-related-posts .post--link {
        padding-block: 0.5rem;
    }
    .block-related-posts .post--link > svg {
        width: 0.75em;
    }
}