/* Animations CSS */

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

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float3D {
    0%, 100% { 
        transform: translateY(0) rotateY(0); 
    }
    50% { 
        transform: translateY(-20px) rotateY(10deg); 
    }
}

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

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 0.5; 
        transform: translate(-50%, -50%) scale(1.05); 
    }
}

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

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

@keyframes scroll1 {
    0%, 100% { 
        transform: translateY(0); 
        opacity: 1; 
    }
    50% { 
        transform: translateY(10px); 
        opacity: 0.5; 
    }
}

@keyframes scroll2 {
    0%, 100% { 
        transform: translateY(0); 
        opacity: 1; 
        animation-delay: 0.2s; 
    }
    50% { 
        transform: translateY(10px); 
        opacity: 0.5; 
    }
}

@keyframes scroll3 {
    0%, 100% { 
        transform: translateY(0); 
        opacity: 1; 
        animation-delay: 0.4s; 
    }
    50% { 
        transform: translateY(10px); 
        opacity: 0.5; 
    }
}

@keyframes orbit {
    0% { 
        transform: rotate(0deg) translateX(150px) rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg) translateX(150px) rotate(-360deg); 
    }
}

@keyframes pulseRing {
    0% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.3; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.05); 
        opacity: 0.5; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.3; 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeOutDown {
    from { 
        opacity: 1; 
        transform: translateY(0); 
    }
    to { 
        opacity: 0; 
        transform: translateY(30px); 
    }
}

@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(151, 19, 19, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(151, 19, 19, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(151, 19, 19, 0); 
    }
}

@keyframes shimmer {
    0% { 
        transform: translateX(-100%); 
    }
    100% { 
        transform: translateX(100%); 
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

@keyframes wave {
    0%, 100% { 
        transform: translateX(0); 
    }
    50% { 
        transform: translateX(-25%); 
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes zoomIn {
    from { 
        transform: scale(0.8); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

@keyframes zoomOut {
    from { 
        transform: scale(1); 
        opacity: 1; 
    }
    to { 
        transform: scale(0.8); 
        opacity: 0; 
    }
}

@keyframes flipInX {
    from { 
        transform: perspective(400px) rotateX(90deg); 
        opacity: 0; 
    }
    to { 
        transform: perspective(400px) rotateX(0deg); 
        opacity: 1; 
    }
}

@keyframes flipOutX {
    from { 
        transform: perspective(400px) rotateX(0deg); 
        opacity: 1; 
    }
    to { 
        transform: perspective(400px) rotateX(90deg); 
        opacity: 0; 
    }
}

@keyframes flipInY {
    from { 
        transform: perspective(400px) rotateY(90deg); 
        opacity: 0; 
    }
    to { 
        transform: perspective(400px) rotateY(0deg); 
        opacity: 1; 
    }
}

@keyframes flipOutY {
    from { 
        transform: perspective(400px) rotateY(0deg); 
        opacity: 1; 
    }
    to { 
        transform: perspective(400px) rotateY(90deg); 
        opacity: 0; 
    }
}

/* Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1s; }

/* Animation Durations */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.5s; }
.duration-slow { animation-duration: 1s; }
.duration-slower { animation-duration: 2s; }

/* Animation Timing Functions */
.ease-linear { animation-timing-function: linear; }
.ease-ease { animation-timing-function: ease; }
.ease-ease-in { animation-timing-function: ease-in; }
.ease-ease-out { animation-timing-function: ease-out; }
.ease-ease-in-out { animation-timing-function: ease-in-out; }
.ease-cubic-bezier { animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Animation Fill Modes */
.fill-none { animation-fill-mode: none; }
.fill-forwards { animation-fill-mode: forwards; }
.fill-backwards { animation-fill-mode: backwards; }
.fill-both { animation-fill-mode: both; }

/* Animation Iteration Count */
.iteration-once { animation-iteration-count: 1; }
.iteration-infinite { animation-iteration-count: infinite; }

/* Animation Directions */
.direction-normal { animation-direction: normal; }
.direction-reverse { animation-direction: reverse; }
.direction-alternate { animation-direction: alternate; }
.direction-alternate-reverse { animation-direction: alternate-reverse; }

/* Page Transition Animations */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation for Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Apply staggered delays */
.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.revealed > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.revealed > *:nth-child(8) { transition-delay: 0.8s; }
.stagger-children.revealed > *:nth-child(9) { transition-delay: 0.9s; }
.stagger-children.revealed > *:nth-child(10) { transition-delay: 1s; }