/* === ANIMATIONS.CSS ===
 * assets/css/animations.css
 * НАЗНАЧЕНИЕ: Анимации и переходы
 */

/* ============================================
   KEYFRAMES
   ============================================ */

/* Fade In с небольшим подъемом */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In без движения */
@keyframes fadeInSimple {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Float (для декоративных элементов) */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 20px hsl(var(--primary) / 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 40px hsl(var(--primary) / 0.5);
    }
}

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

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Shimmer (для skeleton loading) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Accordion Down */
@keyframes accordionDown {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: var(--radix-accordion-content-height);
        opacity: 1;
    }
}

/* Accordion Up */
@keyframes accordionUp {
    from {
        height: var(--radix-accordion-content-height);
        opacity: 1;
    }
    to {
        height: 0;
        opacity: 0;
    }
}

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

.animate-fade-in-simple {
    animation: fadeInSimple 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

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

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

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

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

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

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

/* ============================================
   STAGGERED ANIMATIONS
   ============================================ */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 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; }

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        hsl(var(--muted)) 25%,
        hsl(var(--muted) / 0.5) 50%,
        hsl(var(--muted)) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* ============================================
   TRANSITIONS
   ============================================ */
.transition-fast {
    transition: all 0.15s ease;
}

.transition-normal {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.3s ease;
}

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

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

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

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px hsl(var(--primary) / 0.15);
}

.hover-scale {
    transition: transform 0.2s ease;
}

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

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px hsl(var(--primary) / 0.3);
}
