/* Estilos gerais */
.post-container {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.post-title {
    color: #333;
    margin-bottom: 10px;
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 5px; /* Reduzi a margem abaixo da imagem */
}

.post-date {
    color: #777;
    font-size: 0.9em;
    font-weight: 200;
    text-align: center;
    font-style: italic;
    margin-bottom: 15px;
}

.post-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-divider {
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Estilos para a seção de comentários (inalterados) */
.comments-section {
    margin-top: 20px;
}

.comments-title {
    color: #333;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.comment {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.comment p {
    color: #777;
    line-height: 1.5;
    margin-bottom: 0;
}

.comments-section h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.comments-section form div {
    margin-bottom: 10px;
}

.comments-section label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.comments-section input[type="text"],
.comments-section input[type="email"],
.comments-section textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.comments-section textarea {
    resize: vertical;
}

.comments-section button[type="submit"] {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.comments-section button[type="submit"]:hover {
    background-color: #0056b3;
}

/* Estilos para layout em telas maiores */
@media (min-width: 768px) {
    .post-container {
        display: grid;
        grid-template-columns: 300px 1fr;
        grid-template-rows: auto auto; /* Ajustei as linhas */
        gap: 20px;
        align-items: start; /* Alinha os itens ao topo */
    }

    .post-title {
        grid-column: 1 / 3;
    }

    .image-and-ad {
        display: flex;
        flex-direction: column; /* Coloca a imagem e a propaganda em coluna */
    }

    .post-image {
        width: 100%; /* Garante que a imagem não ultrapasse a largura da coluna */
        margin-bottom: 10px; /* Espaçamento entre imagem e data */
    }

    .post-date {
        margin-bottom: 15px; /* Espaçamento entre data e propaganda */
        font-size: 0.9em;
        color: #777;
    }

    .post-advertisement {
        background-color: #e0f7fa;
        color: #00838f;
        padding: 15px;
        border-radius: 5px;
        text-align: center;
        font-size: 0.9em;
    }

    .post-text {
        grid-column: 2 / 3; /* O texto fica à direita */
        /* O alinhamento ao topo é garantido pelo align-items: start no post-container */
    }

    .post-divider {
        grid-column: 1 / 3;
    }

    .comments-section {
        grid-column: 1 / 3;
    }
}

/* Estilos para telas menores (celulares) */
@media (min-width: 767px) {
    .post-container {
        flex-direction: column;
    }

    .post-image {
        margin-bottom: 10px;
    }

    .post-date {
        margin-bottom: 15px;
    }

    .post-advertisement {
        background-color: #e0f7fa;
        color: #00838f;
        padding: 15px;
        border-radius: 5px;
        text-align: center;
        font-size: 0.9em;
        margin-top: 20px; /* Espaçamento acima da propaganda */
    }
}