h1 {
    text-align: center;
    font-size: 5rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-style: italic;
    color: rgb(32, 36, 102);
    text-shadow: 1px 2px black;
    margin-top: -8rem;
}

h3 {
    color: #F66060;
}

.contenedor {
    display: grid;
    grid-column: 2;
    gap: 2;
}

#comentarios, #posts {
    font-size: 16px;
    margin: auto 20px;
    font-family: Arial, Helvetica, sans-serif;
    width: 45%;
    position: absolute;
    top: 15rem;
}

#comentarios {
    right: 0;
}

#posts {
    left: 0;
}

.caja_comentarios {
    max-height: 400px;
    overflow-y: scroll;
    border-radius: 20px;
}

.comentario_publicado {
    padding-left: 1rem;
    background-color: rgba(179, 179, 226, 0.816);
    margin: 1rem auto;
    border-radius: 5px;
    word-wrap: break-word;
}

.subtxt {
    display: flex;
    justify-content: space-between;
    font-size: smaller;
    padding-top: 1rem;
}

.texto-fecha {
    color: gray;
}

.caja-textarea {
    margin-top: 1rem;
}

.comentario-texto {
    resize: none;
    width: 100%;
    height: 50px;
}

.btn-subir {
    background-color: rgb(233, 116, 6);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 8px;
    font-size: 18px;
}

.fecha-derecha {
    float: right;
    font-size: 0.9em;
    color: #888;
}

.comentario_publicado p {
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
}

.respuesta-form {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.respuesta_comentario {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 5px;
    margin-top: 5px;
}

/* ==== Responsive: Pantallas pequeñas ==== */
@media (max-width: 767.98px) {
    .contenedor {
        width: 100%;
        padding: 0;
        margin-top: 6rem; /* Asegura espacio arriba de los botones */
    }

    #posts,
    #comentarios {
        position: static !important;
        width: 100%;
        margin: 0;
        padding: 0 10px;
        top: 0;
        margin-top: 1rem;
    }

    .blog-body {
        padding: 0;
        margin: 0;
    }

    .blog-body{
        font-size: 1.8rem;
        margin-top: -15rem;
    }

    .btn {
        width: 45%;
        margin-bottom: 0.5rem;
    }

    .d-md-none {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        padding: 10px 0;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    }

    .toggle-btns {
        margin-top: 1rem;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}
