/* Micro Animations and Effects */

/* 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.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce Animation */
@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);
    }
}

/* Emoji Float Animation */
@keyframes emojiFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        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);
    }
}

/* Apply animations to elements */
.hero h1 {
    animation: fadeIn 1s ease-out;
}

.hero p {
    animation: fadeInLeft 1s ease-out 0.3s both;
}

.cta-button {
    animation: scaleIn 0.8s ease-out 0.6s both;
}

.seo-section {
    animation: slideUp 0.8s ease-out both;
}

.seo-section:nth-child(1) { animation-delay: 0.1s; }
.seo-section:nth-child(2) { animation-delay: 0.3s; }
.seo-section:nth-child(3) { animation-delay: 0.5s; }

.emoji-animation {
    animation: emojiFloat 3s ease-in-out infinite;
}

.whatsapp-link {
    animation: pulse 2s ease-in-out infinite;
}

/* Button hover animations */
.btn-phone:hover,
.btn-whatsapp-header:hover,
.cta-button:hover,
.cta-whatsapp:hover {
    animation: glow 1s ease-in-out;
}

/* Header gradient animation */
.header {
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Footer section animations */
.footer-section {
    animation: fadeIn 1s ease-out both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.3s; }
.footer-section:nth-child(3) { animation-delay: 0.5s; }
.footer-section:nth-child(4) { animation-delay: 0.7s; }

/* Sitemap animations */
.sitemap-section {
    animation: slideUp 0.8s ease-out both;
}

.sitemap-section:nth-child(1) { animation-delay: 0.1s; }
.sitemap-section:nth-child(2) { animation-delay: 0.3s; }
.sitemap-section:nth-child(3) { animation-delay: 0.5s; }
.sitemap-section:nth-child(4) { animation-delay: 0.7s; }
.sitemap-section:nth-child(5) { animation-delay: 0.9s; }

/* Link hover animations */
.sitemap-links a:hover,
.sitemap-links-grid a:hover {
    animation: scaleIn 0.3s ease-out;
}

/* Loading animation for images */
@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hover effects with transitions */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar animation */
::-webkit-scrollbar-thumb {
    transition: background 0.3s ease;
}

/* Focus animations for accessibility */
a:focus,
button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    animation: glow 1s ease-in-out;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Stagger animations for lists */
.footer-section ul li {
    animation: fadeInLeft 0.5s ease-out both;
}

.footer-section ul li:nth-child(1) { animation-delay: 0.1s; }
.footer-section ul li:nth-child(2) { animation-delay: 0.2s; }
.footer-section ul li:nth-child(3) { animation-delay: 0.3s; }
.footer-section ul li:nth-child(4) { animation-delay: 0.4s; }
.footer-section ul li:nth-child(5) { animation-delay: 0.5s; }
.footer-section ul li:nth-child(6) { animation-delay: 0.6s; }
.footer-section ul li:nth-child(7) { animation-delay: 0.7s; }

/* Card hover effects */
.seo-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Interactive elements */
.cta-button:active,
.cta-whatsapp:active,
.whatsapp-link:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Background pattern animation */
.hero::before {
    animation: shimmer 20s linear infinite;
}

/* Logo animation on hover */
.logo a:hover h1 {
    animation: bounceIn 0.6s ease-out;
}

/* Progressive enhancement */
@supports (backdrop-filter: blur(10px)) {
    .header {
        backdrop-filter: blur(10px);
        background: rgba(30, 60, 114, 0.9);
    }
}

/* Intersection Observer animations (will be controlled by JS) */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

