/* ======================================== */
/* Regra Principal do Header (Correção Z-index) */
/* ======================================== */
header {
    position: relative;
    z-index: 100; /* Garante que todo o cabeçalho fique acima do conteúdo da página */
}

/* ======================================== */
/* Estilo do Cabeçalho Superior (Barra Azul)*/
/* ======================================== */
.header-superior {
    background-color: #003366;
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.85rem;
}
.header-superior a {
    color: #ffffff;
    margin: 0 10px;
    transition: color 0.2s;
}
.header-superior a:hover {
    color: #a9d4ff;
}
.acessibilidade-tools {
    display: flex;
    align-items: center;
}
.acessibilidade-tools button {
    background: none;
    border: 1px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    margin: 0 2px;
    padding: 2px 6px;
    border-radius: 4px;
}
.acessibilidade-tools button:hover {
    background-color: #ffffff;
    color: #003366;
}
#contrast-toggle {
    border: none;
    font-size: 1rem;
}
.btn-atende {
    background-color: #0056b3;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
}
.btn-atende:hover {
    background-color: #004494;
    color: #ffffff;
}

/* ======================================== */
/* Cabeçalho Principal e Seus Componentes   */
/* ======================================== */
.header-principal {
    position: relative;
    padding: 20px 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8); /* Cor de fundo semi-transparente para ver a imagem atrás */
}

/* --- ESTILO RESTAURADO PARA A IMAGEM DE FUNDO DO CABEÇALHO --- */
.header-principal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../imagens/fundo_city.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 1.0;
    z-index: -1; /* Garante que a imagem de fundo fique atrás do conteúdo do cabeçalho */
}
/* --------------------------------------------------------------- */

.header-principal .container {
    justify-content: space-between;
}
.header-left {
    display: flex;
    align-items: center;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-area .logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}
.logo-area img {
    height: 60px;
    width: auto;
}
.logo-area h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a4a4a;
}

/* ======================================== */
/* Menu Sanduíche e Menus de Navegação      */
/* ======================================== */

/* Botão Sanduíche / X */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #003366;
    cursor: pointer;
    margin-right: 20px;
    position: relative;
    width: 30px;
    height: 30px;
    z-index: 2001; /* Fica na frente do menu dropdown */
}
.menu-toggle .icon-close {
    display: none;
    color: red;
}
body.menu-aberto .menu-toggle .icon-menu {
    display: none;
}
body.menu-aberto .menu-toggle .icon-close {
    display: block;
}

/* Menu Principal Horizontal (Direita) */
.menu-principal-horizontal {
    display: flex;
    align-items: center;
}
.menu-principal-horizontal ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}
.menu-principal-horizontal a {
    color: #333;
    font-weight: 600;
    padding: 10px 0;
    text-decoration: none;
}

/* Menu Sanduíche Dropdown (Esquerda, escondido) */
.menu-sanduiche-dropdown {
    display: none;
    position: absolute;
    top: 100%; /* Posiciona exatamente abaixo do cabeçalho */
    left: 0;
    width: 100%;
    background-color: #f4f6f9;
    z-index: 2000; /* Prioridade alta para ficar sobre o conteúdo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-top: 1px solid #ddd;
    padding: 20px 0;
}
.menu-sanduiche-dropdown.ativo {
    display: block;
}
.menu-sanduiche-dropdown ul {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}
.menu-sanduiche-dropdown a {
    color: #333;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid #e0e4e8;
    font-size: 1.1rem;
}
.menu-sanduiche-dropdown a:hover {
    color: #003366;
}
.menu-sanduiche-dropdown li:last-child > a {
    border-bottom: none;
}

/* Submenus do Dropdown */
.menu-sanduiche-dropdown .has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-sanduiche-dropdown .has-submenu > a::after {
    content: '❯';
    font-size: 1rem;
    color: #003366;
    margin-left: 10px;
    background-color: #e0e4e8;
    padding: 8px 12px;
    border-radius: 5px;
}
.menu-sanduiche-dropdown .has-submenu ul {
    display: block;
    padding-left: 25px;
}
.menu-sanduiche-dropdown .has-submenu ul a {
    font-weight: normal;
    font-size: 1rem;
    padding: 12px 0;
    border-bottom: 1px dotted #ccc;
}
.menu-sanduiche-dropdown .has-submenu ul li:last-child a {
    border-bottom: none;
}

/* ======================================== */
/* Regras para Telas Menores (Responsivo)   */
/* ======================================== */
@media (max-width: 992px) {
    .menu-principal-horizontal {
        display: none; /* Esconde o menu horizontal no celular */
    }
    .logo-area h1 {
        font-size: 0.9rem;
    }
}