/* ───────────────────  BLOG TICKER BAR (inside header)  ─────────────────── */

.blog-ticker-bar {
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 40px;
  height: 38px;
  background: rgba(0, 20, 60, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ticker-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0040ff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.ticker-link {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.ticker-link:hover {
  color: #60a5fa;
}

.ticker-chevron {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.ticker-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.3s;
}

.tick-dot.active {
  background: #0040ff;
}

/* Ticker text animations */
.ticker-fade-out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ticker-fade-in {
  animation: tickerSlideIn 0.35s ease forwards;
}

@keyframes tickerSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dark mode overrides (ticker is always dark so minimal changes needed) */
body.dark-mode .blog-ticker-bar {
  background: rgba(0, 0, 0, 0.85);
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* Mobile */
@media (max-width: 768px) {
  .blog-ticker-bar {
    padding: 0 16px;
    gap: 8px;
  }

  .ticker-dots {
    display: none;
  }
}

/* ───────────────────  BLOG LISTING PAGE  ─────────────────── */

.blog-hero {
  padding: 120px 40px 60px;
  text-align: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
}

/* When the LATEST ticker bar is shown, the fixed header grows by ~38px,
   so the hero needs extra top padding to clear it (otherwise the heading
   slides under the navbar). The class is added by js/blog.js. */
body.has-ticker .blog-hero {
  padding-top: 160px;
}

.blog-hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.blog-hero p {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 520px;
  margin: 0 auto 32px;
}

/* Category filter pills */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
  background: #0040ff;
  border-color: #0040ff;
  color: #fff;
}

/* ───────────────────  BLOG GRID  ─────────────────── */

.blog-grid-section {
  padding: 60px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 16px;
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.blog-card-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image-placeholder i {
  font-size: 2.5rem;
  color: rgba(255,255,255,0.6);
}

.blog-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.blog-category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0040ff;
}

.blog-date {
  font-size: 0.8rem;
  color: #9ca3af;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0040ff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s ease;
}

.blog-read-more:hover {
  gap: 9px;
}

.blog-author-mini {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ───────────────────  FEATURED BLOG CARD (wide)  ─────────────────── */

.blog-card.featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
}

.blog-card.featured .blog-card-image {
  width: 340px;
  min-width: 280px;
  height: auto;
  flex-shrink: 0;
  border-radius: 0;
}

.blog-card.featured .blog-card-image-placeholder {
  width: 340px;
  min-width: 280px;
  height: auto;
  border-radius: 0;
  flex-shrink: 0;
}

/* ───────────────────  BLOG POST PAGE  ─────────────────── */

.blog-post-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

/* When the LATEST ticker bar is shown, the fixed header grows by ~38px,
   so the post needs extra top padding to clear it (otherwise the header
   card slides under the navbar). The class is added by js/blog.js. */
body.has-ticker .blog-post-wrapper {
  padding-top: 150px;
}

/* ═══════════════════  MAGAZINE LAYOUT + AD RAIL  ═══════════════════
   Two-column reading view: article + sticky sidebar (ads + related).
   Palette mirrors the VYPA app — royal #0040ff, deep navy #001a5c,
   success green #10b981, light-blue tags, soft cards. */

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  margin-top: 8px;
}

.blog-main {
  min-width: 0; /* let long words/code wrap instead of blowing out the grid */
}

/* ── Sticky sidebar ── */
.blog-aside {
  position: sticky;
  top: 124px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.has-ticker .blog-aside {
  top: 160px;
}

.blog-aside-card {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.05);
}

.blog-ad-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 12px;
}

/* AdSense unit / placeholder */
.blog-ad-unit { padding: 14px; }

.blog-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 250px;
  border-radius: 12px;
}

.blog-ad-placeholder {
  border: 1.5px dashed #c7d2fe;
  background:
    repeating-linear-gradient(45deg, #f8faff, #f8faff 12px, #f3f6ff 12px, #f3f6ff 24px);
  color: #94a3b8;
}

.blog-ad-placeholder i { font-size: 1.6rem; color: #c7d2fe; }
.blog-ad-placeholder span { font-size: 0.9rem; font-weight: 600; color: #64748b; }
.blog-ad-placeholder small { font-size: 0.72rem; letter-spacing: 0.05em; }

/* ── Local (house) ad cards ── */
.blog-aside-ads { display: flex; flex-direction: column; gap: 14px; }

.blog-ad-card {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e8edf5;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-ad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 64, 255, 0.12);
}

.blog-ad-card-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  background-size: cover;
  background-position: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 2rem;
}

.blog-ad-card-body {
  display: block;
  padding: 14px 16px 16px;
}

.blog-ad-sponsor {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0040ff;
  background: #eff6ff;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.blog-ad-card-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 6px;
}

.blog-ad-card-blurb {
  display: block;
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.55;
  margin-bottom: 12px;
}

.blog-ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0040ff;
  transition: gap 0.18s ease;
}

.blog-ad-card:hover .blog-ad-cta { gap: 10px; }

/* ── "More from the blog" related list (IEEE-style right rail) ── */
/* display:block guards against the global `nav { display:flex }` in main.css
   if this card is ever rendered as a <nav>. */
.blog-related { padding: 20px 18px; display: block; }

.blog-aside-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eef2ff;
  position: relative;
}

.blog-aside-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 42px;
  height: 2px;
  background: #0040ff;
}

.blog-related-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  min-width: 0; /* allow children to shrink so the title wraps + clamps */
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}

.blog-related-item:last-child { border-bottom: none; padding-bottom: 0; }

.blog-related-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-related-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
}

.blog-related-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

.blog-related-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0040ff;
}

.blog-related-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  transition: color 0.18s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-related-item:hover .blog-related-title { color: #0040ff; }

/* ═══════════════════  ARTICLE TYPOGRAPHY POLISH  ═══════════════════ */

/* Drop cap on the opening paragraph */
.blog-post-content > p:first-of-type::first-letter {
  float: left;
  font-size: 3.4rem;
  line-height: 0.86;
  font-weight: 800;
  color: #0040ff;
  margin: 6px 12px 0 0;
}

/* Accent bar on section headings */
.blog-post-content h2 {
  position: relative;
  padding-left: 16px;
}

.blog-post-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #0040ff 0%, #001a5c 100%);
}

.blog-post-content blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 4px solid #0040ff;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8faff 100%);
  border-radius: 0 14px 14px 0;
  font-size: 1.12rem;
  font-style: italic;
  color: #1f2937;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 28px 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.blog-post-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1d9e6, transparent);
  margin: 40px 0;
}

.blog-post-content ul li::marker { color: #0040ff; }

/* ═══════════════════  RESPONSIVE  ═══════════════════ */

@media (max-width: 1024px) {
  /* Sidebar drops below the article; ads/related flow in a row to fill width */
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }
}

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

  .blog-post-content > p:first-of-type::first-letter {
    font-size: 2.8rem;
  }
}

/* ═══════════════════  DARK MODE  ═══════════════════ */

body.dark-mode .blog-aside-card {
  background: #232a3d;
  border-color: #323a52;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .blog-ad-placeholder {
  border-color: #3b4566;
  background: repeating-linear-gradient(45deg, #1f2535, #1f2535 12px, #232a3d 12px, #232a3d 24px);
}

body.dark-mode .blog-ad-placeholder span { color: #94a3b8; }

body.dark-mode .blog-ad-card {
  background: #1f2535;
  border-color: #323a52;
}

body.dark-mode .blog-ad-card-title { color: #f1f5fa; }
body.dark-mode .blog-ad-card-blurb { color: #94a3b8; }
body.dark-mode .blog-ad-sponsor { background: #1e3a5f; color: #60a5fa; }
body.dark-mode .blog-ad-cta { color: #60a5fa; }

body.dark-mode .blog-aside-heading { color: #f1f5fa; border-bottom-color: #323a52; }
body.dark-mode .blog-related-item { border-bottom-color: #2d3548; }
body.dark-mode .blog-related-title { color: #cbd5e0; }
body.dark-mode .blog-related-item:hover .blog-related-title { color: #60a5fa; }
body.dark-mode .blog-related-cat { color: #60a5fa; }

body.dark-mode .blog-post-content > p:first-of-type::first-letter { color: #60a5fa; }
body.dark-mode .blog-post-content blockquote {
  background: linear-gradient(135deg, #1a2744 0%, #1e1e2e 100%);
  border-left-color: #60a5fa;
  color: #cbd5e0;
}
body.dark-mode .blog-post-content h2::before {
  background: linear-gradient(180deg, #60a5fa 0%, #0040ff 100%);
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.blog-post-back:hover {
  color: #0040ff;
}

/* ── Glass morphism post header ── */
.blog-post-header-glass {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  padding: 40px 44px 36px;
  margin-bottom: 56px;
  box-shadow:
    0 8px 40px rgba(0, 64, 255, 0.06),
    0 2px 10px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.blog-post-category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0040ff;
  margin-bottom: 18px;
}

.blog-post-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 18px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #9ca3af;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.blog-post-meta strong {
  color: #374151;
}

.meta-dot {
  color: #d1d5db;
  font-size: 0.75rem;
}

.blog-post-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 48px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ── Sticky reading bar ── */
.blog-sticky-bar {
  position: fixed;
  top: calc(var(--sticky-top, 104px) - 60px);
  left: 0;
  right: 0;
  height: 52px;
  z-index: 990;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  pointer-events: none;
}

.blog-sticky-bar.visible {
  top: var(--sticky-top, 104px);
  opacity: 1;
  pointer-events: auto;
}

.blog-sticky-cat {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0040ff;
}

.blog-sticky-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-sticky-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ── Post CTA block ── */
.blog-post-cta {
  margin-top: 56px;
  padding: 36px 40px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 100%);
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(0, 64, 255, 0.08);
}

.blog-post-cta h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.blog-post-cta p {
  color: #6b7280;
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.blog-cta-btn {
  display: inline-block;
  background: #0040ff;
  color: #fff;
  padding: 13px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.blog-cta-btn:hover {
  background: #002ecc;
  transform: translateY(-1px);
}

.blog-post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #374151;
}

.blog-post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 36px 0 14px;
}

.blog-post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f2937;
  margin: 28px 0 10px;
}

.blog-post-content p {
  margin-bottom: 18px;
}

.blog-post-content ul,
.blog-post-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.blog-post-content li {
  margin-bottom: 8px;
}

.blog-post-content a {
  color: #0040ff;
  text-decoration: underline;
}

.blog-post-content a:hover {
  color: #002ecc;
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}

.post-tag {
  font-size: 0.8rem;
  padding: 5px 12px;
  background: #f3f4f6;
  border-radius: 999px;
  color: #374151;
}

/* ───────────────────  BLOG SECTION (on other pages)  ─────────────────── */

.blog-teaser-section {
  padding: 80px 40px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.blog-teaser-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-teaser-section .section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.blog-teaser-section .section-header h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #111827;
}

.blog-teaser-section .section-header p {
  font-size: 0.95rem;
  color: #6b7280;
  margin-top: 6px;
}

.blog-view-all {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0040ff;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}

.blog-view-all:hover {
  gap: 9px;
}

.blog-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ───────────────────  HOME PAGE BLOG SLIDER  ─────────────────── */

.blog-slider-section {
  padding: 80px 40px;
  background: #fff;
  overflow: hidden;
}

.blog-slider-section .slider-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
  gap: 12px;
}

.blog-slider-section .slider-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.blog-slider-section .slider-header p {
  font-size: 0.95rem;
  color: #6b7280;
  margin-top: 6px;
}

.blog-slider-track-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.blog-slider-track::-webkit-scrollbar {
  display: none;
}

.blog-slider-track .blog-card {
  min-width: 320px;
  max-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.slider-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.slider-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #374151;
  transition: all 0.2s;
}

.slider-nav-btn:hover {
  background: #0040ff;
  border-color: #0040ff;
  color: #fff;
}

/* ───────────────────  EMPTY / LOADING STATES  ─────────────────── */

.blog-loading,
.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 1rem;
  grid-column: 1 / -1;
}

.blog-loading i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ───────────────────  DARK MODE  ─────────────────── */

body.dark-mode .blog-hero {
  background: linear-gradient(135deg, #1a1f35 0%, #1e1e1e 100%);
  border-bottom-color: #2d3748;
}

body.dark-mode .blog-hero h1 {
  color: #f1f5fa;
}

body.dark-mode .blog-hero p {
  color: #94a3b8;
}

body.dark-mode .filter-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #cbd5e0;
}

body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn.active {
  background: #0040ff;
  border-color: #0040ff;
  color: #fff;
}

body.dark-mode .blog-grid-section {
  background: #1e1e1e;
}

body.dark-mode .blog-card {
  background: #2d3748;
  border-color: #4a5568;
}

body.dark-mode .blog-card-title {
  color: #f1f5fa;
}

body.dark-mode .blog-card-excerpt {
  color: #94a3b8;
}

body.dark-mode .blog-category-tag {
  background: #1e3a5f;
  color: #60a5fa;
}

body.dark-mode .blog-date {
  color: #718096;
}

body.dark-mode .blog-card-footer {
  border-top-color: #4a5568;
}

body.dark-mode .blog-author-mini {
  color: #718096;
}

body.dark-mode .blog-post-wrapper {
  background: #1e1e1e;
}

body.dark-mode .blog-post-header-glass {
  background: rgba(30, 30, 46, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}

body.dark-mode .blog-sticky-bar {
  background: rgba(20, 20, 30, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .blog-sticky-title {
  color: #f1f5fa;
}

body.dark-mode .blog-sticky-cat {
  background: #1e3a5f;
  color: #60a5fa;
}

body.dark-mode .blog-post-cta {
  background: linear-gradient(135deg, #1a2744 0%, #1e1e2e 100%);
  border-color: rgba(96, 165, 250, 0.12);
}

body.dark-mode .blog-post-cta h3 {
  color: #f1f5fa;
}

body.dark-mode .blog-post-cta p {
  color: #94a3b8;
}

body.dark-mode .blog-post-title {
  color: #f1f5fa;
}

body.dark-mode .blog-post-meta {
  color: #718096;
}

body.dark-mode .blog-post-meta strong {
  color: #cbd5e0;
}

body.dark-mode .blog-post-content {
  color: #cbd5e0;
}

body.dark-mode .blog-post-content h2,
body.dark-mode .blog-post-content h3 {
  color: #f1f5fa;
}

body.dark-mode .blog-post-content a {
  color: #60a5fa;
}

body.dark-mode .blog-post-tags {
  border-top-color: #4a5568;
}

body.dark-mode .post-tag {
  background: #374151;
  color: #cbd5e0;
}

body.dark-mode .blog-post-category-tag {
  background: #1e3a5f;
  color: #60a5fa;
}

body.dark-mode .blog-teaser-section {
  background: #181c2a;
  border-top-color: #2d3748;
}

body.dark-mode .blog-teaser-section .section-header h2 {
  color: #f1f5fa;
}

body.dark-mode .blog-teaser-section .section-header p {
  color: #94a3b8;
}

body.dark-mode .blog-slider-section {
  background: #1e1e1e;
}

body.dark-mode .blog-slider-section .slider-header h2 {
  color: #f1f5fa;
}

body.dark-mode .blog-slider-section .slider-header p {
  color: #94a3b8;
}

body.dark-mode .slider-nav-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #cbd5e0;
}

/* ───────────────────  RESPONSIVE  ─────────────────── */

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

  .blog-card.featured {
    grid-column: span 2;
  }

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

@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 20px 48px;
  }

  body.has-ticker .blog-hero {
    padding-top: 138px;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-grid-section {
    padding: 40px 20px 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card.featured {
    grid-column: span 1;
    flex-direction: column;
  }

  .blog-card.featured .blog-card-image,
  .blog-card.featured .blog-card-image-placeholder {
    width: 100%;
    height: 200px;
  }

  .blog-teaser-grid {
    grid-template-columns: 1fr;
  }

  .blog-teaser-section {
    padding: 60px 20px;
  }

  .blog-teaser-section .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-slider-section {
    padding: 60px 20px;
  }

  .blog-post-wrapper {
    padding: 80px 20px 60px;
  }

  body.has-ticker .blog-post-wrapper {
    padding-top: 128px;
  }

  .blog-post-title {
    font-size: 1.8rem;
  }

  .blog-post-header-glass {
    padding: 28px 24px 24px;
    border-radius: 16px;
    margin-bottom: 36px;
  }

  .blog-sticky-bar {
    padding: 0 16px;
    gap: 8px;
  }

  .blog-sticky-time {
    display: none;
  }

  .blog-post-cta {
    padding: 28px 20px;
  }
}
