/* Динамическая разметка каталога (client/js/app.js) */

.catalog-loading--error {
  color: #e53935;
}

.catalog-loading--padded {
  padding: 20px;
}

.catalog-empty {
  text-align: center;
  padding: 60px 16px;
}

.catalog-empty .catalog-empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.catalog-empty .catalog-empty-text {
  margin-top: 16px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.project-card--catalog {
  background: var(--card-bg);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  border-top: 2px solid var(--nvidia-green);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card--catalog .project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-card--catalog .project-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card--catalog .project-card-icon {
  color: var(--nvidia-green);
  font-size: 20px;
}

.project-card--catalog .project-card-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.project-card--catalog .project-card-desc {
  color: #d1d5db;
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.5;
  flex-grow: 1;
}

/* Размеченное описание (descriptionRichText.js) */
@keyframes desc-rich-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes desc-rich-shimmer {
  0% {
    background-position: 120% 50%;
  }
  100% {
    background-position: -20% 50%;
  }
}

.project-card-desc--rich .desc-rich-p,
.project-card-desc--rich .desc-rich-lead {
  margin: 0 0 0.5em;
  color: inherit;
  font-size: inherit;
  line-height: 1.55;
}

.project-card-desc--rich .desc-rich-lead {
  position: relative;
  font-weight: 600;
  color: #f3f4f6;
  padding: 0.55em 0.65em 0.6em 0.75em;
  margin: 0 0 0.65em;
  border-radius: 4px;
  border-left: 3px solid var(--nvidia-green);
  background: linear-gradient(
    105deg,
    rgba(118, 185, 0, 0.16) 0%,
    rgba(118, 185, 0, 0.05) 45%,
    rgba(255, 255, 255, 0.02) 100%
  );
  box-shadow:
    0 0 0 1px rgba(118, 185, 0, 0.12),
    0 8px 28px -14px rgba(0, 0, 0, 0.65);
}

@media (prefers-reduced-motion: no-preference) {
  .project-card-desc--rich .desc-rich-lead::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    background: linear-gradient(
      100deg,
      transparent 0%,
      rgba(255, 255, 255, 0.06) 45%,
      transparent 55%
    );
    background-size: 200% 100%;
    animation: desc-rich-shimmer 4.5s ease-in-out infinite;
    opacity: 0.85;
    mix-blend-mode: overlay;
  }
}

.project-card-desc--rich .desc-rich-ul {
  margin: 0.35em 0 0;
  padding-left: 0;
  list-style: none;
  color: #c4c9d1;
  font-size: 13px;
}

.project-card-desc--rich .desc-rich-ul.desc-rich-flow {
  position: relative;
  margin-top: 0.15em;
  padding-top: 0.55em;
}

.project-card-desc--rich .desc-rich-ul.desc-rich-flow::before {
  content: '';
  display: block;
  height: 2px;
  margin: 0 0 0.65em;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    var(--nvidia-green) 0%,
    rgba(118, 185, 0, 0.35) 35%,
    transparent 88%
  );
  opacity: 0.85;
}

.project-card-desc--rich .desc-rich-flow > li {
  position: relative;
  margin-bottom: 0.42em;
  padding: 0.42em 0.55em 0.45em 0.65em;
  border-radius: 3px;
  border: 1px solid rgba(118, 185, 0, 0.14);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(24, 28, 22, 0.5) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.project-card-desc--rich .desc-rich-flow > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--nvidia-green), rgba(118, 185, 0, 0.25));
  opacity: 0.75;
}

.project-card-desc--rich .desc-rich-flow > li:hover {
  border-color: rgba(118, 185, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(118, 185, 0, 0.08);
  transform: translateX(2px);
}

.project-card-desc--rich .desc-rich-li-main {
  display: block;
  margin-bottom: 0.25em;
}

.project-card-desc--rich .desc-rich-sub {
  margin: 0.3em 0 0;
  padding: 0.35em 0 0.15em 0.85em;
  list-style: none;
  font-size: 12px;
  color: #a8b0ba;
  border-left: 1px dashed rgba(118, 185, 0, 0.28);
}

.project-card-desc--rich .desc-rich-sub li {
  position: relative;
  margin-bottom: 0.28em;
  padding-left: 0.65em;
}

.project-card-desc--rich .desc-rich-sub li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(118, 185, 0, 0.55);
  box-shadow: 0 0 8px rgba(118, 185, 0, 0.35);
}

.project-card-desc--rich .desc-rich-h {
  font-size: 14px;
  margin: 0.75em 0 0.4em;
  padding-bottom: 0.25em;
  color: var(--nvidia-green);
  font-weight: 600;
  border-bottom: 1px solid rgba(118, 185, 0, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .project-card-desc--rich .desc-rich-lead {
    animation: desc-rich-reveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .project-card-desc--rich .desc-rich-ul.desc-rich-flow::before {
    animation: desc-rich-reveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.08s backwards;
  }

  .project-card-desc--rich .desc-rich-flow > li:nth-child(1) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(2) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.16s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(3) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.22s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(4) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.28s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(5) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.34s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(6) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.4s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(7) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.46s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(8) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.52s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(9) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.58s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(10) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.64s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(11) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.7s backwards;
  }
  .project-card-desc--rich .desc-rich-flow > li:nth-child(12) {
    animation: desc-rich-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.76s backwards;
  }

  .project-card-desc--rich .desc-rich-ul--dash > li,
  .project-card-desc--rich .desc-rich-ul--star > li {
    animation: desc-rich-reveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  .project-card-desc--rich .desc-rich-ul--dash > li:nth-child(1),
  .project-card-desc--rich .desc-rich-ul--star > li:nth-child(1) {
    animation-delay: 0.06s;
  }
  .project-card-desc--rich .desc-rich-ul--dash > li:nth-child(2),
  .project-card-desc--rich .desc-rich-ul--star > li:nth-child(2) {
    animation-delay: 0.12s;
  }
  .project-card-desc--rich .desc-rich-ul--dash > li:nth-child(3),
  .project-card-desc--rich .desc-rich-ul--star > li:nth-child(3) {
    animation-delay: 0.18s;
  }
  .project-card-desc--rich .desc-rich-ul--dash > li:nth-child(4),
  .project-card-desc--rich .desc-rich-ul--star > li:nth-child(4) {
    animation-delay: 0.24s;
  }
  .project-card-desc--rich .desc-rich-ul--dash > li:nth-child(5),
  .project-card-desc--rich .desc-rich-ul--star > li:nth-child(5) {
    animation-delay: 0.3s;
  }
}

.project-card-desc--rich .desc-rich-ul--dash > li,
.project-card-desc--rich .desc-rich-ul--star > li {
  position: relative;
  margin-bottom: 0.35em;
  padding-left: 0.85em;
  list-style: none;
}

.project-card-desc--rich .desc-rich-ul--dash > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 2px;
  border-radius: 1px;
  background: var(--nvidia-green);
  opacity: 0.85;
}

.project-card-desc--rich .desc-rich-ul--star > li::before {
  content: '';
  position: absolute;
  left: 0.1em;
  top: 0.48em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(118, 185, 0, 0.65);
  box-shadow: 0 0 6px rgba(118, 185, 0, 0.35);
}

.project-table-desc--rich {
  max-width: 420px;
  max-height: 220px;
  overflow: auto;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
  color: #d1d5db;
}

.project-table-desc--rich .desc-rich-ul {
  margin: 0.25em 0 0;
  padding-left: 0;
  list-style: none;
}

.project-table-desc--rich .desc-rich-lead {
  margin: 0 0 0.45em;
  padding: 0.35em 0.45em;
  font-weight: 600;
  color: #e5e7eb;
  border-left: 2px solid var(--nvidia-green);
  background: rgba(118, 185, 0, 0.08);
  border-radius: 2px;
}

.project-table-desc--rich .desc-rich-flow > li {
  margin-bottom: 0.35em;
  padding-left: 0.5em;
  border-left: 2px solid rgba(118, 185, 0, 0.35);
}

.project-table-desc--rich .desc-rich-sub {
  margin-top: 0.25em;
  padding-left: 0.75em;
  border-left: 1px dashed rgba(118, 185, 0, 0.25);
  list-style: none;
}

.project-table-desc--rich .desc-rich-sub li {
  position: relative;
  padding-left: 0.5em;
  margin-bottom: 0.2em;
}

.project-table-desc--rich .desc-rich-sub li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(118, 185, 0, 0.5);
}

.project-card--catalog .project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.project-card--catalog .project-card-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}

.project-card--catalog .project-card-actions .btn-nvidia-sm {
  text-decoration: none;
}

.category-header--all {
  border-left: 2px solid transparent;
}

.category-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-chevron {
  font-size: 10px;
}

.sidebar-project-icon {
  font-size: 12px;
  color: var(--nvidia-green);
}

.projects-table .table-name-icon {
  color: var(--nvidia-green);
  margin-right: 8px;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions .table-action-link {
  color: var(--nvidia-green);
}

.compact-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-item-icon {
  color: var(--nvidia-green);
  width: 20px;
}

.compact-item-actions {
  display: flex;
  gap: 12px;
}

.compact-item-actions .table-action-link {
  color: var(--nvidia-green);
}
