/* ========================================
   Scroll Animations for Sections
   ======================================== */

/* Base state - elegant fade & scale */
.animate-on-scroll {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Animated state - smooth reveal */
.animate-on-scroll.animated {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays - slower cascade */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.45s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.6s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.75s; }
.animate-on-scroll:nth-child(7) { transition-delay: 0.9s; }
.animate-on-scroll:nth-child(8) { transition-delay: 1.05s; }

/* ========================================
   Scroll to Top Button
   ======================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary, #B92525);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.scroll-to-top:hover {
    background-color: #8B1D1D;
    transform: translateY(-3px);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        transition: opacity 0.3s ease;
        transform: none;
    }
    
    .animate-on-scroll.animated {
        opacity: 1;
        transform: none;
    }
    
    .scroll-to-top {
        transition: opacity 0.2s ease;
    }
}

