/* ============================================================
   와이즈플랜랩 블로그 목록 · 상세 · 인라인 SVG 전용 스타일
   ============================================================ */

/* 카테고리 필터 탭 */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  color: #475569;
  border: 1px solid var(--line);
  transition: all 0.15s;
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand); }
.cat-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat-tab .cnt {
  font-size: 11.5px;
  opacity: 0.8;
  background: rgba(15, 23, 42, 0.08);
  padding: 1px 7px;
  border-radius: 999px;
}
.cat-tab.active .cnt { background: rgba(255, 255, 255, 0.22); opacity: 1; }

/* 검색바 */
.blog-search {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 460px;
}
.blog-search input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
}
.blog-search input:focus { outline: none; border-color: var(--brand); }

/* 포스트 카드 */
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: #BFDBFE;
}
.post-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.post-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-ink);
  line-height: 1.38;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.post-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #94A3B8;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ───────── 상세 페이지 레이아웃 ───────── */
.post-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 980px) {
  .post-wrap { grid-template-columns: 1fr; }
  .post-sidebar { order: -1; position: static !important; }
}

.post-article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px 42px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .post-article { padding: 24px 18px; } }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { text-decoration: none; color: var(--brand); font-weight: 600; }
.post-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.post-header h1 {
  margin-top: 12px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  color: var(--brand-ink);
  letter-spacing: -0.03em;
  line-height: 1.28;
}
.post-header .post-summary {
  margin-top: 14px;
  font-size: 16.5px;
  color: #475569;
  line-height: 1.65;
}
.post-meta-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.post-meta-bar b { color: var(--brand-ink); }

/* 본문 타이포그래피 */
.post-body h2 {
  font-size: 23px;
  font-weight: 800;
  color: var(--brand-ink);
  letter-spacing: -0.02em;
  margin: 42px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-50);
  scroll-margin-top: 86px;
}
.post-body h3 {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--brand-deep);
  margin: 28px 0 12px;
  scroll-margin-top: 86px;
}
.post-body p {
  font-size: 16.5px;
  line-height: 1.82;
  color: #1E293B;
  margin-bottom: 18px;
}
.post-body ul, .post-body ol {
  margin: 12px 0 20px 22px;
}
.post-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 8px;
}
.post-body blockquote,
.callout-box {
  background: var(--brand-50);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: #1E293B;
}
.callout-warn {
  background: #FFFBEB;
  border-left: 4px solid var(--accent-amber);
  border-radius: 0 12px 12px 0;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 15.5px;
  line-height: 1.7;
}
.post-body pre {
  background: #0F172A;
  color: #E2E8F0;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0 24px;
}
.post-body code {
  font-family: Consolas, Monaco, monospace;
  background: #F1F5F9;
  color: #0F172A;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}
.post-body pre code { background: transparent; color: inherit; padding: 0; }

/* 표 */
.table-wrap { overflow-x: auto; margin: 24px 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--line);
}
.post-body th, .post-body td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  line-height: 1.55;
}
.post-body th {
  background: var(--brand-50);
  color: var(--brand-ink);
  font-weight: 700;
}
.post-body tr:nth-child(even) td { background: #F8FAFC; }

/* 인라인 SVG 다이어그램 컨테이너 */
.svg-figure {
  margin: 28px 0;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.svg-figure svg {
  width: 100%;
  height: auto;
  display: block;
}
.svg-figure figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* 태그, 저자 박스, 이전/다음글 */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-tag { font-size: 13px; color: var(--brand-deep); background: var(--brand-50); padding: 4px 11px; border-radius: 999px; font-weight: 600; }

.author-box {
  margin-top: 32px;
  padding: 22px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.author-box h4 { font-size: 16px; font-weight: 800; color: var(--brand-ink); }
.author-box .author-role { font-size: 13px; color: var(--brand); font-weight: 700; margin-top: 2px; }
.author-box p { font-size: 14px; color: #475569; margin-top: 8px; line-height: 1.6; }

.post-nav {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.post-nav a {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}
.post-nav a:hover { border-color: var(--brand); }
.post-nav .pn-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.post-nav .pn-title { font-size: 14.5px; font-weight: 700; color: var(--brand-ink); margin-top: 4px; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }

/* 우측 Sticky 목차 */
.post-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.toc-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.toc-box h4 { font-size: 14px; font-weight: 800; color: var(--brand-ink); margin-bottom: 12px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.toc-list a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
  padding-left: 10px;
  border-left: 2px solid transparent;
}
.toc-list a.lv3 { padding-left: 20px; font-size: 12.8px; }
.toc-list a:hover, .toc-list a.active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 700;
}
