@import url('./heroCarrossel.css');
body {
    main {
        display: flex;
        flex-direction: column;
        width: 100%;
        row-gap: 16px;

        .container-cards {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
            width: 100%;
            max-width: 75rem;
            flex-wrap: wrap;
            margin: 0 auto;
            padding: 1rem;
            overflow: hidden;

            .card-blog {
                display: flex;
                flex-direction: column;
                width: 100%;
                max-width: 320px;
                height: 340px;
                background: var(--white);
                border-radius: .5rem;
                transition: all .3s;
                box-shadow: 0px 2px 2px 1px rgba(0, 0, 0, .1);
                z-index: 1;
                overflow: hidden;

                &:hover {
                    > header {
                        img {
                            transform: scale(1.05);
                        }
                    }
                }

                > header {
                    position: relative;
                    overflow: hidden;
                    width: 100%;
                    aspect-ratio: 1 / 1;


                    img {
                        transition: all .3s;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        object-position: center;
                    }
                }

                .conteudo {
                    display: flex;
                    flex-direction: column;
                    row-gap: 1rem;
                    height: 100%;
                    padding: 1rem .5rem;

                    > section {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: space-between;
                        row-gap: .5rem;

                        span {
                            font-size: .75rem;
                            color: var(--dark-red);

                            &:nth-child(2) {
                                color: var(--gray);
                                background: var(--light-gray);
                                padding: .25rem .5rem;
                                border-radius: .25rem
                            }
                        }
                    }

                    h2 {
                        font-size: 1rem;
                        color: var(--dark-gray);
                        display: -webkit-box;
                        -webkit-line-clamp: 3;
                        line-clamp: 3;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis; 
                    }

                    a {
                        font-size: .75rem;
                        margin-top: auto;
                    }
                }
            }
        }
    }
}

@media (min-width: 768px) {
    body {
         main {
            .container-cards {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 2rem;

                .card-blog {
                    display: flex;
                    flex-direction: column;
                    height: 400px;

                    .conteudo {
                        > section {
                            flex-direction: row;
                        }

                        h2 {
                            font-size: 1.25rem; 
                        }
                    }
                }
            }
        }
    }
}