/* mobile-fixes.css */

/* Garante que imagens nunca ultrapassem a tela e sejam responsivas */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Garante que vídeos e iframes do Youtube se adaptem no mobile */
iframe, video, embed, object {
    max-width: 100% !important;
    /* aspect-ratio mantem a proporção 16:9 em navegadores modernos */
    aspect-ratio: 16 / 9;
}

/* Evita barra de rolagem horizontal */
body, html {
    overflow-x: hidden;
}

/* Garante que tabelas muito largas tenham rolagem interna e não quebrem o site */
table {
    max-width: 100% !important;
    overflow-x: auto;
    display: block;
}

/* Correções específicas para telas de celular (menores que 768px) */
@media screen and (max-width: 768px) {
    /* Força os blocos principais a ocuparem 100% e não flutuarem */
    .content-area, .widget-area {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }
    
    /* Afasta um pouco o topo no celular */
    .site-content {
        padding-top: 20px !important;
    }

    /* Reduz tamanhos de fonte de cabeçalhos muito grandes no mobile */
    h1.entry-title, h1.page-title {
        font-size: 24px !important;
        word-wrap: break-word;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-previous, .nav-next {
        text-align: center !important;
        width: 100%;
    }
}
