/**
 * IVINITIV Pro Theme - Animations CSS
 * 
 * @package IVINITIV_Pro
 * @version 1.0.0
 */

/* ========================================
   ANIMATION KEYFRAMES
   ======================================== */

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

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

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

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

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

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 255, 0.8), 0 0 40px rgba(0, 102, 255, 0.4);
    }
}

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

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ========================================
   ANIMATION CLASSES
   ======================================== */

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out forwards;
}

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

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease-out forwards;
}

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

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

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   ANIMATION DELAYS
   ======================================== */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger animations for grids */
.services-grid .service-card.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.services-grid .service-card.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.services-grid .service-card.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.services-grid .service-card.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.services-grid .service-card.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

.blog-grid .blog-card.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.blog-grid .blog-card.animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.blog-grid .blog-card.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }

.industries-grid .industry-card.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.industries-grid .industry-card.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.industries-grid .industry-card.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.industries-grid .industry-card.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.industries-grid .industry-card.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.industries-grid .industry-card.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   HOVER ANIMATIONS
   ======================================== */

.hover-lift {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease-out;
}

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

.hover-rotate {
    transition: transform 0.3s ease-out;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ========================================
   BUTTON ANIMATIONS
   ======================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   LINK ANIMATIONS
   ======================================== */

.service-link svg {
    transition: transform 0.3s ease-out;
}

.service-link:hover svg {
    transform: translateX(4px);
}

/* ========================================
   CARD ANIMATIONS
   ======================================== */

.service-card {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card .service-icon {
    transition: transform 0.3s ease-out;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* ========================================
   IMAGE ANIMATIONS
   ======================================== */

.industry-image {
    transition: transform 0.5s ease-out;
}

.blog-image img {
    transition: transform 0.5s ease-out;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* ========================================
   PARTICLE ANIMATIONS
   ======================================== */

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */

.reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.hero-badge,
.hero-title,
.hero-subtitle,
.hero-cta,
.hero-stats {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hero-badge.reveal,
.hero-title.reveal,
.hero-subtitle.reveal,
.hero-cta.reveal,
.hero-stats.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .particle {
        display: none;
    }
}
