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

.rdg-blocks .rdg-slider-latest-post {
    width: 100%;

    @include title;

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

        .items {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;

            .item {
                .image {
                    display: flex;
                    flex-direction: column;
                    justify-content: flex-end;
                    height: 23rem;
                    max-height: 23rem;
                    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;
                    color: $color-black;

                    .footer-title {
                        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 {
                            color: var(--color-slider-latest-post-title);
                            text-decoration: none !important;
                            transition: all 0.3s ease-in-out;

                            &:hover {
                                color: var(--color-slider-latest-post-title-hover);
                            }
                        }
                    }

                    .footer-description {
                        margin-top: .5rem;
                        color: var(--color-slider-latest-post-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;
                            }
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-slider-latest-post {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
