/* Center the filters and add spacing */
#filters {
    max-width: 800px; /* Adjust as needed */
    margin: 0 auto;
}

/* Set minimum width for filter buttons */
#filters .btn {
    min-width: 120px;
}

/* Active button styling */
.btn.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.btn-outline-primary.active {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-secondary.active {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive adjustments for filter buttons */
@media (max-width: 576px) {
    #filters .btn {
        min-width: 100%;
        padding: 10px 15px;
        font-size: 1rem;
    }
}

/* Loading Spinner Styles */
#events-listing.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

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

/* Positioning for the spinner */
#events-listing {
    position: relative;
}

/* Ensure event cards have consistent heights */
.card.h-100 {
    display: flex;
    flex-direction: column;
}

/* Style the event images */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Style the badge for ended events */
.badge {
    font-size: 0.9rem;
}

/* Hover effect for event cards */
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s;
}

/* Ensure filters wrap properly */
#filters {
    flex-wrap: wrap;
}

/* Additional spacing for filters */
#filters .btn {
    margin-bottom: 10px;
}