* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", serif;
}

body {
    background-color: white;
}

/*TÍTULO PRINCIPAL*/
.nav h1 {
    background-color: #02A28F;
    padding: 2% 3%;
}

header {
    color: white;
}

h1 {
    font-size: 2.25em;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

#imagem-principal {
    max-width: 1200px;
    height: auto; 
}

.fundo-titulo a {
    color: white;
}

.texto-post time {
    color: #666;
}

/*CONTEÚDO PRINCIPAL*/
.main-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    padding: 2% 3%;
    
}

/* Cards dos posts recentes */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card h3 {
    color: #02A28F;
    font-weight: 400;
}

.by {
    color: #666;
    font-weight: 700;
}

.name {
    color:#666
}

/* Posts populares */
.grid-post {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.grid-post article {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem;
    gap: 1rem;
}

.post {
    width: 40%;
    border-radius: 8px;
    object-fit: cover;
}

.texto-post h3 {
    font-size: 1.1em;
    margin-bottom: 0.3em;
}

.fundo-titulo {
    background: #02A28F;
    color: #fff;
    border-radius: 8px;
    padding: 2% 3%;
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paragrafo {
    display: flex;
    justify-content: space-between;
    padding: .8rem 0;
    font-size: 1em;
}

.footer-container {
    background-color: #02A28F;
    color: white;
    padding: 1rem 4rem;
    text-align: center;
}

/* Responsividade */
@media (max-width: 320px) {
    .nav h1 {
        background-color: #02A28F;
    }
    h1 {
        text-align: center;
        font-size: 1.875em;
    }

    .fundo-titulo h2 {
        font-size: 1em;
        padding: 2% 3%;
    }

    .card h3 {
        font-size: 1em;
    }

    .footer-container {
        padding: 1rem 2rem;
    }
}
@media (max-width: 500px) {
    h1 {
        text-align: center;
        width: 100%;
        display: block;
    }

    .main-container {
        grid-template-areas:
            "imagem-principal"
            "secao-post-populares"
            "secao-post-recentes"
            "categoria";
    }

    #imagem-principal {
        grid-area: imagem-principal;
    }

    .secao-post:nth-of-type(2) {
        grid-area: secao-post-populares;
    }

    .secao-post:nth-of-type(1) {
        grid-area: secao-post-recentes;
    }

    .secao-post:nth-of-type(3) {
        grid-area: categoria;
    }
}

@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .grid-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2560px) {
    .main-container {
        max-width: 1400px;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    .nav h1 {
        padding: 1% 23%;
        font-size: 3em;
    }
    #imagem-principal {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-container {
        padding: 1.5rem 0;
        font-size: 1.5em;
    }
}

