@font-face {
    font-family: 'Minecraft';
    src: url('fonts/MinecraftRegular.woff2') format('woff2'),
         url('fonts/MinecraftRegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 2rem;
    position: relative; /* Asegurar que el encabezado sea relativo */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Minecraft', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.logo:hover,
.logo:focus,
.logo:active {
    color: #fff;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 2rem;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #ff6347;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10; /* Ensure toggle button is above the menu */
}

.menu-toggle.active {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: #444;
        position: absolute;
        top: calc(100% + 10px); /* Position menu just below the nav */
        left: 0;
        z-index: 9999; /* Ensure menu is above other content */
    }

    .menu li {
        margin: 1rem 0;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 10; /* Ensure toggle button is above other content */
    }

    .menu.active {
        display: flex;
        animation: fadeIn 0.5s ease;
    }

    main {
        transition: margin-top 0.5s ease;
    }

    main.menu-active {
        margin-top: calc(100% + 60px); /* Adjust based on menu height */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
