/* ==== Twitch News — Related Cards ==== */

.tn-related-section {
  margin-block: 24px 8px;
}

.tn-related-section .tn-related-title {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--tn-heading, #e6e6e6);
}

/* GRID */
.tn-grid.tn-grid-related {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .tn-grid.tn-grid-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tn-grid.tn-grid-related {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* CARD */
.tn-card.tn-card-related {
  position: relative;
  display: block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.tn-card.tn-card-related:hover,
.tn-card.tn-card-related:focus-within {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* LINK */
.tn-card-related .tn-card-link {
  position: static; /* вся карточка кликабельна */
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* THUMB — УБИРАЕМ КРУГИ И РАСТЯГИВАНИЕ */
.tn-card-related .tn-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #1c1f24;
}

.tn-card-related .tn-card-thumb .tn-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important; /* критично: сбить унаследованный круг */
  inline-size: 100%;
  block-size: 100%;
}

/* CONTENT */
.tn-card-related .tn-card-content {
  padding: 12px 12px 14px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
}

.tn-card-related .tn-card-title {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
  color: var(--tn-text, #f0f0f0);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* 2 строки */
  overflow: hidden;
}

.tn-card-related .tn-card-date {
  margin: 0;
  color: rgba(240, 240, 240, 0.65);
  font-size: 12px;
}

.tn-card-related .tn-card-date time {
  white-space: nowrap;
}

/* Метаданные для стримеров */
.tn-card-related .tn-card-meta {
  margin: 0 0 4px 0;
  color: rgba(240, 240, 240, 0.7);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tn-card-related .tn-card-game,
.tn-card-related .tn-card-city {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(145, 70, 255, 0.15);
  border: 1px solid rgba(145, 70, 255, 0.3);
  border-radius: 4px;
  font-size: 11px;
  color: #c084fc;
  font-weight: 500;
}

.tn-card-related .tn-card-viewers {
  margin: 0;
  color: rgba(240, 240, 240, 0.6);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* FOCUS */
.tn-card-related .tn-card-link:focus-visible {
  outline: 2px solid #7aa2ff;
  outline-offset: 2px;
  border-radius: 12px;
}

/* Плотность для узких экранов */
@media (max-width: 360px) {
  .tn-card-related .tn-card-content {
    padding: 10px;
    gap: 6px;
  }
}

/* Если где-то глобально задана круглая форма картинок — выключаем только в этом блоке */
.tn-related-section img {
  border-radius: 0 !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

/* Anti-blur после загрузки */
.tn-card-img.is-loaded {
  filter: none;
  transition: filter 0.25s;
}

/* Мобильная адаптация - 1 колонка */
@media (max-width: 639px) {
  .tn-grid.tn-grid-related {
    grid-template-columns: 1fr;
  }
}

