/* Filter Form */
.af-filter-form {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.af-filter-form select,
.af-filter-form input,
.af-filter-form button {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1 1 calc(33.33% - 20px); /* Ensures equal size and spacing on larger screens */
    min-width: 150px; /* Sets a minimum width for smaller screens */
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.af-filter-form button {
    background: #253163;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* Spinner Loader */
.spinner {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner img {
    width: 50px;
    height: 50px;
}

/* Grid Display */
.af-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.af-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.af-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.af-item img {
    width: 100%;
    height: auto;
}

.af-item h3 {
    font-size: 18px;
    margin: 10px 0;
    padding: 0 10px;
}

.af-item p {
    padding: 0 10px 10px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .af-grid {
        grid-template-columns: 1fr;
    }

    .af-filter-form {
        gap: 10px;
    }

    .af-filter-form select,
    .af-filter-form input,
    .af-filter-form button {
        flex: 1 1 100%; /* Makes each element take full width */
        margin-bottom: 10px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination-btn {
    padding: 10px 15px;
    background: #ddd;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.pagination-btn:hover {
    background: #253163;
    color: #fff;
}