/* ═══════════════════════════════════════════════════════════════
   MediaVault — blog.css
   Dedicated Styles for Public Blog & CMS Admin Dashboard
   Seamlessly integrates with main.css & dark/light theme
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reading Progress Bar ───────────────────────────────────── */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-main);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease;
}

/* ─── Blog Hub Hero ──────────────────────────────────────────── */
.blog-hero {
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  padding: 5px 16px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-md);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
}

.blog-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

/* Blog Search & Filter Bar */
.blog-search-bar {
  max-width: 580px;
  margin: 0 auto var(--space-md);
  display: flex;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.blog-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-input);
}

.blog-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 18px;
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.blog-search-bar button {
  background: var(--gradient-main);
  border: none;
  color: white;
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-weight: 700;
  font-size: var(--font-size-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.blog-search-bar button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Category Filter Chips */
.blog-category-chips {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.cat-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn);
}

/* ─── Blog Layout (Main Content + Sidebar) ───────────────────── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
}

@media (max-width: 980px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

/* ─── Featured Post Card ─────────────────────────────────────── */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-2xl);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-raised);
}

.featured-img-wrap {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .featured-img-wrap img {
  transform: scale(1.05);
}

.featured-content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.featured-content h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.featured-content p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.author-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 680px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img-wrap {
    height: 200px;
  }
  .featured-content {
    padding: var(--space-md);
  }
}

/* ─── Posts Grid ─────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 680px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-raised);
}

.post-card-thumb {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--bg-secondary);
}

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

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

.post-card-body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.post-card:hover .post-card-title {
  color: var(--primary);
}

.post-card-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-cta {
  margin-top: auto;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
}

.learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.learn-more-btn svg {
  transition: transform var(--transition-fast);
}

.learn-more-btn:hover {
  color: #1d4ed8;
}

.post-card:hover .learn-more-btn svg {
  transform: translateX(4px);
}

.post-card-footer {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ─── Sidebar Widgets ────────────────────────────────────────── */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.sidebar-widget h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Quick Downloader Widget (High Conversion!) */
.quick-dl-widget {
  background: var(--gradient-card);
  border: 2px solid var(--primary-border);
  box-shadow: var(--shadow-raised);
}

.quick-dl-widget h3 {
  color: var(--primary);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 6px;
}

.quick-dl-widget p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.45;
}

.quick-dl-form input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-normal);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  margin-bottom: 8px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.quick-dl-form input:focus {
  border-color: var(--primary);
}

.quick-dl-form button {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--gradient-main);
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-dl-form button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Trending List */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: var(--space-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast);
}

.trending-item:hover {
  transform: translateX(3px);
}

.trending-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  min-width: 24px;
}

.trending-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 4px;
  transition: color var(--transition-fast);
}

.trending-item:hover .trending-info h4 {
  color: var(--primary);
}

.trending-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Category List Widget */
.widget-cat-list {
  list-style: none;
}

.widget-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.widget-cat-item:hover {
  color: var(--primary);
}

.widget-cat-item .count {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ─── Single Post Page Layout ────────────────────────────────── */
.post-header {
  padding: var(--space-2xl) 0 var(--space-lg);
  max-width: 820px;
  margin: 0 auto;
}

.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.post-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

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

.post-header h1 {
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.post-featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-raised);
}

/* Post Container Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-2xl);
  max-width: 1140px;
  margin: 0 auto;
  padding-bottom: var(--space-3xl);
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
}

/* Sticky Table of Contents */
.toc-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.toc-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-list {
  list-style: none;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--transition-fast);
  display: block;
  border-left: 2px solid transparent;
  padding-left: 8px;
}

.toc-list a:hover, .toc-list a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Rich Post Article Body */
.post-body {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-body h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  margin: var(--space-xl) 0 var(--space-sm);
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  line-height: 1.3;
}

.post-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-xs);
  color: var(--text-primary);
}

.post-body p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.post-body ul, .post-body ol {
  margin: 0 0 var(--space-md) var(--space-lg);
  color: var(--text-secondary);
}

.post-body li {
  margin-bottom: 6px;
}

.post-body strong {
  color: var(--text-primary);
}

.post-body a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

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

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

/* In-Article Downloader Conversion CTA Box */
.blog-cta-box {
  background: var(--gradient-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-raised);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-main);
}

.blog-cta-box h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.blog-cta-box p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-md);
}

.blog-cta-input-wrap {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}

.blog-cta-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.blog-cta-input-wrap button {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--gradient-main);
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

/* Social Share Bar */
.post-share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--space-xl) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.post-share-bar span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 6px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.share-btn.whatsapp:hover { background: #25d366; color: white; border-color: #25d366; }
.share-btn.twitter:hover { background: #000000; color: white; border-color: #000; }
.share-btn.facebook:hover { background: #1877f2; color: white; border-color: #1877f2; }
.share-btn.copy:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Author Bio Card */
.author-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.author-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-border);
}

.author-card-info h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.author-card-info span {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

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

/* ═══════════════════════════════════════════════════════════════
   ADMIN CMS DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════ */
.admin-wrapper {
  min-height: 100vh;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.admin-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
  box-shadow: var(--shadow-navbar);
}

.admin-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  color: var(--text-primary);
}

.admin-badge {
  background: #dc2626;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 8px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  background: var(--bg-card);
}

/* Admin Stats Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 860px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.admin-stat-card .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.admin-stat-card .value {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

/* Admin Tables */
.admin-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-table-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
  flex-wrap: wrap;
}

.admin-table-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.admin-table-search {
  display: flex;
  gap: 8px;
}

.admin-table-search input {
  padding: 6px 12px;
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.admin-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.admin-table tr:hover td {
  background: var(--bg-card-hover);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.published {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.status-badge.draft {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

/* Post Editor Form */
.editor-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-normal);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 6px;
  border: 1px solid var(--border-normal);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  flex-wrap: wrap;
}

.tool-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.editor-textarea {
  border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  min-height: 380px;
  font-family: monospace;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Google SERP Preview Simulator */
.serp-preview {
  background: white;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
  font-family: Arial, sans-serif;
}

.serp-url {
  font-size: 12px;
  color: #202124;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.serp-title {
  font-size: 18px;
  color: #1a0dab;
  text-decoration: underline;
  cursor: pointer;
  line-height: 1.3;
  margin-bottom: 4px;
  font-weight: 400;
}

.serp-desc {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.4;
}

/* Admin Auth Modal */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.admin-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-raised);
  text-align: center;
}

.admin-login-card h2 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.admin-login-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════
   v31 Additions — Skeleton Loading, Next/Prev, FAQ, Code Blocks
   ═══════════════════════════════════════════════════════════════ */

/* ─── Skeleton Loading Cards ───────────────────────────────────── */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary, #e2e8f0) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skeleton-body {
  padding: 16px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary, #e2e8f0) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skeleton-line.title { height: 18px; width: 85%; }
.skeleton-line.short { width: 55%; }
.skeleton-line.medium { width: 70%; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Next / Previous Article Navigation ──────────────────────── */
.post-next-prev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: var(--space-2xl) 0;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.post-nav-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text-primary);
}

.post-nav-item.next { text-align: right; }

.post-nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.post-nav-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .post-next-prev { grid-template-columns: 1fr; }
  .post-nav-item.next { text-align: left; }
}

/* ─── Article Reaction Bar ─────────────────────────────────────── */
.post-reaction-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0;
}

.reaction-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-btn:hover, .reaction-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.05);
}

.reaction-btn.liked {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(34,197,94,0.1);
}

.reaction-btn.disliked {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}

.reaction-count {
  font-size: 12px;
  font-weight: 800;
}

/* ─── FAQ Section Styles ───────────────────────────────────────── */
.blog-faq {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}

.blog-faq h2 {
  font-size: 20px !important;
  font-weight: 900 !important;
  margin-bottom: var(--space-lg) !important;
  border-left: none !important;
  padding-left: 0 !important;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-item h3 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 0 8px !important;
  cursor: pointer;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 !important;
  line-height: 1.6;
}

/* ─── Code Block Styles ────────────────────────────────────────── */
.post-body pre {
  position: relative;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-lg);
  padding: 16px 16px 16px 20px;
  overflow-x: auto;
  margin: var(--space-lg) 0;
  font-size: 13px;
  line-height: 1.7;
}

.post-body pre code {
  color: #e6edf3;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  background: none;
  padding: 0;
  border: none;
  font-size: 13px;
}

.post-body code {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12.5px;
  color: var(--primary);
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.code-copy-btn:hover { background: #30363d; color: #e6edf3; }
.code-copy-btn.copied { color: #22c55e; border-color: #22c55e; }

/* ─── Sort Bar for Blog Listing ────────────────────────────────── */
.blog-sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.sort-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.sort-btn {
  padding: 5px 14px;
  border: 1px solid var(--border-normal);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.sort-btn:hover, .sort-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ═══════════════════════════════════════════════════════════════
   v33 Additions — Knowledge Hub Hierarchy, Platform Cards, & Breakpoints
   ═══════════════════════════════════════════════════════════════ */

/* ─── Breadcrumbs Bar ─────────────────────────────────────────── */
.blog-breadcrumbs-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  font-size: 12.5px;
}

.blog-breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.blog-breadcrumbs-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  font-weight: 500;
}

.blog-breadcrumbs-list li a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.blog-breadcrumbs-list li.sep {
  color: var(--text-muted);
  font-size: 11px;
}

.blog-breadcrumbs-list li.active {
  color: var(--text-primary);
  font-weight: 700;
}

/* ─── Platform Knowledge Base Grid ────────────────────────────── */
.hub-platforms-section {
  padding: var(--space-xl) 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.hub-platforms-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.hub-platforms-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hub-platforms-header p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}

.hub-platforms-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hub-platform-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.hub-platform-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.platform-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.platform-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.platform-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.platform-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.platform-arrow {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.hub-platform-card:hover .platform-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* ─── Feed Header Row ─────────────────────────────────────────── */
.feed-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: 8px;
}

.feed-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.post-count-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pagination-controls-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

/* ─── Callouts, Notes & Comparison Tables in Post Content ──────── */
.post-body .callout-note {
  background: rgba(0, 87, 217, 0.07);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: var(--space-lg) 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.post-body .callout-tip {
  background: rgba(34, 197, 94, 0.08);
  border-left: 4px solid #22c55e;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: var(--space-lg) 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.post-body .callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: var(--space-lg) 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.post-body .step-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: var(--space-md) 0;
  box-shadow: var(--shadow-card);
}

.post-body .step-block h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 14px;
}

.post-body table th,
.post-body table td {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.post-body table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Precision Responsive Breakpoints ────────────────────────── */

/* 1440px+ (Large Displays) */
@media (min-width: 1440px) {
  .hub-platforms-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* 1280px */
@media (max-width: 1280px) {
  .hub-platforms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 1024px */
@media (max-width: 1024px) {
  .hub-platforms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 768px (Tablets) */
@media (max-width: 768px) {
  .hub-platforms-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .blog-hero h1 {
    font-size: 30px;
  }
  .blog-hero p {
    font-size: 15px;
  }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .post-article {
    padding: 0;
  }
}

/* 390px & 360px (Mobile Screens - Zero Horizontal Overflow) */
@media (max-width: 480px) {
  .hub-platforms-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .blog-search-bar {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 6px;
  }
  .blog-search-bar input {
    padding: 8px 12px;
    font-size: 14px;
  }
  .blog-search-bar button {
    border-radius: var(--radius-md);
    padding: 8px 14px;
    justify-content: center;
    width: 100%;
  }
  .post-header h1 {
    font-size: 24px;
    line-height: 1.25;
  }
  .post-body {
    font-size: 16px;
    line-height: 1.7;
  }
  .post-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .feed-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-sort-bar {
    gap: 6px;
  }
  .sort-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
  .post-card-thumb img {
    height: 170px;
  }
}

@media (max-width: 360px) {
  .blog-hero h1 {
    font-size: 24px;
  }
  .post-badge {
    font-size: 10px;
    padding: 2px 8px;
  }
}

