/* ========================================
   CORREÇÕES PARA MENU MOBILE - MIDGARD LEGACY
   ======================================== */

/* Menu Mobile Wrapper */
.vs-menu-wrapper {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: #FFFFFF !important;
    z-index: 9999;
    transition: all 0.4s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.vs-menu-wrapper.vs-body-visible {
    left: 0;
}

/* Overlay quando menu está aberto */
.vs-menu-wrapper.vs-body-visible::before {
    content: '';
    position: fixed;
    top: 0;
    left: 300px;
    width: calc(100vw - 300px);
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

/* Área do menu */
.vs-menu-area {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
	background: #FFFFFF !important;
}

/* Botão de fechar */
.vs-menu-area .vs-menu-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.vs-menu-area .vs-menu-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Logo mobile */
.vs-menu-area .mobile-logo,
.mobile-logo,
.vs-menu-wrapper .mobile-logo {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

.mobile-logo img {
    max-width: 150px;
    height: auto;
}

/* Menu mobile */
.vs-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vs-mobile-menu > ul > li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.vs-mobile-menu a {
    display: block;
    padding: 12px 0;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.vs-mobile-menu a:hover {
    color: #fec624;
    padding-left: 10px;
}

/* Submenu */
.vs-mobile-menu .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0,0,0,0.2);
    margin: 0;
    border-radius: 5px;
}

.vs-mobile-menu .sub-menu.vs-open {
    max-height: 500px;
    padding: 10px 0;
}

.vs-mobile-menu .sub-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vs-mobile-menu .sub-menu a {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 400;
}

/* Indicador de submenu */
.vs-mobile-menu .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.vs-mobile-menu .vs-active > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Painel de controle mobile */
.mobile-control-panel {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.mobile-control-panel h6 {
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
}

.mobile-control-panel .btn {
    margin-bottom: 8px;
    border-radius: 20px;
    font-size: 14px;
}

/* Links sociais mobile */
.mobile-social-links {
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-social-links .btn {
    border-radius: 20px;
    font-size: 12px;
}

/* Correções para header top no mobile */
@media (max-width: 991px) {
    .header-top {
        display: block !important;
        padding: 10px 0;
    }
    
    .header-top .col {
        display: block !important;
    }
    
    .header-top .header-links ul li a {
        font-size: 12px;
        text-align: center;
        display: block;
        padding: 5px;
    }
    
    .header-top .dropdown {
        margin: 10px 0;
    }
}

/* Melhorias para o botão do menu mobile */
.vs-menu-toggle {
    background: transparent;
    border: 2px solid #0F6BAC;
    color: #0F6BAC;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.vs-menu-toggle:hover {
    background: #0F6BAC;
    color: white;
}

/* Correções para telas muito pequenas */
@media (max-width: 575px) {
    .vs-menu-wrapper {
        width: 280px;
    }
    
    .mobile-logo img {
        max-width: 120px;
    }
    
    .vs-mobile-menu a {
        font-size: 14px;
    }
}

/* Animação suave para o menu */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.vs-menu-wrapper.vs-body-visible {
    animation: slideInLeft 0.4s ease-out;
}

/* Correção para evitar scroll horizontal */
body.vs-body-visible {
    overflow-x: hidden;
}

/* Estilo para o expand button dos submenus */
.vs-mean-expand {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vs-mean-expand:hover {
    background: rgba(255,255,255,0.2);
}

.vs-mean-expand::before {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.vs-active .vs-mean-expand::before {
    transform: rotate(180deg);
}

