/* Loading Animation */
.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 3px solid rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.loading .loading-spinner {
    display: block;
}

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

/* Loading State for Load More Button */
#loadMoreBtn.loading {
    position: relative;
    color: transparent;
}

#loadMoreBtn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Fade Effects for Projects */
.project-card {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.project-card.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.project-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Filter Button Active State */
.filter-btn.active {
    position: relative;
}

.filter-btn.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}
