/* ============================================
   ANIMATION LIBRARY EXTENSION
   Advanced Animations for Modern Frontend
   ============================================ */

/* Entrance Animations */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

@keyframes flipInX {
    from {
        opacity: 0;
        transform: perspective(400px) rotateX(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateX(0);
    }
}

@keyframes flipInY {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

/* Attention Seekers */
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes tada {
    0% {
        transform: scale(1) rotate(0);
    }
    10%,
    20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%,
    50%,
    70%,
    90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%,
    60%,
    80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

@keyframes wobble {
    0% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes jello {
    0%,
    100% {
        transform: skewX(0deg) skewY(0deg);
    }
    30% {
        transform: skewX(25deg) skewY(25deg);
    }
    40% {
        transform: skewX(-15deg) skewY(-15deg);
    }
    50% {
        transform: skewX(15deg) skewY(15deg);
    }
    65% {
        transform: skewX(-5deg) skewY(-5deg);
    }
    75% {
        transform: skewX(5deg) skewY(5deg);
    }
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    10%,
    30% {
        transform: scale(0.9);
    }
    20%,
    40% {
        transform: scale(1.1);
    }
}

/* Background Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatHorizontal {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

@keyframes glow {
    0%,
    100% {
        box-shadow: 0 0 5px rgba(22, 163, 74, 0.5),
            0 0 10px rgba(22, 163, 74, 0.3), 0 0 15px rgba(22, 163, 74, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(22, 163, 74, 0.8),
            0 0 20px rgba(22, 163, 74, 0.6), 0 0 30px rgba(22, 163, 74, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Text Animations */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

@keyframes wave {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(20deg);
    }
    75% {
        transform: rotate(-20deg);
    }
}

/* Utility Animation Classes */
.animate-zoom-in {
    animation: zoomIn 0.6s ease-out;
}

.animate-zoom-out {
    animation: zoomOut 0.6s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.animate-slide-out-up {
    animation: slideOutUp 0.6s ease-out;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out;
}

.animate-flip-in-x {
    animation: flipInX 0.8s ease-out;
}

.animate-flip-in-y {
    animation: flipInY 0.8s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

.animate-shake {
    animation: shake 0.8s ease-in-out;
}

.animate-swing {
    animation: swing 1s ease-in-out;
}

.animate-tada {
    animation: tada 1s ease-in-out;
}

.animate-wobble {
    animation: wobble 1s ease-in-out;
}

.animate-jello {
    animation: jello 1s ease-in-out;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-horizontal {
    animation: floatHorizontal 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-wave {
    animation: wave 0.5s ease-in-out;
}

/* Infinite Animations */
.animate-infinite {
    animation-iteration-count: infinite;
}

/* Animation States */
.animate-paused {
    animation-play-state: paused;
}

.animate-running {
    animation-play-state: running;
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-brighten {
    transition: filter 0.3s ease;
}

.hover-brighten:hover {
    filter: brightness(1.2);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.5);
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animations */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Progress Bar Animation */
@keyframes progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.progress-bar-animated {
    animation: progress 2s ease-out;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animate {
    animation: countUp 0.5s ease-out;
}

/* Performance Optimization */
.will-animate {
    will-change: transform, opacity;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PROJECT SPECIFIC ANIMATIONS (From Home)
   ============================================ */

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -20px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 20px) scale(1.05); }
}

@keyframes float-delayed {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-30px, 30px) rotate(-3deg); }
    66% { transform: translate(20px, -20px) rotate(3deg); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

.animate-blob {
    animation: blob 15s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animate-float-delayed {
    animation: float-delayed 20s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Page Elements */
.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-image {
    animation: slideInRight 1s ease-out;
}

/* Logo Slider */
.logo-slider {
    display: flex;
    align-items: center;
    width: fit-content;
    animation: scroll 40s linear infinite;
}

.logo-slider:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    padding: 0 2.5rem;
}

.logo-item img {
    height: 50px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

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

/* Pagination Customization */
.swiper-pagination-hero .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #e2e8f0;
    opacity: 1;
    transition: all 0.3s;
}

.swiper-pagination-hero .swiper-pagination-bullet-active {
    width: 32px;
    border-radius: 6px;
    background: linear-gradient(to right, #4f46e5, #06b6d4);
}

/* Modern Scrollbar */
.modern-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.modern-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modern-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modern-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

