/* Animation Keyframes */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes gradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }

    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        max-height: 500px;
        opacity: 1;
    }

    to {
        max-height: 0;
        opacity: 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(180deg);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(249, 115, 22, 0.4);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

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

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

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-gradient {
    animation: gradient 8s linear infinite;
    background-size: 200% auto;
}

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

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Delay utilities */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Transition utilities */
.transition-all {
    transition: all 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

/* Hover effects */
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.animated>*:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.stagger-children.animated>*:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.stagger-children.animated>*:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.stagger-children.animated>*:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.stagger-children.animated>*:nth-child(5) {
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

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

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.6s linear infinite;
}

/* Chart animations */
.chart-bar-before,
.chart-bar-after {
    transition: height 0.5s ease-out;
}

/* Mobile menu animation */
@media (max-width: 768px) {
    #mobile-menu {
        transition: max-height 0.3s ease-out;
    }

    #mobile-menu.open {
        animation: slideDown 0.3s ease-out;
    }
}

/* Workflow connector line animation - Smooth Traveling Light Effect */
@keyframes travelingLight {
    0% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.workflow-connector-line {
    /* Gradiente laranja compacto com fade-out suave nas extremidades */
    background: linear-gradient(to bottom,
            transparent 0%,
            transparent 46%,
            rgba(249, 115, 22, 0.3) 48%,
            /* Laranja fraco no início */
            rgba(249, 115, 22, 0.9) 50%,
            /* Laranja forte no centro */
            rgba(249, 115, 22, 0.3) 52%,
            /* Laranja fraco no fim */
            transparent 54%,
            transparent 100%);

    /* Faz o gradiente ser muito maior que o container */
    background-size: 100% 300%;

    /* Anima a posição do gradiente de forma contínua */
    animation: travelingLight 5s linear infinite;
    animation-delay: 0.5s;
}