/* ================================================================
   Blog Single Post — NKD custom layout
   ============================================================ */

.nkd-post {
  padding: 15px 0 0;
}

/* ── Post Header ── */
.nkd-post__title {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  line-height: 1.35;
  margin: 0 0 14px;
}

.nkd-post__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.nkd-post__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nkd-post__author {
  font-weight: 600;
  color: #333;
}

.nkd-post__meta-sep {
  color: #ccc;
}

.nkd-post__cat-pill {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(42, 70, 152, 0.08);
  color: var(--primary-color);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.nkd-post__cat-pill:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ── Featured Image ── */
.nkd-post__featured-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
}

.nkd-post__featured-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ── Content + TOC Layout ── */
.nkd-post__layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  position: relative;
}

/* ── Floating Share Buttons ── */
.nkd-post__share {
  position: fixed;
  left: max(16px, calc((100vw - 1200px) / 2 - 70px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}

.nkd-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nkd-share-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.08);
}

.nkd-share-btn--fb:hover {
  border-color: #1877f2;
  color: #1877f2;
}

.nkd-share-btn--zalo:hover {
  border-color: #0068ff;
  color: #0068ff;
}

.nkd-share-btn--copy.copied {
  border-color: #2e7d32;
  color: #2e7d32;
}

/* ── Post Content Typography ── */
.nkd-post__content {
  min-width: 0;
  font-size: 16px;
  line-height: 1.75;
  color: #333;
}

.nkd-post__content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 32px 0 12px;
  line-height: 1.35;
  scroll-margin-top: 80px;
}

.nkd-post__content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 24px 0 10px;
  line-height: 1.4;
  scroll-margin-top: 80px;
}

.nkd-post__content p {
  margin: 0 0 16px;
}

.nkd-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.nkd-post__content ul,
.nkd-post__content ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.nkd-post__content li {
  margin-bottom: 6px;
}

.nkd-post__content blockquote {
  border-left: 4px solid var(--primary-color);
  margin: 20px 0;
  padding: 12px 20px;
  background: #f8f9fc;
  border-radius: 0 8px 8px 0;
  color: #444;
  font-style: italic;
}

.nkd-post__content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.nkd-post__content a:hover {
  opacity: 0.8;
}

.nkd-post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.nkd-post__content th,
.nkd-post__content td {
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  text-align: left;
}

.nkd-post__content th {
  background: #f5f5f5;
  font-weight: 600;
}

/* ── Table of Contents ── */
.nkd-post__toc-wrap {
  position: relative;
}

.nkd-post__toc {
  position: sticky;
  top: 80px;
  background: #f8f8f8;
  border-radius: 12px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.nkd-post__toc-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.nkd-post__toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nkd-post__toc-nav a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s ease;
}

.nkd-post__toc-nav a:hover {
  color: var(--primary-color);
}

.nkd-post__toc-nav a.active {
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
  background: rgba(42, 70, 152, 0.04);
}

.nkd-post__toc-nav a.toc-h3 {
  padding-left: 24px;
  font-size: 13px;
}

/* Hide TOC if no headings */
.nkd-post__toc:empty,
.nkd-post__toc-nav:empty {
  display: none;
}

/* ── Related Posts ── */
.nkd-related {
  padding: 32px 0 48px;
  border-top: 1px solid #f0f0f0;
  margin-top: 40px;
}

.nkd-related__title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0 0 20px;
}

.nkd-related__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Reuse .nkd-blog-card from blog-category.css */

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nkd-post__share {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 20px;
  }

  .nkd-post__layout {
    grid-template-columns: 1fr;
  }

  .nkd-post__toc {
    position: static;
  }
}

@media (max-width: 768px) {
  .nkd-post__title {
    font-size: 22px;
  }

  .nkd-related__grid {
    grid-template-columns: 1fr;
  }

  .nkd-post__content h2 {
    font-size: 19px;
  }

  .nkd-post__content h3 {
    font-size: 16px;
  }

  .nkd-post__toc-wrap {
    display: none;
  }
}