/* Animations CSS File */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(123, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(123, 58, 237, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(123, 58, 237, 0.3);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Animation Classes */
.animate-on-scroll {
    animation-duration: 0.7s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

.fade-in {
    animation-name: fadeIn;
}

.slide-up {
    animation-name: slideUp;
}

.slide-down {
    animation-name: slideDown;
}

.slide-left {
    animation-name: slideInLeft;
}

.slide-right {
    animation-name: slideInRight;
}

.scale-up {
    animation-name: scaleUp;
}

.pulse {
    animation-name: pulse;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

.glow {
    animation-name: glow;
    animation-duration: 3s;
    animation-iteration-count: infinite;
}

/* Element-specific animations */
.hero-container {
    opacity: 0;
    animation-name: fadeIn;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

.hero-text h1 {
    opacity: 0;
    animation: slideInLeft 1s 0.3s forwards;
}

.hero-text p {
    opacity: 0;
    animation: slideInLeft 1s 0.5s forwards;
}

.hero-text .btn {
    opacity: 0;
    animation: slideInLeft 1s 0.7s forwards;
}

.hero-image {
    opacity: 0;
    animation: slideInRight 1s 0.5s forwards;
}

.section-title {
    opacity: 0;
    animation: slideUp 0.8s forwards;
}

.section-subtitle {
    opacity: 0;
    animation: fadeIn 1s 0.3s forwards;
}

.servico-card, .portfolio-item, .about-card, .info-item {
    opacity: 0;
}

.servico-card.animate-on-scroll, 
.portfolio-item.animate-on-scroll, 
.about-card.animate-on-scroll, 
.info-item.animate-on-scroll {
    animation-name: slideUp;
}

.staggered-parent {
    overflow: hidden;
}

.staggered-item {
    opacity: 0;
}

.staggered-item.animate-on-scroll {
    animation-name: slideUp;
}

/* Cursor typing effect */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-color);
    width: 0;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink 1s step-end infinite;
}

/* Modern hover effects */
.modern-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-hover::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: all 0.6s ease;
}

.modern-hover:hover::before {
    left: 100%;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
