/* ========================================
   LANDING PAGE ANIMATIONS
   ======================================== */

/* Base Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Delay Classes */
.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; }

/* ========================================
   HERO SECTION ANIMATIONS
   ======================================== */

.hero-title {
    animation: slideInFromLeft 1s ease-out 0.5s both;
}

.hero-subtitle {
    animation: slideInFromLeft 1s ease-out 0.7s both;
}

.hero-buttons {
    animation: slideInFromLeft 1s ease-out 0.9s both;
}

.hero-main-product {
    animation: slideInFromRight 1s ease-out 0.6s both;
}

.floating-icon {
    animation: floatIn 1s ease-out both;
}

.floating-icon.icon-1 { animation-delay: 0.8s; }
.floating-icon.icon-2 { animation-delay: 1.0s; }
.floating-icon.icon-3 { animation-delay: 1.2s; }
.floating-icon.icon-4 { animation-delay: 1.4s; }
.floating-icon.icon-5 { animation-delay: 1.6s; }
.floating-icon.icon-6 { animation-delay: 1.8s; }
.floating-icon.icon-7 { animation-delay: 2.0s; }
.floating-icon.icon-8 { animation-delay: 2.2s; }
.floating-icon.icon-9 { animation-delay: 2.4s; }

/* ========================================
   ABOUT SECTION ANIMATIONS
   ======================================== */

.about-visual {
    animation: slideInFromLeft 1s ease-out both;
}

.about-text {
    animation: slideInFromRight 1s ease-out both;
}

.microsoft-partner-badge {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.about-text h2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.about-text p {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.about-cta {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.showcase-stats .stat {
    animation: countUp 1s ease-out both;
}

.showcase-stats .stat:nth-child(1) { animation-delay: 0.5s; }
.showcase-stats .stat:nth-child(2) { animation-delay: 0.7s; }
.showcase-stats .stat:nth-child(3) { animation-delay: 0.9s; }

/* ========================================
   COMPANY FEATURES ANIMATIONS
   ======================================== */

.feature-card {
    animation: slideInFromBottom 0.8s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.3s; }
.feature-card:nth-child(3) { animation-delay: 0.5s; }
.feature-card:nth-child(4) { animation-delay: 0.7s; }

.feature-icon {
    animation: bounceIn 0.8s ease-out both;
}

.feature-card:nth-child(1) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.8s; }

/* ========================================
   PARTNERS SECTION ANIMATIONS
   ======================================== */

.partners-section h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.partner-logo {
    animation: scaleIn 0.6s ease-out both;
}

.partner-logo:nth-child(1) { animation-delay: 0.1s; }
.partner-logo:nth-child(2) { animation-delay: 0.2s; }
.partner-logo:nth-child(3) { animation-delay: 0.3s; }
.partner-logo:nth-child(4) { animation-delay: 0.4s; }
.partner-logo:nth-child(5) { animation-delay: 0.5s; }
.partner-logo:nth-child(6) { animation-delay: 0.6s; }
.partner-logo:nth-child(7) { animation-delay: 0.7s; }
.partner-logo:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   CLIENTS SECTION ANIMATIONS
   ======================================== */

.clients-section h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.client-slide {
    animation: slideInFromBottom 0.8s ease-out both;
}

.client-slide:nth-child(1) { animation-delay: 0.1s; }
.client-slide:nth-child(2) { animation-delay: 0.2s; }
.client-slide:nth-child(3) { animation-delay: 0.3s; }
.client-slide:nth-child(4) { animation-delay: 0.4s; }
.client-slide:nth-child(5) { animation-delay: 0.5s; }
.client-slide:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   PRODUCT SHOWCASE ANIMATIONS
   ======================================== */

.product-showcase-section h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.product-card {
    animation: slideInFromBottom 0.8s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.3s; }
.product-card:nth-child(3) { animation-delay: 0.5s; }
.product-card:nth-child(4) { animation-delay: 0.7s; }

.product-icon {
    animation: rotateIn 0.8s ease-out both;
}

.product-card:nth-child(1) .product-icon { animation-delay: 0.2s; }
.product-card:nth-child(2) .product-icon { animation-delay: 0.4s; }
.product-card:nth-child(3) .product-icon { animation-delay: 0.6s; }
.product-card:nth-child(4) .product-icon { animation-delay: 0.8s; }

/* ========================================
   NEWS SECTION ANIMATIONS
   ======================================== */

.news-section h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.news-card {
    animation: slideInFromBottom 0.8s ease-out both;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.3s; }
.news-card:nth-child(3) { animation-delay: 0.5s; }

.news-image {
    animation: zoomIn 0.8s ease-out both;
}

.news-card:nth-child(1) .news-image { animation-delay: 0.2s; }
.news-card:nth-child(2) .news-image { animation-delay: 0.4s; }
.news-card:nth-child(3) .news-image { animation-delay: 0.6s; }

/* ========================================
   CTA SECTION ANIMATIONS
   ======================================== */

.cta-content h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.cta-content p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-buttons {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

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

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

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

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

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

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

@keyframes zoomInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(0);
    }
    70% {
        transform: scale(0.95) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes waveIn {
    0% {
        opacity: 0;
        transform: translateX(-100px) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: translateX(10px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    80% {
        transform: scale(0.95) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes rotateInScale {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5) translateX(100px);
    }
    50% {
        opacity: 1;
        transform: rotate(-90deg) scale(1.1) translateX(0);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1) translateX(0);
    }
}

/* ========================================
   CONTINUOUS ANIMATIONS
   ======================================== */

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.floating-icon.icon-1 { animation-delay: 0s; }
.floating-icon.icon-2 { animation-delay: 0.5s; }
.floating-icon.icon-3 { animation-delay: 1s; }
.floating-icon.icon-4 { animation-delay: 1.5s; }
.floating-icon.icon-5 { animation-delay: 2s; }
.floating-icon.icon-6 { animation-delay: 2.5s; }
.floating-icon.icon-7 { animation-delay: 3s; }
.floating-icon.icon-8 { animation-delay: 3.5s; }
.floating-icon.icon-9 { animation-delay: 4s; }

/* Pulse animation for icons */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.feature-icon:hover,
.product-icon:hover {
    animation: pulse 0.6s ease-in-out;
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    /* Faster animations on mobile */
    .hero-title,
    .hero-subtitle,
    .hero-buttons,
    .hero-main-product {
        animation-duration: 0.6s;
    }
    
    .floating-icon {
        animation-duration: 0.6s;
    }
    
    /* Disable continuous animations on mobile for performance */
    .floating-icon {
        animation: none;
    }
}

@media (max-width: 480px) {
    /* Even simpler animations on small screens */
    .animate-on-scroll {
        transform: translateY(15px);
        transition-duration: 0.5s;
    }
    
    /* Disable most animations on very small screens */
    .floating-icon,
    .feature-icon,
    .product-icon {
        animation: none;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use transform and opacity for better performance */
.animate-on-scroll,
.hero-title,
.hero-subtitle,
.hero-buttons,
.hero-main-product,
.floating-icon,
.about-visual,
.about-text,
.feature-card,
.partner-logo,
.client-slide,
.product-card,
.news-card,
.cta-content h2,
.cta-content p,
.cta-buttons {
    will-change: transform, opacity;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
