/**
 * Файл: assets/css/animations.css
 * Назначение: Анимации для сайта IVECH
 * Версия: 1.0
 */

/* ============================================================
   1. FADE ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    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);
    }
}

/* ============================================================
   2. SLIDE ANIMATIONS
   ============================================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   3. SCALE ANIMATIONS
   ============================================================ */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 102, 204, 0.4);
    }
}

/* ============================================================
   4. ROTATE ANIMATIONS
   ============================================================ */

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

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

/* ============================================================
   5. КЛАССЫ ДЛЯ ИСПОЛЬЗОВАНИЯ
   ============================================================ */

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

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

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

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

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

.anim-slide-up {
    animation: slideUp 0.7s ease-out forwards;
}

.anim-slide-down {
    animation: slideDown 0.7s ease-out forwards;
}

.anim-slide-left {
    animation: slideLeft 0.7s ease-out forwards;
}

.anim-slide-right {
    animation: slideRight 0.7s ease-out forwards;
}

.anim-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

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

.anim-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.anim-spin {
    animation: spin 3s linear infinite;
}

.anim-spin-slow {
    animation: spinSlow 8s linear infinite;
}

/* ============================================================
   6. ЗАДЕРЖКИ ДЛЯ АНИМАЦИЙ
   ============================================================ */

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1.0s; }

/* ============================================================
   7. АНИМАЦИЯ ДЛЯ БУКВ IVECH
   ============================================================ */

@keyframes letterReveal {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.letter-reveal {
    animation: letterReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================================
   8. ПРОГРЕСС-БАР ДЛЯ STORIES
   ============================================================ */

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

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    flex: 1;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    animation: progressBar 5s linear forwards;
}

/* ============================================================
   9. ПАРАЛЛАКС (для фона)
   ============================================================ */

@keyframes parallaxSlow {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.parallax-slow {
    animation: parallaxSlow 6s ease-in-out infinite;
}

@keyframes parallaxMedium {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.parallax-medium {
    animation: parallaxMedium 8s ease-in-out infinite;
}