/* ==========================================================================
   ГОРИЗОНТАЛЬНАЯ НАВИГАЦИЯ ПО СОДЕРЖАНИЮ (TOC)
   ========================================================================== */

.one-wins-com-co-toc-horizontal {
  width: 100%;
  margin: 5px auto 0;
  background-image: linear-gradient(110deg, #5a1072, #5a1072 100%);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 999;
  padding: 5px 0;
}

.one-wins-com-co-toc-horizontal__list-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 12px;
  /* Скрываем скроллбар во всех браузерах */
  -ms-overflow-style: none;
  /* IE/Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Скрываем скроллбар в WebKit (Chrome, Safari, Edge) */
.one-wins-com-co-toc-horizontal__list-wrapper::-webkit-scrollbar {
  display: none;
}

.one-wins-com-co-toc-horizontal__list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  min-width: fit-content;
  /* важно для flex + overflow */
}

.one-wins-com-co-toc-horizontal__list li {
  display: flex;
  border-radius: 6px;
  transition: background 0.2s ease;
}

/* Подсветка активного пункта — ИСПОЛЬЗУЕТСЯ .is-active (как в JS) */
.one-wins-com-co-toc-horizontal__list li.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.one-wins-com-co-toc-horizontal__list a {
  display: block;
  padding: 5px;
  text-decoration: none;
  color: #e0e0ff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.one-wins-com-co-toc-horizontal__list li.is-active a {
  color: #ffffff;
  font-weight: 600;
  background: transparent;
}

.one-wins-com-co-toc-horizontal__list a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ========================================================================== */

/* Планшеты и маленькие десктопы */
@media (max-width: 1024px) {
  .one-wins-com-co-toc-horizontal {
    margin: 20px auto 28px;
    padding: 10px 0;
  }

  .one-wins-com-co-toc-horizontal__list a {
    padding: 9px 14px;
    font-size: 14px;
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .one-wins-com-co-toc-horizontal {
    margin: 16px auto 24px;
    border-radius: 8px;
    padding: 8px 0;
  }

  .one-wins-com-co-toc-horizontal__list-wrapper {
    padding: 0 8px;
  }

  .one-wins-com-co-toc-horizontal__list {
    gap: 6px;
  }

  .one-wins-com-co-toc-horizontal__list a {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
  }
}

/* Очень маленькие экраны (iPhone SE и т.п.) */
@media (max-width: 480px) {
  .one-wins-com-co-toc-horizontal__list a {
    padding: 8px 10px;
    font-size: 12px;
  }

  .one-wins-com-co-toc-horizontal {
    margin: 5px auto;
  }
}