/* Animações adicionais e efeitos especiais */

/* Animação de entrada para elementos */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Animação de escala */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Efeito de hover para cards */
.hover-lift {
    transition: all 0.3s ease;
}

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

/* Animação de loading para botões */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efeito de digitação */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #e74c3c;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #e74c3c; }
}

/* Efeito de ondulação */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Animação de pulso */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Efeito de brilho */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.glow:hover::before {
    left: 100%;
}

/* Animação de rotação suave */
.rotate-slow {
    animation: rotateSlow 20s linear infinite;
}

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

/* Efeito de parallax para texto */
.parallax-text {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Animação de bounce */
.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Efeito de shake */
.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Animação de fade */
.fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fade.show {
    opacity: 1;
}

/* Efeito de slide */
.slide-up {
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.slide-up.show {
    transform: translateY(0);
}

.slide-down {
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}

.slide-down.show {
    transform: translateY(0);
}

.slide-left {
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.slide-left.show {
    transform: translateX(0);
}

.slide-right {
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.slide-right.show {
    transform: translateX(0);
}

/* Animação de zoom */
.zoom-in {
    transform: scale(0);
    transition: transform 0.5s ease;
}

.zoom-in.show {
    transform: scale(1);
}

.zoom-out {
    transform: scale(2);
    transition: transform 0.5s ease;
}

.zoom-out.show {
    transform: scale(1);
}

/* Efeito de flip */
.flip {
    transform: perspective(400px) rotateY(90deg);
    transition: transform 0.6s ease;
}

.flip.show {
    transform: perspective(400px) rotateY(0deg);
}

/* Animação de loading dots */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
  
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}
