.boton-menu {
    display: none;
}

.boton-subir {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgb(41, 59, 81);
    color: white;
    font-size: 26px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.boton-subir.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media screen and (max-width: 768px) {
    .cabecera {
        position: relative;
    }

    .boton-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        position: absolute;
        top: 48px;
        right: 16px;
        z-index: 1101;
        width: 46px;
        height: 42px;
        padding: 9px;
        border: 0;
        border-radius: 6px;
        background: rgb(41, 59, 81);
        cursor: pointer;
    }

    .boton-menu span {
        display: block;
        width: 100%;
        height: 3px;
        border-radius: 2px;
        background: white;
        transition: transform 0.25s, opacity 0.25s;
    }

    .boton-menu.activo span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .boton-menu.activo span:nth-child(2) {
        opacity: 0;
    }

    .boton-menu.activo span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .navbar {
        display: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        height: auto !important;
        padding: 12px !important;
    }

    .navbar.menu-abierto {
        display: flex !important;
    }

    .navbar .logo {
        display: none;
    }

    .navbar a {
        display: block !important;
        width: 100% !important;
        padding: 12px 10px !important;
        text-align: left !important;
    }
}
