/* Animations */

/* ===== ANIMAÇÕES BÁSICAS ===== */
@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 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);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ANIMAÇÕES ESPECÍFICAS ===== */

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--white); }
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Slide Animation */
@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Spin Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fill Progress Animation */
@keyframes fillProgress {
    from {
        width: 0%;
    }
}

/* ===== CLASSES DE ANIMAÇÃO ===== */

/* Fade in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* Enhanced fade in with scale */
.fade-in-scale {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.8s ease-out;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fade-in-scale:nth-child(1) { transition-delay: 0s; }
.fade-in-scale:nth-child(2) { transition-delay: 0.1s; }
.fade-in-scale:nth-child(3) { transition-delay: 0.2s; }
.fade-in-scale:nth-child(4) { transition-delay: 0.3s; }
.fade-in-scale:nth-child(5) { transition-delay: 0.4s; }
.fade-in-scale:nth-child(6) { transition-delay: 0.5s; }

/* Side slide animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px) scale(0.9);
    transition: all 0.8s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
    transition: all 0.8s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.slide-in-left:nth-child(1) { transition-delay: 0s; }
.slide-in-left:nth-child(2) { transition-delay: 0.2s; }
.slide-in-left:nth-child(3) { transition-delay: 0.4s; }

.slide-in-right:nth-child(1) { transition-delay: 0s; }
.slide-in-right:nth-child(2) { transition-delay: 0.2s; }
.slide-in-right:nth-child(3) { transition-delay: 0.4s; }

/* ===== ELEMENTOS ANIMADOS ===== */

/* Animate text */
.animate-text {
    animation: fadeInUp 0.8s ease-out;
}

.animate-text-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-frame {
    animation: scaleIn 1s ease-out 0.5s both;
}

/* Header animation */
#header {
    transition: transform 0.3s ease-in-out;
}

/* Mobile menu animation */
nav {
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        z-index: 999;
        padding: 80px 20px;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu-toggle.active {
        color: var(--primary);
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

/* Hover effects */
.card,
.banner,
.exp-card,
.btn-primary,
.btn-secondary,
.btn-small {
    transition: all 0.3s ease;
}

/* Special delays for how-we-do section */
.how-we-do h2.fade-in-scale { transition-delay: 0s; }
.how-we-do h3.fade-in-scale { transition-delay: 0.2s; }
.how-we-do p.fade-in-scale { transition-delay: 0.4s; }
.how-we-do .feature:nth-child(1).fade-in-scale { transition-delay: 0.6s; }
.how-we-do .feature:nth-child(2).fade-in-scale { transition-delay: 0.8s; }
.how-we-do .btn-secondary.fade-in-scale { transition-delay: 1s; }