/* ============================================================
   article.css — 投稿記事(single.php / category.php)

   記事ページだけで読み込む(inc/posts.php)。枠(本文+サイドバー)・記事の見出し部分・
   関連記事・求人CTA・サイドバー。本文のタイポグラフィは prose.css(固定ページと共通)。
   求人・企業・管理画面には影響させない。
   色・角丸・フォントは skin.css のトークンを使う。
   ============================================================ */

/* ---------- 枠(本文 + サイドバー) ---------- */
.article-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 72px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}
@media (min-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
  }
}
@media (min-width: 1200px) {
  .article-layout { grid-template-columns: minmax(0, 800px) 320px; justify-content: space-between; }
}
.article, .article-archive { min-width: 0; }

/* ---------- 記事の見出し部分 ---------- */
.article-head { margin: 8px 0 32px; }
.article-cats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.article-cats a {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid var(--cta);
  border-radius: var(--radius-pill);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.article-cats a:hover { background: var(--brand-soft); }
.article-title {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.article-dates { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.article-dates time { font-family: var(--font-en); }
.article-eyecatch { margin: 24px 0 0; border-radius: var(--radius-card); overflow: hidden; background: var(--gray-chip); }
.article-eyecatch img { width: 100%; height: auto; display: block; }

/* ---------- 本文 ----------
   本文のタイポグラフィ(段落・見出し・リスト・表・引用・画像・ボタンなど)は
   固定ページと共通の prose.css(.dj-prose)にある。ここは記事ページ固有の部分だけ。 */

/* 複数ページの記事 */
.article-pages { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2em; font-size: 14px; }

/* ---------- 関連記事・記事カード ---------- */
.related-posts { margin-top: 64px; }
.related-posts-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  position: relative;
}
.related-posts-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56px;
  height: 2px;
  background: var(--brand);
}
.post-cards { display: grid; gap: 18px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .post-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { height: 100%; }
.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg);
  transition: border-color .15s, transform .15s;
}
.post-card-link:hover { border-color: var(--cta); transform: translateY(-2px); }
.post-card-link:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; }
.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft) 0%, var(--gray-chip) 100%); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-noimage { display: block; width: 100%; height: 100%; }
.post-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.post-card-cat { margin: 0; font-size: 12px; font-weight: 700; color: var(--brand-ink); }
.post-card-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.post-card-date { margin: 0; font-size: 12px; color: var(--ink-soft); font-family: var(--font-en); }
/* SP は横並びのコンパクトなカード(3件並べても縦に長くなりすぎない) */
@media (max-width: 639px) {
  .post-cards { gap: 12px; }
  .post-card-link { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: stretch; }
  .post-card-thumb { aspect-ratio: auto; min-height: 96px; }
  .post-card-body { padding: 10px 12px; align-content: center; gap: 4px; }
  .post-card-title { font-size: 14px; }
}

/* ---------- 求人への導線 ---------- */
.jobs-cta {
  border-radius: var(--radius-card);
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
}
.jobs-cta-title { margin: 0; font-weight: 700; line-height: 1.5; color: var(--brand-ink); }
.jobs-cta-text { margin: 8px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink); }
.jobs-cta-btn { margin-top: 14px; padding: 13px 24px; font-size: 15px; }
.jobs-cta-btn:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; }
.jobs-cta-bottom { margin-top: 48px; padding: 28px 24px; text-align: center; }
.jobs-cta-bottom .jobs-cta-title { font-size: 21px; }
.jobs-cta-side { padding: 20px; }
.jobs-cta-side .jobs-cta-title { font-size: 17px; }
.jobs-cta-side .jobs-cta-btn { width: 100%; justify-content: center; }

/* ---------- サイドバー ---------- */
.article-sidebar { display: grid; gap: 28px; min-width: 0; }
/* 追従(sticky)はさせない。サイドバーは画面より高くなる(最近の記事5件+広告2枠)ため、
   追従させると下の項目が記事の終わりまで見えなくなる。 */
/* 1カラムのときは記事下に同じ求人CTAがあるので、サイドバーの求人CTAは出さない */
@media (max-width: 959px) {
  .article-sidebar .jobs-cta-side { display: none; }
}
.side-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  position: relative;
}
.side-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: var(--brand);
}
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.side-cats a:hover .side-cat-name { color: var(--brand-ink); text-decoration: underline; }
.side-cat-count { flex: 0 0 auto; font-size: 12px; color: var(--ink-soft); background: var(--gray-chip); border-radius: var(--radius-pill); padding: 1px 10px; }
.side-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.side-recent a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; }
.side-recent-thumb {
  display: block;
  width: 72px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--gray-chip) 100%);
}
.side-recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-recent-body { display: grid; gap: 4px; min-width: 0; }
.side-recent-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-recent a:hover .side-recent-title { color: var(--brand-ink); text-decoration: underline; }
.side-recent-date { font-size: 12px; color: var(--ink-soft); font-family: var(--font-en); }
.side-cats a:focus-visible, .side-recent a:focus-visible, .side-banner a:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; border-radius: 4px; }

/* 広告バナー */
.side-banner { display: grid; gap: 4px; }
.side-banner-label { margin: 0; font-size: 11px; color: var(--ink-soft); letter-spacing: .08em; }
.side-banner a { display: block; }
.side-banner-img { width: 100%; max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
@media (max-width: 959px) {
  .side-banner { max-width: 360px; }
}

/* ---------- カテゴリー一覧 ---------- */
.article-archive-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.article-archive-desc { margin: 12px 0 0; font-size: 15px; color: var(--ink-soft); }
.article-archive .post-cards { margin-top: 8px; }
.article-empty { color: var(--ink-soft); }
.article-archive .pagination, .article-archive .nav-links { margin-top: 32px; }
