/* ============================================================
 * 関連記事ブロック（related.js 用）
 * トップページの og-card 構造と同じスタイルで描画する。
 * 既存の style.css に追記、または別ファイルで読み込む想定。
 * ============================================================ */

/* ── セクション外枠 ──────────────────────────── */
.related-articles {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.12));
}

.related-articles > h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  opacity: 0.8;
  font-weight: 600;
}

/* ── article-list（トップページと同じ命名） ───── */
.related-articles .article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles .article-list li {
  margin-bottom: 0.75rem;
}

/* ── OG Card（top.css からの複製・記事ページ用調整） ── */
.related-articles .og-card {
  display: flex;
  gap: 1rem;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 12px;
  padding: 12px;
  background: var(--bg, transparent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.related-articles .og-card-link {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.related-articles .og-card-img {
  display: block;
  width: 160px;
  height: calc(160px / 1.91);
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}

.related-articles .og-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.related-articles .og-card-title {
  font-size: 1.02em;
  font-weight: 700;
  line-height: 1.4;
  /* 2行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-articles .og-card-desc {
  font-size: 0.88em;
  line-height: 1.5;
  color: var(--quote-text, rgba(0, 0, 0, 0.6));
  margin: 0;
  /* 関連記事では3行で省略（description が長いので） */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── モバイル対応 ────────────────────────────── */
@media (max-width: 600px) {
  .related-articles .og-card-link {
    flex-direction: column;
  }
  .related-articles .og-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.91 / 1;
  }
}
