/* =============================================
   블로그 (/blog, /blog/:slug) — brand.css 토큰 사용
   ============================================= */

/* ── 목록 ── */
.blog-filters { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 32px; scrollbar-width: none; }
.blog-filters::-webkit-scrollbar { display: none; }
.blog-filters .filter-btn { flex: none; padding: 12px 0; font-size: 16px; font-weight: 500; color: var(--caption); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.blog-filters .filter-btn:hover { color: var(--title); }
.blog-filters .filter-btn.active { color: var(--title); font-weight: 700; border-bottom-color: var(--title); }

.post-grid { list-style: none; display: grid; gap: 40px; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; } }
@media (min-width: 900px) { .post-grid { grid-template-columns: repeat(3, 1fr); gap: 48px 24px; } }
.post-card a { display: block; }
.post-thumb { aspect-ratio: 16 / 9; }
.post-thumb img { transition: opacity .15s; }
.post-card a:hover .post-thumb img { opacity: .9; }
.post-thumb-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--caption); }
.post-cat { display: block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--point); }
.post-title { margin-top: 6px; font-size: 18px; font-weight: 700; color: var(--title); line-height: 1.45; letter-spacing: -0.02em; }
.post-card a:hover .post-title { text-decoration: underline; text-underline-offset: 3px; }
.post-sum { margin-top: 8px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-date { margin-top: 8px; font-size: 13px; color: var(--caption); font-variant-numeric: tabular-nums; }
.blog-empty { padding: 48px 0; color: var(--caption); }
.blog-empty p + p { margin-top: 16px; }

/* 첫 페이지 맨 위 최신 글: 한 줄 전체, 넓은 화면에서는 사진 왼쪽·글 오른쪽 */
.post-feature { grid-column: 1 / -1; }
@media (min-width: 900px) {
    .post-feature a { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: center; }
    .post-feature .post-cat { margin-top: 0; }
    .post-feature .post-title { font-size: 28px; line-height: 1.35; letter-spacing: -0.03em; }
    .post-feature .post-sum { margin-top: 12px; font-size: 16px; -webkit-line-clamp: 3; }
    .post-feature .post-date { margin-top: 16px; font-size: 14px; }
}

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 56px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 15px; color: var(--body); }
.pager a:hover { background: var(--bg-sub); }
.pager span[aria-current] { background: var(--title); color: #fff; font-weight: 700; }

/* ── 상세 ── */
.post-head { padding-block: 48px 24px; }
.post-crumb { font-size: 14px; font-weight: 600; color: var(--point); }
.post-crumb span { color: var(--caption); margin: 0 4px; }
.post-head h1 { margin-top: 12px; font-size: 28px; font-weight: 800; color: var(--title); line-height: 1.35; letter-spacing: -0.03em; }
.post-meta { margin-top: 16px; font-size: 14px; color: var(--caption); }
@media (min-width: 900px) {
    .post-head { padding-block: 72px 32px; }
    .post-head h1 { font-size: 36px; }
}
.post-cover { margin-bottom: 8px; }
.post-cover .photo { aspect-ratio: 16 / 9; }

.post-body { padding-block: 24px 48px; font-size: 17px; line-height: 1.85; color: var(--body); }
.post-body > * + * { margin-top: 1.1em; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { scroll-margin-top: 88px; margin-top: 2.2em; font-size: 22px; font-weight: 700; color: var(--title); line-height: 1.4; letter-spacing: -0.02em; }
.post-body h3 { margin-top: 1.8em; font-size: 19px; font-weight: 700; color: var(--title); line-height: 1.45; }
.post-body h4 { margin-top: 1.6em; font-size: 17px; font-weight: 700; color: var(--title); }
.post-body h2 + *, .post-body h3 + *, .post-body h4 + * { margin-top: .6em; }
.post-body strong { color: var(--title); font-weight: 700; }
.post-body a { color: var(--point); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .35em; }
.post-body li > ul, .post-body li > ol { margin-top: .35em; }
.post-body img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.post-body .post-video { margin-inline: 0; }
.post-body .post-video video { display: block; width: 100%; max-width: 360px; aspect-ratio: 9 / 16; margin: 0 auto; background: #000; border-radius: var(--radius); object-fit: contain; }
.post-body blockquote { padding: 16px 20px; background: var(--bg-sub); border-left: 3px solid var(--point); border-radius: 0 var(--radius) var(--radius) 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.post-body code { padding: 2px 6px; background: var(--bg-sub); border-radius: 4px; font-size: .9em; }
.post-body pre { padding: 16px; background: var(--bg-sub); border-radius: var(--radius); overflow-x: auto; }
.post-body pre code { padding: 0; background: none; }
.post-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.post-body table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.post-body th, .post-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body th { background: var(--bg-sub); color: var(--title); font-weight: 700; white-space: nowrap; }
.post-body tr:last-child td { border-bottom: 0; }
@media (min-width: 900px) {
    .post-body { font-size: 18px; }
    .post-body h2 { font-size: 26px; }
    .post-body h3 { font-size: 21px; }
}

/* 목차 */
.post-toc { margin-top: 24px; }
.post-toc details { padding: 20px 24px; background: var(--bg-sub); border-radius: var(--radius); }
.post-toc summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--title); }
.post-toc ol { margin-top: 12px; padding-left: 1.3em; font-size: 15px; line-height: 1.6; }
.post-toc li + li { margin-top: 6px; }
.post-toc a { color: var(--body); }
.post-toc a:hover { color: var(--point); text-decoration: underline; text-underline-offset: 3px; }

/* 글 끝: 태그 + 공유·목록 */
.post-foot { padding-bottom: 56px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-share-msg { font-size: 14px; color: var(--point); }
.post-cta .cta-side .num { margin-left: 6px; }
.post-tags span { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--body); }

.post-related .h-section { margin-bottom: 32px; }
