/* ===============================================
   PORTFOLIO PAGINATION SYSTEM STYLES
   Modern, responsive pagination with smooth animations
   =============================================== */

/* Pagination Wrapper */
.pagination-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Pagination Controls Header */
.pagination-header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(14, 14, 14, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(102, 217, 239, 0.2);
  backdrop-filter: blur(10px);
}

/* Search Section */
.pagination-search {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.pagination-search input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(102, 217, 239, 0.3);
  border-radius: 25px;
  color: #f0f0f0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination-search input:focus {
  outline: none;
  border-color: #66d9ef;
  box-shadow: 0 0 20px rgba(102, 217, 239, 0.3);
  background: rgba(26, 26, 26, 0.95);
}

.pagination-search input::placeholder {
  color: rgba(240, 240, 240, 0.5);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(240, 240, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.search-clear:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

/* Filter Buttons */
.pagination-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-btn {
  padding: 8px 16px;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(102, 217, 239, 0.3);
  border-radius: 20px;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(102, 217, 239, 0.1);
  border-color: #66d9ef;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #66d9ef, #a6e22e);
  color: #0e0e0e;
  border-color: transparent;
  font-weight: 600;
}

.filter-btn .count {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.filter-btn.active .count {
  background: rgba(14, 14, 14, 0.4);
  color: #0e0e0e;
}

/* Results Info */
.pagination-info {
  font-size: 14px;
  color: rgba(240, 240, 240, 0.7);
  font-weight: 500;
}

.current-results {
  background: rgba(102, 217, 239, 0.1);
  padding: 8px 12px;
  border-radius: 15px;
  border: 1px solid rgba(102, 217, 239, 0.3);
}

.current-results .start,
.current-results .end,
.current-results .total {
  color: #66d9ef;
  font-weight: 700;
}

/* Progress Bar */
.pagination-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: rgba(26, 26, 26, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(102, 217, 239, 0.2);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(102, 217, 239, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #66d9ef, #a6e22e);
  border-radius: 3px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.progress-text {
  font-size: 14px;
  color: rgba(240, 240, 240, 0.8);
  font-weight: 500;
  white-space: nowrap;
}

.progress-text .current-page,
.progress-text .total-pages {
  color: #66d9ef;
  font-weight: 700;
}

/* Content Area */
.pagination-content {
  margin-bottom: 30px;
}

.pagination-loading {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Navigation Controls */
.pagination-navigation {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(14, 14, 14, 0.8);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(102, 217, 239, 0.2);
  backdrop-filter: blur(10px);
}

/* Navigation Buttons */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(102, 217, 239, 0.3);
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(102, 217, 239, 0.1);
  border-color: #66d9ef;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 217, 239, 0.3);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.nav-btn .nav-icon {
  font-size: 16px;
  font-weight: bold;
}

/* Page Numbers */
.page-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 10px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(102, 217, 239, 0.3);
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background: rgba(102, 217, 239, 0.1);
  border-color: #66d9ef;
  transform: scale(1.1);
}

.page-btn.active {
  background: linear-gradient(135deg, #66d9ef, #a6e22e);
  color: #0e0e0e;
  border-color: transparent;
  font-weight: 700;
  transform: scale(1.1);
}

.page-ellipsis {
  padding: 0 8px;
  color: rgba(240, 240, 240, 0.5);
  font-weight: bold;
}

/* Shortcuts and Controls */
.pagination-shortcuts {
  display: flex;
  gap: 10px;
}

.shortcut-btn {
  padding: 8px 16px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(102, 217, 239, 0.3);
  border-radius: 6px;
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shortcut-btn:hover:not(:disabled) {
  background: rgba(102, 217, 239, 0.1);
  border-color: #66d9ef;
}

.shortcut-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-size-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(240, 240, 240, 0.8);
}

.page-size-controls label {
  font-weight: 500;
}

.page-size-controls select {
  padding: 6px 12px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(102, 217, 239, 0.3);
  border-radius: 6px;
  color: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
}

.page-size-controls select:focus {
  outline: none;
  border-color: #66d9ef;
}

/* Item Animations */
.pagination-item,
.project-card,
.hero-project-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.pagination-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pagination-wrapper {
    padding: 15px;
  }
  
  .pagination-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .pagination-search {
    min-width: auto;
    max-width: none;
  }
  
  .pagination-filters {
    justify-content: center;
  }
  
  .filter-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .pagination-progress {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .pagination-nav {
    flex-direction: column;
    gap: 15px;
  }
  
  .page-numbers {
    order: -1;
    margin: 0;
  }
  
  .nav-btn {
    width: 100%;
    justify-content: center;
  }
  
  .pagination-shortcuts,
  .page-size-controls {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .shortcut-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-btn {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
  
  .filter-btn {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .filter-btn .count {
    font-size: 10px;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .pagination-search input {
    background: rgba(14, 14, 14, 0.9);
  }
  
  .pagination-header,
  .pagination-progress,
  .pagination-nav {
    background: rgba(14, 14, 14, 0.9);
  }
}

/* Print styles */
@media print {
  .pagination-wrapper {
    display: none;
  }
}