/**
 * Salista Beauty - animations.css
 * CSS styles for animations and transitions
 * To be used with animations.js
 */

/* Scroll Reveal Base Styles (Hidden Initially) */
.fade-in,
.zoom-in,
.slide-in-left,
.slide-in,
.slide-in-right,
.slide-up,
.slide-down {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; /* Performance hint */
}

.zoom-in { transform: scale(0.9); }
.slide-in-left, .slide-in { transform: translateX(-40px); }
.slide-in-right { transform: translateX(40px); }
.slide-up { transform: translateY(40px); }
.slide-down { transform: translateY(-40px); }

/* Visible State */
.visible {
    opacity: 1 !important;
    transform: none !important;
}

/* Reduced Motion Override */
.no-transition {
    transition: none !important;
}

/* Hero Floating Animations */
@keyframes float-one {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(8px, -12px) rotate(4deg); }
    50% { transform: translate(15px, 0) rotate(0deg); }
    75% { transform: translate(8px, 12px) rotate(-4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-two {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-12px, 8px) rotate(-4deg); }
    50% { transform: translate(0, 15px) rotate(0deg); }
    75% { transform: translate(12px, 8px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Floating Bubbles Animation */
@keyframes bubble-float {
    0% { transform: translateY(0); opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

.bubble {
    border-radius: 50%;
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 1;
    will-change: transform, opacity;
}

/* Custom bubble styling options */
.bubble-container[data-bubble-color] .bubble {
    background-color: var(--bubble-color, rgba(255, 255, 255, 0.15));
}

.bubble-container[data-bubble-glow] .bubble {
    box-shadow: 0 0 8px var(--bubble-glow, rgba(255, 255, 255, 0.2));
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color, #e57965);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* Sticky Header */
header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* Ensure it's above most content */
    background-color: var(--white, #ffffff);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown { 
    from { transform: translateY(-100%); } 
    to { transform: translateY(0); } 
}

/* Parallax Elements */
.parallax {
     transition: transform 0.1s linear; /* Smoother parallax */
     will-change: transform;
}

/* Reduced Motion Media Query */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    
    .fade-in, .zoom-in, .slide-in, .slide-in-left, .slide-in-right, .slide-up, .slide-down {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    @keyframes bubble-float {
        0%, 100% { transform: none; opacity: 0.5; }
    }
    
    @keyframes float-one {
        0%, 100% { transform: none; }
    }
    
    @keyframes float-two {
        0%, 100% { transform: none; }
    }
}

/* Stat counters highlight on completion */
.stat-number.counter-complete {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}