/* ============================================================
   RESPONSIVIDADE GLOBAL PARA SMARTPHONES — TocaRural 2026
   Mantém o estilo WordProject, mas adapta tudo a iOS/Android
   ============================================================ */

/* Imagens fluidas */
img {
    max-width: 100%;
    height: auto;
}

/* Wrapper YAML antigo — permitir encolher */
.ym-wrapper,
.ym-wbox {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Header responsivo */
header h1 {
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.3;
}

/* Navegação de capítulos */
.textHeader p a.chap {
    padding: 6px 10px;
    margin: 3px;
    display: inline-block;
    font-size: 1rem;
}

/* Texto principal */
.textBody {
    font-size: 1.15rem;
    line-height: 1.75;
    word-wrap: break-word;
}

/* Toolbar responsiva */
.chapter-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botões */
.ym-button,
.ym-button2 {
    padding: 8px 14px;
    font-size: 1rem;
}

/* Ícones */
.chapter-toolbar img,
.alignRight img {
    width: 28px;
    height: 28px;
}

/* Footer */
footer p {
    font-size: 0.9rem !important;
    line-height: 1.4;
}

/* Ajustes específicos para ecrãs muito pequenos */
@media (max-width: 480px) {

    header h1 {
        font-size: 1.2rem;
    }

    .textHeader h2 {
        font-size: 1.4rem;
    }

    .textBody {
        font-size: 1.1rem;
    }

    .toolbar-center button {
        padding: 6px 10px;
    }

    .chapter-toolbar img {
        width: 24px;
        height: 24px;
    }
}

/* Capítulos com tamanho uniforme */
.textHeader p a.chap {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 4px;
    font-size: 1rem;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Botões menores no smartphone */
@media (max-width: 480px) {

    .chapter-toolbar .ym-button,
    .chapter-toolbar .ym-button2 {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .chapter-toolbar img {
        width: 20px;
        height: 20px;
    }
}

/* Footer: botões iguais aos do topo no smartphone */
@media (max-width: 480px) {

    .alignRight .ym-button,
    .alignRight .ym-button2 {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .alignRight img {
        width: 20px;
        height: 20px;
    }
}
