/* ============================================================
   PNPLINE Korea — Blog (listing + single post)
   Builds on style.css design tokens. Loaded after style.css.
   ============================================================ */

/* ---------- listing meta row ---------- */
.blog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 28px;
}
.blog-count {
  font-family: var(--mono); font-size: 13px; letter-spacing: .02em;
  color: var(--text-3); white-space: nowrap;
}

/* image thumbnails (vs gradient fallback) */
.blog-thumb.has-img { background: var(--mist-2); }
.blog-thumb.has-img::after { display: none; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.3,1); }
.blog-card:hover .blog-thumb img { transform: scale(1.04); }
.blog-card h3 a { color: inherit; transition: color .2s; }
.blog-card:hover h3 a { color: var(--brand-600); }

/* ---------- skeleton loaders ---------- */
.blog-skel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.bs-thumb { aspect-ratio: 16 / 10; background: var(--mist-2); }
.bs-body { padding: 24px; }
.bs-line { height: 12px; border-radius: 6px; background: var(--mist-2); margin-bottom: 12px; }
.bs-line.w40 { width: 40%; } .bs-line.w90 { width: 90%; }
.bs-line.w80 { width: 80%; } .bs-line.w60 { width: 60%; }
.blog-skel .bs-thumb, .blog-skel .bs-line {
  position: relative; overflow: hidden;
}
.blog-skel .bs-thumb::after, .blog-skel .bs-line::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- status (empty / error) ---------- */
.blog-status { display: none; }
.blog-status.show {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; padding: 72px 0;
}
.blog-status i { font-size: 44px; color: var(--text-3); opacity: .6; }
.blog-status p { font-size: 15.5px; color: var(--text-2); max-width: 420px; line-height: 1.6; }
.blog-status .btn { margin-top: 4px; }

/* ---------- pagination ---------- */
.blog-pager {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 52px; flex-wrap: wrap;
}
.pg-btn {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--text-2); background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
  transition: all .18s cubic-bezier(.2,.7,.3,1);
}
.pg-btn:hover:not(:disabled):not(.active) { border-color: var(--brand-500); color: var(--brand-600); transform: translateY(-1px); }
.pg-btn.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 10px 24px -10px rgba(24,95,165,.6); }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-arrow i { font-size: 19px; }
.pg-gap { color: var(--text-3); padding: 0 4px; font-family: var(--mono); }

/* ============================================================
   Single post page
   ============================================================ */
.post-shell { background: var(--mist); padding: 64px 0 96px; min-height: 60vh; }
.post-wrap { max-width: 820px; margin: 0 auto; }

.post-head { margin-bottom: 30px; }
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.post-cat {
  font-size: 12.5px; font-weight: 600; color: var(--brand-600);
  background: rgba(46,134,224,.10); border-radius: 7px; padding: 5px 11px;
}
.post-title {
  font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.22;
  color: var(--ink); text-wrap: pretty; margin-bottom: 18px;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  font-size: 14px; color: var(--text-2);
  padding-bottom: 26px; border-bottom: 1px solid var(--line);
}
.post-meta span { display: inline-flex; align-items: center; gap: 7px; }
.post-meta i { font-size: 17px; color: var(--text-3); }

.post-hero {
  margin: 30px 0 8px; border-radius: var(--radius); overflow: hidden;
  background: var(--mist-2); border: 1px solid var(--line);
}
.post-hero img { width: 100%; height: auto; display: block; }

/* article body — render WordPress content cleanly */
.post-content { font-size: 17px; line-height: 1.85; color: var(--text); }
.post-content > *:first-child { margin-top: 0; }
.post-content p { margin: 0 0 20px; }
.post-content h2, .post-content h3, .post-content h4, .post-content h5,
.post-content .title-h4, .post-content .title-h5 {
  font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  line-height: 1.35; margin: 40px 0 16px;
}
.post-content h2 { font-size: 27px; }
.post-content h3 { font-size: 23px; }
.post-content h4, .post-content .title-h4 { font-size: 20px; }
.post-content h5, .post-content .title-h5 { font-size: 19px; }
.post-content a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.post-content strong, .post-content b { font-weight: 700; color: var(--ink); }
.post-content img { height: auto; border-radius: 12px; margin: 10px 0; }
.post-content figure { margin: 24px 0; }
.post-content figure img { margin: 0 auto; }
.post-content figcaption { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 8px; }
.post-content hr {
  border: none; height: 1px; background: var(--line-2); margin: 32px 0;
}
.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 22px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  margin: 24px 0; padding: 16px 22px;
  border-left: 3px solid var(--brand-500); background: #fff;
  border-radius: 0 12px 12px 0; color: var(--text-2);
}
/* WP oEmbed preview iframes are hidden by core; keep them out of flow */
.post-content iframe.wp-embedded-content { display: none !important; }
.post-content > p:empty, .post-content > div:empty { display: none; }

.post-foot {
  max-width: 820px; margin: 40px auto 0; display: flex; gap: 12px; flex-wrap: wrap;
}

/* loading + error states for single post */
.post-loading, .post-error { max-width: 820px; margin: 0 auto; }
.post-error {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; padding: 60px 0;
}
.post-error i { font-size: 46px; color: var(--text-3); opacity: .6; }
.post-error p { font-size: 15.5px; color: var(--text-2); }
.sk-title { height: 40px; border-radius: 10px; background: var(--mist-2); margin-bottom: 16px; }
.sk-title.short { width: 55%; }
.sk-meta { height: 14px; width: 240px; border-radius: 7px; background: var(--mist-2); margin-bottom: 30px; }
.sk-img { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--mist-2); margin-bottom: 30px; }
.sk-p { height: 13px; border-radius: 6px; background: var(--mist-2); margin-bottom: 14px; }
.sk-p.w95 { width: 95%; } .sk-p.w85 { width: 85%; } .sk-p.w70 { width: 70%; }
.post-loading .sk-title, .post-loading .sk-meta, .post-loading .sk-img,
.post-loading .sk-p { position: relative; overflow: hidden; }
.post-loading .sk-title::after, .post-loading .sk-meta::after, .post-loading .sk-img::after,
.post-loading .sk-p::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}

@media (max-width: 680px) {
  .post-title { font-size: 30px; }
  .post-content { font-size: 16px; }
  .post-shell { padding: 40px 0 72px; }
}
