﻿/* ============================================================
   TOP-INFO (barra superior fixa)
============================================================ */
#top-info {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffd60a;
    color: #161078;
    padding: 8px 0;
    z-index: 1050;
    transition: transform 0.3s ease;
}

#top-info.hidden {
    transform: translateY(-100%);
}

#top-info a {
    color: #1e3a8a;
    text-decoration: none;
    transition: color 0.3s;
}

#top-info a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.top-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-info-left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.top-info-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

/* Redes sociais */
.social-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* ============================================================
   NAVBAR (logo abaixo do top-info)
============================================================ 
#main-navbar {
    background-color: #f5f5f5 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: top 0.3s ease;
    position: sticky;
    top: 48px; /* altura do top-info 
    z-index: 1040;
    width: 100%;
}*/


#main-navbar {
    position: sticky;
    top: 48px;
    transition: top 0.3s ease;
    z-index: 1040;
}


/* Branding */
#main-navbar .navbar-brand {
    color: #1e3a8a !important;
    font-weight: 600;
    font-size: 1.2rem;
}

#main-navbar .navbar-brand:hover {
    color: #3b82f6 !important;
}

/* Links */
#main-navbar .nav-link {
    color: #000 !important;
    font-size: .95rem !important;
    font-weight: 500 !important;
}

#main-navbar .nav-link:hover,
#main-navbar .nav-link:focus {
    color: #0066cc !important;
}

#main-navbar .nav-link.active {
    color: #0066cc !important;
    border-bottom: 2px solid #0066cc !important;
    display: inline-block;
}


/* Dropdown */
#main-navbar .dropdown-menu {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

#main-navbar .dropdown-item {
    color: #1e3a8a;
    font-weight: 500;
    font-size: 1.05rem;
}

#main-navbar .dropdown-item:hover {
    color: #3b82f6;
    background-color: #e0f2fe;
}

/* Botão mobile */
#main-navbar .navbar-toggler {
    border-color: #3b82f6;
}

#main-navbar .navbar-toggler-icon {
    filter: invert(22%) sepia(94%) saturate(1922%) hue-rotate(208deg) brightness(95%) contrast(96%);
}


/* Forçar a mesma cor em desktop e mobile */
#main-navbar {
    background-color: #ebf2f2 !important;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Forçar a cor do botão mobile */
#main-navbar .navbar-toggler {
    background-color: #ebf2f2 !important;
    border-color:#ebf2f2 !important;
}

/* Tornar o ícone visível (preto) */
#main-navbar .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg) !important;
    filter: invert(0);
}


/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 991.98px) {

    /* Top-info reorganiza */
    .top-info-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-info-left {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Esconde redes sociais no mobile */
    .top-info-right {
        display: none;
    }

    /* Navbar colada ao top-info */
    #main-navbar {
        top: 48px;
    }

    /* Menu colapsado com scroll */
    #navbarNav {
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }
}

/* ============================================================
   MULTI-LEVEL DROPDOWN
============================================================ */
.dropdown-submenu {
    position: relative;
	//border: 1px solid #bcd4ff;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: auto;
    right: 100%;
    margin-top: -1px;
}

.dropdown-menu .dropdown-menu .dropdown-submenu > .dropdown-menu {
    left: auto;
    right: 100%;
}

.dropdown-submenu > a {
    position: relative;
    padding-right: 2rem;
}

.dropdown-submenu > a::after {
    content: "›";
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

.dropdown-toggle::after {
    display: none !important;
}


.dropdown-submenu .dropdown-menu {
    margin-left: 0.7rem;
    margin-right: 0.7rem;
}


/* ============================================================
   MULTI-LEVEL DROPDOWN — CORES POR NÍVEL
============================================================ */
/* ============================================================
   MULTI-LEVEL DROPDOWN
============================================================ */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: auto;
    right: 100%;
    margin-top: -1px;
}

.dropdown-menu .dropdown-menu .dropdown-submenu > .dropdown-menu {
    left: auto;
    right: 100%;
}

.dropdown-submenu > a {
    position: relative;
    padding-right: 2rem;
}

.dropdown-submenu > a::after {
    content: "›";
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

.dropdown-toggle::after {
    display: none !important;
}


/* ============================================================
   MULTI-LEVEL DROPDOWN — CORES POR NÍVEL
============================================================ */

/* NÍVEL 1 — dropdown principal */
.dropdown-menu {
    background-color: #3123fa;
    /*border: 1px solid #bcd4ff#3123fa;*/
}

/* NÍVEL 2 — submenu */
.dropdown-submenu > .dropdown-menu {
    background-color: #3123fa;
    /*border: 1px solid #bcd4ff;*/
}

/* NÍVEL 3 — sub-submenu */
.dropdown-submenu .dropdown-submenu > .dropdown-menu {
    background-color: #3123fa;
    /*border: 1px solid #5fa0ff;*/
}

/* Hover consistente */
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.08);
}


/* Fontes por nível */
/* Nível 1 */
.dropdown-menu > .dropdown-item,
.dropdown-menu .dropdown-item {
    font-size: 0.85rem !important;
}

/* Nível 2 */
.dropdown-submenu > .dropdown-menu .dropdown-item {
    font-size: 0.85rem !important;
}

/* Nível 3 */
.dropdown-submenu .dropdown-submenu > .dropdown-menu .dropdown-item {
    font-size: 0.85rem !important;
}


/* Encostar subníveis ao item pai */
.dropdown-menu .dropdown-menu {
    margin-left: -1px; /* encosta lateralmente */
    margin-top: -1px;  /* encosta verticalmente */
}

/* Garantir que o submenu abre exatamente ao lado */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%; /* abre colado ao lado direito */
}


/* Permite posicionamento relativo do submenu */
.dropdown-submenu {
    position: relative;
}

/* Submenu abre para a esquerda */
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: auto;
    right: 100%; /* abre colado à esquerda */
    margin-top: -1px;
    margin-right: -1px; /* encosta sem gap */
}

/* Remove o espaço entre níveis */
.dropdown-menu .dropdown-menu {
    margin: 0;
}


/* ============================================================
   DESKTOP — ABRIR AO HOVER
============================================================ */
@media (min-width: 992px) {

    /* NÍVEL 1 */
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
    }

    /* NÍVEL 2 */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
       /* border-left: 4px solid #8bb8ff;*/
    }

    /* NÍVEL 3 */
    .dropdown-submenu .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        /*border-left: 4px solid #5fa0ff;*/
    }


    .navbar .has-submenu > a::after {
        content: "▾"; /* seta para baixo */
        font-size: 0.8rem;
        margin-left: 6px;
        display: inline-block;
        transition: transform 0.2s ease;
    }

    /* Quando o submenu está aberto, roda a seta */
    .navbar .has-submenu.show > a::after {
        transform: rotate(180deg);
    }

    .dropdown-submenu .dropdown-menu {
        display: none;
        margin-left: 1rem;
    }

    .dropdown-submenu .dropdown-menu.show {
        display: block;
    }

    .dropdown-submenu > a::after {
        content: "▾";
        float: right;
        margin-left: 6px;
        transition: transform .2s ease;
    }

    .dropdown-submenu .dropdown-menu.show ~ a::after,
    .dropdown-submenu.show > a::after {
        transform: rotate(180deg);
    }
}


