/* =========================================
   Navegação (Header Injetado)
   ========================================= */

#header-container {
    width: 100%;
    position: fixed; /* Usamos absolute ou fixed dependendo da preferencia, vou deixar fixed para o scroll acompanhar se for esse o objetivo, mas a tag hero tem padding */
    top: 32px;
    left: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    transition: top 0.3s ease;
}

.cabecalho {
    width: 90%;
    max-width: 1720px;
    background-color: #ffffff;
    border: none;
    border-radius: 60px;
    box-shadow: 0 276px 110px 0 rgba(0, 0, 0, 0.02),
                0 155px 93px 0 rgba(0, 0, 0, 0.07),
                0 69px 69px 0 rgba(0, 0, 0, 0.12),
                0 17px 38px 0 rgba(0, 0, 0, 0.14);

    transition: all 0.3s ease;
}

/* Reset de espaçamento do .container global que pode ter sido herdado do style.css */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem !important;
    width: 100%;
    margin: 0 auto;

    a.logo-link {
        padding: 0 !important;
        margin: 0 !important;
        height: 50px;
    }

    .logo-link:hover {
        opacity: .8;
        transition: all .3s ease-in-out;
    }
}

/* Logo */
.cabecalho img {
    height: 50px;
    width: 200px;
    padding: 0 !important;
    margin: 0 !important;
}

/* Links do menu */
.nav-menu {
    display: flex;
    align-items: center;
    flex: 1; /* Permite que o menu ocupe o restante do espaço apos a logo */
    justify-content: flex-end; /* CTA na direita (se margens permitirem) */

    img {
        width: 10px;
        height: 10px;
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0 auto; /* Centraliza entre a extrema direita e a logo */
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: var(--cor-texto);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--cor-primaria);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--cor-secundaria);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.ativo::after {
    width: 100%;
}

/* Dropdown Soluções */
.dropdown-container {
    position: relative;
    display: flex;
    align-items: center;

    .dropdown-toggle {
        padding: 0;
    }
    
    .dropdown-toggle img {
        transition: transform 0.3s ease;
    }

    .dropdown-toggle.ativo img {
        transform: rotate(180deg);
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    list-style: none;
    min-width: 400px;
    z-index: 1002;
    margin-top: 10px;
    text-align: center;
    flex-direction: column;
    gap: 0;
}

.dropdown-menu.ativo {
    display: flex;
}

.dropdown-menu li {
    width: 100%;

    span {
        width: 100%;
        height: .03rem;
        display: block;
        background-color: var(--cor-primaria);
        opacity: .2;
    }
}

.nav-links .dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--cor-texto) !important;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links .dropdown-menu li a::after {
    display: none;
}

.nav-links .dropdown-menu li a:hover {
    background-color: rgba(1, 6, 71, 0.05);
    color: var(--cor-primaria) !important;
}

/* Call to action (Área do Cliente) */
.nav-cta {
    display: flex;
    align-items: center;
}

.btn-cta {
    color: var(--cor-primaria);
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--cor-primaria);
}

.btn-cta:hover {
    background-color: rgba(1, 6, 71, 0.1);
    transform: translateY(-2px);
}

/* Botão Mobile */
.btn-mobile {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburguer {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--cor-primaria);
    position: relative;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburguer::before,
.hamburguer::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--cor-primaria);
    border-radius: 2px;
    left: 0;
    transition: all 0.3s;
}

.hamburguer::before {
    top: -8px;
}

.hamburguer::after {
    top: 8px;
}

/* Estilos de mobile ativo para o Hamburguer */
.btn-mobile.ativo .hamburguer {
    background-color: transparent;
}
.btn-mobile.ativo .hamburguer::before {
    top: 0;
    transform: rotate(45deg);
}
.btn-mobile.ativo .hamburguer::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Efeito Scroll no Header (Desktop) */
@media (min-width: 1025px) {
    #header-container.scrolled {
        top: 0;
    }

    #header-container.scrolled .cabecalho {
        width: 100%;
        max-width: 100%;
        padding: .3rem 5rem;
        border-radius: 0;
    }
}

/* Responsividade Menu Mobile */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 1.5rem !important;
    }

    /* Reduzindo tamanho da logo do mobile */

    a.logo-link {
        height: 35px !important;
    }
    
    .cabecalho img {
        height: 35px;
        width: auto;
    }

    .btn-mobile {
        display: block;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        z-index: 1000;
        transition: right 0.4s ease;
        gap: 2.5rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    }

    .nav-menu.ativo {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    /* Ajuste Dropdown Mobile */
    .dropdown-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background-color: #eaeaea45;
        padding: 0.5rem 0 0 0;
        margin-top: 5px;
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
        gap: .5rem;
        
        img {
            width: 1rem;
        }
    }

    .nav-links .dropdown-menu li a {
        font-size: 1.2rem;
    }

    .nav-cta {
        display: flex; /* O CTA aparece agora dento do menu */
    }
}
