/* =====================================================
   BLOG POST READING BAR & STICKY ARTICLE HEADER
   ===================================================== */

/* Sticky reading header that appears while scrolling */
.blog-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(10, 15, 28, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 24px;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.blog-reading-bar.visible {
  transform: translateY(0);
  pointer-events: all;
}

.blog-reading-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-reading-bar-site {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary, #2E7D32);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
}

.blog-reading-bar-sep {
  color: rgba(255,255,255,0.25);
  font-size: 0.9rem;
}

.blog-reading-bar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Reading progress bar (thin stripe at very top) */
.blog-progress-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary, #2E7D32), #4ade80);
  z-index: 3000;
  transition: width 0.1s linear;
}

/* Table of Contents sidebar */
.blog-toc {
  position: sticky;
  top: 100px;
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.blog-toc h4 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500, #64748b);
  margin-bottom: 16px;
}
.blog-toc a {
  display: block;
  color: var(--gray-600, #475569);
  text-decoration: none;
  padding: 5px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: 0.2s;
}
.blog-toc a:hover,
.blog-toc a.active {
  color: var(--primary, #2E7D32);
  border-left-color: var(--primary, #2E7D32);
}

/* Blog layout with optional sidebar */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr 240px;
  }
}

/* Admin article editor improvements */
.editor-toolbar button {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s;
}
.editor-toolbar button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Blog card hover enhancements */
.blog-card {
  transition: transform 0.25s, box-shadow 0.25s;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
