/* Estilos específicos para o menu responsivo */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: #0C4DA1; 
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 25px;
    z-index: 1500;
    background-color: #ffffff; 
    border: 1px solid #0C4DA1; 
    padding: 8px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-toggle i {
    color: #0C4DA1; 
}

/* Estilos para o menu com lista */
.menu {
    display: flex;
    flex-direction: row; /* Horizontal por padrão */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.menu a {
   margin: 0 !important; /* Evita empurrar os links para dentro e causar quebra */
   padding: 10px 12px;
    text-decoration: none;
    color: #333;
    display: block;
    transition: all 0.3s ease;
    white-space: nowrap;
}



@media (max-width: 768px) {
    .container {
        position: relative; /* Garante que o posicionamento absoluto funcione corretamente */
    }

    header nav.topo .container {
        justify-content: space-between;
        gap: 14px;
        align-items: center;
    }

    header .logo {
        order: 2;
        margin-left: auto;
    }

    header .logo a {
        display: flex;
        align-items: center;
    }

    .menu a.nav-cta {
        display: none !important;
    }
    
    .menu {
        display: none !important;
    }
    
    .menu-toggle {
        display: block !important;
        position: static;
        order: 1;
        margin-left: 280px !important;
        right: auto;
        top: auto;
        transform: none;
        background-color: transparent;
        border: 0;
        padding: 8px 0;
        border-radius: 0;
        box-shadow: none;
        z-index: 2001;
    }

    .menu-toggle i {
        font-size: 28px;
    }
    
    .menu.active {
        display: flex !important;
        flex-direction: column; /* Vertical em telas pequenas */
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #0C4DA1;
        z-index: 2000;
        padding: 20px;
        width: 100%;
        height: auto !important;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        border-top: 2px solid #0C4DA1;
    }
    
    .menu.active a {
        margin: 10px 0; /* Espaçamento vertical em telas pequenas */
        text-align: center;
        padding: 10px;
        border-bottom: 1px solid #eee;
        color: #ffffff;
    }

    .menu.active a.nav-cta {
        display: block !important;
    }
}

/* Ajuste adicional para telas muito pequenas */
@media (max-width: 480px) {
    .menu-toggle {
        top: 15px;
        right: 10px;
        padding: 8px 10px;
    }
}
