/* Microanimações Sutis */

/* Fade In Animation */
@keyframes fadeInUp {
    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);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicar animações de entrada */
.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-ctas {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.seo-section {
    animation: fadeInUp 0.8s ease-out both;
}

.seo-section:nth-child(2) { animation-delay: 0.1s; }
.seo-section:nth-child(3) { animation-delay: 0.2s; }
.seo-section:nth-child(4) { animation-delay: 0.3s; }
.seo-section:nth-child(5) { animation-delay: 0.4s; }

.map-section {
    animation: scaleIn 1s ease-out both;
    animation-delay: 0.2s;
}

.footer-content {
    animation: fadeInUp 0.8s ease-out both;
    animation-delay: 0.1s;
}

/* Sitemap animations */
.sitemap-category {
    animation: fadeInUp 0.6s ease-out both;
}

.sitemap-category:nth-child(1) { animation-delay: 0.1s; }
.sitemap-category:nth-child(2) { animation-delay: 0.2s; }
.sitemap-category:nth-child(3) { animation-delay: 0.3s; }
.sitemap-category:nth-child(4) { animation-delay: 0.4s; }
.sitemap-category:nth-child(5) { animation-delay: 0.5s; }
.sitemap-category:nth-child(6) { animation-delay: 0.6s; }
.sitemap-category:nth-child(7) { animation-delay: 0.7s; }
.sitemap-category:nth-child(8) { animation-delay: 0.8s; }
.sitemap-category:nth-child(9) { animation-delay: 0.9s; }
.sitemap-category:nth-child(10) { animation-delay: 1.0s; }
.sitemap-category:nth-child(11) { animation-delay: 1.1s; }
.sitemap-category:nth-child(12) { animation-delay: 1.2s; }

/* Hover Effects Sutis */
.cta-primary,
.cta-secondary,
.cta-tertiary,
.cta-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.cta-tertiary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

/* Logo hover effect */
.logo a:hover {
    transform: scale(1.02);
}

/* WhatsApp pulse animation */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-link {
    animation: gentlePulse 3s ease-in-out infinite;
}

.whatsapp-link:hover {
    animation-play-state: paused;
    transform: scale(1.1);
}

/* Link hover effects */
a {
    transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-section ul li a:hover,
.sitemap-category ul li a:hover {
    color: #0066cc;
    transform: translateX(5px);
}

/* Background gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#header {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.map-section {
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

/* Subtle loading animation for images */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Text highlight animation */
@keyframes textHighlight {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

.seo-section h2 {
    background-size: 200% 100%;
    animation: textHighlight 4s ease-in-out infinite;
}

/* Card hover effects */
.sitemap-category {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sitemap-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Button press effect */
.cta-primary:active,
.cta-secondary:active,
.cta-tertiary:active,
.cta-button:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Scroll reveal animation */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    animation: slideInFromBottom 0.8s ease-out both;
}

/* Typing effect for hero text (optional) */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Gentle rotation for icons */
@keyframes gentleRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(1deg);
    }
    75% {
        transform: rotate(-1deg);
    }
}

.icon-gentle-rotate:hover {
    animation: gentleRotate 2s ease-in-out infinite;
}

/* Bounce effect for notifications */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Scale on focus for accessibility */
.cta-primary:focus,
.cta-secondary:focus,
.cta-tertiary:focus,
.cta-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    transform: scale(1.02);
}

/* Micro-interactions for form elements (if added later) */
@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    }
}

input:focus,
textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

/* Stagger animation for list items */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    animation: staggerFadeIn 0.5s ease-out both;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* Reduced motion preferences */
@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;
    }

    .whatsapp-link {
        animation: none !important;
    }

    #header,
    .map-section {
        animation: none !important;
    }

    .seo-section h2 {
        animation: none !important;
    }
}
