/* TRRB V31.4: article navigation, random related reading and engagement CTA */

.article-page .article-neighbors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 820px);
  margin: 34px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.article-page .article-neighbor {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: center;
  gap: 8px;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: 0 6px 18px rgba(17, 24, 39, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.article-page .article-neighbor:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 0, 0, .34);
  box-shadow: 0 10px 26px rgba(17, 24, 39, .08);
}

.article-page .article-neighbor > span {
  color: #d60000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.article-page .article-neighbor strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.5;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-page .article-neighbor.is-next {
  text-align: right;
}

.article-page .article-neighbor.is-empty {
  min-height: 108px;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.article-page .related-news {
  width: min(100%, 820px);
  margin: 38px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  overflow: visible;
}

.article-page .related-news h2 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 14px;
  font-size: 24px;
}

.article-page .related-news h2::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 0;
  width: 4px;
  border-radius: 999px;
  background: #d60000;
}

.article-page .related-carousel { overflow: visible; }

.article-page .related-track {
  display: grid;
  width: 100%;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 16px;
  animation: none;
  transform: none;
}

.article-page .related-item {
  display: grid;
  min-width: 0;
  min-height: 222px;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  border: 1px solid #e1e5ea;
  border-radius: 11px;
  padding: 12px;
  background: #fff;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: 0 5px 16px rgba(17, 24, 39, .05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.article-page .related-item:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 0, 0, .35);
  box-shadow: 0 12px 26px rgba(17, 24, 39, .09);
}

.article-page .related-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.article-page .related-item.has-no-image {
  min-height: 150px;
  grid-template-rows: auto 1fr;
  background: linear-gradient(145deg, #fff 0%, #fafafa 100%);
}

.article-page .related-item span {
  color: #d60000;
  font-size: 12px;
  font-weight: 800;
}

.article-page .related-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-engagement {
  width: min(100%, 820px);
  margin: 36px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.article-engagement-header { margin-bottom: 16px; }
.article-engagement-header h2 { margin: 0 0 7px; font-size: 22px; }
.article-engagement-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.article-engagement-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.article-engagement-card {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.article-engagement-card.is-primary { border-color: rgba(214, 0, 0, .3); background: #fff5f5; }
.article-engagement-card strong { color: var(--red); font-size: 16px; }
.article-engagement-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 900px) {
  .article-page .related-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-engagement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .article-page .article-neighbors {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 26px;
  }

  .article-page .article-neighbor,
  .article-page .article-neighbor.is-empty {
    min-height: 86px;
    padding: 14px 16px;
  }

  .article-page .article-neighbor.is-next { text-align: left; }
  .article-page .article-neighbor strong { font-size: 15px; }

  .article-page .related-news,
  .article-engagement { margin-top: 28px; }

  .article-page .related-news h2 { font-size: 21px; }
  .article-page .related-track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .article-page .related-item { min-height: 0; padding: 10px; }
  .article-page .related-item img { aspect-ratio: 4 / 3; }
  .article-page .related-item span { font-size: 11px; }
  .article-page .related-item strong { font-size: 14px; line-height: 1.42; -webkit-line-clamp: 3; }
  .article-engagement-header h2 { font-size: 20px; }
  .article-engagement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .article-engagement-card { min-height: 104px; padding: 13px; }
  .article-engagement-card strong { font-size: 15px; }
  .article-engagement-card span { font-size: 12px; }
}

@media (max-width: 380px) {
  .article-page .related-track,
  .article-engagement-grid { grid-template-columns: 1fr; }
}
