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

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

    .title {
        width: 100%;
        display: flex;
        text-align: center;
        align-items: center;
        justify-content: center;

        h1, h2, h3, span {
            margin: 0;
            font-weight: 400;
            font-size: var(--font-size);
            line-height: var(--line-height);
    
            @media (max-width: $breakpoint-lg) {
                & {
                    font-size: var(--font-size-lg);
                    line-height: var(--line-height-lg);
                }
            }
    
            @media (max-width: $breakpoint-md) {
                & {
                    font-size: var(--font-size-md);
                    line-height: var(--line-height-md);
                }
            }
    
            @media (max-width: $breakpoint-sm) {
                & {
                    font-size: var(--font-size-sm);
                    line-height: var(--line-height-sm);
                }
            }
        }
    }

    .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;
    }
}
