/* ============================================
   크레센영어교습소 블로그 스타일 v3 (독자적 미니사이트)
   - 블로그 전용 상단바/하단바 (홈페이지 메뉴·푸터 없음)
   - 좌측 사이드바 (검색 + 카테고리)
   - SVG 영어교육 히어로 배경 + 세로 리스트
   ============================================ */

/* ===== 블로그 전용 상단바 ===== */
.blog-body {
  margin: 0;
  font-family: 'Pretendard', 'Poppins', -apple-system, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  font-size: 16px;
}
.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 8px rgba(15,23,42,.05);
}
.blog-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.blog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  flex-shrink: 0;
}
.blog-brand-logo { height: 40px; width: auto; }
.blog-brand-text { font-size: 18px; font-weight: 600; }
.blog-brand-text strong { color: #1e3a8a; font-weight: 800; }
.blog-topnav {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}
.blog-topnav a {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  transition: all .15s;
}
.blog-topnav a:hover { background: #f1f5f9; color: #1e3a8a; }
.blog-topnav .btn-blog { background: #1e3a8a; color: #fff; }
.blog-topnav .btn-blog:hover { background: #1e40af; color: #fff; }

.blog-lang-toggle {
  display: none;  /* 모바일에서만 */
  margin-left: auto;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
}
.blt-caret { font-size: 10px; opacity: .6; }

.blog-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: auto;
}
.blog-lang-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  border: 1px solid transparent;
  transition: all .15s;
}
.blog-lang-item:hover { background: #f1f5f9; }
.blog-lang-item.active { background: #1e3a8a; color: #fff; }
.blog-lang-item img { border-radius: 2px; display: block; }
.blog-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
body.blog-lang-open .blog-backdrop { opacity: 1; pointer-events: auto; }

/* ===== 블로그 전용 하단바 (심플 — 브랜드 + © + 관리자 아이콘) ===== */
.blog-bottombar {
  background: #0c1f4b;
  color: #cbd5e1;
  padding: 40px 20px 32px;
  margin-top: 0;
}
.blog-bottombar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.bb-brand { font-size: 18px; color: #fff; }
.bb-brand strong { color: #fbbf24; }
.bb-tag { display: block; font-size: 14px; color: #94a3b8; margin-top: 6px; }
.bb-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  width: 100%;
  max-width: 560px;
  justify-content: center;
  font-size: 13px;
  color: #94a3b8;
}
/* 관리자 로그인 아이콘 (© 옆) */
.bb-admin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
  transition: all .15s ease;
}
.bb-admin-icon:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .blog-topbar-inner { height: 58px; gap: 10px; }
  .blog-brand-logo { height: 32px; }
  .blog-brand-text { font-size: 15px; }
  .blog-topnav { margin-left: 4px; gap: 4px; }
  .blog-topnav a { padding: 7px 10px; font-size: 13px; }
  .blog-lang-toggle { display: inline-flex; }
  /* 모바일: 언어 패널 드롭다운 */
  .blog-langs {
    display: none;
    position: fixed;
    top: 64px; right: 12px; left: 12px;
    max-width: 360px; margin-left: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0,0,0,.2);
    padding: 12px;
    z-index: 101;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  body.blog-lang-open .blog-langs { display: grid; }
  .blog-lang-item { padding: 10px 12px; border: 1px solid #e2e8f0; }
  .blog-lang-item img { width: 26px; height: 19px; }
  .blog-lang-item span { font-size: 14px; }
  .bb-contact { margin-left: 0; width: 100%; }
  .bb-links { width: 100%; }
}


/* ===== 컨테이너 (블로그는 main.css 미로드 → 직접 정의) ===== */
.blog-body .container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

/* ===== 히어로 영역 ===== */
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
  color: #fff;
  text-align: center;
  margin-bottom: 0;
}

/* 히어로 상단 내비 (블로그홈 + 홈페이지 바로가기) */
.blog-hero-topnav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.bht-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 22px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all .15s ease;
}
.bht-blog {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
}
.bht-blog:hover { background: rgba(255,255,255,.28); }
.bht-home {
  background: #fbbf24;
  border: 1px solid #fbbf24;
  color: #0f172a;
}
.bht-home:hover { background: #fff; transform: translateY(-1px); }
.blog-hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.blog-hero .container {
  position: relative;
  z-index: 1;
}

/* ===== 메인 히어로 (웹지원센터 스타일 — 좌측 정렬 + 언어pill + 검색) ===== */
.blog-hero--main { padding: 56px 0 52px; text-align: left; }
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, rgba(12,31,75,.92) 0%, rgba(30,58,138,.72) 45%, rgba(30,64,175,.25) 100%);
}
.blog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  text-align: left;
}
.blog-hero--main .blog-breadcrumb { text-align: left; }
.blog-hero--main .blog-hero-title {
  text-align: left;
  margin: 6px 0 12px;
  font-size: 42px;
}
.blog-hero--main .blog-hero-sub {
  text-align: left;
  margin: 0 0 22px;
  max-width: 560px;
}

/* 언어 pill 스위처 */
.blog-hero-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
  max-width: 720px;
}
.bhl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 22px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: all .15s ease;
}
.bhl-pill img { border-radius: 2px; display: block; }
.bhl-pill:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.bhl-pill.active {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #0f172a;
}
.bhl-name { font-weight: 700; }

/* 히어로 검색창 */
.blog-hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  overflow: hidden;
}
.bhs-icon { padding: 0 4px 0 18px; font-size: 18px; color: #94a3b8; }
.blog-hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 16px 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  color: #0f172a;
  background: transparent;
}
.blog-hero-search button {
  border: 0;
  background: #1e3a8a;
  color: #fff;
  padding: 0 26px;
  align-self: stretch;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.blog-hero-search button:hover { background: #1e40af; }
.blog-breadcrumb {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  margin-bottom: 14px;
}
.blog-breadcrumb a {
  color: #fbbf24;
  text-decoration: none;
  margin: 0 4px;
}
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-hero-cat {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.blog-hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  word-break: keep-all;
}
.blog-hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,.92);
  margin: 0 auto 14px;
  max-width: 720px;
  line-height: 1.6;
  word-break: keep-all;
}
.blog-hero-meta {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  margin-top: 12px;
}

/* ===== 레이아웃 ===== */
.blog-layout {
  background: #f8fafc;
  padding: 40px 0 80px;
  min-height: 60vh;
}
.blog-grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ===== 좌측 사이드바 ===== */
.blog-sidebar {
  position: sticky;
  top: 90px;
}
.bsb-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.bsb-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 14px;
  color: #1e3a8a;
  padding-bottom: 10px;
  border-bottom: 2px solid #fbbf24;
}
.bsb-cats { list-style: none; padding: 0; margin: 0; }
.bsb-cats li { margin: 0; }
.bsb-cats a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #475569;
  font-size: 15px;
  font-weight: 600;
  transition: all .15s ease;
  border-left: 3px solid transparent;
}
.bsb-cats a:hover {
  background: #f1f5f9;
  color: #1e3a8a;
  border-left-color: var(--cat-color, #1e3a8a);
}
.bsb-cats a.active {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #92400e;
  border-left-color: #d4a017;
  font-weight: 800;
}
.bsb-emoji {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.bsb-cats a > span:last-child {
  margin-left: auto;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.bsb-cats a.active > span:last-child {
  background: #d4a017;
  color: #fff;
}
.bsb-cta { background: linear-gradient(135deg, #fef3c7, #fffbeb); border-color: #fbbf24; }
.bsb-cta h3 { color: #92400e; margin: 0 0 8px; font-size: 16px; }
.bsb-cta p { color: #78350f; font-size: 14px; margin: 0 0 12px; }
.bsb-cta .btn { width: 100%; margin-top: 6px; text-align: center; }

/* ===== 사이드바 검색 ===== */
.bsb-search-form { display: flex; gap: 0; }
.bsb-search-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.bsb-search-form input:focus { border-color: #fbbf24; }
.bsb-search-form button {
  padding: 11px 16px;
  background: #1e3a8a;
  color: #fff;
  border: 0;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-size: 16px;
}
.bsb-search-form button:hover { background: #1e40af; }

/* ===== 세로 리스트 (kfbsa 레퍼런스 패턴) ===== */
.blog-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.bl-item {
  border-bottom: 1px solid #e2e8f0;
}
.bl-item:first-child { border-top: 1px solid #e2e8f0; }
.bl-link {
  display: flex;
  gap: 18px;
  padding: 22px 12px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  transition: background .15s ease;
}
.bl-link:hover { background: #fffbeb; }
.bl-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bl-emoji { font-size: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.bl-thumb--img { background-size: cover; background-position: center; background-repeat: no-repeat; }
.bl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 700;
}
.bl-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  word-break: keep-all;
}
.bl-link:hover .bl-title { color: #1e40af; }
.bl-feat { color: #d4a017; font-style: normal; }
.bl-excerpt {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  word-break: keep-all;
}
.bl-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

/* ===== 메인 (카드 그리드) ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.bp-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.bp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  border-color: #fbbf24;
}
.bp-cover {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.bp-emoji {
  font-size: 72px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}
.bp-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.bp-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.bp-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
  color: #0f172a;
  word-break: keep-all;
}
.bp-excerpt {
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  word-break: keep-all;
  flex: 1;
}
.bp-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
}

/* ===== 페이저 ===== */
.blog-pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.blog-pager a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 700;
}
.blog-pager a:hover { background: #f1f5f9; }
.blog-pager a.active {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

/* ===== 빈 상태 ===== */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 18px;
}

/* ===== 단일 게시물 ===== */
.blog-article {
  background: #fff;
  border-radius: 14px;
  padding: 36px 40px;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  border: 1px solid #e2e8f0;
}
.ba-content {
  font-size: 17px;
  line-height: 1.85;
  color: #0f172a;
  word-break: keep-all;
}
.ba-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fbbf24;
}
.ba-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
  margin: 24px 0 10px;
}
.ba-content p { margin: 12px 0; }
.ba-content ul, .ba-content ol { padding-left: 28px; margin: 14px 0; }
.ba-content li { margin: 6px 0; }
.ba-content strong { color: #1e3a8a; font-weight: 800; }
.ba-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}
.ba-content table th, .ba-content table td {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.ba-content table th {
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
}
.ba-content a {
  color: #1e40af;
  text-decoration: underline;
}
.ba-tags {
  margin: 32px 0 0;
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 14px;
  color: #475569;
}
.ba-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #fbbf24;
  color: #0f172a;
  border-radius: 12px;
  font-weight: 700;
  margin: 2px 4px;
  font-size: 13px;
}
.ba-cta {
  margin-top: 36px;
  padding: 28px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border-radius: 12px;
  text-align: center;
  border: 1px solid #fbbf24;
}
.ba-cta p { margin: 0 0 14px; font-size: 17px; color: #92400e; }
.ba-cta .btn { margin: 4px; }
.ba-back { margin-top: 28px; text-align: center; }

/* ===== 모바일 ===== */
@media (max-width: 900px) {
  .blog-grid-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; margin-bottom: 0; }
  .bsb-cats { display: flex; flex-wrap: wrap; gap: 6px; }
  .bsb-cats li { flex: 1 1 auto; min-width: 130px; }
  .bsb-cats a { padding: 10px 12px; font-size: 14px; }
  .bsb-cta { display: none; }
}
@media (max-width: 768px) {
  .blog-body .container { padding: 0 16px; }
  .blog-hero-topnav { gap: 6px; margin-bottom: 14px; }
  .bht-link { padding: 7px 12px; font-size: 12px; }
  .bht-home { white-space: nowrap; }
  .blog-hero--main { padding: 28px 0 30px; }
  .blog-hero--main .blog-hero-title { font-size: 26px; }
  .blog-hero-langs { gap: 5px; margin-bottom: 16px; }
  .bhl-pill { padding: 6px 10px; font-size: 12px; }
  .bhl-pill .bhl-name { display: none; }  /* 모바일은 코드만 */
  .blog-hero-search { max-width: 100%; }
  .blog-hero-search input { padding: 13px 10px; font-size: 15px; }
  .blog-hero-search button { padding: 0 18px; }
}
@media (max-width: 600px) {
  .blog-hero { padding: 60px 0 44px; }
  .blog-hero-title { font-size: 26px; padding: 0; }
  .blog-hero-sub { font-size: 15px; padding: 0; }
  .blog-hero--main .blog-hero-title { padding: 0; }
  .blog-hero--main .blog-hero-sub { padding: 0; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article { padding: 24px 20px; }
  .ba-content { font-size: 16px; }
  .ba-content h2 { font-size: 22px; }
  .ba-content h3 { font-size: 18px; }
  .bp-cover { height: 130px; }
  .bp-emoji { font-size: 56px; }
  /* 세로 리스트 모바일 */
  .bl-link { gap: 12px; padding: 16px 4px; }
  .bl-thumb { width: 56px; height: 56px; border-radius: 12px; }
  .bl-emoji { font-size: 28px; }
  .bl-title { font-size: 16px; }
  .bl-excerpt { font-size: 13px; }
}

.btn-block { display: block; width: 100%; }
