/* Blog 테마: 흰 카드 바탕 + 오른쪽 사이드바 */
.kc-main.container { max-width: 1360px; }
.bl-wrap { background: #fff; border: 1px solid var(--kc-line, #e6e8ec); border-radius: 18px; padding: 30px 30px 34px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.bl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 60px; align-items: start; }
.bl-main { min-width: 0; }
.bl-side { min-width: 0; }

/* 새 글 추가하기 */
.bl-newpost { display: flex; align-items: center; justify-content: center; gap: 8px; height: 41px; border-radius: 8px; background: #2563eb; color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none !important; transition: filter .15s; }
.bl-newpost:hover { filter: brightness(1.08); }

.bl-box { margin-top: 38px; }
.bl-box__t { margin: 0 0 22px; font-size: 14px; font-weight: 700; color: var(--kc-text, #1d2330); }

/* 검색 */
.bl-search { position: relative; }
.bl-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #8b93a1; pointer-events: none; }
.bl-search input { width: 100%; height: 38px; padding: 0 14px 0 40px; border: 1px solid var(--kc-line, #e6e8ec); border-radius: 8px; background: #f9fafb; font-size: 13.5px; color: inherit; outline: 0; }
.bl-search input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* 카테고리 · 인기 게시물 */
.bl-cats, .bl-pop { list-style: none; margin: 0; padding: 0; }
.bl-cats li + li, .bl-pop li + li { border-top: 1px solid var(--kc-line, #e6e8ec); }
.bl-cats a, .bl-pop a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 2px; color: var(--kc-text, #1d2330); font-size: 14px; text-decoration: none; }
.bl-cats a:hover, .bl-pop a:hover { color: #2563eb; }
.bl-cats i, .bl-pop i { width: 16px; flex: none; color: #5f6b7a; font-size: 14px; text-align: center; }
.bl-cats span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-cats b { flex: none; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: #eef0f3; color: #5f6b7a; font-size: 11px; font-weight: 600; text-align: center; }
.bl-pop a { font-size: 13.5px; }
.bl-pop span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 인기 태그 */
.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-tags a { padding: 6px 14px; border-radius: 999px; background: #eef0f3; color: #4a5565; font-size: 13px; text-decoration: none; }
.bl-tags a:hover { background: #2563eb; color: #fff; }

/* 구독 */
.bl-sub { padding: 28px 30px 30px; border: 1px solid var(--kc-line, #e6e8ec); border-radius: 12px; background: #fafbfc; }
.bl-sub .bl-box__t { font-size: 15px; margin-bottom: 14px; }
.bl-sub p { margin: 0 0 18px; color: #8b93a1; font-size: 13.5px; }
.bl-sub__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 8px; background: #2b3140; color: #fff !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important; }
.bl-sub__btn:hover { filter: brightness(1.15); }

@media (max-width: 1099.98px) {
  .bl-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
}
@media (max-width: 991.98px) {
  .bl-wrap { padding: 20px 16px 24px; border-radius: 14px; }
  .bl-grid { grid-template-columns: 1fr; gap: 10px; }
  .bl-side { order: 2; }
}

/* 어두운 화면 */
html[data-bs-theme="dark"] .bl-wrap { background: #161a21; border-color: #2c313c; box-shadow: none; }
html[data-bs-theme="dark"] .bl-box__t, html[data-bs-theme="dark"] .bl-cats a, html[data-bs-theme="dark"] .bl-pop a { color: #e7eaf0; }
html[data-bs-theme="dark"] .bl-search input { background: #1d222b; border-color: #2c313c; color: #e7eaf0; }
html[data-bs-theme="dark"] .bl-cats li + li, html[data-bs-theme="dark"] .bl-pop li + li { border-color: #2c313c; }
html[data-bs-theme="dark"] .bl-cats b, html[data-bs-theme="dark"] .bl-tags a { background: #262c37; color: #aab1bd; }
html[data-bs-theme="dark"] .bl-sub { background: #1b2028; border-color: #2c313c; }

/* 메인 화면: 카드 · 히어로 (게시판 스킨 'blog' 의 카드 모양을 테마에서도 쓴다) */
.bl-home, .bl-board { --bl-line: #e6e8ec; --bl-primary: #2563eb; }
/* ===== 블로그형 카드 목록 ===== */
.bl-empty { padding: 60px 0; text-align: center; color: #8b93a1; border: 1px dashed var(--bl-line); border-radius: 12px; }
.bl-list { display: grid; gap: 22px; }
.bl-card { position: relative; display: grid; grid-template-columns: 273px minmax(0, 1fr); min-height: 255px; border: 1px solid var(--bl-line); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 1px 4px rgba(16, 24, 40, .06); transition: box-shadow .2s, transform .2s; }
.bl-card:hover { box-shadow: 0 8px 22px rgba(16, 24, 40, .1); transform: translateY(-2px); }
.bl-card__chk { position: absolute; left: 10px; bottom: 10px; z-index: 3; }
.bl-card__img { position: relative; display: block; background: #eceef1; overflow: hidden; }
.bl-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bl-card:hover .bl-card__img img { transform: scale(1.04); }
.bl-card__noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #b8bec9; }
.bl-badge { position: absolute; left: 20px; top: 20px; padding: 4px 10px; border-radius: 4px; color: #fff; font-size: 12px; font-style: normal; font-weight: 600; line-height: 1.3; }
.bl-card__body { display: flex; flex-direction: column; min-width: 0; }
.bl-card__main { flex: 1; padding: 20px 20px 16px; min-width: 0; }
.bl-card__t { margin: 0 0 14px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.bl-card__t a { color: var(--kc-text, #1d2330); text-decoration: none; }
.bl-card__t a:hover { color: var(--bl-primary); }
.bl-card__x { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 16px; color: #8b93a1; font-size: 13.5px; line-height: 1.6; }
.bl-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.bl-card__tags a { padding: 3px 9px; border: 1px solid var(--bl-line); border-radius: 3px; color: #4a5565; font-size: 12px; text-decoration: none; }
.bl-card__tags a:hover { border-color: var(--bl-primary); color: var(--bl-primary); }
.bl-card__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: #8b93a1; font-size: 13px; }
.bl-card__meta i { margin-right: 5px; font-size: 12px; }
.bl-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--bl-line); }
.bl-card__by { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; }
.bl-card__by b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-card__by img, .bl-card__ava { width: 24px; height: 24px; flex: none; border-radius: 50%; object-fit: cover; }
.bl-card__ava { display: inline-grid; place-items: center; background: #dbe4ff; color: #3b5bdb; font-size: 11px; font-weight: 700; }
.bl-card__more { flex: none; color: var(--bl-primary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.bl-card__more i { margin-left: 4px; font-size: 11px; }
.bl-card.is-notice { border-color: #f0c4be; }


@media (max-width: 767.98px) {
  .bl-card { grid-template-columns: 1fr; }
  .bl-card__img { aspect-ratio: 16 / 9; }
  .bl-card__main { padding: 16px; }
  .bl-card__foot { padding: 12px 16px; }
}

html[data-bs-theme="dark"] .bl-card { background: #1b2028; border-color: #2c313c; }
html[data-bs-theme="dark"] .bl-card__t a { color: #e7eaf0; }
html[data-bs-theme="dark"] .bl-card__foot, html[data-bs-theme="dark"] .bl-card__tags a { border-color: #2c313c; }
html[data-bs-theme="dark"] .bl-card__tags a { color: #aab1bd; }


.bl-home__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 38px 0 18px; }
.bl-home__head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.bl-home__head a { color: var(--bl-primary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.bl-home__head i { margin-left: 4px; font-size: 11px; }

.bl-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--bl-line); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 2px 10px rgba(16, 24, 40, .06); }
.bl-hero__img { position: relative; display: block; min-height: 340px; background: #eceef1; overflow: hidden; }
.bl-hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bl-hero:hover .bl-hero__img img { transform: scale(1.03); }
.bl-hero__body { display: flex; flex-direction: column; min-width: 0; padding: 32px 34px 24px; }
.bl-hero__k { margin-bottom: 14px; color: var(--bl-primary); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.bl-hero__t { margin: 0 0 16px; font-size: 26px; font-weight: 800; line-height: 1.35; }
.bl-hero__t a { color: var(--kc-text, #1d2330); text-decoration: none; }
.bl-hero__t a:hover { color: var(--bl-primary); }
.bl-hero__x { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 18px; color: #6b7585; font-size: 14.5px; line-height: 1.7; }
.bl-hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; }
.bl-hero .bl-card__tags { margin-bottom: 16px; }

html[data-bs-theme="dark"] .bl-hero { background: #1b2028; border-color: #2c313c; box-shadow: none; }
html[data-bs-theme="dark"] .bl-hero__t a, html[data-bs-theme="dark"] .bl-home__head h2 { color: #e7eaf0; }
html[data-bs-theme="dark"] .bl-hero__x { color: #aab1bd; }

@media (max-width: 991.98px) {
  .bl-hero { grid-template-columns: 1fr; }
  .bl-hero__img { min-height: 0; aspect-ratio: 16 / 9; }
  .bl-hero__body { padding: 22px 20px 18px; }
  .bl-hero__t { font-size: 21px; }
}
html[data-bs-theme="dark"] .bl-card__img, html[data-bs-theme="dark"] .bl-hero__img { background: #242a35; }
html[data-bs-theme="dark"] .bl-card__noimg { color: #5b6577; }

/* 넓은 화면: 스크롤해도 사이드바가 따라온다. 안쪽 스크롤바는 만들지 않는다.
   사이드바가 화면보다 길면 front.js 가 top 을 음수로 줘서, 끝까지 내려가야 아래쪽이 붙는다. */
@media (min-width: 992px) {
  .bl-side { position: sticky; top: 100px; }
}
