/* ==========================================================================
   STYLE.CSS - LAYOUT MODERNO PARA O GOVERNO CIVIL SFB
   ========================================================================== */

/* Configurações Gerais e Cores (Dark Mode) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-principal: #0d1117;
    --bg-card: #161b22;
    --bg-nav: #21262d;
    --texto-claro: #f0f6fc;
    --texto-mutado: #8b949e;
    --amarelo-destaque: #f2cc60;
    --azul-link: #58a6ff;
    --borda: #30363d;
}

body {
    background-color: var(--bg-principal) !important;
    background-image: none !important; /* Remove o fundo antigo repetido */
    color: var(--texto-claro) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    line-height: 1.6;
    padding: 20px;
}

/* Forçar tabelas antigas a se comportarem como blocos modernos */
table {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    border-collapse: collapse !important;
    display: block;
}

tr {
    display: flex;
    flex-direction: column;
    width: 100%;
}

td {
    display: block;
    width: 100% !important;
    padding: 15px !important;
    background: none !important;
}

/* Transformando a estrutura em um Layout de Duas Colunas (Grid) */
body > p > table:nth-of-type(1) {
    background-color: var(--bg-card);
    border: 1px solid var(--borda);
    border-radius: 8px 8px 0 0;
}

body > p > table:nth-of-type(1) tr {
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    body > p > table:nth-of-type(1) tr {
        flex-direction: column;
    }
}

/* Menu Superior de Navegação */
body > table:nth-of-type(1) {
    background-color: var(--bg-nav) !important;
    border-left: 1px solid var(--borda);
    border-right: 1px solid var(--borda);
    border-bottom: 1px solid var(--borda);
    border-radius: 0 0 8px 8px;
    margin-bottom: 25px !important;
}

body > table:nth-of-type(1) tr {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

body > table:nth-of-type(1) td {
    width: auto !important;
    padding: 5px 10px !important;
}

/* Área Principal: Menu Lateral + Conteúdo */
body > table:nth-of-type(2) {
    background: none !important;
}

body > table:nth-of-type(2) > tragedies > tr, 
body > table:nth-of-type(2) > tbody > tr {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

@media (max-width: 768px) {
    body > table:nth-of-type(2) > tragedies > tr,
    body > table:nth-of-type(2) > tbody > tr {
        flex-direction: column;
    }
}

/* Coluna do Menu Lateral (Informe-se) */
body > table:nth-of-type(2) td:nth-of-type(1) {
    flex: 0 0 260px;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 20px !important;
}

body > table:nth-of-type(2) td:nth-of-type(1) table tr {
    flex-direction: column;
    gap: 8px;
}

/* Coluna do Conteúdo Principal */
body > table:nth-of-type(2) td:nth-of-type(2) {
    flex: 1;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 30px !important;
}

/* Customização dos Links */
a {
    color: var(--azul-link) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--amarelo-destaque) !important;
    text-decoration: underline !important;
}

/* Ajustes de Imagens (Logos e Organograma) */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

/* Sobrescrita de Classes Antigas para Modernização */
.auto-style77, .auto-style112 {
    color: var(--amarelo-destaque) !important;
    font-size: 1.1rem !important;
    font-weight: 600;
}

.auto-style78 {
    font-size: 2.2rem !important;
    color: var(--texto-claro) !important;
    display: block;
    margin-bottom: 5px;
}

.auto-style79 {
    color: var(--amarelo-destaque) !important;
    font-size: 1.2rem !important;
}

.auto-style118 {
    color: var(--texto-claro) !important;
    font-size: 1rem !important;
    text-align: justify !important;
}

/* Rodapé */
#table128 {
    margin-top: 30px !important;
    background-color: var(--bg-nav) !important;
    border: 1px solid var(--borda);
    border-radius: 6px;
    text-align: center;
}

#table128 td {
    color: var(--texto-mutado) !important;
}
