/* ==================================================
   SEARCH SECTION
================================================== */

.ggm-search-wrapper {
  padding: 2.5rem 0;
  background: linear-gradient(
    180deg,
    rgba(33, 67, 134, 0.05) 0%,
    rgba(33, 67, 134, 0.02) 100%
  );
}

.ggm-search-input-wrapper {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

/* Input */
.ggm-search-field {
  width: 100%;
  padding: 0.9rem 1.2rem;
  padding-right: 2.8rem;
  padding-left: 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  background: #fff;
  box-shadow:
    0 12px 30px rgba(33, 67, 134, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

/* Focus */
.ggm-search-field:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(33, 67, 134, 0.12);
}

/* Search icon */
.ggm-search-input-wrapper::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
}

.ggm-search-field:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(33, 67, 134, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.06);
}

/* =====================================
   SEARCH LOADER
===================================== */

.ggm-search-loader {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(33, 67, 134, 0.2);
  border-top: 2px solid var(--color-primary);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ggm-search-loader.active {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: ggm-spin 0.8s linear infinite;
}

/* ==================================================
   ARCHIVE GRID
================================================== */

.ggm-archive-section {
  padding: 3rem 0;
  overflow: hidden; /* prevents bottom gap */
}

.ggm-cards-grid {
  display: grid;
  gap: 1.8rem;
  /* grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); */
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  justify-content: center;
  margin-bottom: 0;

  /* gap: 1.5rem;
  grid-template-columns: 1fr; */
}

.ggm-cards-grid.loading {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.ggm-archive-pagination {
  margin-top: var(--space-4);
  display: flex;
  justify-content: center;
}

.ggm-archive-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
}

.ggm-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding-inline: 0.9rem;
  border-radius: var(--radius-round);
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(33, 67, 134, 0.06);
}

.ggm-archive-pagination .page-numbers:hover {
  background: rgba(33, 67, 134, 0.06);
  border-color: rgba(33, 67, 134, 0.18);
}

.ggm-archive-pagination .page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

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