/* ========================================
   SCROLL TO TOP BUTTON
   Botón flotante para volver arriba
   ======================================== */

/* Botón scroll to top */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #D4AF37, #C9A55C);
    color: #0a0a0a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

/* Botón visible */
#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover effect */
#scrollToTop:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #E5C047, #D4AF37);
}

/* Click effect */
#scrollToTop:active {
    transform: translateY(-2px) scale(1.05);
}

/* Icono */
#scrollToTop i {
    transition: transform 0.3s ease;
}

#scrollToTop:hover i {
    transform: translateY(-3px);
}

/* Pulse animation cuando aparece */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.7);
    }
}

#scrollToTop.visible {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    #scrollToTop {
        bottom: 25px;
        right: 25px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    #scrollToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    #scrollToTop {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Evitar conflictos con otros elementos fijos */
#scrollToTop {
    pointer-events: auto;
}
