/* Reset e estilos base */
body, html { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f4f4f4; 
    background-image: url(/imagens/fundosite.png);
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/*
==============================================
--- CABEÇALHO ---
==============================================
*/
.new-header {
    position: relative;
    z-index: 2000;
}

.header-top-bar {
    padding: 15px 0;
    background-image: url(../imagens/rodapeazul.png);
}
.header-top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.header-left { display: flex; align-items: center; gap: 15px; }
.header-logo { height: 70px; background-color: rgba(255, 255, 255, 0.9); border-radius: 50%; border: 3px solid #fff; }
.header-title { color: #ffffff; font-size: 1.1rem; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 25px; }
.header-socials { display: flex; gap: 15px; }
.header-socials a { color: #ffffff; font-size: 1.5rem; text-decoration: none; transition: opacity 0.3s; }
.header-socials a:hover { opacity: 0.8; }
.search-form { position: relative; }
.search-input { background-color: #ffffff; border: 2px solid #ffffff; border-radius: 20px; padding: 10px 45px 10px 20px; width: 250px; font-size: 0.9rem; color: #1e4799; }
.search-input::placeholder { color: #1e4799; opacity: 0.7; }
.search-button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #1e4799; font-size: 1.1rem; cursor: pointer; padding: 5px 10px; }

.header-main-nav { background-color: #0f2c5d; }

.header-main-nav > .container > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}
.header-main-nav > .container > ul > li { 
    position: relative;
}
.header-main-nav a { 
    display: block; 
    padding: 15px 0; 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem;
    white-space: nowrap;
}
.has-dropdown > a { 
    cursor: pointer; 
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0f2c5d;
    border-top: 2px solid #4db6ac;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 250px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2100;
    display: block; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.has-dropdown:hover > .dropdown-menu,
.has-dropdown.active > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu li a {
    padding: 12px 20px;
    white-space: nowrap;
    transition: background-color 0.3s, padding-left 0.3s;
}
.dropdown-menu li a:hover {
    background-color: #1e4799;
    padding-left: 25px;
}

.mobile-menu-toggle {
    display: none;
}

/* --- NAVEGAÇÃO PRINCIPAL (DESKTOP) --- */
.header-main-nav {
    background-color: #0f2c5d;
    position: relative;
}

.header-main-nav > .container > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.header-main-nav > .container > ul > li {
    position: relative;
}

.header-main-nav a {
    display: block;
    padding: 15px 0;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* --- DROPDOWNS (DESKTOP) --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0f2c5d;
    border-top: 2px solid #4db6ac;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 250px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.has-dropdown:hover > .dropdown-menu,
.has-dropdown.active > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu li a {
    padding: 12px 20px;
    white-space: nowrap;
    transition: background-color 0.3s, padding-left 0.3s;
}

.dropdown-menu li a:hover {
    background-color: #1e4799;
    padding-left: 25px;
}

/* --- BOTÃO HAMBÚRGUER (ESCONDIDO NO DESKTOP) --- */
.mobile-menu-toggle {
    display: none;
}

.portarias-page-container {
    max-width: 800px; /* Largura máxima do conteúdo */
    margin: 50px auto; /* Centraliza o container na página e adiciona espaço no topo/fundo */
    padding: 20px;
}

.portaria-ano-titulo {
    text-align: center; /* Centraliza a imagem do título */
    margin-bottom: 40px; /* Espaço abaixo da imagem do título */
}

.portaria-ano-titulo img {
    max-width: 150px; /* Ajuste a largura da imagem do título se necessário */
    height: auto;
}

.lista-de-portarias {
    display: flex;
    flex-direction: column; /* Organiza os links em uma coluna */
    gap: 10px; /* Espaço vertical entre os links */
}

.portaria-link-item {
    display: block; /* Faz o link ocupar toda a largura */
    background-color: #ffffff; /* Fundo branco */
    padding: 16px 20px;
    border: 1px solid #e5e7eb; /* Borda cinza clara */
    border-radius: 6px; /* Bordas levemente arredondadas */
    text-decoration: none; /* Remove o sublinhado do link */
    color: #374151; /* Cor do texto */
    text-align: center;
    font-size: 1rem;
    transition: all 0.2s ease-in-out; /* Efeito suave para o hover */
}

/* Efeito ao passar o mouse por cima, como na imagem */
.portaria-link-item:hover {
    background-color: #e5e7eb; /* Cor de fundo do item selecionado */
    border-color: #d1d5db;
    transform: scale(1.01); /* Leve aumento de tamanho */
}

/*
==============================================
--- ESTILOS DO RODAPÉ (FOOTER) ---
==============================================
*/
.site-footer {
    background-color: #002d56;
    color: #a9d4f5;
    padding-top: 60px;
    font-size: 0.95rem;
    background-image: url(/imagens/rodapeazul.png);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #4db6ac;
}

.footer-logo {
    max-width: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 10px;
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    background-color: #4db6ac;
    transform: translateY(-2px);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a9d4f5;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 8px;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-contact i {
    color: #4db6ac;
    margin-right: 15px;
    margin-top: 5px;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background-color: #001f3d;
    padding: 20px 0;
    border-top: 1px solid #004175;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #8cb6d9;
    font-size: 0.9rem;
}


/*
==============================================
--- ESTILOS RESPONSIVOS ---
==============================================
*/

/* Para tablets e telas menores */
@media (max-width: 992px) {
    .header-top-bar-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-right {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .search-input {
        width: 100%;
    }

    .header-main-nav > .container > ul {
        gap: 20px;
    }

    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}


/* Para celulares */
@media (max-width: 768px) {
    /* --- 1. Cabeçalho Responsivo (Substitua esta parte) --- */
    .header-top-bar-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    /* ESTA É A CORREÇÃO PRINCIPAL */
    .header-left {
        display: flex; /* Garante que é um container flex */
        flex-direction: row; /* Mantém logo e título lado-a-lado */
        align-items: center; /* Alinha verticalmente */
        gap: 10px;
        flex-grow: 1;
    }

    .header-logo {
        height: 50px;
        border: 2px solid #fff;
    }

    .header-title {
        font-size: 0.9rem;
        text-align: left;
        white-space: normal;
    }

    .header-right {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        gap: 20px;
    }
    
    .search-form {
        flex-grow: 1;
        max-width: 300px;
    }
    
    .search-input {
        width: 100%;
    }

    /* --- 2. Menu Hambúrguer (Toggle) --- */
    .mobile-menu-toggle {
        display: block;
        background-color: transparent;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        padding: 5px 10px;
        position: static;
        transform: none;
        z-index: 2200;
        margin-left: auto;
    }
    
    
    .header-main-nav > .container > ul {
        display: none; /* Escondido por padrão */
        flex-direction: column;
        position: static;
        width: 100%;
        background-color: #0f2c5d;
        box-shadow: none;
        padding: 10px 0;
    }
    
    /* --- CORREÇÃO IMPORTANTE: Sincronizando com o JavaScript --- */
    /* Mostra o menu quando a <nav> tem a classe 'nav-active' */
    .header-main-nav.nav-active > .container > ul {
        display: flex;
    }
    
    .header-main-nav > .container > ul > li {
        text-align: center;
    }
    
    .header-main-nav a {
        padding: 12px 20px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: #1e4799;
        display: none;
        padding-left: 20px;
        min-width: unset;
        border-radius: 0;
    }

    .has-dropdown.active > .dropdown-menu {
        display: block;
    }

    /* --- 3. Seção Hero Responsiva --- */
    .hero-section {
        height: 70vh; /* Altura menor para telas pequenas */
    }

    .hero-title {
        font-size: 2.2rem; /* Tamanho de fonte bem menor */
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.1rem; /* Subtítulo menor */
        margin-bottom: 40px;
    }

    .hero-button {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    /* --- 4. Seção de Notícias Responsiva --- */
    .news-section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    /* --- 5. Rodapé Responsivo --- */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
    }
}


/*
==============================================
--- ESTILOS RESPONSIVOS ---
==============================================
*/

/* Para tablets e telas menores */
@media (max-width: 992px) {
    .header-top-bar-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-right {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .search-input {
        width: 100%;
    }

    .header-main-nav > .container > ul {
        gap: 20px;
    }

    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}


/* Para celulares */
@media (max-width: 768px) {
    /* --- 1. Cabeçalho Responsivo (Substitua esta parte) --- */
    .header-top-bar-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    /* ESTA É A CORREÇÃO PRINCIPAL */
    .header-left {
        display: flex; /* Garante que é um container flex */
        flex-direction: row; /* Mantém logo e título lado-a-lado */
        align-items: center; /* Alinha verticalmente */
        gap: 10px;
        flex-grow: 1;
    }

    .header-logo {
        height: 50px;
        border: 2px solid #fff;
    }

    .header-title {
        font-size: 0.9rem;
        text-align: left;
        white-space: normal;
    }

    .header-right {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        gap: 20px;
    }
    
    .search-form {
        flex-grow: 1;
        max-width: 300px;
    }
    
    .search-input {
        width: 100%;
    }

    /* --- 2. Menu Hambúrguer (Toggle) --- */
    .mobile-menu-toggle {
        display: block;
        background-color: transparent;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        padding: 5px 10px;
        position: static;
        transform: none;
        z-index: 2200;
        margin-left: auto;
    }
    
    
    .header-main-nav > .container > ul {
        display: none; /* Escondido por padrão */
        flex-direction: column;
        position: static;
        width: 100%;
        background-color: #0f2c5d;
        box-shadow: none;
        padding: 10px 0;
    }
    
    /* --- CORREÇÃO IMPORTANTE: Sincronizando com o JavaScript --- */
    /* Mostra o menu quando a <nav> tem a classe 'nav-active' */
    .header-main-nav.nav-active > .container > ul {
        display: flex;
    }
    
    .header-main-nav > .container > ul > li {
        text-align: center;
    }
    
    .header-main-nav a {
        padding: 12px 20px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: #1e4799;
        display: none;
        padding-left: 20px;
        min-width: unset;
        border-radius: 0;
    }

    .has-dropdown.active > .dropdown-menu {
        display: block;
    }

    /* --- 3. Seção Hero Responsiva --- */
    .hero-section {
        height: 70vh; /* Altura menor para telas pequenas */
    }

    .hero-title {
        font-size: 2.2rem; /* Tamanho de fonte bem menor */
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.1rem; /* Subtítulo menor */
        margin-bottom: 40px;
    }

    .hero-button {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    /* --- 4. Seção de Notícias Responsiva --- */
    .news-section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    /* --- 5. Rodapé Responsivo --- */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
    }
}
