/* Text Left Animations for Tailwind CSS */

/* Basic Slide In Left Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

/* Fade In Left with Tailwind classes */
.fade-in-left {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.7s ease-out;
}

.fade-in-left.opacity-100 {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.7s ease-out;
}

.fade-in-up.opacity-100 {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Right Animation */
.fade-in-right {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.7s ease-out;
}

.fade-in-right.opacity-100 {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced Scroll-triggered animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scroll-slide-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered scroll animations */
.scroll-stagger>* {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-stagger.animate-in>* {
    opacity: 1;
    transform: translateX(0);
}

.scroll-stagger.animate-in>*:nth-child(1) {
    transition-delay: 0.1s;
}

.scroll-stagger.animate-in>*:nth-child(2) {
    transition-delay: 0.2s;
}

.scroll-stagger.animate-in>*:nth-child(3) {
    transition-delay: 0.3s;
}

.scroll-stagger.animate-in>*:nth-child(4) {
    transition-delay: 0.4s;
}

.scroll-stagger.animate-in>*:nth-child(5) {
    transition-delay: 0.5s;
}

.scroll-stagger.animate-in>*:nth-child(6) {
    transition-delay: 0.6s;
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.animate-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(40, end) forwards;
}

/* Slide In From Left with Bounce */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    70% {
        transform: translateX(10px);
        opacity: 1;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-from-left {
    animation: slideInFromLeft 1s ease-out forwards;
}

/* Hover Slide Left */
.hover-slide-left {
    transition: transform 0.3s ease;
}

.hover-slide-left:hover {
    transform: translateX(-10px);
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: revealText 1.5s ease-out forwards;
}

@keyframes revealText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Staggered Animation Delays */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-400 {
    animation-delay: 0.4s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}

.animate-delay-600 {
    animation-delay: 0.6s;
}

.animate-delay-700 {
    animation-delay: 0.7s;
}

.animate-delay-800 {
    animation-delay: 0.8s;
}

.animate-delay-900 {
    animation-delay: 0.9s;
}

.animate-delay-1000 {
    animation-delay: 1s;
}

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced scroll animations with different directions */
.scroll-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.scroll-down {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-down.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Scale animations */
.scroll-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Rotate animations */
.scroll-rotate {
    opacity: 0;
    transform: rotate(-10deg) translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-rotate.animate-in {
    opacity: 1;
    transform: rotate(0deg) translateX(0);
}

/* Responsive animation speeds */
@media (max-width: 768px) {
    .animate-slide-in-left {
        animation-duration: 0.6s;
    }

    .animate-fade-in-left {
        animation-duration: 0.4s;
    }

    .scroll-fade-in,
    .scroll-slide-left,
    .scroll-slide-right,
    .scroll-up,
    .scroll-down,
    .scroll-scale,
    .scroll-rotate {
        transition-duration: 0.6s;
    }
}

/* Utility classes for common text animations */
.text-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.text-fade-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.text-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(40, end) forwards;
}

/* Animation timing functions */
.animate-ease-in {
    animation-timing-function: ease-in;
}

.animate-ease-out {
    animation-timing-function: ease-out;
}

.animate-ease-in-out {
    animation-timing-function: ease-in-out;
}

.animate-linear {
    animation-timing-function: linear;
}

/* Animation durations */
.animate-duration-fast {
    animation-duration: 0.3s;
}

.animate-duration-normal {
    animation-duration: 0.6s;
}

.animate-duration-slow {
    animation-duration: 1s;
}

.animate-duration-slower {
    animation-duration: 1.5s;
}

/* Infinite animations */
.animate-infinite {
    animation-iteration-count: infinite;
}

/* Pause animations */
.animate-pause {
    animation-play-state: paused;
}

.animate-play {
    animation-play-state: running;
}

/* Direction controls */
.animate-reverse {
    animation-direction: reverse;
}

.animate-alternate {
    animation-direction: alternate;
}

.animate-alternate-reverse {
    animation-direction: alternate-reverse;
}