/* Microanimações Sutis */

/* Animação de entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    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);
    }
}

/* Animação de hover sutil */
@keyframes gentleHover {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Pulsar suave para elementos importantes */
@keyframes subtlePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 255, 227, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 255, 227, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 255, 227, 0);
    }
}

/* Animação de brilho */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Aplicação das animações */

/* Header */
.logo h1 {
    animation: fadeIn 1s ease-out;
}

/* Hero Section */
.hero-content {
    animation: fadeIn 1.2s ease-out 0.2s both;
}

.hero h1 {
    animation: slideInLeft 1s ease-out 0.4s both;
}

.hero p {
    animation: slideInRight 1s ease-out 0.6s both;
}

.cta-buttons {
    animation: scaleIn 1s ease-out 0.8s both;
}

/* WhatsApp flutuante */
.whatsapp-float {
    animation: fadeIn 1s ease-out 2s both;
}

/* Seções de conteúdo */
.content-section {
    animation: fadeIn 1s ease-out both;
    animation-delay: calc(var(--section-delay, 0) * 0.2s);
}

.content-section:nth-child(1) { --section-delay: 1; }
.content-section:nth-child(2) { --section-delay: 2; }
.content-section:nth-child(3) { --section-delay: 3; }
.content-section:nth-child(4) { --section-delay: 4; }
.content-section:nth-child(5) { --section-delay: 5; }
.content-section:nth-child(6) { --section-delay: 6; }
.content-section:nth-child(7) { --section-delay: 7; }
.content-section:nth-child(8) { --section-delay: 8; }
.content-section:nth-child(9) { --section-delay: 9; }

/* Títulos das seções */
.content-section h2 {
    position: relative;
    overflow: hidden;
}

.content-section h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 255, 227, 0.1), transparent);
    animation: shimmer 2s ease-in-out;
    animation-delay: calc(var(--section-delay, 0) * 0.1s + 1s);
}

/* Botões CTA */
.cta-primary,
.cta-secondary,
.cta-tertiary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-primary:hover {
    animation: gentleHover 0.6s ease-in-out;
}

.cta-secondary:hover {
    animation: gentleHover 0.6s ease-in-out;
}

.cta-tertiary:hover {
    animation: gentleHover 0.6s ease-in-out;
}

/* WhatsApp button */
.whatsapp-float a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float a:hover {
    animation: subtlePulse 1.5s infinite;
}

/* Links do sitemap */
.sitemap-section li a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sitemap-section li a:hover {
    animation: slideInRight 0.3s ease-out;
}

/* Efeitos de hover nos cards */
.content-section:hover {
    animation: gentleHover 0.8s ease-in-out;
}

/* Animação de carregamento para elementos */
.loading {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s forwards;
}

/* Microanimações para elementos decorativos */
.cta-content {
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-content:hover::before {
    width: 300px;
    height: 300px;
}

/* Animação sutil para o footer */
.footer-section {
    animation: fadeIn 1s ease-out both;
    animation-delay: 0.5s;
}

/* Efeito de digitação para títulos importantes (opcional) */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.hero h1 {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end), fadeIn 1s ease-out 0.4s both;
}

/* Animações de scroll (Intersection Observer pode ser usado no JS) */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Microanimações para ícones (se houver) */
@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);
    }
}

.icon {
    animation: bounceIn 1s ease-out both;
}

/* Animação de respiração suave para elementos em destaque */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.hero h1 {
    animation: breathe 4s ease-in-out infinite 2s;
}

/* Efeitos de foco para acessibilidade */
.cta-primary:focus,
.cta-secondary:focus,
.cta-tertiary:focus {
    outline: 2px solid #10FFE3;
    outline-offset: 2px;
    animation: subtlePulse 1s ease-in-out;
}

/* Animações reduzidas para preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero h1 {
        animation: none;
    }

    .content-section {
        animation: none;
    }
}
