/* ---------------------------
   Pagination wrapper = card
   --------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  background: var(--card-color);   /* <-- follows theme */
  color: var(--font-color);        /* <-- text follows theme */
  padding: 12px;                   /* inner padding like a card */
  /* border-radius: 16px;             same radius as cards */
  box-shadow: none;                /* flat by default like cards */
  transition: background .2s ease, box-shadow .3s ease, color .2s ease;
  position: relative;              /* creates stacking context */
  z-index: 1;
}

/* ensure internal layout stays the same */
.pagination ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
  align-items: center;
}

/* make buttons sit on top of the wrapper (transparent background so wrapper shows) */
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  background: transparent;         /* buttons are transparent so wrapper color shows */
  color: var(--font-color);        /* button text follows theme */
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, color .2s ease;
}

/* Hover effect — same style physics as article cards */
.pagination a:hover,
.pagination a:focus {
  color: var(--primary-color);
  box-shadow:
    rgba(0, 0, 0, 0.16) 0px 10px 36px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  transform: translateY(-2px);
  background: var(--card-color);   /* keeps hover visually consistent */
}

/* Active: subtle selected look, but still respects theme */
.pagination a.active {
  background: var(--card-color);   /* remain the same card background in both themes */
  color: var(--secondary-color);   /* accent text to indicate selection */
  pointer-events: none;
  box-shadow:
    rgba(0, 0, 0, 0.16) 0px 10px 36px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  transform: translateY(-2px);
  border: 1px solid rgba(0,0,0,0.06);
}

/* Slight tweak for dark theme borders */
[data-theme="dark"] .pagination a.active {
  border-color: rgba(255,255,255,0.04);
}

/* Optional: make the pagination wrapper full-width */
.pagination.fullwidth {
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Active page uses primary color */
.pagination a.active {
  color: var(--secondary-color);                        /* make text readable */
  pointer-events: none;               /* disable clicks */
  font-weight: bold;
  box-shadow:
    rgba(0, 0, 0, 0.16) 0px 10px 36px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  transform: translateY(-2px);
  border: 1px solid var(--primary-color);
}
