/*
   mobile.css - Recurso Bíblico
   Ajustes para celulares e tablets.
   Este arquivo é carregado DEPOIS do style.css (em themes/header.php).
   Nada aqui muda o site em telas de computador (acima de 1040px).
   Muitos "!important" são necessários porque várias páginas usam
   larguras fixas direto no HTML (style="width: 780px;" etc.).
*/

/* =========================================================
   TABLETS E TELAS MENORES (até 1040px)
   ========================================================= */
@media screen and (max-width: 1040px) {

    *, *:before, *:after { -webkit-box-sizing: border-box; box-sizing: border-box; }
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { font-size: 15px; line-height: 1.4; }

    /* Containers de largura fixa passam a ser fluidos */
    .width_limitor,
    #background #container,
    #header,
    #breadcrumb,
    #content,
    #footer {
        width: auto !important;
        max-width: 1010px;
        margin-left: 6px !important;
        margin-right: 6px !important;
    }

    /* Imagens e vídeos nunca ultrapassam a tela */
    img, iframe, video, embed, object { max-width: 100%; }
    #content img { height: auto; }

    /* ---------- Cabeçalho ---------- */
    #header .headerdesign { height: auto; overflow: hidden; padding-bottom: 8px; }
    #header .logo { width: 220px; margin: 5px 10px 0 5px; }
    #header .logo img { width: 100%; height: auto; }
    #header .subtitle { height: auto; font-size: 17px; line-height: 22px; padding: 12px 12px 0 12px; }
    #header #topmenu { float: none; clear: both; width: auto; height: auto; display: block; text-align: center; padding-top: 6px; }
    #header #topmenu ul li { float: none; display: inline-block; vertical-align: top; margin: 2px 4px; }
    #header #topmenu ul li h2 { margin: 0; }
    #header #topmenu ul li a { display: inline-block; padding: 4px 6px; }

    /* ---------- Barra abaixo do cabeçalho (compartilhar / busca) ---------- */
    #breadcrumb { height: auto; overflow: hidden; padding: 3px 0; }
    #searchbox { margin: 2px 4px; }
    .marquee { width: 100%; }

    /* ---------- Colunas ---------- */
    #only_column {
        float: none;
        width: auto !important;
        margin: 8px;
        padding: 0 12px 12px 12px;
    }
    /* Página de Estudos / Links / Ajude-nos: menu à esquerda, conteúdo ocupa o resto */
    #left_column { margin: 8px 4px 8px 8px; }
    #main_column {
        float: none;
        width: auto !important;
        overflow: hidden;
        margin: 8px 8px 8px 4px;
    }
    #tablewrap { float: none; }

    /* Tabelas de Estudos e Links ocupam a largura disponível */
    #estudostable, #linkstable { width: 100% !important; }

    /* ---------- Página inicial ---------- */
    #index_page .noticias_container,
    #index_page .highlight_study,
    #index_page .video,
    #index_page .rec_link,
    #index_page .cartoon_container,
    #index_page .spacing_div {
        float: none;
        width: auto;
        min-width: 0;
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }
    #index_page .noticias_block { float: none !important; }
    #index_page .noticias_scrollbox { height: 260px; }
    #index_page .highlight_study { border-right: 0; padding: 0; margin-top: 15px; text-align: center; }
    #index_page .highlight_study_box { text-align: center; }
    #index_page .study_pic {
        float: none !important;
        display: inline-block;
        vertical-align: top;
        margin: 20px 12px 10px 12px !important;
    }
    #index_page .video { text-align: center; margin: 20px 0 0 0; }
    #index_page .video iframe { width: 100%; max-width: 560px; height: 315px; }
    #index_page #galeria_box { float: none; width: auto; height: auto; margin: 20px auto 0 auto; padding: 10px; max-width: 360px; font-size: 24px; }
    #index_page .cartoon_container { margin-top: 20px; text-align: center; }
    #index_page .cartoon_container > div:first-child { margin-left: auto !important; margin-right: auto !important; max-width: 360px; font-size: 24px !important; }
    #index_page .cartoon_shadow { position: static; width: auto; height: auto; max-width: 100%; max-height: none; }
    #index_page .cartoon { max-width: 100%; height: auto; }

    /* ---------- Página Ajude-nos ---------- */
    .warning { margin: 0 10px; }

    /* ---------- Formulários ---------- */
    #form_autor .formulario,
    #form_envio .formulario { width: auto; margin: 15px 0; }
    #form_autor .comentario, #form_autor .biografia,
    #form_envio .comentario, #form_envio .biografia { width: 100%; margin: 5px 0; }
    #form_autor .left_info, #form_autor .right_info,
    #form_envio .left_info, #form_envio .right_info,
    #form_autor #info_teo .left_info, #form_autor #info_teo .right_info,
    #form_autor #info_pes .left_info, #form_autor #info_pes .right_info,
    #form_envio #info_teo .left_info, #form_envio #info_teo .right_info,
    #form_envio #info_pes .left_info, #form_envio #info_pes .right_info {
        float: none;
        width: auto;
        text-align: left;
    }
    #form_autor #info_teo textarea, #form_autor #info_pes textarea,
    #form_envio #info_teo textarea, #form_envio #info_pes textarea { width: 100%; max-width: 460px; }
    input, select, textarea { max-width: 100%; }

    /* Formulário de contato (tabelas com width="600px" e margem de 150px) */
    #only_column table[width],
    #only_column form table { width: 100% !important; margin-left: 0 !important; }

    /* ---------- Rodapé ---------- */
    #footer { padding: 0 8px 8px 8px; }
    #footer table { width: 100%; }
    #footer .termos, #footer .copyright { width: auto; }
    #footer .footerlink { display: inline-block; padding: 6px 10px; }
}

/* =========================================================
   CELULARES (até 760px)
   ========================================================= */
@media screen and (max-width: 760px) {

    body { font-size: 16px; }
    h1 { font-size: 32px; }

    /* ---------- Cabeçalho ---------- */
    #header { margin-top: 6px; }
    #header .logo { float: none; width: 170px; margin: 6px auto 0 auto; }
    #header .subtitle { font-size: 14px; line-height: 18px; padding: 6px 10px 0 10px; text-align: center; }
    /* Botões do menu: 5 botões em 2 linhas, fáceis de tocar */
    #header #topmenu ul li {
        width: 30%;
        min-width: 92px;
        height: auto;
        margin: 3px 1%;
        padding: 0;
        background-size: 100% 100%;
    }
    #header #topmenu ul li h2 { font-size: 15px; }
    #header #topmenu ul li a { display: block; padding: 12px 2px 16px 2px; }

    /* ---------- Compartilhar / busca ---------- */
    #breadcrumb .fb-share-button,
    #breadcrumb .google_plus { float: left; margin: 3px 0 3px 4px; }
    #searchbox { float: none; clear: both; text-align: center; margin: 4px 0; }
    #searchbox .searchfield { width: 65%; height: 34px; font-size: 16px; }
    #searchbox .searchsubmit { height: 36px; padding: 0 12px; font-size: 16px; }

    /* ---------- Colunas empilhadas ---------- */
    #only_column { margin: 6px; padding: 0 10px 10px 10px; }
    #left_column,
    #main_column {
        float: none;
        width: auto !important;
        margin: 6px !important;
        padding: 0 10px 10px 10px !important;
    }
    #menuwrap, #tablewrap { float: none; }
    #main_column .column_title, #only_column .column_title, #left_column .column_title { font-size: 20px; }
    #main_column .column_header, #only_column .column_header, #left_column .column_header { height: auto; min-height: 40px; overflow: hidden; }

    /* ---------- Tabela de Estudos: esconde Subcategoria e Série ---------- */
    #estudostable { table-layout: auto; }
    #estudostable .header_subcategory, #estudostable .subcategory,
    #estudostable .header_series, #estudostable .series { display: none; }
    #estudostable .header_name, #estudostable .header_category { width: auto; }
    #estudostable td, #estudostable th { word-wrap: break-word; }
    #estudostable td a { display: inline-block; padding: 2px 0; }

    /* ---------- Tabela de Links: esconde a coluna Ênfase ---------- */
    #linkstable { table-layout: auto; }
    #linkstable .head_link_enfase, #linkstable .body_link_enfase { display: none; }
    #linkstable .head_link_imagem, #linkstable .head_link_name { width: auto; }
    #linkstable .body_link_imagem img { max-width: 110px; }
    #linkstable tr td { height: auto; padding: 8px 4px; }

    /* ---------- Página inicial ---------- */
    #index_page .study_pic { width: 44%; height: auto; margin: 18px 2% 8px 2% !important; }
    #index_page .highlight_study_box .thumb { width: 100% !important; height: auto !important; max-width: 170px; }
    #index_page .small_title { width: auto; font-size: 13px; }
    #index_page .noticias_date { float: none; font-weight: normal; font-size: 13px; }
    #index_page .video iframe { height: 56vw; max-height: 315px; }
    #index_page .intro_body p { text-align: left !important; }

    /* ---------- Página Ajude-nos ---------- */
    #pesquisa .view_results { float: none; }
    #Results table { width: 100%; }
    #Results .results_bar_td { width: 35%; }
    #Results .results_design { width: 100%; }
    #Results .results_name { padding-right: 8px; }
    #Results .results_color_bar { margin-right: 0; }

    /* ---------- Janelas (pop-ups) do site ---------- */
    .reveal-modal,
    .reveal-modal.small, .reveal-modal.medium,
    .reveal-modal.large, .reveal-modal.xlarge,
    #instrucao .reveal-modal {
        left: 6px !important;
        right: 6px !important;
        width: auto !important;
        margin-left: 0 !important;
        padding: 30px 14px 24px 14px !important;
        overflow-x: auto;
    }
    .reveal-modal .close-reveal-modal { font-size: 34px; top: 12px; right: 12px; padding: 4px; }
    .reveal-modal .authorpic,
    .reveal-modal .authorbio,
    .reveal-modal .authorprofile,
    .reveal-modal .container > div,
    .reveal-modal .linkprofile,
    .reveal-modal .linkprofile > div {
        float: none !important;
        width: auto !important;
        margin: 0 0 10px 0 !important;
        text-align: left !important;
    }
    .reveal-modal .authorpic { text-align: center !important; }
    .reveal-modal div[style*="width:520px"] { width: auto !important; height: auto !important; }
    .reveal-modal iframe { width: 100% !important; }
    .reveal-modal img { max-width: 100% !important; height: auto; }
    .pop_container { width: auto !important; left: 10px !important; right: 10px !important; margin-left: 0 !important; padding: 25px !important; }

    /* ---------- Formulários: rótulo acima do campo ---------- */
    #only_column form table td,
    #form_autor .label_cell, #form_envio .label_cell {
        display: block;
        width: auto !important;
        text-align: left !important;
        height: auto;
    }
    #form_autor input, #form_autor .input,
    #form_envio input, #form_envio .input,
    #form_envio #author_name .nome {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    #form_autor input[type="checkbox"], #form_autor input[type="radio"],
    #form_envio input[type="checkbox"], #form_envio input[type="radio"] { width: auto; }
    #form_autor select, #form_envio select,
    #form_autor #info_teo select, #form_autor #info_pes select,
    #form_envio #info_teo select, #form_envio #info_pes select { width: 100%; max-width: 100%; }
    #form_autor fieldset, #form_envio fieldset { margin: 8px 0; }
    #only_column form input[type="text"],
    #only_column form textarea,
    #only_column form select { width: 100%; font-size: 16px; }
    #only_column form textarea { min-height: 140px; }
    /* Esconde a coluna dos dois-pontos ":" no formulário de contato */
    #only_column form[name="form1"] table td:nth-child(2) { display: none; }
    #only_column form[name="form1"] table td:first-child { font-weight: bold; padding-top: 10px; }
    /* Botões maiores para o dedo */
    input[type="submit"], input[type="reset"], input[type="button"] { min-height: 40px; padding: 6px 18px; font-size: 16px; }
    #form_autor button, #form_envio button { height: auto; padding: 10px 18px; font-size: 16px; }

    /* ---------- Rodapé empilhado ---------- */
    #footer table, #footer tbody, #footer tr, #footer td { display: block; width: auto !important; text-align: center !important; }
    #footer td { padding: 6px 0; font-size: 13px; }
    #footer #IndexSlider { width: 160px; }
}
