.filter-projects {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 14px;
}
.filter-projects button {
    margin: 0;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Layout for first row - 4 columns (3 large + 1 small status) */
.filter-row:first-child .filter-group:nth-child(1),
.filter-row:first-child .filter-group:nth-child(2),
.filter-row:first-child .filter-group:nth-child(3) {
    flex: 2;
    min-width: calc(23% - 10px);
}

.filter-row:first-child .filter-group:nth-child(4) {
    flex: 1;
    min-width: calc(15% - 10px);
}

/* Layout for second row - 4 columns (3 large + 1 small button) */
.filter-row:nth-child(2) .filter-group:nth-child(1),
.filter-row:nth-child(2) .filter-group:nth-child(2),
.filter-row:nth-child(2) .filter-group:nth-child(3) {
    flex: 2;
    min-width: calc(23% - 10px);
}

.filter-row:nth-child(2) .filter-group:nth-child(4) {
    flex: 1;
    min-width: calc(15% - 10px);
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group .project-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group .project-filter-input {
    height: 40px;
    box-sizing: border-box;
    margin: 0;
}

.filter-group .project-filter-input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.filter-group .project-filter-input::placeholder {
    color: #999;
}

.filter-group .select2-container {
    width: 100% !important;
}

.filter-group .select2-container--default .select2-selection--single {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-group
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    line-height: 38px;
    padding-left: 12px;
}

.filter-group
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 38px;
}

.filter-actions {
    display: none;
}

.btn-filter {
    background: #007cba;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-filter:hover {
    background: #005a87;
}

.btn-reset {
    background: #666;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-reset:hover {
    background: #444;
}

.project-loading {
    text-align: center;
    padding: 40px 0;
    display: none;
}

.project-loading.active {
    display: block;
}

.project-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Select2 Custom Styling */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
}

.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: #007cba;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f0f0f0;
    color: #333;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.select2-container--default .select2-selection--single:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* No results styling */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #888;
    margin: 0;
}

/* Result count */
.result-count {
    margin: 15px 0;
    font-weight: 600;
    color: #666;
}

/* Search input with icon */
.search-group .search-wrapper {
    position: relative;
}

.search-group .search-wrapper .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.search-group .project-filter-input {
    padding-right: 40px;
}

/* Button group styling */
.button-group .button-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.button-group .btn-filter {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.button-group .btn-reset {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 600;
}
#project-filter-form {
    margin-bottom: 0;
}
/* Reset button row styling */
.reset-row {
    display: none;
}

.reset-row .btn-reset {
    width: 150px;
    height: 40px;
    margin: 0 auto;
    display: block;
}

/* Ajax Pagination Styles */
.ajax-pagination {
    margin: 30px 0;
    text-align: center;
}

.ajax-pagination .flatsome-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.ajax-pagination .pagination-link,
.ajax-pagination .pagination-current {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.ajax-pagination .pagination-link:hover {
    background-color: #f0f0f0;
    border-color: #007cba;
    color: #007cba;
}

.ajax-pagination .pagination-current {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
    cursor: default;
}

.ajax-pagination .pagination-prev,
.ajax-pagination .pagination-next {
    padding: 8px 16px;
    font-weight: 600;
}

.ajax-pagination .pagination-dots {
    display: inline-block;
    padding: 8px 4px;
    color: #999;
    font-weight: bold;
}

/* Loading state for pagination */
.ajax-pagination.loading {
    opacity: 0.5;
    pointer-events: none;
}

.ajax-pagination .pagination-link.loading {
    background-color: #f0f0f0;
    color: #999;
    cursor: wait;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .ajax-pagination .flatsome-pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    .ajax-pagination .pagination-link,
    .ajax-pagination .pagination-current {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 14px;
    }

    .ajax-pagination .pagination-prev,
    .ajax-pagination .pagination-next {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ajax-pagination .pagination-dots {
        display: none;
    }

    .ajax-pagination .pagination-link,
    .ajax-pagination .pagination-current {
        padding: 4px 8px;
        min-width: 30px;
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100% !important;
        flex: none !important;
    }

    .button-group .button-wrapper {
        flex-direction: row;
        gap: 10px;
    }

    .button-group .btn-filter,
    .button-group .btn-reset {
        width: auto;
        flex: 1;
        height: 40px;
        font-size: 12px;
    }

    .filter-projects h3 {
        text-align: center;
        margin-bottom: 20px;
    }

    .filter-group label {
        font-size: 14px;
    }

    .btn-filter,
    .btn-reset {
        padding: 12px 20px;
        font-size: 14px;
    }
}
