/* ============================================
   ANIMATIONS
   Electrotécnica PRO - IPET N°66
   ============================================ */

/* ============================================
   FADE ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@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);
    }
}

/* ============================================
   SCALE ANIMATIONS
   ============================================ */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {

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

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

/* ============================================
   ROTATION ANIMATIONS
   ============================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

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

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

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

/* ============================================
   GLOW ANIMATIONS
   ============================================ */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5),
            0 0 10px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8),
            0 0 30px rgba(59, 130, 246, 0.5);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 1));
    }
}

/* ============================================
   SLIDE ANIMATIONS
   ============================================ */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ============================================
   SHAKE ANIMATION
   ============================================ */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* ============================================
   GRADIENT ANIMATION
   ============================================ */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

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

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

/* ============================================
   SHIMMER EFFECT
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

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

/* ============================================
   TYPING ANIMATION
   ============================================ */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   UTILITY ANIMATION CLASSES
   ============================================ */
.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.5s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.5s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease forwards;
}

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

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

.animate-shake {
    animation: shake 0.5s ease;
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.6s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.7s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.8s;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform var(--transition-normal);
}

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

.hover-glow:hover {
    animation: glow 1s ease-in-out;
}

.hover-scale {
    transition: transform var(--transition-fast);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* ============================================
   PROGRESS BAR ANIMATION
   ============================================ */
@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.progress-bar {
    animation: progressBar 2s ease forwards;
}