/* ========================================
   ヘッダー直下記事ボックス（新着/おすすめ/ランダム）
   自サイト記事専用。アンテナ枠（外部RSS）とは独立したコンポーネント。
   ======================================== */

.home-articles-tabs__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-articles-tabs__column {
  min-width: 0;
  border-left: 1px solid #d1d5db;
}

.home-articles-tabs__column:first-child {
  border-left: none;
}

.home-articles-tabs__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  color: #ffffff;
  background: #1e293b; /* slate-800 と統一 */
  border-bottom: 2px solid #f43f5e; /* rose-500 */
}

.home-articles-tabs__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #ef4444;
  border-radius: 3px;
}

.home-articles-tabs__random-label {
  color: #f87171;
}

.home-articles-tabs__panel {
  padding: 0;
}

.home-articles-tabs__empty {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  padding: 20px 0;
}

/* 各カラムが独立して縦スクロールするテキストリンク一覧。 */
.home-articles-tabs__list {
  margin: 0;
  padding: 0;
  list-style: none;
  height: 255px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home-articles-tabs__row {
  border-top: 1px solid #f3f4f6;
}

.home-articles-tabs__row:first-child {
  border-top: none;
}

.home-articles-tabs__link {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.6;
  color: #0056d6;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}

.home-articles-tabs__link:hover {
  background: #eff6ff;
  color: #4338ca;
  text-decoration: underline;
}

/* ランダム列の記事リンクは見出しと同じ赤系で強調する。 */
.home-articles-tabs__column:nth-child(3) .home-articles-tabs__link {
  color: #dc2626;
}

.home-articles-tabs__column:nth-child(3) .home-articles-tabs__link:hover {
  color: #b91c1c;
  background: #fef2f2;
}

/* タブレットでは2列にして、3つ目の一覧は横幅を使い切る。 */
@media (max-width: 1023px) {
  .home-articles-tabs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-articles-tabs__column:nth-child(odd) {
    border-left: none;
  }

  .home-articles-tabs__column:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid #d1d5db;
  }
}

/* スマホでは無理に詰めず、読みやすい1列の縦積みにする。 */
@media (max-width: 639px) {
  .home-articles-tabs__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-articles-tabs__column {
    border-left: none;
  }

  .home-articles-tabs__column:not(:first-child) {
    border-top: 1px solid #d1d5db;
  }

  .home-articles-tabs__column:nth-child(3) {
    grid-column: auto;
  }
}
