/**
 * Animations Stylesheet - GaLa-Bau Kiki
 * Modern animations and transitions
 */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Pulse Shadow Animation */
@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(255, 111, 0, 0.4);
    }
    50% {
        box-shadow: 0 10px 35px rgba(255, 111, 0, 0.6);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Float */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Fade In on Scroll */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In on Scroll */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In on Scroll */
.scale-in-scroll {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.scale-in-scroll.visible {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

/* Lift Effect */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Card Hover Lift */
.card-hover-lift {
    transition: all 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Icon Rotate on Hover */
.icon-rotate-hover i {
    transition: transform 0.3s ease;
}

.icon-rotate-hover:hover i {
    transform: rotate(360deg);
}

/* Underline Animation */
.underline-animate {
    position: relative;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary-light);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* Grow Effect */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* Shake Effect */
.hover-shake:hover {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(124, 179, 66, 0.6);
}

/* ========================================
   PARALLAX EFFECTS
   ======================================== */

.parallax-section {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(124, 179, 66, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   STAGGER ANIMATIONS
   ======================================== */

.stagger-animation > * {
    animation: fadeInUp 0.6s ease backwards;
}

.stagger-animation > *:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation > *:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation > *:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation > *:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation > *:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-animation > *:nth-child(6) {
    animation-delay: 0.6s;
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */

/* Scroll Indicator Animation */
.scroll-wheel {
    width: 3px;
    height: 10px;
    background: white;
    border-radius: 2px;
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Number Counter Animation */
.counter {
    transition: all 0.5s ease;
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Text Highlight Effect */
.text-highlight {
    color: #43A047;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   TRANSITION UTILITIES
   ======================================== */

.transition-fast {
    transition: all 0.15s ease;
}

.transition-normal {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .fade-in-scroll,
    .slide-in-left,
    .slide-in-right,
    .scale-in-scroll {
        transform: translateY(15px);
    }
    
    .slide-in-left,
    .slide-in-right {
        transform: translateY(15px);
    }
    
    /* Disable parallax on mobile */
    .parallax-section {
        background-attachment: scroll;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax-section {
        background-attachment: scroll;
    }
}
