/* ===========================
   Pagination
=========================== */
.pagination {
  display: flex;                  /* block-level flex container */
  justify-content: flex-start;    /* align items to the left */
  align-items: center;
  margin: 2rem 0 1rem 0;          /* shift down */
  margin-left: 7px;
  gap: 0;
  width: 100%;                    /* full width */
  float: left;
  clear: both;
  text-size-adjust: 100%;
  font-size: 18px;
  color: rgb(73, 78, 82);
  font-family: -apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  line-height: 1.5;
  box-sizing: border-box;
  padding-top: 1em;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.2rem;       /* smaller padding */
  padding-right: 1ch;
  padding-left: 1ch;
  text-decoration: none;
  color: rgb(73, 78, 82);
  font-weight: 500;
  font-size: 0.7rem;            /* smaller font */
  border: 1px solid #d1d5db;
  border-right: none;
  background-color: #fff;
  transition: all 0.2s ease;
  min-width: 24px;               /* smaller width */
  min-height: 20px;              /* smaller height */
}


/* First item - rounded left corners */
.pagination a:first-child,
.pagination span:first-child {
  border-radius: 3px 0 0 3px;
  border-right: none;
}

/* Last item - rounded right corners and border */
.pagination a:last-child,
.pagination span:last-child {
  border-radius: 0 3px 3px 0;
  border-right: 1px solid #d1d5db;
}

/* Middle items - no rounding */
.pagination a:not(:first-child):not(:last-child),
.pagination span:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Hover states */
.pagination a:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* Current page */
.pagination .current {
  background-color: #d1d5db; /* light gray */
  color: #1f1a1a;            /* text color */
  border-color: #d1d5db;     /* match background */
  font-weight: 600;
  pointer-events: none;
}
/* Disabled states */
.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
  color: #9ca3af;
  background-color: #f9fafb;
}

/* Ellipsis item */
.pagination .ellipsis {
  background-color: #f9fafb;
  color: #6b7280;
  pointer-events: none;
  font-weight: 400;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .pagination {
    margin: 1rem 0;
  }
  
  .pagination a,
  .pagination span {
    padding: 0.2rem 0.35rem;
    min-width: 24px;
    min-height: 22px;
    font-size: 0.65rem;
  }
}
