/* BridgeHere 블로그 — 목록(/ko/blog, /en/blog) · 상세(/ko/blog/{slug}) 공통
   구조 참고: 삼성반도체 뉴스 목록·상세(서브 내비 · 최신 글 · 추천 글 캐러셀 · 전체 글 검색/정렬/더 보기 · 관련 글 사이드바)
   토큰은 tokens.css, 헤더·푸터·버튼은 site.css를 그대로 쓴다. */

.blog-page { background: var(--bg-base); }

/* ---------- 서브 내비 (sticky) ---------- */
.bnav { position: sticky; top: 0; z-index: 30; padding-top: 64px; background: rgba(247, 244, 236, 0.92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
.bnav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; }
.bnav__title { font-size: 16px; font-weight: 800; color: var(--text-high); letter-spacing: -0.01em; white-space: nowrap; }
.bnav__tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.bnav__tabs::-webkit-scrollbar { display: none; }
.bnav__tabs a { position: relative; display: inline-flex; align-items: center; height: 52px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text-sub); white-space: nowrap; }
.bnav__tabs a:hover { color: var(--text-high); }
.bnav__tabs a.is-active { color: var(--text-high); }
.bnav__tabs a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }

/* ---------- 공통 요소 ---------- */
.bsec { padding: 48px 0; scroll-margin-top: 128px; }
.bsec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.bsec__head > div { display: flex; flex-direction: column; gap: 8px; }
.bdate { display: block; font-size: 13px; font-weight: 500; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.btags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bthumb { position: relative; overflow: hidden; border-radius: 22px; background: var(--bg-tray); }
.bthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-rise); }
a:hover .bthumb img, a:focus-visible .bthumb img { transform: scale(1.03); }
/* 원형 아이콘 버튼 — 추천 글 이전·다음, 상세 공유. 토큰만 써서 밝은 영역·네이비 밴드(.theme-dark) 모두 대응 */
.bicon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-high); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, opacity 150ms ease; }
.bicon:hover { border-color: var(--border-strong); background: var(--tint); }
.bicon[disabled] { opacity: 0.35; cursor: default; }
.bicon--sm { width: 36px; height: 36px; }
.blink { color: inherit; }
.blink:hover .btitle, .blink:focus-visible .btitle { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.btitle { color: var(--text-high); font-weight: 700; letter-spacing: -0.01em; }

/* ---------- 01 최신 글: 대표 1 + 목록 3 ---------- */
.latest { display: grid; gap: 32px; }
.latest__main { display: flex; flex-direction: column; gap: 18px; }
.latest__main .bthumb { aspect-ratio: 16 / 10; border-radius: 28px; }
.latest__main .btitle { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.35; }
.latest__meta { display: flex; flex-direction: column; gap: 12px; }
.latest__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.latest__list li + li { border-top: 1px solid var(--border); }
.latest__item { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; align-items: start; padding: 20px 0; }
.latest__list li:first-child .latest__item { padding-top: 0; }
.latest__item .btitle { font-size: 17px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.latest__item .bthumb { aspect-ratio: 4 / 3; border-radius: 16px; }
.latest__text { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 02 추천 글: 네이비 밴드 캐러셀 ---------- */
.bpick { background: #0A1120; color: #F2F6FC; padding: 56px 0 64px; scroll-margin-top: 116px; }
.bpick__nav { display: flex; gap: 8px; }
.bpick__track { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.bpick__track::-webkit-scrollbar { display: none; }
.bpick__card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; color: inherit; }
.bpick__card .bthumb { aspect-ratio: 4 / 3; background: #111B2E; }
.bpick__card .btitle { color: #F2F6FC; font-size: 18px; line-height: 1.45; }
.bpick__card .bdate { color: #9FB0C8; }
.bpick__body { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }

/* ---------- 03 전체 글: 검색 · 정렬 · 그리드 · 더 보기 ---------- */
.bfind { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 40px; text-align: center; }
.bsearch { position: relative; width: min(560px, 100%); }
.bsearch input { width: 100%; height: 52px; padding: 0 48px 0 48px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-surface); font: inherit; font-size: 15px; color: var(--text-high); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.bsearch input::placeholder { color: var(--text-partial); }
.bsearch input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.bsearch input::-webkit-search-cancel-button { display: none; }
.bsearch__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-sub); pointer-events: none; }
.bsearch__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text-sub); display: none; align-items: center; justify-content: center; cursor: pointer; }
.bsearch__clear:hover { background: var(--tint); color: var(--text-high); }
.bsearch.has-value .bsearch__clear { display: inline-flex; }
.bbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bcount { font-size: 14px; color: var(--text-sub); }
.bcount b { color: var(--text-high); }
.bsort { position: relative; }
.bsort__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 16px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--text-high); cursor: pointer; }
.bsort__btn:hover, .bsort.is-open .bsort__btn { border-color: var(--border-strong); }
.bsort__btn svg { transition: transform 150ms ease; }
.bsort.is-open .bsort__btn svg { transform: rotate(180deg); }
.bsort__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 160px; margin: 0; padding: 6px; list-style: none; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 38, 74, 0.12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms; }
.bsort.is-open .bsort__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.bsort__opt { display: flex; width: 100%; align-items: center; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 14px; color: var(--text-body); text-align: left; cursor: pointer; }
.bsort__opt:hover, .bsort__opt:focus-visible { background: var(--tint); color: var(--text-high); outline: none; }
.bsort__opt[aria-selected="true"] { color: var(--text-high); font-weight: 700; }
.bgrid { display: grid; grid-template-columns: 1fr; gap: 40px 24px; margin: 0; padding: 0; list-style: none; }
.bgrid > li[hidden] { display: none; }
.bcard { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.bcard .bthumb { aspect-ratio: 4 / 3; }
.bcard__body { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.bcard .btitle { font-size: 18px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bempty { padding: 56px 0; text-align: center; font-size: 15px; color: var(--text-sub); }
.bmore { display: flex; justify-content: center; margin-top: 48px; }
.bmore .btn { min-width: 200px; }

/* ---------- 04 시작하기 배너 ---------- */
.bcta { padding: 24px 0 72px; }
.bcta__box { position: relative; overflow: hidden; display: grid; gap: 24px; padding: 40px 28px; border-radius: 28px; background: #14264A; color: #F7F4EC; }
.bcta__box::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(243, 223, 160, 0.22), transparent); pointer-events: none; }
.bcta__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #F3DFA0; }
.bcta__title { margin-top: 10px; font-size: clamp(22px, 2.8vw, 30px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; }
.bcta__lead { margin-top: 10px; font-size: 15px; line-height: 1.7; color: #D9DFEA; }
.bcta__btns { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bcta .btn--primary { background: #F7F4EC; color: #14264A; }
.bcta .btn--primary:hover { background: #FFFFFF; }
.bcta .btn--ghost { border-color: rgba(247, 244, 236, 0.4); color: #F7F4EC; }
.bcta .btn--ghost:hover { border-color: #F7F4EC; background: rgba(247, 244, 236, 0.08); color: #FFFFFF; }

/* ---------- 경로 표시 ---------- */
.bcrumb { border-top: 1px solid var(--border); }
.bcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 auto; padding: 18px 0; list-style: none; font-size: 13px; color: var(--text-sub); }
.bcrumb li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.bcrumb li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.6; margin-right: 4px; }
.bcrumb a { color: var(--text-body); }
.bcrumb a:hover { color: var(--text-high); text-decoration: underline; text-underline-offset: 3px; }
.bcrumb [aria-current] { color: var(--text-high); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------- 상세 ---------- */
.bpost-head { padding: 40px 0 28px; border-bottom: 1px solid var(--border); }
.bpost-head .eyebrow { display: block; margin-bottom: 14px; }
.bpost-head h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.3; color: var(--text-high); max-width: 22em; text-wrap: balance; }
.bpost-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.bshare { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bpost { display: grid; gap: 48px; padding: 40px 0 56px; }
.barticle { min-width: 0; max-width: 760px; font-size: 17px; line-height: 1.85; color: var(--text-body); }
.barticle > * + * { margin-top: 20px; }
.barticle b, .barticle strong { color: var(--text-high); font-weight: 700; }
.barticle .blead { font-size: 19px; line-height: 1.75; color: var(--text-high); font-weight: 500; }
.barticle h2 { margin-top: 56px; font-size: 22px; line-height: 1.45; font-weight: 800; letter-spacing: -0.015em; color: var(--primary); }
.barticle figure { margin: 32px 0; }
.barticle figure img { width: 100%; max-width: 560px; height: auto; margin-inline: auto; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-tray); }
.barticle figure.is-tall img { max-width: 400px; }
.bcompare { display: grid; gap: 14px; margin: 32px 0; }
.bcompare__col { padding: 22px 22px 20px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-surface); }
.bcompare__col:last-child { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.bcompare__col h3 { font-size: 16px; font-weight: 800; color: var(--text-high); margin-bottom: 12px; }
.bcompare__col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.6; }
.bcompare__col li { position: relative; padding-left: 16px; }
.bcompare__col li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.bcompare__col:last-child li::before { background: var(--primary); }
.bfaq { margin: 32px 0; padding: 0; border-top: 1px solid var(--border); }
.bfaq__item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.bfaq dt { display: flex; gap: 10px; font-size: 17px; font-weight: 700; line-height: 1.55; color: var(--text-high); }
.bfaq dd { display: flex; gap: 10px; margin: 10px 0 0; font-size: 16px; line-height: 1.8; }
.bfaq__mark { flex: none; width: 24px; font-weight: 800; color: var(--link); }
.barticle .btags { margin-top: 40px; }
.bsource { margin-top: 24px; font-size: 14px; color: var(--text-sub); }
.bsource a { color: var(--link); font-weight: 600; }
.bsource a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bpost-end { display: flex; justify-content: center; margin-top: 48px; }

/* 관련 글 (데스크톱 sticky 사이드바) */
.brel__title { font-size: 20px; font-weight: 800; color: var(--text-high); margin-bottom: 20px; }
.brel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.brel__item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; }
.brel__item .bthumb { aspect-ratio: 4 / 3; border-radius: 14px; }
.brel__item .btitle { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.brel__text { display: flex; flex-direction: column; gap: 6px; }

/* ---------- 반응형 ---------- */
@media (min-width: 640px) {
  .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bpick__track { grid-auto-columns: calc((100% - 20px) / 2); }
  .bcompare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .bsec { padding: 64px 0; }
  .bnav__title { font-size: 18px; }
  .bcta__box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 48px 56px; }
  .latest__item { grid-template-columns: minmax(0, 1fr) 160px; }
}
@media (min-width: 1024px) {
  /* 좌우 높이 맞춤: 오른쪽 목록 3개 높이가 기준, 왼쪽 이미지가 남는 높이를 채움(큰 글 제목은 최대 2줄) */
  .latest { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 48px; align-items: stretch; }
  .latest__main .bthumb { flex: 1 1 0; min-height: 260px; aspect-ratio: auto; }
  .latest__main .bthumb img { position: absolute; inset: 0; }
  .latest__main .btitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .latest__list { justify-content: space-between; }
  .latest__item { padding: 24px 0; }
  .latest__list li:last-child .latest__item { padding-bottom: 0; }
  .latest__item .bthumb { aspect-ratio: 1 / 1; }
  .latest__item .btitle { -webkit-line-clamp: 2; }
  .latest__text { align-self: stretch; }
  .latest__text .bdate { margin-top: auto; }
  .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bpick__track { grid-auto-columns: calc((100% - 40px) / 3); }
  .bpost { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }
  .brel { position: sticky; top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .bthumb img, .bpick__track { transition: none; scroll-behavior: auto; }
}
