/* =====================================================
   MENÚ MÓVIL
   ===================================================== */
#muses-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99998;
    backdrop-filter: blur(3px);
}

#muses-overlay.show {
    display: block;
}

#muses-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: #6366f1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99997;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

#muses-menu-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

@media (max-width: 767px) {
    #muses-menu-btn {
        display: flex !important;
    }

    #left-menu.open {
        display: block !important;
        transform: translateX(0) !important;
        z-index: 99999 !important;
    }
}

#left-menu.open {
    overflow-y: auto !important;
    height: 100vh !important;
}

/* =====================================================
   BOTÓN SUBIR - SIEMPRE VISIBLE (excepto lectura)
   ===================================================== */
#muses-top-btn {
    position: fixed;
    bottom: 25px;
    right: 90px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e2233, #2d3348);
    border: 2px solid #6366f1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99996;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

#muses-top-btn.show {
    display: flex !important;
}

#muses-top-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

#muses-top-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/*
 * FIX #5: Scroll-to-top on mobile — was stacked above menu button (right side)
 * causing visual clutter. Moved to bottom-left on mobile so both buttons
 * have their own corner. Also reduced size for less intrusion.
 */
@media (max-width: 767px) {
    #muses-top-btn {
        bottom: 20px;
        left: 20px;
        right: auto;
        width: 40px;
        height: 40px;
        border-width: 1px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    #muses-top-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* =====================================================
   ACORDEÓN TAGS - SIDEBAR
   ===================================================== */
#left-menu .tagcloud,
#left-menu .widget_tag_cloud .tagcloud,
.c-left-menu .tagcloud {
    padding: 5px 10px;
}

#left-menu .tagcloud a,
.c-left-menu .tagcloud a {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    background: rgba(58, 64, 80, 0.6);
    color: #9ca3af !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 12px !important;
    transition: all 0.2s;
}

#left-menu .tagcloud a:hover,
.c-left-menu .tagcloud a:hover {
    background: rgba(99, 102, 241, 0.4);
    color: #fff !important;
}

/* Estado colapsado */
.tags-collapsed {
    max-height: 140px !important;
    overflow: hidden !important;
    position: relative !important;
}

.tags-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: linear-gradient(transparent, #242730);
    pointer-events: none;
}

/* Botón toggle */
#muses-tags-toggle {
    display: none;
    width: calc(100% - 20px);
    margin: 8px 10px;
    padding: 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

#muses-tags-toggle:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
}

#muses-tags-toggle.active {
    display: block !important;
}

/* En móvil no colapsar */
@media (max-width: 767px) {
    .tags-collapsed {
        max-height: none !important;
        overflow: visible !important;
    }

    .tags-collapsed::after {
        display: none !important;
    }

    #muses-tags-toggle {
        display: none !important;
    }
}