/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 46px;
    height: 46px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-accent);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 75px;
        bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        right: 15px;
    }

    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* iOS safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .scroll-to-top {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }

    @media (max-width: 768px) {

        .scroll-to-top {
            bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        }
    }
}