/* Enhanced Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Fade Up Animation */
.fade-up-scroll {
    transform: translateY(40px);
}

.fade-up-scroll.visible {
    transform: translateY(0);
}

/* Enhanced Scale Up Animation */
.scale-up-scroll {
    transform: scale(0.9) translateY(30px);
    opacity: 0;
}

.scale-up-scroll.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Slide In Animations */
.slide-left-scroll {
    transform: translateX(-50px);
    opacity: 0;
}

.slide-left-scroll.visible {
    transform: translateX(0);
    opacity: 1;
}

.slide-right-scroll {
    transform: translateX(50px);
    opacity: 0;
}

.slide-right-scroll.visible {
    transform: translateX(0);
    opacity: 1;
}

/* Rotate and Scale Animation */
.rotate-scale-scroll {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0;
}

.rotate-scale-scroll.visible {
    transform: scale(1) rotate(0);
    opacity: 1;
}

/* Blur In Animation */
.blur-in-scroll {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
}

.blur-in-scroll.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger effect for grid children */
.stagger-children > * {
    transition-delay: calc(var(--child-index, 0) * 0.15s);
}

/* Enhanced Parallax effect */
.parallax-scroll {
    will-change: transform;
    transform: translateY(0);
    transition: transform 0.1s linear;
}

/* Gradient Border Animation */
.gradient-border {
    position: relative;
    background: var(--surface-color);
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--primary-light), var(--primary-dark), var(--primary));
    border-radius: 1.1rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gradient-border.visible::before {
    opacity: 1;
    animation: gradientShift 3s ease infinite;
    background-size: 400% 400%;
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: translateX(-100%);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.text-reveal.visible::after {
    transform: translateX(100%);
}

/* Enhanced Keyframe Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideUp {
    from { 
        transform: translateY(40px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes scaleUp {
    from { 
        transform: scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

@keyframes slideInLeft {
    from { 
        transform: translateX(-60px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideInRight {
    from { 
        transform: translateX(60px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(21, 101, 192, 0.3); }
    50% { box-shadow: 0 0 30px rgba(21, 101, 192, 0.6); }
}

/* Enhanced Animation Presets */
.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-up {
    animation: slideUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-scale-up {
    animation: scaleUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-left {
    animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-right {
    animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Enhanced Transition Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }
.delay-700 { transition-delay: 700ms; }
.delay-800 { transition-delay: 800ms; }

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

/* Enhanced Glass Card Hover Effects */
.glass-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Enhanced Logo Animation */
.logo-animate {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* Text Gradient Animation */
.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--primary-light), var(--primary-dark));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Enhanced Video Play Button */
.video-container {
    position: relative;
    cursor: pointer;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

.video-container::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    color: var(--primary);
    font-size: 24px;
    z-index: 3;
    transition: all 0.3s ease;
}

.video-container:hover::before {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-container:hover::after {
    color: white;
    transform: translate(-40%, -50%) scale(1.1);
}