/**
 * Styles pour la pagination du widget HB Posts Grid
 * 
 * @package Hugo_Blocks_For_Elementor
 * @since 1.0.0
 */

/* ========================================
   PAGINATION
   ======================================== */

.hb-posts-pagination {
  margin-top: 40px;
  text-align: center;
}

/* Pagination avec numéros */
.hb-pagination-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hb-pagination-numbers a,
.hb-pagination-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #f8f9fa;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.hb-pagination-numbers a:hover {
  background: #007cba;
  color: #fff;
  transform: translateY(-2px);
}

.hb-pagination-numbers .current {
  background: #007cba;
  color: #fff;
  font-weight: 600;
}

.hb-pagination-numbers .dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  color: #999;
  font-weight: 500;
}

/* Pagination Précédent/Suivant */
.hb-pagination-prev-next {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.hb-pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: #007cba;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.hb-pagination-btn:hover {
  background: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.hb-pagination-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Bouton "Charger plus" */
.hb-pagination-load-more {
  text-align: center;
}

.hb-load-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  background: #007cba;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hb-load-more-btn:hover {
  background: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.hb-load-more-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Scroll infini */
.hb-pagination-infinite {
  text-align: center;
  padding: 20px;
}

.hb-infinite-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #666;
}

.hb-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.hb-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 12px;
}

.hb-loading-overlay .hb-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.hb-posts-grid {
  position: relative;
}

/* Animation d'apparition des nouvelles cartes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hb-post-card {
  animation: fadeInUp 0.4s ease-out;
}

/* ========================================
   RESPONSIVE PAGINATION
   ======================================== */

@media (max-width: 768px) {
  .hb-pagination-numbers {
    gap: 4px;
  }

  .hb-pagination-numbers a,
  .hb-pagination-numbers span {
    min-width: 35px;
    height: 35px;
    padding: 0 8px;
    font-size: 14px;
  }

  .hb-pagination-prev-next {
    gap: 15px;
  }

  .hb-pagination-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .hb-load-more-btn {
    padding: 10px 24px;
    font-size: 14px;
  }
}
