/* Animations for English Portal Website */

/* Hero Image Animation */
@keyframes heroImageFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes heroImageGlow {
    0%, 100% {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    }
}

/* Feature Card Animations */
@keyframes featureCardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.6));
    }
}

/* Product Card Animations */
@keyframes productCardSlide {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* World Map Animations */
@keyframes mapPinBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Button Animations */
@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    }
    50% {
        box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.4);
    }
}

/* Apply Animations */

/* Hero Image */
.hero-main-img {
    animation: heroImageFloat 4s ease-in-out infinite;
}

.hero-image:hover .hero-main-img {
    animation: heroImageGlow 2s ease-in-out infinite;
}

/* Feature Cards */
.feature-card:hover {
    animation: featureCardFloat 2s ease-in-out infinite;
}

.feature-card:hover .feature-img {
    animation: iconGlow 2s ease-in-out infinite;
}

/* Product Cards */
.product-card {
    animation: productCardSlide 0.6s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* World Map Pins */
.map-pin {
    animation: mapPinBounce 2s ease-in-out infinite;
}

.map-pin.usa { animation-delay: 0s; }
.map-pin.japan { animation-delay: 0.5s; }
.map-pin.thailand { animation-delay: 1s; }
.map-pin.india { animation-delay: 1.5s; }

/* Buttons */
.btn-primary:hover {
    animation: buttonPulse 0.3s ease-in-out;
}

.btn-primary:active {
    animation: buttonGlow 0.3s ease-in-out;
}

/* Smooth Transitions */
.feature-card,
.product-card,
.btn,
.nav-link,
.hero-main-img,
.feature-img,
.product-img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects */
.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-main-img:hover {
    transform: scale(1.05);
}

.feature-img:hover,
.product-img:hover {
    transform: scale(1.1);
}

/* Loading Animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header,
.feature-card,
.product-card {
    animation: fadeInUp 0.8s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }

/* Image Loading Animation */
@keyframes imageFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-main-img,
.feature-img,
.product-img,
.map-image,
.qr-image {
    animation: imageFadeIn 0.8s ease-out forwards;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .hero-main-img {
        animation: none;
    }
    
    .feature-card:hover {
        animation: none;
    }
    
    .hero-image:hover .hero-main-img {
        animation: none;
    }
} 