/* Topo, menu e rodapé do site público (app/layout/top.php e rodape.php). */

:root {
    --site-verde: #008f72;
    --site-verde-escuro: #0b5e4a;
    --site-verde-mais-escuro: #084536;
    --site-amarelo: #ffa600;
    --site-texto: #1f2937;
    --site-suave: #6b7280;
}

/* ---------- barra de acessibilidade ---------- */
.topo-acessibilidade {
    background: var(--site-verde-escuro);
    font-size: .75rem;
}

.topo-acessibilidade a {
    color: rgba(255, 255, 255, .9) !important;
    text-decoration: none;
}

.topo-acessibilidade a:hover {
    color: #fff !important;
}

.topo-acessibilidade .tecla {
    display: inline-block;
    min-width: 1.2em;
    margin-left: .2rem;
    padding: 0 .25rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, .2);
    text-align: center;
    color: #fff;
}

.topo-acessibilidade ul {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin: 0;
    padding: .35rem 0;
    list-style: none;
}

/* ---------- topo ---------- */
header.topo {
    background: #fff;
    background-image: none;
    border-bottom: 1px solid #eef0f2;
}

.topo-principal {
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.topo-logo img {
    display: block;
    width: 100%;
    max-width: 270px;
    height: auto;
}

.topo-busca {
    position: relative;
}

.topo-busca input {
    width: 100%;
    height: 46px;
    padding: 0 3.25rem 0 1.1rem;
    border: 1px solid #dfe3e8;
    border-radius: 999px;
    background: #f6f8f9;
    font-size: .95rem;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.topo-busca input:focus {
    outline: none;
    border-color: var(--site-verde);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 143, 114, .15);
}

.topo-busca button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--site-verde);
    color: #fff;
}

.topo-busca button:hover {
    background: var(--site-verde-escuro);
}

.topo-redes a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef7f4;
    color: var(--site-verde);
    font-size: 1.15rem;
    transition: background .2s, color .2s;
}

.topo-redes a:hover {
    background: var(--site-verde);
    color: #fff;
}

.topo-selo img {
    width: 64px;
    height: auto;
}

/* ---------- menu ---------- */
.menu-principal {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--site-verde);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.menu-principal .navbar {
    padding: 0;
    background: transparent !important;
}

.menu-principal .navbar-nav .nav-link {
    position: relative;
    padding: .95rem .85rem;
    font-weight: 600;
    font-size: .95rem;
    color: #fff !important;
    white-space: nowrap;
}

.menu-principal .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: .85rem;
    right: .85rem;
    bottom: 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--site-amarelo);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.menu-principal .navbar-nav .nav-link:hover::after,
.menu-principal .navbar-nav .nav-link.ativo::after,
.menu-principal .navbar-nav .show>.nav-link::after {
    transform: scaleX(1);
}

.menu-principal .navbar-nav .nav-link.ativo {
    color: #fff !important;
}

.menu-principal .navbar-nav .nav-link .bi-chevron-down {
    font-size: .7em;
    margin-left: .15rem;
}

.menu-principal .dropdown-menu {
    margin-top: 0;
    padding: .4rem;
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
    max-height: 70vh;
    overflow-y: auto;
}

.menu-principal .dropdown-item {
    border-radius: .5rem;
    padding: .45rem .8rem;
    font-size: .92rem;
}

.menu-principal .dropdown-item:hover,
.menu-principal .dropdown-item:focus {
    background: #eef7f4;
    color: var(--site-verde-escuro);
}

.menu-principal .navbar-toggler {
    border: 0;
    padding: .7rem 0;
    color: #fff;
    font-weight: 700;
    box-shadow: none !important;
}

.menu-principal .navbar-toggler .bi {
    font-size: 1.6rem;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .menu-principal .navbar-collapse {
        padding-bottom: .75rem;
    }

    .menu-principal .navbar-nav .nav-link {
        padding: .65rem .25rem;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .menu-principal .navbar-nav .nav-link::after {
        display: none;
    }

    .menu-principal .navbar-nav .nav-link.ativo {
        color: var(--site-amarelo) !important;
    }

    .menu-principal .dropdown-menu {
        box-shadow: none;
        margin-bottom: .5rem;
    }
}

/* ---------- rodapé ---------- */
.rodape {
    background: var(--site-verde-escuro);
    color: rgba(255, 255, 255, .85);
    font-size: .92rem;
    border-top: 6px solid var(--site-amarelo);
}

.rodape a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.rodape a:hover {
    color: var(--site-amarelo);
}

.rodape-titulo {
    margin-bottom: .9rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--site-amarelo);
}

.rodape-logo {
    width: 100%;
    max-width: 240px;
    height: auto;
    padding: .6rem .8rem;
    border-radius: .75rem;
    background: #fff;
}

.rodape-lista {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rodape-lista li {
    margin-bottom: .45rem;
}

.rodape-lista .bi {
    width: 1.3em;
    color: var(--site-amarelo);
}

.rodape-redes a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: .4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    font-size: 1.15rem;
    color: #fff;
}

.rodape-redes a:hover {
    background: var(--site-amarelo);
    color: var(--site-verde-mais-escuro);
}

.rodape-base {
    background: var(--site-verde-mais-escuro);
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
}

/* alto contraste continua valendo nos blocos novos */
.contrast .topo-busca input,
.contrast .menu-principal,
.contrast .rodape,
.contrast .rodape-base {
    background: #000 !important;
    color: #fff !important;
}
