/* Modern Search Results Styling */

/* Pagination Container */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    gap: 4px;
}

/* Pagination List */
.pagination .search-pagination {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 2px;
}

.pagination .search-pagination li {
    display: inline-flex;
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
}

.pagination .search-pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .search-pagination li a:hover {
    background: #f3f4f6;
    border-color: #C5A95E;
    color: #C5A95E;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Current Page Styling */
.pagination .current-page {
    background-color: transparent !important;
}

.pagination .search-pagination li.current-page a {
    background: #C5A95E !important;
    border-color: #C5A95E;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(197, 169, 94, 0.3);
}

.pagination .search-pagination li.current-page a:hover {
    background: #b89b52 !important;
    border-color: #b89b52;
    transform: none;
}

/* Previous/Next Buttons */
.pagination .prev-page,
.pagination .next-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #666;
    text-decoration: none;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .prev-page:hover,
.pagination .next-page:hover {
    background: #C5A95E;
    border-color: #C5A95E;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pagination .prev-page:disabled,
.pagination .next-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Filter Flex Container */
.filter-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

/* Filter Results Button (Sort) */
.filter-results {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-results:hover {
    background: #C5A95E;
    border-color: #C5A95E;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 169, 94, 0.25);
}

.filter-results i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.filter-results:hover i.fa-arrow-up {
    transform: translateY(-3px);
}

.filter-results:hover i.fa-arrow-down {
    transform: translateY(3px);
}

/* Active Filter State */
.filter-results.active-filter {
    background: #C5A95E;
    border-color: #C5A95E;
    color: #fff;
    box-shadow: 0 2px 4px rgba(197, 169, 94, 0.3);
}

.filter-results.active-filter:hover {
    background: #b89b52;
    border-color: #b89b52;
}

/* Filter Side Container */
.filter-side {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-side .filter-results {
    margin: 0;
}

/* Search Results Heading */
.search-results-heading {
    text-align: center;
    margin: 40px 0 30px;
    padding: 0 20px;
}

.search-results-heading h3 {
    font-size: 28px;
    font-weight: 300;
    color: #333;
    margin: 0;
}

.search-results-heading h3 b {
    font-weight: 600;
    color: #C5A95E;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .filter-flex {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .filter-side {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .filter-results {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .pagination .search-pagination li a {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
    }
    
    .pagination .prev-page,
    .pagination .next-page {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .search-results-heading h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 2px;
    }
    
    .pagination .search-pagination {
        gap: 1px;
    }
    
    .pagination .search-pagination li a {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
        border-radius: 6px;
    }
    
    .filter-results {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-flex,
.pagination,
.search-results-heading {
    animation: fadeInUp 0.5s ease-out;
}

/* Tooltip for sorting */
.filter-results[title] {
    position: relative;
}

.filter-results[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 6px;
    margin-bottom: 8px;
    opacity: 0;
    animation: tooltipFade 0.3s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
}

@keyframes tooltipFade {
    to {
        opacity: 1;
    }
}

/* Enhanced button press effect */
.filter-results:active,
.pagination .prev-page:active,
.pagination .next-page:active,
.pagination .search-pagination li a:active {
    transform: scale(0.95);
    background: #C5A95E !important;
    border-color: #C5A95E !important;
    color: #fff !important;
}

/* Loading state for filters */
.filter-results.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.filter-results.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid #C5A95E;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Bottom pagination spacing */
.pagination.bottom {
    margin-top: 60px;
    margin-bottom: 80px;
}