.pagination {
  display: flex;
  justify-content: center;
  margin: 60px 0;
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Only the links are pressable. The item used to show the hand over the
   current page and the «…» as well, and the «…» even rose on hover, so it
   looked like a button that did nothing. */
.pagination__item {
  display: inline-block;
}

.pagination__link.dots,
.pagination__link.active {
  cursor: default;
}

.pagination__link,
.pagination .current {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 42px;
  height: 42px;
  padding: 5px 15px;
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text-heading);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-bg-secondary);
  transition: 0.2s ease-in-out;
  transition-property: color, background-color, border-color, transform, text-decoration-color, height, padding;
}

a.pagination__link:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-link);
  border-color: var(--color-border);
}

.pagination .current,
.pagination__item.active .pagination__link {
  background: var(--color-blue-200);
  color: var(--color-white);
  font-weight: 700;
  border-color: var(--color-blue-200);
  pointer-events: none;
}

.pagination__item .pagination__link.active {
  background-color: var(--color-blue-200);
  color: var(--color-white);
  border-color: var(--color-blue-100);
  font-weight: 700;
}

.pagination .prev,
.pagination .next {
  font-weight: 700;
}

.menu__lang {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__lang .current-lang a {
  cursor: pointer;
}

.menu__lang .lang-item {
  display: block;
  background-color: var(--color-bg-primary);
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.menu__lang .lang-item a {
  display: flex;
  align-items: center;
  padding: 8px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.menu__lang .lang-item img {
  width: 20px !important;
  height: auto !important;
  transition: transform 0.3s ease;
}

.menu__lang .lang-item:not(.current-lang) {
  display: block;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  pointer-events: none;
  transform: translateY(-10px);
  /* Hidden, not just transparent, so Tab does not land on a flag nobody can
     see; visibility flips only after the fade-out has finished. */
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  border-top: none;
}

.menu__lang.is-open .lang-item:not(.current-lang) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

.menu__lang .lang-item a:hover {
  background-color: var(--color-bg-secondary);
}
