/* Scroll to Top Button */
#ro-scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* Default, can be overridden by Customizer */
    width: 50px;
    height: 50px;
    background-color: var(--color-primary, #007bff);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    border: none;
    outline: none;
}

#ro-scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#ro-scroll-to-top:hover {
    background-color: var(--color-dark, #333);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#ro-scroll-to-top svg,
#ro-scroll-to-top i {
    font-size: 20px;
    fill: currentColor;
}

/* Position overrides */
body.scroll-btn-left #ro-scroll-to-top {
    right: auto;
    left: 30px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #ro-scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 70px;
        /* Above bottom sticky bar if present */
        right: 20px;
    }

    body.scroll-btn-left #ro-scroll-to-top {
        left: 20px;
    }

    /* Option to hide on mobile */
    body.scroll-btn-hide-mobile #ro-scroll-to-top {
        display: none !important;
    }
}

/* Scroll Down Button (Hero) */
.hero-scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    animation: bounce 2s infinite;
    z-index: 10;
    color: var(--color-primary, #007bff);
    /* Or white depending on hero bg */
    transition: opacity 0.3s ease;
}

.hero-scroll-down svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}