/* ==========================================================================
   PoofShare - Blog Engine Stylesheet
   Includes 3-column article reader, sticky TOC, top progress bar,
   card grid, callouts, TL;DR box, FAQ accordions, and responsive viewports.
   ========================================================================== */

/* Top Reading Progress Bar */
.blog-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #7c5cff), var(--success, #10b981));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   Blog Index & Category Archive Layout
   ========================================================================== */
.blog-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Align Navbar and Footer with 1200px Layout */
.blog-body .nav-container,
.blog-body .footer-container {
  max-width: 1200px;
}

.blog-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  flex: 1 0 auto;
}

.blog-hero {
  margin-bottom: 40px;
}

.blog-breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.blog-breadcrumbs a:hover {
  color: var(--accent);
}

.blog-breadcrumbs .current {
  color: var(--text);
  font-weight: 500;
}

.blog-hero-title {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.blog-hero-subtitle {
  font-size: 17px;
  color: var(--muted);
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 7px 16px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.category-pill:hover {
  border-color: rgba(124, 92, 255, 0.4);
  color: #fff;
  background: var(--surface-2);
}

.category-pill.active {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.15);
  color: #fff;
}

.pill-count {
  font-size: 11px;
  color: var(--muted);
}

/* Blog Posts Grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.post-card-media {
  display: block;
  text-decoration: none;
  background: var(--surface-2);
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-thumb-fallback {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(16, 185, 129, 0.08));
}

.post-thumb-fallback svg {
  width: 44px;
  height: 44px;
  color: var(--muted);
  opacity: 0.6;
}

.post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.post-cat-badge {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-light);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.post-card-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.post-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-card-title a:hover {
  color: var(--accent-light);
}

.post-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 0 auto;
}

.post-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.read-more-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.post-card:hover .read-more-link {
  color: var(--accent-light);
}

.post-card:hover .read-more-link svg {
  transform: translateX(3px);
}

.blog-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.blog-empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.blog-empty-state h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}

.blog-empty-state p {
  color: var(--muted);
  font-size: 14px;
  max-width: 440px;
  margin: 0 auto;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.page-indicator {
  font-size: 14px;
  color: var(--muted);
}

/* ==========================================================================
   Article Reader Page (3-Column Layout)
   ========================================================================== */
.blog-article-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.article-page-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  flex: 1 0 auto;
}

/* Align Navbar and Footer with 1200px Article Layout */
.blog-article-body .nav-container,
.blog-article-body .footer-container {
  max-width: 1200px;
}

.article-breadcrumbs-wrap {
  margin-bottom: 24px;
}

.article-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px) 72px;
  gap: 36px;
  justify-content: center;
  align-items: start;
}

/* Left Sidebar (Sticky Table of Contents) */
.blog-sidebar-left {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.blog-sidebar-empty {
  visibility: hidden;
}

.sticky-toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.toc-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

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

.toc-item {
  line-height: 1.4;
}

.toc-item-sub {
  padding-left: 12px;
}

.toc-link {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding: 3px 0 3px 10px;
  transition: all 0.15s ease;
}

.toc-link:hover {
  color: var(--text);
}

.toc-link.active {
  color: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Center Prose Column */
.blog-prose-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.article-header {
  margin-bottom: 32px;
}

.article-meta-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.article-lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.author-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.author-subtext {
  font-size: 12px;
  color: var(--muted);
}

.article-hero-media {
  margin: 0 0 36px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.article-hero-media:hover .article-hero-img {
  transform: scale(1.01);
}

/* Article Body Typography & Elements */
.article-body-content {
  font-size: 16.5px;
  line-height: 1.8;
  color: #d8d8e4;
}

.article-body-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 44px 0 16px;
  scroll-margin-top: 96px;
}

.article-body-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 32px 0 12px;
  scroll-margin-top: 96px;
}

.article-body-content p {
  margin-bottom: 22px;
}

.article-body-content ul,
.article-body-content ol {
  margin: 0 0 24px 24px;
}

.article-body-content li {
  margin-bottom: 8px;
}

.article-body-content a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.article-body-content a:hover {
  color: #fff;
}

.article-body-content blockquote {
  border-left: 3px solid var(--accent);
  background: rgba(124, 92, 255, 0.06);
  padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  color: #e5e5f0;
  font-style: italic;
}

.article-body-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #f472b6;
}

.code-container {
  position: relative;
  margin: 28px 0;
  background: #09090d;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-container pre {
  padding: 20px;
  overflow-x: auto;
  margin: 0;
}

.code-container code {
  background: transparent;
  padding: 0;
  color: #e2e8f0;
  font-size: 14px;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-code-btn:hover {
  color: #fff;
  border-color: var(--accent);
}

/* Responsive Table Wrappers & Tables */
.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
  text-align: left;
}

.article-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.article-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #d1d5db;
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Figures & Images */
.blog-figure {
  margin: 32px 0;
  text-align: center;
}

.blog-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-figure:hover .blog-img {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(124, 92, 255, 0.16);
  transform: scale(1.008);
}

.blog-figure figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* Key Takeaways / TL;DR Box */
.tldr-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
  padding: 22px;
  margin: 28px 0 36px;
}

.tldr-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-size: 15px;
  margin-bottom: 10px;
}

.tldr-icon {
  width: 20px;
  height: 20px;
}

.tldr-body {
  font-size: 15.5px;
  color: #e2e8f0;
  line-height: 1.65;
}

/* Callout Cards */
.callout {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 26px 0;
  border-left: 4px solid;
}

.callout-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.callout-content {
  font-size: 15px;
  line-height: 1.6;
}

.callout-note {
  background: rgba(124, 92, 255, 0.08);
  border-left-color: var(--accent);
}
.callout-note .callout-title { color: var(--accent-light); }

.callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: #10b981;
}
.callout-tip .callout-title { color: #10b981; }

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}
.callout-warning .callout-title { color: #f59e0b; }

.callout-important {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444;
}
.callout-important .callout-title { color: #ef4444; }

/* FAQ Accordion Items inside Article Content (Harmonized with faq.css) */
.article-content .faq-item {
  margin: 16px 0;
}

/* Feedback Micro-Interaction */
.feedback-widget {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 44px 0 28px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feedback-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  gap: 10px;
}

.feedback-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
}

.feedback-thanks {
  color: #10b981;
  font-size: 14px;
  font-weight: 500;
}

/* Author Card */
.author-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 36px;
}

.author-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.author-card-text h4 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.author-card-text p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Related Posts */
.related-posts-section {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  border-color: rgba(124, 92, 255, 0.45);
  transform: translateY(-2px);
}

.related-read-time {
  font-size: 11px;
  color: var(--accent-light);
  font-weight: 600;
  text-transform: uppercase;
}

.related-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  line-height: 1.4;
}

/* Right Sidebar (Floating Tools) */
.blog-sidebar-right {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-share-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 56px;
}

.share-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.share-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 9.5px;
  gap: 2px;
}

.share-btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--accent-light);
}

.share-btn svg {
  width: 17px;
  height: 17px;
}

/* Toast Notification */
.blog-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.blog-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile Table of Contents Accordion */
.mobile-toc-accordion {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 28px;
}

.mobile-toc-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.mobile-toc-summary::-webkit-details-marker {
  display: none;
}

.mobile-toc-summary .toc-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.mobile-toc-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.mobile-toc-accordion[open] .mobile-toc-chevron {
  transform: rotate(180deg);
}

.mobile-toc-list {
  list-style: none;
  padding: 12px 0 4px 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 10px;
}

/* Mobile Share Strip */
.mobile-share-strip {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.mobile-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.mobile-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-share-btn:hover {
  border-color: var(--accent);
  color: #fff;
}

.mobile-share-btn svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   Responsive Viewports
   ========================================================================== */
@media (max-width: 1180px) {
  .article-grid {
    grid-template-columns: minmax(0, 780px) 64px;
    gap: 24px;
  }
  .blog-sidebar-left {
    display: none;
  }
  .mobile-toc-accordion {
    display: block;
  }
}

@media (max-width: 820px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
  .blog-sidebar-right {
    display: none;
  }
  .mobile-share-strip {
    display: flex;
  }
  .blog-prose-container {
    min-width: 0;
    max-width: 100%;
    padding: 28px 20px;
  }
  .code-container {
    min-width: 0;
    max-width: 100%;
  }
  .code-container pre {
    max-width: 100%;
    overflow-x: auto;
    padding-top: 36px;
    -webkit-overflow-scrolling: touch;
  }
  .article-table-wrap {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article-title {
    font-size: 26px;
  }
  .blog-hero-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .article-page-layout {
    padding: 16px 12px 60px;
  }
  .blog-prose-container {
    padding: 18px 12px;
    border-radius: var(--radius-sm);
  }
  .article-title {
    font-size: 21px;
    line-height: 1.3;
  }
  .article-lead {
    font-size: 14.5px;
    line-height: 1.55;
  }
  .blog-breadcrumbs .current {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
  }
  .feedback-widget {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .author-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Blog Image Lightbox & Shimmer Skeleton Zoom
   ========================================================================== */
.blog-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 15, 0.94);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
}

.blog-lightbox-modal.active {
  display: flex;
}

.blog-lightbox-wrap {
  position: relative;
  width: 92vw;
  height: 86vh;
  max-width: 1200px;
  max-height: 850px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.blog-lightbox-skeleton {
  position: absolute;
  inset: 0;
  background: #14141a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  min-height: 240px;
  border-radius: var(--radius-sm);
  z-index: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blog-lightbox-skeleton.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.blog-skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(124, 92, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(124, 92, 255, 0.08) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: blog-skeleton-shimmer 1.8s infinite ease-in-out;
}

@keyframes blog-skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.blog-skeleton-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.blog-skeleton-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  opacity: 0.6;
  animation: blog-skeleton-pulse 2s infinite ease-in-out;
}

@keyframes blog-skeleton-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

.blog-lightbox-img {
  width: 100%;
  height: 100%;
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
  cursor: zoom-out;
}

.blog-lightbox-img.loaded {
  opacity: 1;
}

.blog-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(20, 20, 26, 0.85);
  color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  z-index: 10;
  transition: all 0.2s ease;
}

.blog-lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

.blog-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 26, 0.85);
  color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 10;
  transition: all 0.2s ease;
}

.blog-lightbox-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

.blog-lightbox-prev {
  left: 24px;
}

.blog-lightbox-next {
  right: 24px;
}

.blog-lightbox-footer {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 26, 0.85);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
  border: 1px solid var(--border);
  max-width: 82vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 640px) {
  .blog-lightbox-modal {
    padding: 12px;
  }
  .blog-lightbox-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .blog-lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
  .blog-lightbox-prev {
    left: 10px;
  }
  .blog-lightbox-next {
    right: 10px;
  }
  .blog-lightbox-footer {
    bottom: 14px;
    font-size: 0.8rem;
    padding: 6px 14px;
  }
}
