/* Custom Styles and Animations for Equilíbrio */

/* Base animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes growLine {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

/* Animação de Equilíbrio (Pendular/Flutuante) */
@keyframes equilibrar {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        /* Inclina levemente para a esquerda enquanto sobe */
        transform: translateY(-15px) rotate(-6deg);
    }
    50% {
        /* Retorna ao centro */
        transform: translateY(0) rotate(0deg);
    }
    75% {
        /* Inclina levemente para a direita enquanto sobe */
        transform: translateY(-15px) rotate(6deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.animate-balance {
    animation: equilibrar 6s ease-in-out infinite;
}

/* Animação da bolha de nível */
@keyframes moveBubble {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        /* Logo inclina p/ esquerda, bolha sobe p/ direita */
        transform: translateX(50%);
    }
    50% {
        transform: translateX(0);
    }
    75% {
        /* Logo inclina p/ direita, bolha sobe p/ esquerda */
        transform: translateX(-50%);
    }
}

.animate-bubble {
    animation: moveBubble 6s ease-in-out infinite;
}

/* Initial state for elements to be animated on scroll */
.opacity-0 {
    opacity: 0;
}

/* Classes applied by JavaScript when element is in view */
.fade-up.in-view {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide-in-left.in-view {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right.in-view {
    animation: slideInRight 0.8s ease-out forwards;
}

.line-grow.in-view {
    animation: growLine 2s ease-out forwards;
}

/* Smooth scrolling override (though tailwind scroll-smooth covers it mostly) */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #009A5F; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #007a4b; 
}

/* Navbar active state */
.nav-link-active {
    color: #009A5F !important;
}
