/* Menu Fix - Estilos essenciais para o funcionamento do menu */

/* Smooth Scrolling - CSS nativo (com polyfill via JS para navegadores antigos) */
html {
    scroll-behavior: smooth;
}

/* Garantir que o menu esteja oculto por padrão */
#menu {
    transform: translateX(-100%);
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Quando o menu está visível */
body.is-menu-visible #menu {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Garantir que o botão do menu seja clicável */
#header nav a[href="#menu"] {
    cursor: pointer;
    z-index: 10001;
}

/* Garantir que o botão de fechar funcione */
#menu .close {
    cursor: pointer;
    z-index: 10003;
    position: absolute;
    top: 1em;
    right: 1em;
    width: 3em;
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #0096fa;
    font-size: 1.2em;
    transition: color 0.2s ease;
}

#menu .close:hover {
    color: #b143ed;
}

#menu .close span {
    pointer-events: none;
}

/* Garantir que o menu tenha o z-index correto */
#menu {
    z-index: 10002;
}

/* Blur no wrapper quando menu está aberto */
body.is-menu-visible #wrapper {
    filter: blur(0.5em);
    -webkit-filter: blur(0.5em);
}