@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: 18rem;
                    max-height: 18rem;
                    background-size: cover;
                    background-position: center top;
                    background-repeat: no-repeat;
                }

                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;
                        color: $color-primary;

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

                        @media (max-width: $breakpoint-sm) {
                            & {
                                -webkit-line-clamp: 4;
                            }
                        }
                        
                        a {
                            color: $color-primary;
                            text-decoration: none !important;
                            transition: all 0.3s ease-in-out;

                            &:hover {
                                color: $color-primary-dark-light;
                            }
                        }
                    }

                    .footer-description {
                        margin-top: .5rem;
                        color: $color-black;

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