/* ============= SCROLL TO TOP BUTTON STYLES ============= */
:root {
    --scroll-purple: #7d3eff;
    --scroll-orange: #FF8C00;
}

/* Bot¨Žn principal */
.scroll-top {
    width: 48px;
    height: 48px;
    line-height: 48px;
    position: fixed;
    bottom: -60px;
    right: 30px;
    font-size: 18px;
    border-radius: 12px;
    z-index: 9999;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, var(--scroll-purple) 0%, var(--scroll-orange) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

/* Estado visible */
.scroll-top.open {
    bottom: 30px;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-top.scroll-to-target {
    width: 48px;
    height: 48px;
    line-height: 48px;
    position: fixed;
    bottom: -60px;
    right: 30px;
    font-size: 18px;
    border-radius: 12px;
    z-index: 9999;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, var(--scroll-purple) 0%, var(--scroll-orange) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.scroll-top.scroll-to-target.open {
    bottom: 100px;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Hover effect */
.scroll-top:hover {
    background: linear-gradient(135deg, var(--scroll-orange) 0%, var(--scroll-purple) 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.5);
}

/* Focus state */
button.scroll-top:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.3);
}

/* Icono interno */
.scroll-top span {
    color: #fff;
    font-size: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-family: 'themify-icons';
}

.scroll-top:hover span {
    transform: translateY(-3px);
}

/* Sombra debajo del bot¨Žn */
.scroll-top:after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 100%;
    left: 10%;
    height: 12px;
    width: 80%;
    opacity: 0.6;
    background: radial-gradient(ellipse at center, rgba(106, 13, 173, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

.scroll-top:hover:after {
    opacity: 0.8;
}

/* Animaci¨Žn de entrada */
@keyframes scrollTopFadeIn {
    from {
        bottom: -60px;
        opacity: 0;
        transform: scale(0.8) rotate(-180deg);
    }
    to {
        bottom: 30px;
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.scroll-top.open {
    animation: scrollTopFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-top {
        width: 42px;
        height: 42px;
        line-height: 42px;
        right: 20px;
        font-size: 16px;
    }
    
    .scroll-top.open {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-top {
        width: 38px;
        height: 38px;
        line-height: 38px;
        right: 15px;
        font-size: 14px;
    }
    
    .scroll-top.open {
        bottom: 15px;
    }
}

@media (max-width: 600px) {
    .scroll-top.scroll-to-target.open {
        bottom: 80px;
        right: 18px;
    }
}
