/* ==========================================================================
   --- SUPORTE TOTAL A SMARTPHONES E TABLETS (MEDIA QUERIES CRISPAS) ---
   ========================================================================== */
@media (max-width: 1024px) {
    .menu-toggle { display: block; order: 2; }
    .right-actions { gap: 10px; }

    /* Transformação da Barra de Navegação num Painel Deslizante Lateral */
    .nav-container {
        position: fixed; top: 75px; left: -100%; width: 280px; height: calc(100vh - 75px);
        background-color: var(--white); box-shadow: 4px 0 15px rgba(0,0,0,0.1);
        transition: left 0.4s cubic-bezier(0.05, 0.74, 0.2, 1);
        overflow-y: auto; display: block; padding: 20px 10px;
    }
    
    /* Quando o menu mobile estiver ativo através do JS */
    .nav-container.open { left: 0; }

    .nav-menu { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
    .nav-menu li { width: 100%; }
    .nav-menu a {
        padding: 12px 15px; border-bottom: 1px solid #f0f0f0; width: 100%;
        display: flex; justify-content: space-between; align-items: center;
    }

    /* Permitir que as setas capturem cliques no mobile */
    .toggle-submenu {
        pointer-events: auto; background: #f0f0f0; width: 35px; height: 35px;
        display: flex; align-items: center; justify-content: center; border-radius: 4px;
    }

    /* Reset de posicionamento absoluto para comportamento Accordion */
    .dropdown-menu, .dropdown-submenu .submenu, .dropdown-nested-submenu .nested-submenu {
        position: relative; top: 0; left: 0; width: 100%; min-width: 100%;
        box-shadow: none; border-top: none; background-color: #f9f9f9;
        display: none; /* Controlado via JavaScript */
        opacity: 1; visibility: visible; transform: none; padding-left: 15px;
    }
    
    /* Remove os hovers em mobile para evitar bugs visuais estáticos */
    .dropdown:hover > .dropdown-menu,
    .dropdown-submenu:hover .submenu,
    .dropdown-nested-submenu:hover .nested-submenu {
        display: none;
    }
    
    /* Força exibição quando a classe utilitária do JS for inserida */
    .nav-menu li.show-children > .dropdown-menu,
    .nav-menu li.show-children > .submenu,
    .nav-menu li.show-children > .nested-submenu {
        display: block;
    }
    
    .nav-menu li.show-children > a .toggle-submenu i {
        transform: rotate(90deg);
        color: var(--accent-red);
    }

    .hero-content h1 { font-size: 1.8rem; }
    .hero-content p { font-size: 0.95rem; }
    .section-header h2 { font-size: 1.8rem; }
}