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

.rdg-blocks .rdg-cpt-list {
    .content {
        width: 100%;
        display: flex;
        flex-direction: column;

        @include title;

        .posts {
            display: flex;
            flex-direction: row;
            gap: 2rem 1rem;
            flex-wrap: wrap;
            justify-content: space-between;

            a {
                text-decoration: none;
            }

            article {
                width: calc(calc(100% / 3) - .8rem);

                @media (max-width: 1024px) {
                    & {
                        width: calc(calc(100% / 2) - .8rem);
                    }
                }

                @media (max-width: $breakpoint-md) {
                    & {
                        width: 100%;
                    }
                }

                .inside-article {
                    padding: 0;

                    .article-header {
                        display: flex;
                        justify-content: space-between;
                        margin-bottom: .3rem;

                        @media (max-width: 330px) {
                            & {
                                flex-direction: column;
                                text-align: center;
                            }
                        }

                        .article-date {
                            color: var(--color-cpt-list-date);
                        }

                        .article-dropdown {
                            position: relative;
                            display: inline-block;

                            .more-content {
                                display: none;
                                position: absolute;
                                padding: .5rem;
                                box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
                                z-index: 1;
                                background-color: var(--color-cpt-list-more);
                                border-radius: 3px;
                                width: auto;

                                a {
                                    display: block;
                                    white-space: nowrap;
                                }
                            }
                        }

                        .article-dropdown:hover .more-content {
                            display: block;
                          }
                    }

                    .article-image img, .article-image .color {
                        height: 15rem;
                        object-fit: cover;
                        background-color: var(--color-gray);
                    }

                    .article-summary {
                        .article-title {
                            margin-bottom: .5rem;

                            a {
                                color: var(--color-cpt-list-title);

                                &:hover {
                                    color: var(--color-cpt-list-title);
                                }
                            }
                        }

                        .article-excerpt {
                            color: var(--color-cpt-list-excerpt);
                        }
                    }
                }
            }
        }

        @include message;
    }
}

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