/* css/animations.css - Animacje */

/* Animacje fade-in i slide-up */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
}

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

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

/* Animacje dla klas z delay */
.fade-in.delay-100 { animation-delay: 0.1s; }
.fade-in.delay-200 { animation-delay: 0.2s; }
.fade-in.delay-300 { animation-delay: 0.3s; }
.fade-in.delay-400 { animation-delay: 0.4s; }

.slide-up.delay-100 { animation-delay: 0.1s; }
.slide-up.delay-200 { animation-delay: 0.2s; }
.slide-up.delay-300 { animation-delay: 0.3s; }
.slide-up.delay-400 { animation-delay: 0.4s; }

/* Animacje hover dla kart */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

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

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

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Animacje dla przycisków */
.btn-primary, .btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
}

/* Animacje dla ikon */
.icon-wrapper {
    transition: transform 0.3s ease;
}

.card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Animacje dla grup hover */
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

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

.group:hover .group-hover\:rotate-180 {
    transform: rotate(180deg);
}

/* Animacje dla nawigacji */
.dropdown-menu {
    transition: all 0.3s ease;
}

.mobile-menu {
    transition: all 0.3s ease;
}

.mobile-menu-content {
    transition: transform 0.3s ease;
}

/* Animacje dla elementów w viewport */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animacje dla loading states */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Animacje dla gradientów */
.gradient-animation {
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animacje dla tekstu */
.text-gradient {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #06B6D4);
    background-size: 200% 200%;
    animation: textGradient 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animacje dla floating elementów */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

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

/* Animacje dla scale hover */
.scale-hover {
    transition: transform 0.3s ease;
}

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

/* Animacje dla blur-in */
.blur-in {
    filter: blur(5px);
    opacity: 0;
    animation: blurIn 0.8s ease-out forwards;
}

@keyframes blurIn {
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* Responsive animacje */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Animacje dla fokusa */
.focus-ring {
    transition: all 0.2s ease;
}

.focus-ring:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Animacje dla stanu loading */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}