/* ============================================
   Pagination Styles - Modern & Responsive
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pagination .page-link:hover {
    background-color: #f9fafb;
    border-color: #7c3aed;
    color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.1);
}

.pagination .page-link:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
    z-index: 10;
}

/* Active Page */
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border-color: #7c3aed;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3),
                0 2px 4px -1px rgba(124, 58, 237, 0.2);
    cursor: default;
    transform: scale(1.05);
}

.pagination .page-item.active .page-link:hover {
    transform: scale(1.05);
}

/* Disabled State */
.pagination .page-item.disabled .page-link {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: #f3f4f6;
    transform: none;
    box-shadow: none;
}

/* Previous/Next Buttons */
.pagination .page-link i {
    font-size: 1rem;
}

/* Ellipsis */
.pagination .page-item.disabled .page-link:contains("...") {
    background-color: transparent;
    border-color: transparent;
    cursor: default;
}

/* Page Info Text */
.pagination + div {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 576px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Hide some page numbers on mobile */
    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .pagination .page-link {
        background-color: #1f2937;
        color: #e5e7eb;
        border-color: #374151;
    }
    
    .pagination .page-link:hover {
        background-color: #374151;
        border-color: #7c3aed;
        color: #a78bfa;
    }
    
    .pagination .page-item.disabled .page-link {
        background-color: #111827;
        color: #6b7280;
        border-color: #374151;
    }
}

/* Animation for page transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination {
    animation: fadeIn 0.3s ease-out;
}

/* Hover effect for better UX */
.pagination .page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(109, 40, 217, 0.1) 100%);
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pagination .page-link:hover::before {
    opacity: 1;
}

.pagination .page-link {
    position: relative;
    overflow: hidden;
}
