/*
 * Menu das paginas publicas (29/10/2026): a barra do topo do login, do "O que fazemos"
 * e do "Quem somos" (public/auxiliar/menu_publico.php). As cores sao as do logo, as
 * mesmas variaveis das paginas publicas; a fonte e a Lato, que cada pagina carrega.
 */
:root {
    --pub-topo-altura: 68px;
}

.pub-topo {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid #E3E8ED;
    font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* O style.css do login poe margem zero e a fonte Abel em todo elemento: aqui vale a da barra. */
.pub-topo * {
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
}

.pub-topo svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pub-topo__largura {
    max-width: 1120px;
    /* A borda de baixo entra na altura: a barra inteira mede --pub-topo-altura, que o login desconta. */
    height: calc(var(--pub-topo-altura) - 1px);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-topo__logo {
    display: block;
    flex-shrink: 0;
    margin-right: auto;
    border-radius: 4px;
}

.pub-topo__logo img {
    display: block;
    height: 36px;
    width: auto;
}

.pub-topo__menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* No login a barra so tem os links (o logo ja esta grande na coluna dele). */
.pub-topo--simples .pub-topo__menu {
    margin-left: auto;
}

.pub-topo__menu a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #021526;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.pub-topo__menu a svg {
    color: #0F97A5;
}

.pub-topo__menu a:hover {
    background: #F3F7F8;
    color: #0A7F8B;
}

.pub-topo__menu a[aria-current="page"] {
    background: rgba(15, 151, 165, .1);
    color: #0A7F8B;
}

.pub-topo__botao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding: 8px 18px 8px 14px;
    border: 1px solid #0F97A5;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

.pub-topo__botao--contorno {
    color: #0A7F8B;
}

.pub-topo__botao--contorno:hover {
    background: #0F97A5;
    color: #fff;
}

.pub-topo__botao--cheio {
    background: #0A7F8B;
    border-color: #0A7F8B;
    color: #fff;
}

.pub-topo__botao--cheio:hover {
    background: #086A74;
    border-color: #086A74;
}

/* O botao de tres tracos so existe no celular (e so com o JS da barra rodando). */
.pub-topo__abrir {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #021526;
    cursor: pointer;
}

.pub-topo__abrir svg {
    width: 24px;
    height: 24px;
}

.pub-topo__abrir:hover {
    background: #F3F7F8;
}

.pub-topo__x,
.pub-topo--aberto .pub-topo__tracos {
    display: none;
}

.pub-topo--aberto .pub-topo__x {
    display: block;
}

.pub-topo a:focus-visible,
.pub-topo button:focus-visible {
    outline: 3px solid #0F97A5;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    :root {
        --pub-topo-altura: 60px;
    }

    .pub-topo__largura {
        padding: 0 16px;
    }

    .pub-topo__logo img {
        height: 30px;
    }

    .pub-topo__botao {
        margin-left: 0;
        padding: 7px 14px 7px 11px;
        font-size: 14px;
    }

    /* Login: os dois links no meio da barra. */
    .pub-topo--simples .pub-topo__menu {
        margin: 0 auto;
    }

    .pub-topo--js .pub-topo__abrir {
        display: inline-flex;
        margin-right: -6px;
    }

    /* Os links descem para um painel embaixo da barra, aberto pelo botao. */
    .pub-topo--js .pub-topo__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px 16px 16px;
        background: #fff;
        border-bottom: 1px solid #E3E8ED;
        box-shadow: 0 16px 24px rgba(2, 21, 38, .08);
    }

    .pub-topo--js.pub-topo--aberto .pub-topo__menu {
        display: flex;
    }

    .pub-topo--js .pub-topo__menu a {
        padding: 12px;
        border-radius: 10px;
        font-size: 16px;
    }

    /* Sem o JS (raro), os links quebram para uma segunda linha em vez de vazar a tela. */
    .pub-topo:not(.pub-topo--js):not(.pub-topo--simples) .pub-topo__largura {
        flex-wrap: wrap;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}
