/* Micro-animations para elementos interativos */

/* Animação de entrada suave para seções */
@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);
    }
}

/* Animação para botões com efeito de brilho */
@keyframes buttonGlow {
    0% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 30px rgba(40, 167, 69, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
}

/* Animação para gradientes móveis */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animação de flutuação suave */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animação de rotação suave para ícones */
@keyframes gentleRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animação de escala pulsante */
@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Animação de texto digitando */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Animação de fade in escalonado */
@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplicação das animações */

/* Header animations */
.main-header {
    animation: slideInFromTop 0.8s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo animation */
.logo {
    animation: fadeInScale 1s ease-out 0.2s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation links stagger animation */
.nav-link:nth-child(1) { animation: fadeInStagger 0.6s ease-out 0.4s both; }
.nav-link:nth-child(2) { animation: fadeInStagger 0.6s ease-out 0.5s both; }
.nav-link:nth-child(3) { animation: fadeInStagger 0.6s ease-out 0.6s both; }
.nav-link:nth-child(4) { animation: fadeInStagger 0.6s ease-out 0.7s both; }

/* Hero animations */
.hero-content h1 {
    animation: slideInFromLeft 1s ease-out 0.3s both;
}

.hero-content p {
    animation: slideInFromLeft 1s ease-out 0.6s both;
}

.hero-buttons {
    animation: slideInFromBottom 1s ease-out 0.9s both;
}

.hero-visual {
    animation: slideInFromRight 1.2s ease-out 0.5s both;
}

/* Emoji floating animation */
.emoji-animation {
    animation: float 3s ease-in-out infinite;
}

/* WhatsApp button pulse */
.whatsapp-link {
    animation: buttonGlow 3s ease-in-out infinite;
}

/* Hover animations */
.btn-cta-primary:hover {
    animation: scalePulse 0.6s ease-in-out;
}

.btn-whatsapp-cta:hover {
    animation: gradientShift 0.8s ease-in-out infinite;
}

/* Section titles */
.seo-content h2 {
    animation: slideInFromLeft 0.8s ease-out both;
}

.seo-content h2:nth-child(1) { animation-delay: 0.1s; }
.seo-content h2:nth-child(2) { animation-delay: 0.2s; }
.seo-content h2:nth-child(3) { animation-delay: 0.3s; }
.seo-content h2:nth-child(4) { animation-delay: 0.4s; }
.seo-content h2:nth-child(5) { animation-delay: 0.5s; }
.seo-content h2:nth-child(6) { animation-delay: 0.6s; }
.seo-content h2:nth-child(7) { animation-delay: 0.7s; }

/* Footer animations */
.footer-section {
    animation: fadeInUp 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; }

/* Loading animation for images */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Micro-interactions */
.btn-phone:hover::before,
.btn-whatsapp-header:hover::before {
    animation: gentleRotate 0.5s ease-in-out;
}

/* Focus animations for accessibility */
button:focus,
a:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    animation: focusPulse 0.3s ease-in-out;
}

@keyframes focusPulse {
    0% {
        outline-color: var(--primary-blue);
    }
    50% {
        outline-color: var(--primary-yellow);
    }
    100% {
        outline-color: var(--primary-blue);
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
}
