/* Scroll Animations & Transitions */

/* Estado inicial dos elementos que serão animados */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Estado visível após scroll */
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animações com delay para efeito cascata */
.stagger-reveal > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-reveal > *.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animação de fade in suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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 fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Animação de float para elementos flutuantes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Animação de pulse suave */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Efeito de glass morphism para navbar */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.8);
}

/* Navbar com scroll */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dark nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Transições suaves para modo escuro */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Remover transição de transform para não conflitar com animações */
.reveal,
.stagger-reveal > * {
    transition-property: opacity, transform;
}

/* Hover effects suaves */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Animação de escala para botões */
button, a {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

button:active, a:active {
    transform: scale(0.98);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Loading state para imagens */
img {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.2s forwards;
}

.faq-item.active .faq-content {
    max-height: 500px;
    animation: fadeIn 0.4s ease-out;
}

.faq-item.active i[data-lucide="chevron-down"] {
    transform: rotate(180deg);
}

/* Gradient animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Loader para transições de página */
.page-transition {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Parallax smooth */
.parallax {
    will-change: transform;
}

/* Performance optimization */
.reveal,
.stagger-reveal > * {
    will-change: opacity, transform;
}

.reveal.is-visible,
.stagger-reveal > *.is-visible {
    will-change: auto;
}

/* Reduce motion para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal,
    .stagger-reveal > * {
        opacity: 1;
        transform: none;
    }
}