/* Loading and Initial Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease-out forwards;
}

.scale-in {
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.6s ease-out forwards;
}

/* Scroll Triggered Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease-out forwards;
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInBottom 1s ease-out forwards;
}

/* Typing Animation */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Staggered animations for multiple elements */
.stagger-fade-in > * {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; }

/* Hover Animations */
.hover-scale {
    transition: transform 0.3s ease;
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: currentColor }
}

/* Loading Animation for Images */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    animation: imageSkeleton 1.5s infinite;
}

@keyframes imageSkeleton {
    from { left: -100%; }
    to { left: 100%; }
}