/* ===========================
   TOC — NEON STYLE FOR YOUR SITE
=========================== */

/* можно просто добавить эту переменную к своим root-переменным */
:root {
  --tocMaxWidth: 1400px;
}

/* ===== Общая обёртка ===== */

.toc {
  background: transparent;
}

.toc.wrapper {
  width: min(var(--tocMaxWidth), 92vw);
  margin-inline: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.toc .swiper {
  padding: 0 4px 16px !important;
  padding-top: 0 !important;
}

.toc .swiper-wrapper {
  padding-top: 18px;
  padding-bottom: 22px;
  justify-content: flex-start;
}

.toc .swiper-slide {
  width: fit-content;
}

/* Заголовок */
.toc h2 {
  white-space: nowrap;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ===== Ссылки (неоновые таблетки) ===== */

.toc a {
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
  border: 1px solid rgba(120, 214, 255, 0.6);
  padding: 7px 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, rgba(10, 22, 80, 0.9), #050712);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(1, 3, 12, 1);
}

/* Hover / Focus — неоновый градиент cyan → lilac → hot pink */
.toc a:hover,
.toc a:focus {
  color: #01030a;
  background: linear-gradient(120deg, #ffffff, var(--accent), var(--accent-hot));
  background-size: 200%;
  border-color: transparent;
 
  transform: translateY(-1px);
}

/* Active — без доп. сдвига */
.toc a:active {
  transform: translateY(0);
}

/* Доступность */
.toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}

/* ===== Scrollbar ===== */

.toc-swiper {
  max-width: var(--tocMaxWidth);
  margin-inline: auto;
}

.toc-swiper .swiper-scrollbar {
  background: rgba(12, 20, 60, 0.8);
  height: 3px;
  border-radius: 999px;
}

.toc-swiper .swiper-scrollbar-drag {
  background: linear-gradient(120deg, #28e0ff, #9aa7ff, #ff4fa3);
  border-radius: 999px;
}

/* выравнивание скроллбара по ширине контейнера */
.swiper-horizontal > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-horizontal {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* ===== Мобилка ===== */
@media screen and (max-width: 750px) {
  .toc.wrapper {
    width: min(100vw, 92vw);
  }

  .swiper-horizontal > .swiper-scrollbar,
  .swiper-scrollbar.swiper-scrollbar-horizontal {
    width: 92% !important;
    margin: 0 auto;
  }

  .toc .swiper-wrapper {
    padding-top: 14px;
    padding-bottom: 20px;
  }

  .toc a {
    font-size: 11px;
    padding: 7px 16px;
  }
}
