/* Related articles carousel (article pages) */
.article-related {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.article-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.article-related-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.article-related-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.article-related-scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.article-related-scroll-btn:hover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent);
}

.article-related-scroll-btn:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.55);
  outline-offset: 2px;
}

.article-related-track-wrap {
  position: relative;
  margin: 0 -4px;
  padding: 4px;
}

.article-related-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  list-style: none;
  margin: 0;
  padding: 4px 2px 12px;
}

.article-related-track::-webkit-scrollbar {
  display: none;
}

.article-related-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
}

.article-related-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-related-card-link:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}

.article-related-thumb {
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
  overflow: hidden;
}

.article-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-related-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, #f3f4f6 100%);
}

.article-related-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  min-height: 118px;
}

.article-related-tag {
  align-self: flex-start;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 100px;
}

.article-related-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-related-meta {
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .article-related {
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-related-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
