/* ==========================================================================
   Rajbala IT - Blog & Knowledge Center Stylesheet
   Fully compatible with Dark & Light mode tokens, mobile-first responsive
   ========================================================================== */

/* --- 1. Knowledge Center Hero & Search --- */
.kc-hero {
  padding: calc(var(--header-height) + 3rem) 1.5rem 3.5rem;
  background: radial-gradient(circle at 50% 15%, rgba(6, 182, 212, 0.12) 0%, transparent 65%);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
}

.kc-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.kc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.kc-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.kc-hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.kc-search-wrap {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.kc-search-input {
  width: 100%;
  padding: 1rem 3.25rem 1rem 3.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: var(--text-white);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-normal);
}

.kc-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
  background: var(--bg-card-hover);
}

.kc-search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-dim);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.kc-search-clear {
  position: absolute;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: none;
  padding: 4px;
}

.kc-search-clear.visible {
  display: block;
}

/* --- 2. Category Filter Navigation Tabs --- */
.kc-category-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1.5rem 0;
  margin-bottom: 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.kc-category-strip::-webkit-scrollbar {
  height: 4px;
}

.kc-category-strip::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.kc-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.kc-category-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: var(--text-white);
  transform: translateY(-2px);
}

.kc-category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #060911;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.kc-category-pill .badge-count {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
}

/* --- 3. Featured Spotlight Card --- */
.kc-featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 3.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.kc-featured-card:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.2);
  transform: translateY(-4px);
}

.kc-featured-img-wrap {
  position: relative;
  min-height: 340px;
  background: #0f172a;
  overflow: hidden;
}

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

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

.kc-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 9, 17, 0.8) 100%);
}

.kc-featured-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--accent);
  color: #060911;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kc-featured-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kc-featured-top {
  margin-bottom: 1.5rem;
}

.kc-featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.kc-featured-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 1rem;
}

.kc-featured-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kc-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.kc-author-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kc-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #060911;
  font-weight: 700;
  font-size: 0.85rem;
  object-fit: cover;
  flex-shrink: 0;
}

.kc-author-info {
  line-height: 1.25;
}

.kc-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-white);
}

.kc-author-role {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.kc-stats-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.kc-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Card Bookmark / Save Button */
.kc-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.kc-save-btn:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--primary-light);
  transform: translateY(-1px);
}

.kc-save-btn.saved {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.kc-save-btn.saved svg {
  fill: #fbbf24;
  stroke: #fbbf24;
}

.kc-featured-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  color: var(--text-white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.kc-featured-save-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--primary-light);
  color: var(--primary-light);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.kc-featured-save-btn.saved {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
}

.kc-featured-save-btn.saved svg {
  fill: #fbbf24;
  stroke: #fbbf24;
}

[data-theme="light"] .kc-save-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

[data-theme="light"] .kc-save-btn.saved {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #d97706;
}

/* --- 4. Trending Strip Section --- */
.kc-trending-section {
  margin-bottom: 3.5rem;
}

.kc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.kc-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kc-trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.kc-trending-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.kc-trending-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.kc-rank-badge {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-dim);
  line-height: 1;
  min-width: 28px;
}

.kc-trending-card:nth-child(1) .kc-rank-badge { color: var(--primary); }
.kc-trending-card:nth-child(2) .kc-rank-badge { color: var(--accent); }
.kc-trending-card:nth-child(3) .kc-rank-badge { color: var(--warning); }

.kc-trending-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kc-trending-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- 5. Main Knowledge Grid & Article Cards --- */
.kc-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.kc-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.kc-article-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.18);
}

.kc-card-thumb-wrap {
  position: relative;
  height: 200px;
  background: #0f172a;
  overflow: hidden;
}

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

.kc-article-card:hover .kc-card-thumb-wrap img {
  transform: scale(1.06);
}

.kc-card-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.kc-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.kc-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.kc-article-card:hover .kc-card-title {
  color: var(--primary-light);
}

.kc-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.kc-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- 6. Pagination & Controls --- */
.kc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0 4rem;
}

.kc-page-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.kc-page-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary-light);
}

.kc-page-btn.active {
  background: var(--primary);
  color: #060911;
  border-color: var(--primary);
  font-weight: 700;
}

.kc-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- 7. Single Blog Post Detail Layout --- */
.post-detail-header {
  padding: calc(var(--header-height) + 2rem) 1.5rem 2.5rem;
  background: radial-gradient(circle at 50% 10%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.post-detail-container {
  max-width: 860px;
  margin: 0 auto;
}

.post-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

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

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

.post-title-main {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.25;
  margin: 1rem 0;
}

.post-lead-excerpt {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.post-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.post-cover-wrap {
  margin: 2.5rem auto 3.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-card);
  max-height: 520px;
  background: #0a0f1d;
}

.post-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article Body Typography */
.post-article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-article-content p {
  margin-bottom: 1.5rem;
}

.post-article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.post-article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 2rem 0 0.85rem;
}

.post-article-content ul,
.post-article-content ol {
  margin: 1.25rem 0 1.75rem 1.5rem;
}

.post-article-content li {
  margin-bottom: 0.65rem;
}

.post-article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(6, 182, 212, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-primary);
}

.post-article-content img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.post-callout {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.post-callout h4 {
  color: var(--accent-light);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.post-tags-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2.5rem 0 2rem;
}

.post-tag-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-tag-pill:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary-light);
  border-color: var(--primary);
}

/* Gallery Showcase & Video Embed */
.post-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.post-gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 180px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.post-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  transition: transform 0.3s ease;
}

.post-gallery-item:hover img {
  transform: scale(1.08);
}

.post-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: 2.5rem 0;
  background: #000;
}

.post-video-wrap iframe,
.post-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- 8. Interactive Engagement Strip --- */
.post-engagement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  margin: 3rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--text-white);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.like-btn svg {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  fill: none;
  stroke: #ef4444;
}

.like-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: scale(1.03);
}

.like-btn.liked {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.like-btn.liked svg {
  fill: #fff;
  stroke: #fff;
  transform: scale(1.15);
}

.post-share-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--primary);
  color: #060911;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* --- 9. Author Box Card --- */
.post-author-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3.5rem 0;
}

.post-author-box .author-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #060911;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: cover;
}

/* --- 10. Empty & Error States --- */
.kc-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  grid-column: 1 / -1;
}

.kc-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: var(--text-dim);
}

/* --- 11. Light Theme Overrides --- */
[data-theme="light"] .kc-hero {
  background: radial-gradient(circle at 50% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .kc-search-input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .kc-category-pill {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #64748b;
}

[data-theme="light"] .kc-category-pill:hover {
  background: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] .kc-category-pill.active {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="light"] .kc-featured-card,
[data-theme="light"] .kc-article-card,
[data-theme="light"] .kc-trending-card,
[data-theme="light"] .post-engagement-bar,
[data-theme="light"] .post-author-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .kc-featured-card:hover,
[data-theme="light"] .kc-article-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15);
}

[data-theme="light"] .kc-card-footer {
  background: #f8fafc;
  border-top-color: #f1f5f9;
}

[data-theme="light"] .post-article-content {
  color: #334155;
}

[data-theme="light"] .post-article-content blockquote {
  background: #f0fdf4;
  border-left-color: var(--primary);
  color: #1e293b;
}

[data-theme="light"] .post-callout {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* --- 11b. Premium Enhancements: Progress, Bookmark, TOC & Adjacent Navigation --- */
#reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}

#reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #10b981);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
  transition: width 0.1s ease-out;
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text-white);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bookmark-btn svg {
  fill: none;
  stroke: #f59e0b;
  transition: all 0.2s ease;
}

.bookmark-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  transform: scale(1.03);
}

.bookmark-btn.saved {
  background: #f59e0b;
  color: #060911;
  border-color: #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.bookmark-btn.saved svg {
  fill: #060911;
  stroke: #060911;
}

.post-toc-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.post-toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.85rem;
}

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

.post-toc-list li.toc-h3 {
  padding-left: 1.25rem;
}

.post-toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-block;
  transition: color var(--transition-fast);
}

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

.post-takeaways-card {
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.12), transparent 70%), var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin: 2rem 0 2.5rem;
  position: relative;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.08);
}

.post-takeaways-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.post-adjacent-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 3rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.adjacent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition-normal);
}

.adjacent-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.adjacent-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.adjacent-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-theme="light"] .post-toc-wrap {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .post-toc-title {
  color: #0f172a;
}

[data-theme="light"] .post-takeaways-card {
  background: #f0fdfa;
  border-color: #99f6e4;
}

[data-theme="light"] .adjacent-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .adjacent-title {
  color: #0f172a;
}

/* --- 12. Responsive Breakpoints --- */
@media (max-width: 900px) {
  .kc-featured-card {
    grid-template-columns: 1fr;
  }
  .kc-featured-img-wrap {
    min-height: 240px;
  }
  .kc-featured-content {
    padding: 1.75rem;
  }
}

@media (max-width: 640px) {
  .kc-hero {
    padding: calc(var(--header-height) + 1.5rem) 1rem 2.5rem;
  }
  .kc-articles-grid {
    grid-template-columns: 1fr;
  }
  .post-engagement-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .like-btn {
    justify-content: center;
  }
  .post-share-group {
    justify-content: center;
  }
  .post-author-box {
    flex-direction: column;
    text-align: center;
  }
}
