/* ============================================================================
   home-responsive.css  —  camada MOBILE aditiva da home (index.php)
   ----------------------------------------------------------------------------
   - SÓ contém regras dentro de @media (max-width) → em desktop (>820px) a
     home fica 100% intacta (nenhum arquivo/estilo existente foi alterado).
   - Não mexe em NADA de exibição: as regras do que mostrar continuam no PHP
     ($esconde_bloco_imoveis / $esconde_bloco_empregos / $config_noticias /
     $config_portal_tamanho). Aqui só reflui quem já está visível.
   - Seções notícias+eventos e carrossel de banners já são responsivos por
     conta própria (noticias-block-novo.css + Tiny Slider); não os tocamos.
   v1 — primeiro passe. Ajustar breakpoints/detalhes após teste em device.
   ============================================================================ */

@media (max-width: 820px) {

    /* ---- containers de largura fixa (1190px) → fluidos ---- */
    #tudo,
    #geral {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    #direita,
    #direita-home {
        width: 100% !important;
        margin-left: 0 !important;
        float: none !important;
    }
    #esquerda,
    #esquerda-home {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    html, body { overflow-x: hidden; }
    body { max-width: 100%; }

    /* ---- cabeçalho: linhas empilham e ficam fluidas ---- */
    .linha1,
    .linha2 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }
    .container-nav {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .container-nav.busca { order: -1; }
    .input-busca {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    /* o widget de clima ocupa muito espaço no phone; esconde só no mobile */
    .container-nav.temperatura { display: none !important; }
    #barra-superior {
        flex-wrap: wrap;
        height: auto !important;
        box-sizing: border-box;
    }

    /* ---- cards de empresa: grid 3 colunas → 1 coluna ---- */
    .business-container {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        padding: 0 12px !important;
        box-sizing: border-box;
    }
    .business-row { width: 100% !important; box-sizing: border-box; }
    .business-img img { max-width: 100%; height: auto; }

    /* ---- bloco de empregos (lista + busca): flex 2 col → empilha ---- */
    .jobs-block {
        flex-direction: column !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .jobs-list,
    .jobs-search {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .search-row { flex-direction: column !important; }
    .search-row .input-group,
    .search-row .search-button {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* imagens genéricas nunca estouram a viewport */
    #tudo img { max-width: 100%; height: auto; }
}

@media (max-width: 480px) {
    .business-container { gap: 10px !important; padding: 0 8px !important; }
    .jobs-list,
    .jobs-search { padding: 12px !important; }
}
