/* ========== 119dpi =  100% ========== */
/* ========== 120dpi =  125% ========== */
/* ========== 144dpi =  150% ========== */
@media (max-width: 1400px) and (max-resolution: 119dpi) {
    header {
        background-size: 50vw auto; 
    }
}

@media (max-width: 1900px) and (max-resolution: 120dpi) {
    header {
        background-size: 72vw auto; 
    }

    .logo img {
        transform: translateX(-70px);
    }
}

@media (max-width: 1200px) and (min-resolution: 120dpi) and (max-resolution: 143dpi) {
    header {
        background-size: 50vw auto; 
    }
}

@media (max-width: 1366px) and (min-resolution: 120dpi) and (max-resolution: 143dpi) {
    header {
        background-size: 76vw auto;  
        padding: 5px 0;
    }

    .nav-menu li {
        padding: 0 10px;
        left: 20px;
    }

    .nav-link {
        font-size: 15px;
    }
    .logo img {
        height: 40px;
        transform:  translateX(10px);
    }
}

@media (max-width: 1366px) and (max-resolution: 119dpi) {
    header {
        background-size: 70vw auto;  
    }

    .nav-menu li {
        padding: 0 10px;
    }
    .nav-link {
        font-size: 15px;
    }
    .logo img {
        height: 40px;
    }
}

/* === (TABLET E CELULAR) < 992px === */
@media (max-width: 992px) {
    header {
        background-image: none !important; 
        background-color: #ffffff;
        height: 70px; 
        padding: 0;
        display: flex;
        align-items: center;
        
    }

    .mobile-menu-icon {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 70px; 
        right: -100%; 
        width: 100%;
        height: calc(100vh - 70px); 
        background-color: var(--cor-secundaria); 
        
        flex-direction: column; 
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 30px;
        
      
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        right: 0; 
        transform: none !important;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0;
        left: 0 !important; 
    }
 
    .nav-menu li::after {
        display: none;
    }

    .nav-link {
        font-size: 22px; 
        display: block;
        padding: 15px;
    }
 
    .btn-destaque {
        background-color: #ffffff;
        color: var(--cor-secundaria) !important;
        width: 80%;
        margin: 0 auto;
        display: inline-block;
    }

    .whatsapp-btn {
        transition: transform 0.3s ease, background-color 0.3s ease;
        animation: none;
        will-change: transform;
    }

    .progress-wrap-container {
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px) translateZ(0);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    .progress-wrap-container.active-progress {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) translateZ(0);
    }

    .whatsapp-container, .whatsapp-btn {
        transition: transform 0.2s ease, opacity 0.3s !important;
        animation: none !important;
        transform: translateZ(0); 
        -webkit-transform: translateZ(0);
        bottom: 20px !important; 
    }

    .progress-wrap-container {
        transition: opacity 0.3s, visibility 0.3s !important; 
        transform: translateZ(0);
        bottom: 20px !important;
    }
    
    .progress-wrap-container.active-progress {
        transform: translateZ(0) translateY(0) !important;
    }

    .dropdown-item {
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    .dropdown-menu {
        position: static;  
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border-top: none;
        background-color: rgba(255, 255, 255, 0.05); 
        min-width: 90%;
        margin-top: 10px;
        padding: 0;
    }

    .dropdown-menu::before { display: none; }

    .dropdown-menu a {
        padding: 15px;
    }

    .menu-text span { color: white; } 
    .menu-text small { color: rgba(255,255,255,0.6); }
    .menu-icon-box {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }
    
}

@media (max-width: 900px) {
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    .dashboard-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding-bottom: 20px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-spacer { display: none; }
    
    .main-content {
        overflow: visible;
    }
    
    .top-bar {
        padding: 0 20px;
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 10px;
        text-align: center;
    }
    
    .content-scroll {
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;  
    }

    .nav-menu li {
        left: auto !important; 
        transform: none !important;
        transition: none !important;
    }

    /* 2. Forçamos o texto da engrenagem a ficar SEMPRE visível e parado */
    .texto-expandivel, 
    .seta-expandivel {
        max-width: none !important; /* Remove o limite de tamanho */
        opacity: 1 !important;      /* Sempre visível */
        width: auto !important;
        overflow: visible !important;
        margin-left: 10px !important;
        transition: none !important; /* MATA A ANIMAÇÃO DE LOOP */
    }

    /* 3. Estiliza o botão para ficar fixo e bonito no celular */
    .btn-engrenagem {
        width: 100%;
        justify-content: center;
        background-color: rgba(255,255,255,0.1) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
        padding: 12px !important;
        color: white !important;
    }

    /* 4. Impede que o 'hover' (toque) tente expandir o botão novamente */
    .dropdown-item:hover .texto-expandivel {
        max-width: none !important;
        margin-left: 10px !important;
    }

    .dropdown-item:hover .btn-engrenagem {
        padding-right: 12px !important; /* Mantém o padding original */
    }

    .nav-menu li {
        /* O segredo: 'static' desativa o 'left' e 'relative' do desktop */
        position: static !important; 
        left: auto !important;
        margin: 0 !important;
        
        /* Garante largura total e centralização */
        width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        
        /* Mata qualquer animação residual */
        transform: none !important; 
        transition: none !important;
    }

    .nav-menu {
        /* Removemos gaps estranhos */
        transform: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        align-items: center !important;
        overflow-x: hidden !important; /* Impede a barra de rolagem horizontal */
    }

    /* Ajuste para o botão verde não vazar */
    .btn-destaque {
        width: 80% !important;
        max-width: 300px !important; /* Trava um tamanho máximo */
        margin: 0 auto !important;
        display: block !important;
        transform: none !important; /* Sem animação de pulo no mobile */
    }
    
    /* Impede o botão de pular ao ser tocado */
    .btn-destaque:hover, .btn-destaque:active {
        transform: none !important;
    }
}

/* === (TABLET E CELULAR) < 992px === */
@media (max-width: 900px) {
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    header {
        background-image: none !important; 
        background-color: #ffffff;
        height: 70px; 
        padding: 0;
        display: flex;
        align-items: center;
    }

    .mobile-menu-icon {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 70px; 
        right: -100%; 
        width: 100%;
        height: calc(100vh - 70px); 
        background-color: var(--cor-secundaria); 
        
        flex-direction: column; 
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 30px;
        
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        transition: right 0.4s ease; /* Animação suave só para entrar */
        overflow-y: auto; /* Permite rolar se o menu for muito alto */
        overflow-x: hidden; /* Evita rolagem lateral */
         transition: none !important; 
    }

    .nav-menu.active {
        right: 0; 
    }

    /* --- CORREÇÃO DOS BOTÕES NO MOBILE (AQUI ESTÁ A MÁGICA) --- */
    .nav-menu li {
        position: static !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    /* TRAVAR O BOTÃO DE FERRAMENTAS ABERTO */
    .btn-engrenagem {
        width: 80%; /* Largura fixa bonita */
        margin: 0 auto;
        justify-content: center;
        background-color: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        padding: 12px;
        color: white;
    }

    /* Força o texto a aparecer sempre */
    .texto-expandivel, 
    .seta-expandivel {
        max-width: none !important; 
        opacity: 1 !important;     
        width: auto !important;
        overflow: visible !important;
        margin-left: 10px !important;
        transition: none !important; /* Desliga a animação */
    }

    /* --- FIM DA CORREÇÃO --- */

    .nav-menu li::after { display: none; }

    .nav-link {
        font-size: 20px; 
        display: block;
        padding: 10px;
        color: white;
    }
 
    .btn-destaque {
        background-color: #ffffff;
        color: var(--cor-secundaria) !important;
        width: 80%;
        margin: 0 auto;
        display: inline-block;
    }

    /* Ajustes do Dropdown para Mobile */
    .dropdown-menu {
        position: static;  
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border-top: none;
        background-color: rgba(255, 255, 255, 0.05); 
        min-width: 90%;
        margin: 10px auto 0; /* Centraliza */
        padding: 0;
    }

    .dropdown-menu::before { display: none; }

    .dropdown-menu a {
        padding: 15px;
        justify-content: flex-start; /* Alinha ícone e texto */
        padding-left: 30px;
    }

    .menu-text span { color: white; text-align: left; } 
    .menu-text small { color: rgba(255,255,255,0.6); text-align: left; }
    .menu-icon-box {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }
}