/* pager */
/*
nav.pager {
    display: block;
    clear: both;
    width: 100%;
}
nav.pager:before {
    clear: both;
    display: block;
    content: '';
}

.pager__items:after {
	clear: both;
	display: block;
	content: '';
}
.pager__items li {
	float: left;
}

nav.pager {
	margin-top: 30px;
}

ul.pager__items li.pager__item a {
	float: left;
    display: block;
    width: 50px;
    height: 50px;
    margin-right: 1px;
    line-height: 50px;
    text-align: center;
    background-color: #fafafa;
    color: #202121;
    transition: all 0.3s ease-in-out;
    box-shadow: none !important;
    border-bottom: solid 0px !important;
}
ul.pager__items li.pager__item.pager__item--last a,
ul.pager__items li.pager__item.pager__item--first a { width: auto; padding-left: 10px; padding-right: 10px; }

ul.pager__items li.pager__item a:hover {
	background-color: rgba(189,92,63,0.3) !important;
}

ul.pager__items li.is-active a,
ul.pager__items li.is-active a:hover {
	background-color: rgba(189,92,63,1) !important;
  	color: white !important;
}
*/

/* =========================================
   Постраничная навигация (Pager)
   ========================================= */
nav.pager {
  width: 100%;
  margin: 32px 0 16px;
}

ul.pager__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.pager__items li.pager__item {
  margin: 0;
  padding: 0;
}

/* Общие стили для ссылок и активного элемента */
ul.pager__items li.pager__item a,
ul.pager__items li.is-active a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #2b2927;
  background-color: #faf9f6; /* Единый фон с карточками */
  border: none;
  text-decoration: none;
  box-shadow: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Кнопки «Первая», «Предыдущая», «Следующая», «Последняя» */
ul.pager__items li.pager__item--first a,
ul.pager__items li.pager__item--previous a,
ul.pager__items li.pager__item--next a,
ul.pager__items li.pager__item--last a {
  padding: 0 14px;
}

/* Состояние при наведении */
ul.pager__items li.pager__item a:hover {
  background-color: #f2efe9 !important;
  border-color: #8c4a27;
  color: #8c4a27 !important;
}

/* Активная (текущая) страница */
ul.pager__items li.is-active a,
ul.pager__items li.is-active a:hover {
  background-color: rgba(189,92,63,1) !important; /* Фирменный терракотовый акцент */
  border-color: #8c4a27 !important;
  color: #ffffff !important;
  font-weight: 600;
  cursor: default;
}

/* Многоточие (разделитель страниц в Drupal) */
ul.pager__items li.pager__item--ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 42px;
  color: #7a756d;
  font-size: 14px;
  user-select: none;
}

/* =========================================
   Мобильная версия (экраны меньше 520px)
   ========================================= */
@media (max-width: 520px) {
  ul.pager__items {
    gap: 4px;
  }

  ul.pager__items li.pager__item a,
  ul.pager__items li.is-active a {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  /* Скрываем крайние кнопки «Первая» и «Последняя» на узких экранах, 
     чтобы навигация не занимала 3 строки (остаются стрелки Назад/Вперед и цифры) */
  ul.pager__items li.pager__item--first,
  ul.pager__items li.pager__item--last {
    display: none;
  }
}
