/* ============================================================
   SYU INC. Single Article CSS
   記事詳細ページ専用スタイル
   ============================================================ */

/* ── ARTICLE HERO ── */
.article-hero { padding-block: 52px 0; }
.article-meta { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.article-date { font-family: var(--fl); font-size: .7rem; color: var(--muted); }
.article-read-time { font-family: var(--fl); font-size: .7rem; color: var(--muted); }
.article-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.article-tag { font-family: var(--fl); font-size: .62rem; padding: 3px 10px; border: 1px solid var(--border); color: var(--text2); border-radius: 100px; transition: .18s; }
.article-tag:hover { border-color: var(--orange); color: var(--orange); }
.article-title { font-size: clamp(1.5rem, 3.5vw, 2.6rem); line-height: 1.2; margin-bottom: 1.4rem; max-width: 860px; }
.article-lead { font-size: 1rem; color: var(--text2); line-height: 1.9; max-width: 720px; margin-bottom: 2rem; border-left: 4px solid var(--orange); padding-left: 1.2rem; }
.article-eyecatch { width: 100%; margin-top: 0; }
.article-eyecatch img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* ── LAYOUT ── */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 72px; padding-block: 64px; align-items: start; }
.article-body { max-width: 100%; min-width: 0; }

/* ── ARTICLE CONTENT ── */
/* WordPress の the_content() が吐くHTML要素すべてに対応 */

.article-body > * + * { margin-top: 1.4em; }

/* Headings */
.article-body h2 { font-size: clamp(1.15rem, 2.2vw, 1.55rem); margin-top: 3rem; margin-bottom: 1rem; padding: 14px 16px; background: var(--bg-alt); border-left: 4px solid var(--orange); line-height: 1.3; }
.article-body h3 { font-size: 1.05rem; margin-top: 2rem; margin-bottom: .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.article-body h4 { font-size: .95rem; margin-top: 1.4rem; margin-bottom: .5rem; color: var(--orange); }
.article-body h5 { font-size: .9rem; margin-top: 1.2rem; margin-bottom: .4rem; font-weight: 700; }
.article-body h6 { font-size: .85rem; margin-top: 1rem; margin-bottom: .3rem; color: var(--muted); font-weight: 600; }

/* Body text */
.article-body p { font-size: .95rem; color: var(--text2); line-height: 2; margin-bottom: 1em; }
.article-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; transition: .18s; }
.article-body a:hover { color: var(--orange-dk); }
.article-body strong, .article-body b { color: var(--text); font-weight: 700; }
.article-body em, .article-body i { font-style: italic; }
.article-body mark { background: rgba(255,77,28,.12); color: var(--text); padding: 1px 3px; }
.article-body del { color: var(--muted); }
.article-body code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: .85em; background: var(--bg-alt); padding: 2px 6px; border: 1px solid var(--border); }
.article-body pre { background: #1a1a2e; padding: 20px 24px; overflow-x: auto; margin: 1.6em 0; }
.article-body pre code { background: none; border: none; padding: 0; color: rgba(255,255,255,.85); font-size: .85rem; line-height: 1.75; }

/* Lists */
.article-body ul { margin: 1em 0 1.4em; padding: 0; list-style: none; }
.article-body ul li { font-size: .95rem; color: var(--text2); line-height: 1.85; padding: .4em 0 .4em 1.4em; position: relative; border-bottom: 1px solid var(--border); }
.article-body ul li:first-child { border-top: 1px solid var(--border); }
.article-body ul li::before { content: ''; position: absolute; left: 0; top: .8em; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
.article-body ol { margin: 1em 0 1.4em; padding: 0; list-style: none; counter-reset: ol-counter; }
.article-body ol li { font-size: .95rem; color: var(--text2); line-height: 1.85; padding: .5em 0 .5em 2.4em; position: relative; border-bottom: 1px solid var(--border); counter-increment: ol-counter; }
.article-body ol li:first-child { border-top: 1px solid var(--border); }
.article-body ol li::before { content: counter(ol-counter); position: absolute; left: 0; top: .45em; width: 1.6em; height: 1.6em; background: var(--orange); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--fl); font-size: .7rem; font-weight: 700; line-height: 1; }
/* ネストリスト */
.article-body ul ul, .article-body ol ol, .article-body ul ol, .article-body ol ul { margin: .4em 0 .4em 1em; }
.article-body ul ul li, .article-body ol ol li { border: none; padding-left: 1em; }
.article-body ul ul li::before { background: var(--border); width: 4px; height: 4px; }

/* Blockquote */
.article-body blockquote { margin: 2em 0; position: relative; }
.article-body blockquote p { font-family: var(--fh); font-size: 1.05rem; font-style: italic; line-height: 1.75; color: var(--text); background: var(--bg-alt); padding: 24px 28px 24px 48px; margin: 0; border-left: 4px solid var(--orange); }
.article-body blockquote p::before { content: '\201C'; font-family: Georgia, serif; font-size: 3.5rem; color: var(--orange); position: absolute; left: 12px; top: -4px; line-height: 1; }
.article-body blockquote cite { display: block; font-family: var(--fl); font-size: .7rem; color: var(--muted); margin-top: .6rem; font-style: normal; padding-left: 4px; }

/* Table */
.article-body table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 1.6em 0; }
.article-body table th { background: var(--bg-dark); color: #fff; font-family: var(--fl); font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: 12px 16px; text-align: left; white-space: nowrap; }
.article-body table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: top; line-height: 1.65; }
.article-body table tr:last-child td { border-bottom: none; }
.article-body table tr:nth-child(even) td { background: var(--bg-alt); }
/* テーブルのレスポンシブ対応 */
.article-body .wp-block-table { overflow-x: auto; display: block; }

/* HR */
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* Figure / Image */
.article-body figure { margin: 2em 0; }
.article-body figure img { width: 100%; }
.article-body figcaption { font-family: var(--fl); font-size: .7rem; color: var(--muted); margin-top: .5rem; text-align: center; line-height: 1.5; }

/* WordPress Blocks: Callout / 強調ボックス */
.article-body .wp-block-pullquote { border-top: 4px solid var(--orange); border-bottom: 4px solid var(--orange); padding: 1.5em 0; text-align: center; margin: 2em 0; }
.article-body .wp-block-pullquote blockquote p { background: none; border: none; padding: 0; font-size: 1.2rem; }
.article-body .wp-block-pullquote blockquote p::before { display: none; }

/* Gutenbergカラムブロック */
.article-body .wp-block-columns { display: flex; gap: 24px; margin: 1.6em 0; flex-wrap: wrap; }
.article-body .wp-block-column { flex: 1; min-width: 200px; }

/* Gutenberg カバーブロック */
.article-body .wp-block-cover { position: relative; padding: 2em; display: flex; align-items: center; justify-content: center; min-height: 200px; background: var(--bg-dark); margin: 1.6em 0; }
.article-body .wp-block-cover p { color: #fff; position: relative; z-index: 1; }

/* ── SNSシェア ── */
.article-share { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.share-label { font-family: var(--fl); font-size: .65rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: .8rem; display: block; }
.share-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.share-btn { font-family: var(--fl); font-size: .72rem; font-weight: 700; padding: 9px 18px; border: 1px solid var(--border); cursor: pointer; transition: .18s; color: var(--text2); background: #fff; text-decoration: none; display: inline-block; }
.share-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* ── 著者ボックス ── */
.article-author { margin-top: 3rem; padding: 24px; border: 1px solid var(--border); display: flex; gap: 20px; align-items: flex-start; }
.author-icon { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-icon img, .author-avatar-img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.author-name { font-size: .95rem; font-weight: 700; margin-bottom: .2rem; }
.author-title { font-family: var(--fl); font-size: .62rem; color: var(--orange); letter-spacing: .08em; margin-bottom: .5rem; }
.author-bio { font-size: .82rem; color: var(--text2); line-height: 1.75; }

/* ── 前後記事ナビ ── */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 3rem; }
.article-nav-item { background: var(--bg-alt); padding: 20px 24px; display: flex; flex-direction: column; gap: .4rem; transition: .2s; text-decoration: none; }
.article-nav-item:hover { background: var(--text); }
.article-nav-item:hover .an-title { color: #fff; }
.an-disabled { opacity: 0; pointer-events: none; }
.an-dir { font-family: var(--fl); font-size: .62rem; color: var(--muted); letter-spacing: .1em; font-weight: 700; }
.article-nav-item:hover .an-dir { color: rgba(255,255,255,.5); }
.an-title { font-size: .85rem; font-weight: 600; line-height: 1.4; color: var(--text); transition: .18s; }
.an-item-prev .an-dir::before { content: '← '; }
.an-item-next { text-align: right; }
.an-item-next .an-dir::after { content: ' →'; }

/* ── SIDEBAR ── */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-block { margin-bottom: 2.4rem; }
.sidebar-title { font-family: var(--fl); font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); padding-bottom: .6rem; border-bottom: 2px solid var(--orange); margin-bottom: 1.2rem; display: block; }

/* サイドバー目次（JS生成） */
.sidebar-toc { display: flex; flex-direction: column; }
.stoc-item { font-size: .8rem; padding: .5em 0; border-bottom: 1px solid var(--border); color: var(--text2); display: flex; gap: .5em; align-items: flex-start; transition: .18s; cursor: pointer; text-decoration: none; }
.stoc-item:hover { color: var(--orange); }
.stoc-n { font-family: var(--fl); font-size: .65rem; color: var(--orange); font-weight: 700; flex-shrink: 0; }

/* サイドバー関連記事 */
.sidebar-related { display: flex; flex-direction: column; gap: 1rem; }
.related-item { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.related-thumb { width: 72px; height: 48px; flex-shrink: 0; overflow: hidden; background: var(--bg-alt); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder.sm { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--fl); font-size: .42rem; color: rgba(255,255,255,.5); letter-spacing: .05em; background: linear-gradient(135deg, #0A0A0A, #FF4D1C); }
.related-item h4 { font-size: .79rem; line-height: 1.45; font-weight: 600; color: var(--text); transition: .18s; margin-top: .3rem; }
.related-item:hover h4 { color: var(--orange); }
.related-item .article-cat { font-size: .55rem; }

/* サイドバーCTA */
.sidebar-cta { background: var(--bg-dark); padding: 24px; text-align: center; }
.sidebar-cta h3 { font-size: .9rem; color: #fff; margin-bottom: .5rem; line-height: 1.5; }
.sidebar-cta p { font-size: .75rem; color: rgba(255,255,255,.4); margin-bottom: 1.1rem; line-height: 1.6; }
.sidebar-cta a { display: block; background: var(--orange); color: #fff; font-family: var(--fl); font-size: .75rem; font-weight: 700; padding: 12px; transition: .18s; }
.sidebar-cta a:hover { background: var(--orange-dk); }

/* ── 下部関連記事 ── */
.related-section { padding-block: 72px; background: var(--bg-alt); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 2rem; }
.related-card { background: #fff; border: 1px solid var(--border); overflow: hidden; transition: .2s; display: flex; flex-direction: column; text-decoration: none; }
.related-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.rc-img { aspect-ratio: 16/9; overflow: hidden; }
.rc-img img { width: 100%; height: 100%; object-fit: cover; }
.rc-img .card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--fl); font-size: .6rem; color: rgba(255,255,255,.4); letter-spacing: .1em; background: linear-gradient(135deg, #0A0A0A 60%, #FF4D1C); }
.rc-body { padding: 16px 20px; flex: 1; display: flex; flex-direction: column; }
.rc-cat { font-family: var(--fl); font-size: .58rem; font-weight: 700; letter-spacing: .1em; color: var(--orange); margin-bottom: .4rem; display: block; }
.rc-body h3 { font-size: .88rem; line-height: 1.5; flex: 1; margin-bottom: .8rem; font-weight: 600; }
.related-card:hover .rc-body h3 { color: var(--orange); }
.rc-date { font-family: var(--fl); font-size: .62rem; color: var(--muted); }

/* ── 秀資料館に戻る ── */
.back-link-wrap { padding-block: 40px; text-align: center; }
.back-link { font-family: var(--fl); font-size: .8rem; font-weight: 700; color: var(--text2); display: inline-flex; align-items: center; gap: 8px; transition: .18s; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
.back-link::before { content: '←'; }
.back-link:hover { color: var(--orange); border-color: var(--orange); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .article-nav { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .article-body blockquote p { padding-left: 36px; }
  .article-author { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
}
