/* ============================================================
   BlogSphere - Single Blog Post Stylesheet
   ============================================================
   File:     assets/css/blog-post.css
   Purpose:  Single post page styles

   Table of Contents:
     1. Reading Progress Bar
     2. Post Hero Header
     3. Floating Side Share Buttons
     4. Post Main Layout
     5. Post Introduction
     6. Table of Contents
     7. Post Content (Article Body)
     8. Post Tags
     9. Post Actions Bar
    10. Post Conclusion
    11. Author Bio Box
    12. Comments Section
    13. Related Articles
    14. Post Sidebar
    15. Blog Post Responsive
   ============================================================ */

/* ============================================================
   1. READING PROGRESS BAR (Top fixed)
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: transparent;
  z-index: calc(var(--z-fixed) + 5);
  pointer-events: none;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  transition: width 100ms linear;
}

/* ============================================================
   2. POST HERO HEADER
   ============================================================ */
.post-hero {
  padding: var(--space-lg) 0 var(--space-2xl);
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  flex-wrap: wrap;
}

.post-hero-image-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--color-bg-tertiary);
}

.post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.post-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2xl);
  z-index: 2;
}

.post-hero-category-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.post-hero-category-badge:hover {
  transform: translateY(-1px);
  color: white;
  opacity: 0.9;
}

.post-hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  color: white;
  margin-bottom: var(--space-lg);
  line-height: var(--leading-tight);
  max-width: 900px;
  letter-spacing: -0.02em;
}

.post-hero-meta-bar {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.post-hero-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-hero-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.post-hero-author-details {
  display: flex;
  flex-direction: column;
}

.post-hero-author-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: white;
}

.post-hero-author-role {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
}

.post-hero-meta-item {
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  gap: 2px;
}

.post-hero-meta-item i {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 4px;
}

.post-meta-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-meta-value {
  font-size: var(--text-sm);
  color: white;
  font-weight: var(--weight-medium);
}

.post-hero-share {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-left: auto;
}

.post-hero-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--text-xs);
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.post-hero-share-btn:hover {
  background-color: white;
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* ============================================================
   3. FLOATING SIDE SHARE BUTTONS (Sticky on left)
   ============================================================ */
.post-floating-share {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.post-floating-share.visible {
  opacity: 1;
  visibility: visible;
}

.floating-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.floating-share-btn:hover {
  transform: scale(1.1) translateX(3px);
  color: white;
}

.share-fb {
  background-color: #1877f2;
}
.share-tw {
  background-color: #000000;
}
.share-li {
  background-color: #0a66c2;
}
.share-wa {
  background-color: #25d366;
}
.share-pi {
  background-color: #bd081c;
}

/* ============================================================
   4. POST MAIN LAYOUT
   ============================================================ */
.post-main-section {
  padding-top: var(--space-xl);
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
  align-items: start;
}

.post-article {
  min-width: 0;
}

/* ============================================================
   5. POST INTRODUCTION
   ============================================================ */
.post-intro {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.post-intro-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: var(--leading-snug);
}

.post-intro-subtitle {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ============================================================
   6. TABLE OF CONTENTS + AD ROW
   ============================================================ */
.post-toc-ad-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.post-toc {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.post-toc-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.post-toc-title::before {
  content: '📋';
  font-size: var(--text-base);
}

.post-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-toc-item a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 0.6rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.post-toc-item a::before {
  content: '›';
  color: var(--color-text-light);
  font-size: var(--text-lg);
  line-height: 1;
}

.post-toc-item a:hover {
  background-color: var(--color-bg);
  color: var(--color-primary);
}

.post-toc-item a:hover::before {
  color: var(--color-primary);
}

.post-toc-item.active a {
  background-color: var(--color-primary);
  color: white;
  font-weight: var(--weight-semibold);
}

.post-toc-item.active a::before {
  color: white;
}

.post-toc-item.toc-h3 a {
  padding-left: 1.5rem;
  font-size: var(--text-xs);
}

.post-toc-ad {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ============================================================
   7. POST CONTENT (Article Body)
   ============================================================ */
.post-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--color-text);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.post-content h1 {
  font-size: var(--text-4xl);
}
.post-content h2 {
  font-size: var(--text-3xl);
}
.post-content h3 {
  font-size: var(--text-2xl);
}
.post-content h4 {
  font-size: var(--text-xl);
}

.post-content h2:first-child,
.post-content h3:first-child {
  margin-top: 0;
}

.post-content p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--color-primary-dark);
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--color-text-secondary);
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: var(--space-xs);
  line-height: var(--leading-relaxed);
}

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background-color: var(--color-bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text);
  font-size: var(--text-lg);
}

.post-content blockquote p {
  margin: 0;
  color: inherit;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
  box-shadow: var(--shadow-md);
}

.post-content figure {
  margin: var(--space-xl) 0;
}

.post-content figcaption {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  font-style: italic;
}

.post-content code {
  background-color: var(--color-bg-tertiary);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
  font-family: var(--font-mono);
}

.post-content pre {
  background-color: #1a202c;
  color: #e2e8f0;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

.post-content th,
.post-content td {
  border: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
}

.post-content th {
  background-color: var(--color-bg-secondary);
  font-weight: var(--weight-semibold);
}

.post-content hr {
  margin: var(--space-2xl) 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   8. POST TAGS
   ============================================================ */
.post-tags-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.post-tags-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.post-tag-link {
  padding: 0.35rem 0.85rem;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-tag-link:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* ============================================================
   9. POST ACTIONS BAR (Like, Share, Bookmark)
   ============================================================ */
.post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.post-actions-left {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6rem 1rem;
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.post-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.post-action-btn.active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.post-action-btn.active i {
  font-weight: 900;
}

.post-action-count {
  font-weight: var(--weight-semibold);
  background-color: var(--color-bg-tertiary);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

.post-action-btn.active .post-action-count {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ============================================================
   10. POST CONCLUSION
   ============================================================ */
.post-conclusion {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-primary);
}

.post-conclusion-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.post-conclusion-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ============================================================
   11. AUTHOR BIO BOX
   ============================================================ */
.post-author-bio {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
  background: transparent !important;
  border: none !important;
}

.post-author-bio-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-border-light);
}

.post-author-bio-content {
  flex: 1;
  min-width: 0;
}

.post-author-bio-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
  font-weight: var(--weight-semibold);
}

.post-author-bio-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.post-author-bio-role {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--color-primary);
  background-color: rgba(108, 92, 231, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.post-author-bio-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
}

.post-author-bio-social {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.post-author-bio-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: 50%;
  text-decoration: none;
  font-size: var(--text-xs);
  transition: all var(--transition-fast);
}

.post-author-bio-social a:hover {
  background-color: var(--color-primary);
  color: white;
}

.post-author-bio-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-author-bio-follow-btn:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   12. COMMENTS SECTION
   ============================================================ */
.post-comments-section {
  margin-top: var(--space-2xl);
}

.post-comments-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-border-light);
}

.post-comments-count {
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
  font-size: var(--text-base);
}

/* Comment Form */
.post-comment-form {
  padding: var(--space-lg);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.post-comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.post-comment-form-group {
  margin-bottom: var(--space-md);
}

.post-comment-input,
.post-comment-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  outline: none;
}

.post-comment-input:focus,
.post-comment-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.post-comment-textarea {
  resize: vertical;
  min-height: 100px;
}

.post-comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  align-items: center;
}

.post-comment-cancel-btn {
  padding: 0.65rem 1.25rem;
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.post-comment-cancel-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

.post-comment-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.65rem 2rem;
  background-color: var(--color-text);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.post-comment-submit-btn:hover {
  background: var(--gradient-primary);
  transform: translateY(-1px);
}

.post-comment-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.post-comment-message {
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  text-align: center;
}

.post-comment-message.success {
  background-color: var(--color-success-light);
  color: var(--color-success);
}

.post-comment-message.error {
  background-color: var(--color-error-light);
  color: var(--color-error);
}

/* Comments List */
.post-comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.post-comment-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.post-comment-item.comment-pinned {
  border-color: var(--color-warning);
  background: linear-gradient(to right, rgba(243, 156, 18, 0.05), var(--color-surface));
}

.post-comment-avatar {
  flex-shrink: 0;
  font-size: var(--text-3xl);
  color: var(--color-text-light);
  line-height: 1;
}

.post-comment-body {
  flex: 1;
  min-width: 0;
}

.post-comment-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.post-comment-author {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.post-comment-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.post-comment-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-warning);
  background-color: rgba(243, 156, 18, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
}

.post-comment-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-sm);
  word-wrap: break-word;
}

.post-comment-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.post-comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.post-comment-reply-btn:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.post-comment-likes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Nested Replies */
.post-comment-replies {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.post-comment-reply {
  background-color: var(--color-bg-secondary);
  border: none;
  padding: var(--space-md);
}

.post-comment-reply .post-comment-avatar {
  font-size: var(--text-2xl);
}

.post-no-comments {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--color-text-muted);
}

.post-no-comments i {
  font-size: var(--text-4xl);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

/* ============================================================
   13. RELATED ARTICLES SECTION
   ============================================================ */
.related-articles-section {
  background-color: var(--color-bg-secondary);
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.related-article-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.related-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border);
}

.related-article-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-article-thumb {
  height: 200px;
  overflow: hidden;
  background-color: var(--color-bg-tertiary);
}

.related-article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-article-card:hover .related-article-img {
  transform: scale(1.05);
}

.related-article-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-article-category {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}

.related-article-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  line-height: var(--leading-snug);
}

.related-article-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: var(--leading-normal);
  flex: 1;
}

.related-article-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 11px;
  color: var(--color-text-muted);
}

.related-article-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.related-article-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  margin: 0 var(--space-md) var(--space-md);
  background-color: var(--color-text);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.related-article-btn:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-1px);
}

/* ============================================================
   14. POST SIDEBAR (uses sidebar.css from blog.css)
   ============================================================ */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

/* ============================================================
   15. BLOG POST RESPONSIVE
   ============================================================ */

/* Large Desktop: 1200px */
@media (max-width: 1200px) {
  .post-floating-share {
    display: none;
  }

  .post-hero-title {
    font-size: var(--text-4xl);
  }

  .post-toc-ad-row {
    grid-template-columns: 1fr;
  }

  .post-toc-ad {
    display: none;
  }

  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .post-hero-image-wrap {
    height: 400px;
  }

  .post-hero-content {
    padding: var(--space-xl);
  }

  .post-hero-title {
    font-size: var(--text-3xl);
  }

  .post-hero-meta-bar {
    gap: var(--space-md);
  }

  .post-hero-share {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  .post-hero {
    padding: var(--space-md) 0 var(--space-xl);
  }

  .post-hero-image-wrap {
    height: 320px;
    border-radius: var(--radius-lg);
  }

  .post-hero-content {
    padding: var(--space-lg);
  }

  .post-hero-title {
    font-size: var(--text-2xl);
  }

  .post-hero-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .post-hero-share {
    width: 100%;
    justify-content: flex-start;
  }

  .post-intro-title {
    font-size: var(--text-xl);
  }

  .post-content h1 {
    font-size: var(--text-3xl);
  }
  .post-content h2 {
    font-size: var(--text-2xl);
  }
  .post-content h3 {
    font-size: var(--text-xl);
  }

  .post-comment-form-row {
    grid-template-columns: 1fr;
  }

  .post-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .post-author-bio-social {
    justify-content: center;
  }

  .post-actions-bar {
    justify-content: center;
  }

  .related-articles-grid {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
  .post-hero-image-wrap {
    height: 260px;
  }

  .post-hero-content {
    padding: var(--space-md);
  }

  .post-hero-title {
    font-size: var(--text-xl);
  }

  .post-hero-meta-item {
    font-size: var(--text-xs);
  }

  .post-intro-title {
    font-size: var(--text-lg);
  }

  .post-comments-title {
    font-size: var(--text-lg);
  }

  .post-comment-item {
    padding: var(--space-md);
  }
}
