/* =====================
   VARIÁVEIS DE COR
   ===================== */
:root {
    --verde-escuro: #001178;
    --verde-detalhe: #001178;
    --cinza-fundo: #f3f5f6;
    --texto-links: #0000ff;
    --bs-primary: #007bff;
    --bs-info: #17a2b8;
}

/* =====================
   ESTILOS GERAIS
   ===================== */
body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h2, h3, h5, h6 {
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: opacity 0.3s ease-in-out;
}

a:hover {
    opacity: 0.8;
}
/* =====================
   ACESSIBILIDADE: CONTRASTE
   ===================== */
/* Estilos aplicados quando o modo de alto contraste está ativo */
body.high-contrast {
    background-color: #000 !important; /* Força o fundo a ser preto */
    color: #fff !important; /* Força o texto a ser branco */
}

body.high-contrast a,
body.high-contrast .nav-links a,
body.high-contrast .nav-links label {
    color: #ffd700 !important; /* Links em amarelo para contraste máximo */
}

body.high-contrast .bg-light {
    background-color: #000 !important;
}

body.high-contrast .bg-dark {
    background-color: #333 !important;
}

body.high-contrast .text-dark {
    color: #fff !important;
}

body.high-contrast .shadow,
body.high-contrast .rounded {
    box-shadow: none !important; /* Remove sombras que podem atrapalhar o contraste */
}

/* =====================
   BARRA DE DADOS E ACESSIBILIDADE (GOVBAR)
   ===================== */
.govbar {
    background: var(--verde-escuro);
    color: #fff;
    font-size: 0.95rem;
}

.govbar a {
    color: #fff;
    text-decoration: none;
    opacity: 0.95;
    font-weight: 500;
}

.govbar a:hover {
    opacity: 1;
    text-decoration: underline;
}

.govbar .actions .btn {
    --bs-btn-padding-y: 0.1rem;
    --bs-btn-padding-x: 0.35rem;
    --bs-btn-border-radius: 50rem;
    line-height: 1;
}

/* Estilo dos botões de acessibilidade na barra superior */
.govbar .btn-plain {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5); /* Adiciona uma borda sutil */
    color: #fff;
    padding: 0.1rem 0.35rem; /* Padding menor */
    cursor: pointer;
    line-height: 1; /* Altura da linha para alinhar o texto */
    border-radius: 5px; /* Cantos arredondados */
    min-width: 2rem; /* Define uma largura mínima para botões de uma letra */
}

.govbar .btn-plain:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.govbar .btn-verde-atende {
    background-color: var(--verde-detalhe);
    color: #fff;
    border: none;
    font-weight: bold;
    padding: 0.3rem 0.8rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.govbar .btn-plain:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Fundo sutil no hover */
}

/* =====================
   ESTILOS PARA TABS E LISTAGENS
   ===================== */
/* Altera a aparência do botão de tab quando está ativo */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    border-color: var(--bs-primary) !important;
}

/* Define a cor dos links dentro da tabela para preto e remove o sublinhado */
.tab-content table a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

/* Altera a cor do link para o azul padrão do Bootstrap ao passar o mouse */
.tab-content table a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Força a cor preta em todos os links e textos na listagem para evitar conflitos */
.tab-content table tr td {
    color: #000 !important;
}

/* =====================
   HEADER PRINCIPAL (TOPO HERO)
   ===================== */
.topo-hero {
    background: var(--cinza-fundo);
    color: #000;
    position: relative;
    border-bottom: 3px solid var(--verde-detalhe);
    padding: 1rem;
}

.topo-hero .marca {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topo-hero .brasao {
    width: 200px;
    height: auto;
}

.topo-hero .unicef {
    width: 50px;
    height: auto;
}

.topo-hero .titulos .sub {
    font-size: 1.1rem;
    margin: 0;
}

.topo-hero .titulos .slogan {
    font-size: 0.6rem;
    margin: 0;
}

.topo-hero .titulos .principal {
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 2.1rem;
    margin: -2px 0 0 0;
}

.topo-links a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    margin-left: 18px;
}

.topo-links a:hover {
    color: #222;
    text-decoration: underline;
}

.skyline {
    width: 100%;
    height: 54px;
    background: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="1200" height="54" viewBox="0 0 1200 54"><g fill="none" stroke="%23cfd6d9" stroke-width="1.2" opacity="0.9"><path d="M0 44h30v-8h20v-9h18v17h20v-26h22v15h20v-23h18v34h25v-12h15v-22h14v34h20v-18h22v11h19v-26h18v37h25v-17h22v23h20v-12h18v-19h20v31h22v-25h18v15h20v7h22v-27h18v35h26"/></g></svg>') center bottom/contain repeat-x;
}
/* =====================
   NAVBAR E MENUS (CORREÇÕES DE RESPONSIVIDADE)
   ===================== */

/* Ajusta a largura do wrapper para que o menu ocupe a largura total no mobile */
.megamenu .wrapper {
    max-width: 100%;
    padding: 0 1rem;
}

/* Esconde o botão do menu hamburger no desktop */
.megamenu .menu-btn {
    display: none;
}

/* Esconde o input radio usado para o menu mobile no desktop */
.megamenu input[type="radio"] {
    display: none;
}

/* Esconde o menu mobile no desktop */
.megamenu .nav-links {
    display: flex;
    justify-content: flex-end; /* Alinha o menu à direita no desktop */
}

/* Oculta os itens de menu mobile no desktop */
.megamenu .nav-links .mobile-item {
    display: none;
}

/* Exibe o menu principal e submenus no desktop */
.megamenu .nav-links .desktop-item {
    display: block;
}

/* Media query para telas mobile (menores que 992px) */
@media (max-width: 991px) {
    /* Exibe o botão do menu hamburger no mobile */
    .megamenu .menu-btn {
        display: block;
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        cursor: pointer;
        z-index: 1050;
    }
    
    /* Esconde o menu principal e submenus no mobile por padrão */
    .megamenu .nav-links {
        position: fixed;
        top: 0;
        left: -100%; /* Move o menu para fora da tela */
        width: 100%;
        max-width: 300px; /* Largura máxima para o menu lateral */
        height: 100vh; /* Altura total da tela */
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1rem;
        transition: left 0.3s ease-in-out;
        z-index: 1040;
        list-style: none; /* Remove as bolinhas da lista */
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    }
    
    /* Quando o menu é ativado pelo botão */
    #menu-btn:checked ~ .nav-links {
        left: 0;
    }

    /* Estilos para os links e labels de menu no mobile */
    .megamenu .nav-links li {
        width: 100%;
    }
    .megamenu .nav-links a,
    .megamenu .nav-links label {
        display: block;
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    /* Troca: some desktop, mostra mobile */
    .megamenu .nav-links .desktop-item {
        display: none;
    }
    .megamenu .nav-links .mobile-item {
        display: block;
        cursor: pointer;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
    }
    
    /* Estilos para o mega-menu e dropdown no mobile */
    .megamenu .drop-menu,
    .megamenu .mega-box {
        position: static;
        display: none;
        box-shadow: none;
        padding: 0.5rem 1rem;
        border-radius: 0;
        border: none;
    }
    
    /* Exibe os submenus quando o checkbox é clicado */
    .megamenu input[type="checkbox"]:checked ~ .drop-menu,
    .megamenu input[type="checkbox"]:checked ~ .mega-box {
        display: block;
    }

    /* Corrige o problema dos botões radio visíveis */
    .megamenu input[type="radio"] {
        display: none !important;
    }

    /* Corrige o botão de fechar do menu */
    .megamenu .cancel-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: #333;
    }
}
/* =====================
   NAVBAR E MENUS (CORREÇÕES DE RESPONSIVIDADE)
   ===================== */

/* Ajustes gerais para a navegação */
.megamenu .wrapper {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

/* Oculta o botão de fechar no desktop */
.megamenu .cancel-btn {
    display: none;
}

/* Oculta os botões de rádio e o menu mobile no desktop */
.megamenu input[type="radio"],
.megamenu .nav-links .mobile-item {
    display: none !important;
}

/* Exibe o menu principal no desktop */
.megamenu .nav-links {
    display: flex;
    justify-content: flex-end;
    flex-direction: row; /* Garante que os links fiquem em linha */
}

/* Exibe os itens de menu desktop */
.megamenu .nav-links .desktop-item {
    display: block;
}

/* Media query para telas mobile (menores que 992px) */
@media (max-width: 991px) {
    .megamenu .wrapper {
        justify-content: space-between; /* Alinha os elementos do wrapper */
    }

    /* Exibe o botão do menu hamburger no mobile */
    .megamenu .menu-btn {
        display: block;
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        z-index: 1050; /* Garante que o botão fique na frente */
    }

    /* Oculta o menu principal e submenus no mobile por padrão */
    .megamenu .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1rem;
        transition: left 0.3s ease-in-out;
        z-index: 1040;
        list-style: none;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    }
    
    /* Quando o menu é ativado pelo botão */
    #menu-btn:checked ~ .nav-links {
        left: 0;
    }

    /* Exibe o botão de fechar no mobile */
    .megamenu .cancel-btn {
        display: block;
    }

    /* Estilos para os links de menu no mobile */
    .megamenu .nav-links li {
        width: 100%;
    }
    .megamenu .nav-links a,
    .megamenu .nav-links label {
        display: block;
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    /* Troca: some desktop, mostra mobile */
    .megamenu .nav-links .desktop-item {
        display: none;
    }
    .megamenu .nav-links .mobile-item {
        display: block;
        cursor: pointer;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
    }
    
    /* Exibe os submenus quando o checkbox é clicado */
    .megamenu input[type="checkbox"]:checked ~ .drop-menu,
    .megamenu input[type="checkbox"]:checked ~ .mega-box {
        display: block;
    }

    /* Corrige o botão de fechar do menu */
    .megamenu .cancel-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: #333;
    }
}
/* =====================
   ESTILOS DE GALERIA E PORTFÓLIO
   ===================== */
.portfolio-filter .btn {
    text-transform: uppercase;
    font-weight: bold;
}
.portfolio-filter .btn-outline-primary.active {
    background-color: var(--bs-primary);
    color: #fff;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.galeria-item .galeria-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.galeria-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.galeria-item:hover img {
    transform: scale(1.05);
}

.galeria-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay h3,
.galeria-overlay p {
    margin: 0;
    line-height: 1.2;
}

.galeria-overlay h3 {
    font-size: 1.2rem;
    font-weight: bold;
}
.galeria-overlay p {
    font-size: 0.8rem;
}
/* =====================
   ESTILOS DE GALERIA E PORTFÓLIO
   ===================== */
/* ... (Mantenha as regras anteriores aqui) ... */

/* Estilos para as imagens da galeria de símbolos */
.galeria-item.cat1 img, 
.galeria-item.cat2 img, 
.galeria-item.cat3 img {
    max-height: 200px; /* Define uma altura máxima para as imagens */
    width: auto; /* A largura se ajusta automaticamente para manter a proporção */
    object-fit: contain; /* A imagem é redimensionada para caber no contêiner */
    margin: 0 auto; /* Centraliza a imagem */
}

/* =====================
   ESTILOS GERAIS PARA BREADCRUMB
   ===================== */
.breadcrumb {
    padding: 0 15px; /* Adiciona um padding para a margem lateral */
}

/* Garante que o link da página ativa esteja em negrito */
.breadcrumb .breadcrumb-item.active a {
    font-weight: bold;
    color: #000;
}

.links-navegacao{
    margin-top: -30px;
    font-weight: bold;
    
}

/* =====================
   ESTILOS DE GALERIA DE PREFEITOS
   ===================== */
.img-galeria {
    /* Define um tamanho fixo para as imagens, mantendo a proporção */
    width: 200px;
    height: 200px;
    object-fit: cover; /* Garante que a imagem preencha o espaço sem distorcer */
    border-radius: 50%; /* Faz a imagem ficar redonda */
    border: 3px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* =====================
   NAVBAR E MENUS (MEGAMENU)
   ===================== */
.megamenu {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.megamenu.sticky-top {
    top: 0;
    z-index: 1030;
}

.megamenu .wrapper {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.logo-topo {
    max-height: 55px;
}

.menu-btn {
    display: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
}

#menu-toggle {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none; /* CORREÇÃO: Remove as bolinhas da lista */
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.mobile-item {
    display: none;
}

.nav-links a,
.nav-links label {
    color: #222;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    display: block;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links label:hover {
    background: #f0f4ff;
    color: #005bbf;
}

.drop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 1000;
}

.drop-menu li a {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.mega-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    background: #fff;
    padding: 1rem;
    display: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.mega-box .content {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.mega-box .content .row {
    width: 100%;
}

.mega-box .row header {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #005bbf;
    padding-bottom: 0.3rem;
}

.mega-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-box ul li {
    margin-bottom: 0.4rem;
}

.mega-box ul li a {
    font-size: 0.9rem;
    color: #333;
}

.mega-box ul li a:hover {
    color: #005bbf;
}

.has-drop:hover > .drop-menu {
    display: flex;
}

.has-mega:hover > .mega-box {
    display: flex;
}

.nav-links input[type="checkbox"] {
    display: none !important;
}

@media (min-width: 992px) {
    .nav-links .mobile-item {
        display: none !important;
    }
    .nav-links .desktop-item {
        display: block !important;
    }
    .megamenu .menu-btn {
        display: none;
    }
}

@media (max-width: 991px) {
    .menu-btn {
        display: block;
        color: #333;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    .nav-links .desktop-item {
        display: none !important;
    }
    .nav-links .mobile-item {
        display: block !important;
        width: 100%;
        padding: 0.7rem 1rem;
        cursor: pointer;
    }
    .nav-links .mobile-item:hover {
        background: #f0f4ff;
        color: #005bbf;
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1rem;
        gap: 0.5rem;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 2000;
        list-style: none;
    }
    #menu-toggle:checked ~ .nav-links {
        left: 0;
    }
    .nav-links li {
        width: 100%;
    }
    .drop-menu,
    .mega-box {
        position: static;
        display: none;
        width: 100%;
        background: #f9f9f9;
        box-shadow: none;
        border: none;
        margin-top: 0.5rem;
    }
    .mega-box .content {
        display: block;
    }
    .nav-links input[type="checkbox"]:checked ~ .drop-menu,
    .nav-links input[type="checkbox"]:checked ~ .mega-box {
        display: block;
    }
}

/* =====================
   CARDS
   ===================== */
.card-inicial {
    background-image: linear-gradient(180deg, #f0f0f0 0%, #e4e6e8 100%);
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-inicial:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* =====================
   CARROSSEL
   ===================== */
.carousel-item {
    min-height: 380px;
}

.carousel-caption {
    backdrop-filter: blur(5px);
    border-radius: 12px;
}

.main-carousel .carousel-item {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 45vh;
    min-height: 320px;
    width: 100%;
}

.main-carousel-bg-1 {
    background-image: url('/images/slides/servicos.png');
}

.main-carousel-bg-2 {
    background-image: url('/images/slides/banner_transparencia.png');
}

.main-carousel-bg-3 {
    background-image: url('/images/slides/banner_refis.png');
}

@media (min-width: 992px) {
    .main-carousel .carousel-item {
        padding: 0;
    }
}

#carouselNoticias .carousel-item {
    height: 40vh;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

@media (max-width: 992px) {
    #carouselNoticias .carousel-item {
        height: 35vh;
    }
}

@media (max-width: 576px) {
    #carouselNoticias .carousel-item {
        height: 30vh;
    }
    #carouselNoticias .carousel-caption h5 {
        font-size: 1rem;
    }
    #carouselNoticias .carousel-caption p {
        font-size: 0.8rem;
    }
}

/* =====================
   LISTA DE NOTÍCIAS
   ===================== */
.list-group-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.list-group-item h6 {
    font-size: 0.95rem;
    color: #222;
}

.list-group-item:hover h6 {
    color: #0056b3;
}

/* =====================
   RODAPÉ
   ===================== */
.footer {
    background-image: linear-gradient(to top, #005bbf 0%, #0079ff 100%);
    padding: 3rem 0 2rem;
}

.footer a {
    color: #fff;
}

.footer a:hover {
    text-decoration: underline;
}