/* Custom Premium Pagination Styling */
.pagination-wrapper {
    margin-top: 30px;
}

.custom-pagination .pagination {
    margin-bottom: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.custom-pagination .page-item {
    margin: 0;
}

.custom-pagination .page-item .page-link {
    border-radius: 12px !important;
    border: 1px solid #178be6;
    color: #178be6;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    background-color: #fff;
}

.custom-pagination .page-item.active .page-link {
    background-color: #178be6;
    border-color: #178be6;
    color: #fff;
    box-shadow: 0 4px 10px rgba(23, 139, 230, 0.3);
}

.custom-pagination .page-item.disabled .page-link {
    color: #b5d5f0;
    border-color: #e0f0ff;
    background-color: #fff;
    pointer-events: none;
}

.custom-pagination .page-item:not(.active):not(.disabled):hover .page-link {
    background-color: #f0f8ff;
    border-color: #178be6;
    color: #178be6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Centering and info text display */
.custom-pagination nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Override Bootstrap's default hiding/flex behavior to stack and center */
.custom-pagination nav > div:not(.d-sm-none) {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: center !important;
    gap: 12px;
    width: 100%;
}

/* Hide the simplified mobile version if it exists */
.custom-pagination nav > div.d-sm-none {
    display: none !important;
}

/* Ensure the results text is centered and styled */
.custom-pagination nav p.text-muted {
    margin-bottom: 0 !important;
    font-size: 15px;
    font-weight: 500;
    color: #444 !important;
    order: 2; /* Put text below pagination buttons */
}

.custom-pagination nav .pagination {
    order: 1; /* Put buttons on top */
}

.custom-pagination nav p.text-muted span {
    color: #178be6;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-pagination .page-link {
        width: 38px;
        height: 38px;
        font-size: 14px;
        border-radius: 10px !important;
    }
    
    .custom-pagination .pagination {
        gap: 5px;
    }
}
