/* Micro Animations CSS */

/* Fade In Animation */
@keyframes fadeIn {
    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);
    }
}

/* Scale Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleHover {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Slide Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@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);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulseSoft {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.8), 0 0 30px rgba(52, 152, 219, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Typing Animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Wave Animation */
@keyframes wave {
    0%, 60%, 100% {
        transform: initial;
    }
    30% {
        transform: translateY(-15px);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Apply animations to elements */

/* Header animations */
header {
    animation: slideDown 0.8s ease-out;
}

.emoji-animation {
    animation: floatSlow 3s ease-in-out infinite;
}

/* Hero section animations */
.hero-content h1 {
    animation: fadeInLeft 1s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeInLeft 1s ease-out 0.4s both;
}

.cta-button {
    animation: bounceIn 1s ease-out 0.6s both;
}

.hero-placeholder {
    animation: scaleIn 1s ease-out 0.8s both;
}

/* Content sections animations */
.content-container {
    animation: fadeIn 0.8s ease-out both;
}

.content-container:nth-child(1) { animation-delay: 0.1s; }
.content-container:nth-child(2) { animation-delay: 0.2s; }
.content-container:nth-child(3) { animation-delay: 0.3s; }
.content-container:nth-child(4) { animation-delay: 0.4s; }
.content-container:nth-child(5) { animation-delay: 0.5s; }
.content-container:nth-child(6) { animation-delay: 0.6s; }
.content-container:nth-child(7) { animation-delay: 0.7s; }

/* WhatsApp button animation */
.whatsapp-float a {
    animation: bounce 2s ease-in-out infinite;
}

/* Map section animation */
.map-section {
    animation: scaleIn 1s ease-out 0.5s both;
}

/* Footer animations */
.footer-container {
    animation: slideUp 1s ease-out both;
}

.footer-section {
    animation: fadeIn 0.8s ease-out both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }
.footer-section:nth-child(5) { animation-delay: 0.5s; }
.footer-section:nth-child(6) { animation-delay: 0.6s; }

/* Hover animations */
.cta-button:hover {
    animation: scaleHover 0.3s ease forwards;
}

.logo a:hover {
    animation: shake 0.5s ease;
}

.map-link:hover {
    animation: glow 1s ease-in-out infinite;
}

/* Loading animation for hero placeholder */
.hero-placeholder::before {
    animation: pulseSoft 2s ease-in-out infinite;
}

/* Intersection Observer animations (will be controlled by JavaScript) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for lists */
.stagger-animation li {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.5s ease both;
}

.stagger-animation li:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation li:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation li:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation li:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation li:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation li:nth-child(6) { animation-delay: 0.6s; }
.stagger-animation li:nth-child(7) { animation-delay: 0.7s; }

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile-specific animation adjustments */
@media (max-width: 768px) {
    .hero-content h1,
    .hero-content p,
    .cta-button,
    .hero-placeholder {
        animation-duration: 0.6s;
    }

    .content-container {
        animation-duration: 0.6s;
    }

    .footer-section {
        animation-duration: 0.6s;
    }
}