
/* Кнопка "Наверх" - плавающая, всегда видна при прокрутке */
.scroll-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #D91656;
    color: #ffffff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(217, 22, 86, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(calc(0.8 * var(--a11y-ui-scale, 1)));
    transform-origin: bottom right;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(var(--a11y-ui-scale, 1));
}

.scroll-top-btn:hover {
    background: #B3003D;
    transform: translateY(-3px) scale(calc(1.05 * var(--a11y-ui-scale, 1)));
    box-shadow: 0 6px 25px rgba(217, 22, 86, 0.5);
    color: #ffffff;
}

.scroll-top-btn:active {
    transform: scale(calc(0.92 * var(--a11y-ui-scale, 1)));
    box-shadow: 0 2px 10px rgba(217, 22, 86, 0.3);
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(calc(0.8 * var(--a11y-ui-scale, 1)));
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(var(--a11y-ui-scale, 1));
    }
}

.scroll-top-btn.visible {
    animation: fadeInUp 0.3s ease forwards;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
        box-shadow: 0 3px 12px rgba(217, 22, 86, 0.35);
    }
}

@media (max-width: 480px) {
    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Затемнение фона при наведении (опционально) */
.scroll-top-btn .arrow-icon {
    transition: transform 0.3s ease;
}

.scroll-top-btn:hover .arrow-icon {
    transform: translateY(-2px);
}
