/* ── BLOG INDEX — 시리즈 허브 레이아웃 ────────────────────── */

body { background: #fff; }

/* ── 페이지 래퍼 ──────────────────────────────────────────── */
.bg-page { min-height: calc(100vh - 68px); }

/* ── 페이지 헤더 ──────────────────────────────────────────── */
.bg-hero {
    background: #fff;
    border-bottom: 1px solid var(--border, var(--border));
    padding: 2.5rem 0 0;
}
.bg-hero-inner {
    max-width: 1320px; margin: 0 auto; padding: 0 2rem;
}
.bg-hero-label {
    display: inline-block;
    font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: .5rem;
}
.bg-hero h1 {
    font-size: clamp(var(--fs-22), 3vw, var(--fs-32));
    font-weight: 700; letter-spacing: -.01em; color: var(--text);
    line-height: 1.3; margin-bottom: .5rem;
}
.bg-hero-sub {
    font-size: var(--fs-13); font-weight: 400; color: var(--text); margin-bottom: 1.75rem;
}

/* ── 목록 래퍼 ────────────────────────────────────────────── */
.bg-list-section {
    max-width: 1320px; margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

/* ── 티스토리 스타일 레이아웃 (메인 + 사이드바) ────────────── */
.bg-tistory-layout {
    max-width: 1320px; margin: 0 auto;
    padding: 2.2rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .bg-tistory-layout { grid-template-columns: 1fr; gap: 2rem; padding: 1.6rem 1.5rem 3rem; }
}

/* ── 피처 캐로셀 ──────────────────────────────────────────── */
.bg-feature {
    border-radius: var(--r); overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg, #f5f5f5);
}
.bg-feature-link { display: block; position: relative; text-decoration: none; }
.bg-feature-img {
    width: 100%; height: 360px;
    object-fit: cover; display: block;
}
.bg-feature-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2.5rem 1.75rem 1.5rem;
    background: linear-gradient(to top, rgba(var(--text-rgb), .82) 0%, transparent 100%);
}
.bg-feature-badge {
    display: inline-block;
    font-size: var(--fs-12); font-weight: 700;
    color: #fff; background: rgba(255,255,255,.18);
    padding: .2rem .7rem; border-radius: 999px;
    margin-bottom: .6rem;
}
.bg-feature-title {
    font-size: clamp(var(--fs-18), 2.4vw, var(--fs-28));
    font-weight: 700; color: #fff;
    line-height: 1.4; margin: 0;
    text-wrap: balance;
}
.bg-feature .carousel-indicators { margin-bottom: .6rem; }
.bg-feature .carousel-control-prev,
.bg-feature .carousel-control-next { width: 8%; opacity: 0; transition: opacity .2s; }
.bg-feature:hover .carousel-control-prev,
.bg-feature:hover .carousel-control-next { opacity: .8; }
@media (max-width: 600px) {
    .bg-feature-img { height: 220px; }
    .bg-feature-caption { padding: 1.5rem 1.1rem 1rem; }
}

/* ── 순위형 글 목록 ───────────────────────────────────────── */
.bg-ranked-list { list-style: none; margin: 0; padding: 0; }
.bg-ranked-item { border-bottom: 1px solid var(--border, var(--border)); }
.bg-ranked-item:first-child { border-top: 1px solid var(--border, var(--border)); }
.bg-ranked-link {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem .2rem;
    text-decoration: none;
}
.bg-ranked-text { flex: 1; min-width: 0; }
.bg-ranked-cat {
    font-size: var(--fs-12); font-weight: 600; color: var(--accent);
    margin: 0 0 .25rem;
}
.bg-ranked-title {
    font-size: var(--fs-16); font-weight: 700; color: var(--text);
    margin: 0 0 .3rem; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .15s ease;
}
.bg-ranked-num {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    margin-right: .4rem;
}
.bg-ranked-summary {
    font-size: var(--fs-13); color: var(--text);
    margin: 0; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}
.bg-ranked-link:hover .bg-ranked-title { color: var(--accent); }
.bg-ranked-thumb {
    flex-shrink: 0;
    width: 76px; height: 56px;
    border-radius: var(--r-sm, 6px);
    overflow: hidden;
    background: var(--bg, #f5f5f5);
}
.bg-ranked-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
    .bg-ranked-thumb { width: 60px; height: 46px; }
    .bg-ranked-title { white-space: normal; }
}

/* ── 페이지네이션 ─────────────────────────────────────────── */
.bg-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: .3rem;
    margin-top: 2rem;
}
.bg-page-arrow, .bg-page-num {
    display: flex; align-items: center; justify-content: center;
    min-width: 2rem; height: 2rem;
    border-radius: 999px;
    font-size: var(--fs-13); font-weight: 600; color: var(--text);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.bg-page-num:hover, .bg-page-arrow:hover { background: var(--bg, #f5f5f5); }
.bg-page-num.active { background: var(--accent); color: #fff; font-weight: 700; }
.bg-page-arrow.disabled { pointer-events: none; opacity: .3; }

/* ── 사이드바: 시리즈 카드 ────────────────────────────────── */
.bg-main { min-width: 0; }
.bg-sidebar { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.bg-side-card {
    border: 1px solid var(--border, var(--border));
    border-radius: var(--r);
    padding: 1.1rem 1.2rem;
}
.bg-side-card-title {
    font-size: var(--fs-15); font-weight: 700; color: var(--text);
    margin: 0 0 .3rem;
}
.bg-side-card-tagline {
    font-size: var(--fs-12); color: var(--text);
    margin: 0 0 .8rem; line-height: 1.4;
}
.bg-side-card-posts { list-style: none; margin: 0; padding: 0; }
.bg-side-card-posts li {
    display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
    padding: .5rem 0;
    border-top: 1px solid var(--border, var(--border));
}
.bg-side-card-posts li:first-child { border-top: none; }
.bg-side-card-posts a {
    font-size: var(--fs-13); font-weight: 500; color: var(--text);
    text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bg-side-card-posts a:hover { color: var(--accent); }
.bg-side-card-date {
    flex-shrink: 0;
    font-size: var(--fs-11); color: var(--text-muted);
}
.bg-side-empty { font-size: var(--fs-13); color: var(--text-muted); }

/* 빈 상태 */
.bg-empty {
    max-width: 1320px; margin: 0 auto;
    text-align: center; padding: 5rem 1rem;
    color: var(--text-muted); font-size: var(--fs-16);
}

/* ── 반응형 ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bg-hero-inner { padding: 0 1rem; }
    .bg-list-section { padding: 1.4rem 1rem 3rem; }
}
