/* VirtuMate — статьи (/articles, /article) */

.articles-main,
.article-main {
  padding: 32px 0 56px;
}

.articles-page-head,
.article-page-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 32px;
}

.articles-page-head__eyebrow,
.article-page-head__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.articles-page-head .section-subtitle,
.article-page-head .section-subtitle {
  margin-top: 12px;
}

/* --- List --- */
.articles-list-loading {
  margin: 0 0 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.articles-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
}

.articles-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(155deg, rgba(32, 32, 34, 0.96), rgba(18, 18, 20, 0.98));
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.articles-card:hover {
  border-color: rgba(6, 182, 212, 0.32);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}

.articles-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.articles-card-thumb-wrap {
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.articles-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.articles-card:hover .articles-card-thumb {
  transform: scale(1.04);
}

.articles-card-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 18px 20px 20px;
}

.articles-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.articles-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.articles-card-more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-a);
}

.articles-card-empty,
.articles-card-error {
  grid-column: 1 / -1;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  text-align: center;
  color: var(--text-muted);
}

.articles-card-error {
  color: #fecdd3;
  border-color: rgba(236, 72, 153, 0.35);
}

/* --- Single article --- */
.article-main__inner {
  max-width: 780px;
}

.article-nav {
  margin-bottom: 18px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.article-back:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
}

.article-panel {
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background:
    linear-gradient(155deg, rgba(32, 32, 34, 0.98), rgba(18, 18, 20, 0.99)) padding-box,
    linear-gradient(90deg, rgba(6, 182, 212, 0.35), rgba(139, 92, 246, 0.28), rgba(236, 72, 153, 0.32)) border-box;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.article-panel__head {
  padding: 28px 32px 0;
}

.article-panel__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.article-panel__title {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.article-panel__body {
  padding: 24px 32px 12px;
}

.article-panel__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 32px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

.article-panel__foot .btn {
  font-size: 14px;
}

/* Article typography */
.article-body-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.article-body-content > *:first-child {
  margin-top: 0;
}

.article-body-content h1 {
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 700;
  margin: 2rem 0 0.85rem;
  line-height: 1.28;
  color: #fff;
}

.article-body-content h1:first-child {
  margin-top: 0;
}

.article-body-content h2 {
  font-size: clamp(20px, 2.8vw, 24px);
  font-weight: 700;
  margin: 1.75rem 0 0.65rem;
  line-height: 1.32;
  color: #f0f0f0;
}

.article-body-content h2:first-child {
  margin-top: 0;
}

.article-body-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  line-height: 1.35;
  color: #e8e8e8;
}

.article-body-content p {
  margin: 0 0 1.125rem;
}

.article-body-content p:last-child {
  margin-bottom: 0;
}

.article-body-content a {
  color: var(--brand-a);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.article-body-content a:hover {
  color: #5eead4;
}

.article-body-content figure,
.article-body-content .article-figure {
  margin: 1.65rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body-content figure img,
.article-body-content .article-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body-content > img,
.article-body-content p img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body-content figcaption {
  padding: 10px 14px 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.article-body-content ul,
.article-body-content ol {
  margin: 0 0 1.125rem;
  padding-left: 1.35rem;
}

.article-body-content li {
  margin-bottom: 0.45rem;
}

.article-body-content ul li::marker {
  color: rgba(6, 182, 212, 0.85);
}

.article-body-content ol li::marker {
  color: rgba(167, 139, 250, 0.9);
  font-weight: 600;
}

.article-body-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem 1rem 1.2rem;
  border-left: 3px solid rgba(6, 182, 212, 0.45);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-muted);
}

.article-body-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-body-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body-content pre {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.55;
}

.article-body-content pre code {
  padding: 0;
  border: 0;
  background: none;
}

.article-body-content hr {
  margin: 2rem 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.article-body-content strong {
  font-weight: 650;
  color: #f4f4f4;
}

.article-body-content em {
  font-style: italic;
  color: #e8e8e8;
}

@media (max-width: 720px) {
  .articles-main,
  .article-main {
    padding-top: 20px;
  }

  .article-panel__head,
  .article-panel__body,
  .article-panel__foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .article-panel__head {
    padding-top: 22px;
  }

  .article-panel__foot {
    padding-bottom: 22px;
  }

  .article-panel__foot .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 140px;
  }

  .article-body-content {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
}
