.list-group-item {
  width: 100%;
  padding: 0;
  margin: 0 10px 14px 0;
  border: 1px solid #e3e8ef;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.list-group-item:first-child {
  border-radius: 22px;
}

.list-group-item:last-child {
  border-radius: 22px;
}

.list-group-item:hover {
  transform: translateY(-2px);
  border-color: #d3dcec;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  background: #fff !important;
}

.ii-card {
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.ii-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ii-card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.ii-card__title:hover {
  color: #3f6dcb;
}

.ii-card__title img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border-radius: 12px;
}

.ii-card__title h3 {
  font-size: 16px;
  margin-bottom: 0px !important;
}

/* Бейдж статуса сервиса */
.ii-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;

  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* Общая точка статуса */
.ii-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

/* Лучший выбор */
.ii-status--best {
  background: #c8f9ff;
  color: #00a5b8;
}

.ii-status--best::before {
  background: #00a5b8;
}

/* Работает в России */
.ii-status--success {
  background: #eef8df;
  color: #5d8a1f;
}

.ii-status--success::before {
  background: #78ab43;
  box-shadow: 0 0 0 0 rgba(120, 171, 67, 0.45);
  animation: neygen-status-pulse 1.8s infinite;
}

/* Доступ может быть ограничен */
.ii-status--warning {
  background: #fff6dc;
  color: #b88a00;
}

.ii-status--warning::before {
  background: #b88a00;
}

/* Легкая пульсация зеленой точки */
@keyframes neygen-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(120, 171, 67, 0.45);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(120, 171, 67, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(120, 171, 67, 0);
  }
}

/* Уважаем системную настройку уменьшения анимаций */
@media (prefers-reduced-motion: reduce) {
  .ii-status--success::before {
    animation: none;
  }
}

.ii-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0 0;
}

.ii-card__badges .ai-badge {
  height: 26px;
  padding: 5px 8px;
  font-size: 12px;
}

.ii-card__description {
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
  color: #263247;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.ii-capabilities__description[hidden] {
  display: none;
}

.ii-card__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f5;
}

.ii-card__meta-row {
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.35;
}

.ii-card__meta-row span {
  min-width: 125px;
  color: #7b8493;
}

.ii-card__meta-row strong {
  color: #333e50;
  font-weight: 700;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef8df;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.ii-card__yes {
  color: #5d8a1f !important;
}

.ii-card__no {
  /* color: #64748b !important; */
}

.ii-buttons {
  display: flex;
  gap: 15px;
}

.ii-button {
  flex-grow: 1;
  background: #3f6ecb;
  box-shadow: 0 4px 10px rgba(63, 110, 203, .14);
  transition: background-color .25s, color .25s, box-shadow .25s, border-color .25s;
  margin-top: 15px;
  border-radius: 6px;
  flex-direction: row;
  justify-content: center;
}

.ii-button a {
  display: block;
  color: #fff;
  font-size: 16px;
  text-align: center;
  padding: 10px;
}

.ii-button:hover {
  background: #315db2;
  box-shadow: 0 4px 10px rgba(63, 110, 203, .14);
}

.ii-button-secondary {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.ii-button-secondary a {
  padding: 10px 0 0;
}

.ii-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.ii-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: .18s ease;
}

.ii-card__btn--primary {
  background: #3f6dcb;
  color: #fff;
  box-shadow: 0 6px 14px rgba(63, 110, 203, .18);
}

.ii-card__btn--primary:hover {
  background: #315db2;
  color: #fff;
}

.ii-card__btn--secondary {
  background: #f5f7fb;
  color: #3f6dcb;
  border: 1px solid #dbe4f3;
}

.ii-card__btn--secondary:hover {
  background: #eef4ff;
  color: #315db2;
  border-color: #c9d8f2;
}

/**
 * Файл: listing.css
 * Назначение: переключатель сортировки сервисов в листингах Neygen.
 */

.ai-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.ai-sort__label {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.ai-sort__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-sort__link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #dbe4f5;
  border-radius: 999px;
  background: #ffffff;
  color: #3f6ecb;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

.ai-sort__link:hover {
  border-color: #3f6ecb;
  background: #f7f9ff;
  color: #2e6ff1;
}

.ai-sort__link.is-active {
  border-color: #3f6ecb;
  background: #3f6ecb;
  color: #ffffff;
}

/* Файл: listing.css
   Блок: категории листингов в левом фильтре.
   Назначение: аккордеон категорий нейросетей под фильтрами. */

.ai-sidebar-categories {}

.ai-sidebar-categories__title {
  margin: 0 0 12px;
  color: #14213d;
  font-size: 16px;
  font-weight: 800;
}

.ai-sidebar-category {
  margin: 0;
  overflow: hidden;
}

.ai-sidebar-category[open] {
  border-color: #c9dda8;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.ai-sidebar-category__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 11px 12px;
  color: #5f6f86;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ai-sidebar-category__summary::-webkit-details-marker {
  display: none;
}

.ai-sidebar-category__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid #8492a6;
  border-bottom: 2px solid #8492a6;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.ai-sidebar-category[open] .ai-sidebar-category__summary::after {
  transform: rotate(225deg);
}

.ai-sidebar-category__summary-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.ai-sidebar-category__summary-main i {
  width: 16px;
  font-size: 14px;
  text-align: center;
}

.ai-sidebar-category__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f5fb;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.ai-sidebar-category__links {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.32s ease,
    opacity 0.22s ease;
}

.ai-sidebar-category__links-inner {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin-bottom: 0;
}

.ai-sidebar-category__link {
  display: block;
  padding: 8px;
  border-radius: 10px;
  color: #31405f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition: 0.18s ease;
}

.ai-sidebar-category__link:hover {
  background: #f5f8ff;
  color: #3f6dcb;
  text-decoration: none;
}

.ai-sidebar-category.is-active>.ai-sidebar-category__summary {
  background: #edf3ff;
  color: #3f6dcb;
  border-radius: 6px;
}

.ai-sidebar-category.is-active>.ai-sidebar-category__summary i {
  color: #3f6dcb;
}

.ai-sidebar-category__link.is-active {
  color: #3f6dcb;
  font-weight: 800;
}

/**
 * Файл: media/templates/site/cassiopeia/css/neygen/listing.css
 * Блок: другие ИИ-сервисы внизу листинга.
 * Назначение: компактная перелинковка на сервисы, которых нет в текущей подборке.
 */

.neygen-other-services {
  margin: 62px 0 44px;
  padding: 28px;
  background: #fff;
  border: 1px solid #e1e8ff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.neygen-other-services__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.neygen-other-services-title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  color: #1f2d3d;
}

.neygen-other-services__head p {
  margin: 0;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.6;
  color: #667085;
}

.neygen-other-services__all {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #3f6ecb;
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.neygen-other-services__all:hover {
  background: #2e5fbd;
  transform: translateY(-1px);
}

/**
 * Файл: media/templates/site/cassiopeia/css/neygen/listing.css
 * Блок: другие ИИ-сервисы — автоскролл без дублей.
 * Назначение: одна строка сервисов с плавным движением туда-обратно.
 */

.neygen-other-services__marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0,
      #000 42px,
      #000 calc(100% - 42px),
      transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0,
      #000 42px,
      #000 calc(100% - 42px),
      transparent 100%);
}

.neygen-other-services__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: neygenServicesScrollPingPong 120s ease-in-out infinite alternate;
  will-change: transform;
}

.neygen-other-services:hover .neygen-other-services__track {
  animation-play-state: paused;
}

.neygen-other-service {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 220px;
  min-height: 58px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  color: #1f2d3d;
  text-decoration: none;
  transition: 0.2s ease;
}

.neygen-other-service:hover {
  border-color: #3f6ecb;
  box-shadow: 0 8px 20px rgba(63, 110, 203, 0.12);
  transform: translateY(-1px);
}

.neygen-other-service__logo,
.neygen-other-service__placeholder {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.neygen-other-service__logo {
  object-fit: contain;
  background: #f7f9ff;
}

.neygen-other-service__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf4ff;
  color: #3f6ecb;
  font-size: 12px;
  font-weight: 900;
}

.neygen-other-service__title {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes neygenServicesScrollPingPong {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-100% + 100vw - 80px), 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .neygen-other-services__marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .neygen-other-services__track {
    animation: none;
  }
}

/**
 * Файл: user.css
 * Назначение: оформление возможностей сервиса в карточках Neygen.
 *
 * Логика:
 * - первые 3 возможности видны сразу и выглядят как основные преимущества;
 * - дополнительные возможности раскрываются через JS по кнопке "Показать ещё";
 * - оформление компактное, без перегруза карточки.
 */

.ii-capabilities {
  padding: 0 0 15px 0;
  /* min-height: 130px; */
}

.ii-capabilities__list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ii-capabilities__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 0;
  padding-left: 18px;
  color: #263247;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.ii-capabilities__item::before {
  content: "\f00c";
  position: absolute;
  left: 0;
  top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #eef8df;
  color: #5d8a1f;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 8px;
  line-height: 1;
}

/* Дополнительные возможности после раскрытия */
.ii-capabilities__item--extra {
  /* color: #4b5870; */
  font-weight: 500;
}

.ii-capabilities__item--extra::before {
  background: #eef8df;
  color: #5d8a1f;
}

.ii-capabilities__item[hidden] {
  display: none;
}

.ii-capabilities__more {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3f6ecb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.ii-capabilities__more:hover {
  color: #2e6ff1;
}

/**
 * Файл: user.css
 * Назначение: оформление ссылки "Подробнее о сервисе" после раскрытия возможностей.
 */

.ii-capabilities__details {
  text-decoration: none !important;
}

/* Файл: listing.css
   Блок: рейтинг Neygen в карточке сервиса
   Назначение: выводит компактную оценку сервиса под названием рядом с логотипом */

.ii-card__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ii-card__title {
  align-items: flex-start;
}

.ii-card__title-content {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ii-card__title-content h3 {
  margin: 0;
}

.ii-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;

  padding: 5px 9px 5px 6px;
  border: 1px solid #e3ebff;
  border-radius: 999px;

  background: linear-gradient(180deg, #f8faff 0%, #f1f5ff 100%);
  color: #344054;

  font-size: 12px;
  line-height: 1;
  text-decoration: none;

  box-shadow: 0 4px 10px rgba(63, 110, 203, 0.08);
}

.ii-card__rating-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 19px;
  height: 19px;
  border-radius: 50%;

  background: #3f6ecb;
  color: #ffffff;

  font-size: 10px;
  flex: 0 0 auto;
}

.ii-card__rating-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ii-card__rating-text span {
  color: #667085;
  font-weight: 700;
  white-space: nowrap;
}

.ii-card__rating-text strong {
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ii-card__title:hover .ii-card__rating {
  border-color: #cddaff;
  background: #f7f9ff;
}

/**
 * Файл: media/templates/site/cassiopeia/css/neygen/listing.css
 * Блок: кнопка "В избранное" в карточке ИИ-сервиса.
 * Назначение: компактная кнопка с inline-SVG, без псевдоэлементов.
 */

.ii-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ii-card__rating-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.ii-button__favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  gap: 6px;
  min-height: 32px;
  padding: 10px;
  border: 1px solid #d7e3ff;
  border-radius: 6px;
  background: #ffffff;
  color: #3f6ecb;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 6px 14px rgba(63, 110, 203, 0.10);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.ii-button__favorite-icon {
  flex: 0 0 auto;
  display: block;
  width: 16px;
  height: 16px;
  color: currentColor;
  transform: translateY(-0.5px);
}

.ii-button__favorite:hover {
  background: #f7f9ff;
  border-color: #b9ccf6;
  color: #2f58aa;
  box-shadow: 0 8px 18px rgba(63, 110, 203, 0.16);
  transform: translateY(-1px);
}

.ii-button__favorite:focus-visible {
  outline: none;
  border-color: #3f6ecb;
  box-shadow:
    0 0 0 4px rgba(63, 110, 203, 0.14),
    0 8px 18px rgba(63, 110, 203, 0.16);
}

.ii-button__favorite:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

/**
 * Будущее состояние после реального добавления в избранное.
 */
.ii-button__favorite.is-active {
  background: #5d8a1f;
  border-color: #5d8a1f;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(63, 110, 203, 0.22);
}

.ii-button__favorite.is-active .ii-button__favorite-icon path {
  fill: currentColor;
  stroke: currentColor;
}

.ii-button__favorite.is-active span {
  color: #ffffff;
}

/**
 * Временное состояние, пока backend избранного не подключён.
 */
.ii-button__favorite.is-waiting {
  background: #f8fafc;
  border-color: #e4eaf6;
  color: #667085;
  box-shadow: none;
}

.ii-scores {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-right: 8px;
  font-size: 12px;
  line-height: 1.2;
}

.ii-scores__item {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f5fb3;
  font-weight: 700;
  white-space: nowrap;
}

.ii-scores__item--muted {
  background: #f3f4f6;
  color: #6b7280;
}

@media (max-width: 560px) {
  .ii-card__rating {
    gap: 5px;
  }

  .ii-button__favorite {
    display: none;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .ii-button__favorite-icon {
    width: 15px;
    height: 15px;
  }
}

.ai-count-page {
  margin: 0 0 21px 15px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}

.neygen-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 10px;
}

.neygen-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #dfe7f5;
  border-radius: 12px;
  background: #ffffff;
  color: #24324a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: 0.18s ease;
}

.neygen-pagination__item:hover {
  border-color: #3f6ecb;
  color: #3f6ecb;
  background: #f7f9ff;
}

.neygen-pagination__item.is-active {
  border-color: #3f6ecb;
  background: #3f6ecb;
  color: #ffffff;
  cursor: default;
}

.neygen-pagination__item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.neygen-pagination__item--disabled:hover {
  border-color: #dfe7f5;
  color: #24324a;
  background: #ffffff;
}

.neygen-pagination__item--dots {
  border-color: transparent;
  background: transparent;
  color: #9ca3af;
  min-width: 24px;
  padding: 0 4px;
}

.neygen-pagination__item--dots:hover {
  border-color: transparent;
  background: transparent;
  color: #9ca3af;
}

@media (max-width: 1100px) {
  .neygen-other-services__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .neygen-other-services__track {
    animation-duration: 42s;
  }

  .neygen-other-service {
    width: 190px;
    min-height: 54px;
  }

  .neygen-other-services {
    padding: 20px;
    margin-top: 32px;
  }

  .neygen-other-services__head {
    flex-direction: column;
  }

  .neygen-other-services-title {
    font-size: 22px;
  }

  .neygen-other-services__all {
    width: 100%;
  }

  .neygen-other-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .neygen-other-services__track {
    animation-duration: 28s;
  }

  .neygen-other-service {
    width: 190px;
    min-height: 54px;
  }

  .ai-sort {
    display: none;
  }
}

@media (max-width: 680px) {
  .ii-card__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ai-sort {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-sort__links {
    gap: 6px;
  }

  .ai-sort__link {
    font-size: 12px;
    padding: 5px 9px;
  }
}

@media (max-width: 520px) {
  .ii-card__rating {
    padding-right: 8px;
  }
}

@media (max-width: 480px) {
  .neygen-other-services__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 320px) {
  .ii-card__top {
    flex-direction: column;
  }
}