/* 
 * Animation Utilities
 * Keyframes, transitions, and animation definitions
 */

/* Loading Spinner Animation */
@keyframes ppg-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Heart Pulse Animation */
@keyframes heartPulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.2); 
    }
    100% { 
        transform: scale(1); 
    }
}

/* Gallery Loading Animation */
@keyframes ppg-pulse {
    0% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
    100% { 
        opacity: 1; 
    }
}

/* Apply loading animation */
.ppg-wrapper.ppg-loading .ppg-item {
    animation: ppg-pulse 1.5s ease-in-out infinite;
}

/* Fade In Animation for New Content */
@keyframes ppg-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ppg-item {
    animation: ppg-fadeIn 0.3s ease-out;
}

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

.ppg-filters-row {
    animation: ppg-slideDown 0.4s ease-out;
}

/* Bounce Animation for Interactive Elements */
@keyframes ppg-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Scale Animation for Buttons */
@keyframes ppg-scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Subtle hover animations */
.ppg-item:hover {
    animation: none; /* Override default to prevent conflicts */
}

/* Custom easing functions */
.ppg-smooth-ease {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ppg-bounce-ease {
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Performance optimizations */
.ppg-item,
.ppg-star,
.ppg-filter,
.ppg-heart {
    will-change: transform;
}

/* Reduce animations on slower devices */
@media (update: slow) {
    .ppg-item,
    .ppg-star,
    .ppg-filter,
    .ppg-heart {
        transition-duration: 0.1s;
        animation-duration: 0.5s;
    }
}