/* === Блок сортировки книг (общий контейнер) === */
.book-sorting{
  /* border:1px solid #000; */
  width:100%;
  margin-bottom:31px;
}

/* === Заголовочная полоса с кнопками === */
.book-sorting__head{
  display:flex;
  justify-content:center;      /* по центру на ПК */
  align-items:center;
  gap:14px;
  border-bottom:none;          /* убрали нижнюю полосу */
  margin-bottom:8px;
}

/* Элемент вкладки (без нижних подчёркиваний и лишних отступов) */
.book-sorting__cat{
  font-size:23px;
  -webkit-box-sizing:border-box;
  -moz-box-sizing:border-box;
  box-sizing:border-box;
  cursor:pointer;
  color:#b1bfc9;
  flex-shrink:0;
  margin-bottom:0;
  padding:0;                   /* не даём конфликтовать с пилюлей */
  border-bottom:none;
}
.book-sorting__cat.active{
  color:#212121;
  border-bottom:none;
}

/* === Кнопка-вкладка («пилюля») === */
.book-sorting__cat a{
  display:inline-flex;
  justify-content:center;
  align-items:center;

  height:48px;
  padding:0 22px;
  text-decoration:none;

  background:#f5f7fa;
  color:#2b2b2b !important;
  border:1px solid #d6d9de;
  border-radius:14px;

  font-weight:600;
  line-height:1;
  transition:transform .2s, box-shadow .2s, background-color .2s, border-color .2s;
  box-shadow:0 10px 24px -16px rgba(0,0,0,.25);
}
.book-sorting__cat a:hover{
  background:#eef2f8;
  border-color:#cbd3e1;
  transform:translateY(-1px);
  box-shadow:0 14px 28px -18px rgba(0,0,0,.28);
}
.book-sorting__cat.active a{
  background:#ecf2ff;
  border-color:#c7d0ff;
  box-shadow:0 12px 26px -18px rgba(77,59,254,.35);
}

/* === Кнопки-фильтры (как было) === */
.book-sorting__buttons{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:flex-start;
  gap:15px;
  padding-bottom:20px;
}
.book-sorting__buttons-item,
.book-sorting__buttons-item-topbookscontent{
  height:40px;
  line-height:40px;
  display:block;
  float:left;
  padding:0 16px;
  border-radius:40px;
  font-weight:6004;
  color:#b1bfc9;
  cursor:pointer;
  border:none;
  outline:none;
  background-color:transparent;
  flex-shrink:0;
}
.book-sorting__buttons-item.active,
.book-sorting__buttons-item-topbookscontent.active{
  color:#212121;
  background-color:#f0f3f5;
}
.book-sorting__buttons-item:focus,
book-sorting__buttons-item-topbookscontent:focus{
  outline:none;
}

.book-sorting hr{ color:#b1bfc9; }

/* === Остальное — как было в файле === */
.load-more-btn,
.load-more-btn-book,
.load-more-btn-new-book{
  width:100%;
  text-align:center;
  background-color:#f0f3f5;
  height:45px;
  border:none;
  font-weight:600;
  margin:30px 0 20px;
  cursor:pointer;
  transition-duration:.3s;
}
.load-more-btn:hover,
.load-more-btn-book:hover,
.load-more-btn-new-book:hover{ background-color:#dbdfe2; }
.load-more-btn:focus,
.load-more-btn-book:focus,
.load-more-btn-new-book:focus{ outline:none; }

.authors-list__item{ display:flex; align-items:center; }
.authors-list__item svg{ width:20px; height:20px; }
.authors-list__item-name{ font-weight:700; display:table-cell; min-width:215px; }
.authors-list__item-views{ display:table-cell; min-width:115px; }
.authors-list__item-qty{ display:table-cell; }

.page-id-2927 .home-content{ margin-top:0 !important; }

.authors-list{ padding-bottom:50px; display:flex; flex-direction:column; gap:20px; }

.navigation.pagination{ text-align:center; margin:15px 0; }
.page-numbers{ text-decoration:none; background-color:#fff; border:1px solid #ccc; padding:3px 13px; }
.page-numbers.current{ font-weight:700; }

.icon_moon{ width:24px; height:24px; padding:0; border-radius:50%; }
.icon_moon:focus{ outline:none; }
.icon_moon:before{
  display:block; float:left; content:'';
  width:24px; height:24px; margin-left:12px; margin-right:8px;
  background:center center / 24px 24px no-repeat;
  background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjM2IiBmaWxsPSIjYjFiZmM5Ij48ZyBzdHlsZT0iaXNvbGF0aW9uOmlzb2xhdGUiIGZpbGw9IiNiMWJmYzkiPjxwYXRoIGQ9Ik0xNC41NCAxMC4zN2E1LjQgNS40IDAgMCAxLTYuOTEtNi45MS41OS41OSAwIDAgMC0uNzQtLjc1IDYuNjYgNi42NiAwIDAgMC0yLjQ3IDEuNTQgNi42IDYuNiAwIDEgMCAxMC44NyA2Ljg2LjU5LjU5IDAgMCAwLS43NS0uNzRabS0xLjYxIDIuMzlhNS40NCA1LjQ0IDAgMCAxLTcuNjktNy42OSA1LjU4IDUuNTggMCAwIDEgMS0uNzYgNi41NSA2LjU1IDAgMCAwIDcuNDcgNy40NyA1LjE1IDUuMTUgMCAwIDEtLjc4Ljk4WiIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkIiBkYXRhLW5hbWU9IkltYWdlwqAzIiBmaWxsPSIjYjFiZmM5IiAvPjwvZz48L3N2Zz4=);
  background-size:28px;
}
.icon_moon.active:before{
  background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjM2IiBmaWxsPSIjOTlBOUJBIj48ZyBzdHlsZT0iaXNvbGF0aW9uOmlzb2xhdGUiIGZpbGw9IiM5OUE5QkEiPjxwYXRoIGQ9Ik0xNC41NCAxMC4zN2E1LjQgNS40IDAgMCAxLTYuOTEtNi45MS41OS41OSAwIDAgMC0uNzQtLjc1IDYuNjYgNi42NiAwIDAgMC0yLjQ3IDEuNTQgNi42IDYuNiAwIDEgMCAxMC44NyA2Ljg2LjU5LjU5IDAgMCAwLS43NS0uNzRaIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQiIGRhdGEtbmFtZT0iSW1hZ2XCoDgiIGZpbGw9IiM5OUE5QkEiIC8+PC9nPjwvc3ZnPg==);
}

.dark-theme,
.dark-theme .site-header,
.dark-theme .site-content,
.dark-theme .footer-navigation{ background-color:#222; color:#b1bfc9; transition-duration:.3s; }
.dark-theme .site-header{ box-shadow:inset 0 -1px 0 0 #3c3c3c; }
.dark-theme a, .dark-theme a:visited{ color:#b1bfc9; }
.dark-theme .site-footer--style-gray,
.dark-theme .load-more-btn{ background:#1d1d1e; }
.dark-theme textarea, .dark-theme input{ background:#1d1d1e; color:#b1bfc9; }
.dark-theme .last-comments__item-avatar-name{ color:#4eabed; }
.dark-theme .child-categories ul li a{ color:#b8cad0; border:1px solid #b8cad0; }

.authors-list__item-avatar{ margin-right:15px; border-radius:6px; }
.last-comments__item{ display:block; padding-bottom:20px; border-bottom:1px solid #b8cad0; margin-bottom:23px; }
.last-comments__item-wrap{ display:flex; justify-content:flex-start; align-items:center; gap:5px; flex-wrap:wrap; }
.last-comments__item-avatar{ display:flex; justify-content:flex-start; align-items:center; gap:9px; }
.last-comments__item-avatar-name{
  font-weight:700; width:40px; height:40px; display:flex; justify-content:center; align-items:center;
  background-color:#b8cad0; flex-shrink:0;
}
.last-comments__item-avatar-name-item{ display:block; font-weight:700; }
.last-comments__item-content{ display:block; width:100%; }
.last-comments__item-title{ font-weight:700; text-align:left; margin-bottom:4px; }
.last-comments__item-title a{ text-decoration:none; font-weight:500; }

.page-id-2927 .book-sorting__cat{
  display:flex; justify-content:flex-start; align-items:center; gap:5px; border-bottom:3px solid transparent;
}
.page-id-2927 .book-sorting__cat svg{ width:30px; }
.page-id-2927 .book-sorting__cat.active{ border-bottom:3px solid transparent; }

.post-cards--vertical-series{ display:flex; justify-content:flex-start; align-items:flex-start; flex-wrap:wrap; }
.post-cards--vertical-series .post-card__thumbnail img{ width:100%; }

/* === Адаптив === */
@media screen and (max-width:767px){
  .authors-list__item-views, .authors-list__item-name{ min-width:auto; padding-right:10px; }
  .last-comments__item-avatar-name{ font-weight:700; width:30px; height:30px; }
  .book-sorting{ display:block; }

  /* мобильная сетка кнопок: 3 в ряд */
  .book-sorting__head{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
    justify-content:stretch;
    margin-bottom:8px;
    border-bottom:none;
  }
  .book-sorting__cat{ width:100%; flex:unset; font-size:18px; line-height:normal; }
  .book-sorting__cat a{ width:100%; height:44px; padding:0 8px; font-size:16px; border-radius:10px; }

  .icon_moon{ position:absolute; right:30px; top:50px; }
}
@media screen and (max-width:480px){
  .book-sorting__buttons-item, .book-sorting__buttons-item-topbookscontent{ padding:0 11px; font-size:14px; }
}
@media (max-width:380px){
  .book-sorting__head{ grid-template-columns:repeat(2, 1fr); }
}

/*ixstyle*/
div.newbookscontent, div.topbookscontent, div.topcommentscontent{ display:none; }
div.activecontent{ display:grid; }
.topbookscontent_wraper > .book-sorting__buttons{ padding-bottom:20px; }

/* Убрали дубликат .book-sorting { margin-bottom:0; } — оставляем 31px как выше */

@media screen and (max-width:480px){
  .related-posts{ margin:0; padding:0; }
  a.icon_moon{ bottom:-16px; }
}

/* ПК: делаем шрифт менее жирным и сами кнопки шире */
@media (min-width: 768px){
  .book-sorting__cat a{
    font-weight: 500;          /* было 600 — стал менее жирный */
    padding: 0 34px;           /* шире «пилюля» без увеличения текста */
    min-width: 260px;          /* чтобы визуально были пошире */
    height: 50px;              /* можно на 2px выше для баланса */
  }
  .book-sorting__head{
    gap: 18px;                 /* чуть больше интервал между кнопками */
  }
}
