@import '../../../../assets/scss/abstracts/variables';
@import '../../../../assets/scss/abstracts/mixins';

.rdg-blocks .rdg-posts-list {
    width: 100%;

    @include title;

    .body {
        @media (max-width: $breakpoint-xl) {
            & {
                padding: 0;
                width: 100%;
            }
        }

        .items {
            width: 100%;
            display: flex;
            gap: 1.5rem;

            @media (max-width: $breakpoint-md) {
                & {
                    flex-direction: column;
                }
            }

            .item {
                width: 100%;

                .image {
                    display: flex;
                    flex-direction: column;
                    justify-content: flex-end;
                    height: 16rem;
                    max-height: 16rem;
                    background-size: cover;
                    background-position: center top;
                    background-repeat: no-repeat;

                    @media (max-width: $breakpoint-md) {
                        & {
                            height: 16rem;
                            max-height: 16rem;
                        }
                    }

                    @media (max-width: $breakpoint-sm) {
                        & {
                            height: 14rem;
                            max-height: 14rem;
                        }
                    }
                }

                footer {
                    display: flex;
                    flex-direction: column;
                    margin-top: .5rem;

                    .footer-title {
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        color: var(--color-posts-list-title);

                        @media (max-width: $breakpoint-md) {
                            & {
                                -webkit-line-clamp: 3;
                            }
                        }

                        @media (max-width: $breakpoint-sm) {
                            & {
                                -webkit-line-clamp: 4;
                            }
                        }

                        a {
                            font-weight: 700;
                            font-size: inherit;
                        }
                    }

                    .header {
                        display: flex;
                        padding-bottom: .5rem;
                        color: var(--color-posts-list-date);
                    }

                    .footer-description {
                        margin-top: .5rem;
                        color: var(--color-posts-list-description);

                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;

                        @media (max-width: $breakpoint-md) {
                            & {
                                -webkit-line-clamp: 3;
                            }
                        }

                        @media (max-width: $breakpoint-sm) {
                            & {
                                -webkit-line-clamp: 4;
                            }
                        }
                    }

                    a {
                        margin-top: .8rem;
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-posts-list {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;

        .body {
            .items {
                .item {
                    footer {
                        a {
                            text-decoration: none;
                        }
                    }
                }
            }
        }
    }
}
