/* Blog hub — sidebar, tags, categories, mobile-first */

#page-blog .section-inner {
  max-width: 1280px;
  padding-left: clamp(12px, 4vw, 24px);
  padding-right: clamp(12px, 4vw, 24px);
}

.blog-hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.blog-hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.blog-hub-panel {
  background: var(--card, #0f172a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 18px 16px;
}

.blog-hub-panel h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green, #10b981);
  margin: 0 0 14px;
}

.blog-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-recent-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-recent-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.blog-recent-list a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #94a3b8);
  text-decoration: none;
  line-height: 1.45;
}

.blog-recent-list a:hover {
  color: var(--green, #10b981);
}

.blog-recent-cat {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a7080;
  margin-top: 4px;
}

.blog-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-cat-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.06);
  color: var(--text, #94a3b8);
  cursor: pointer;
  transition: 0.2s;
}

.blog-cat-chip:hover,
.blog-cat-chip.is-active {
  color: var(--green, #10b981);
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.14);
}

.blog-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow: hidden;
}

.blog-tag-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  line-height: 1.2;
}

.blog-tag-pager,
.blog-mosaic-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.blog-tag-pager button,
.blog-mosaic-pager button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--card2, #1e293b);
  color: var(--white, #f1f5f9);
  cursor: pointer;
}

.blog-tag-pager button:disabled,
.blog-mosaic-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.blog-tag-pager span,
.blog-mosaic-pager span {
  font-size: 12px;
  color: #7a9aaa;
}

.blog-hub-main {
  min-width: 0;
}

.blog-hub-main .blog-magazine {
  max-width: none;
  width: 100%;
}

.blog-filter-note {
  font-size: 13px;
  color: #7a9aaa;
  text-align: center;
  margin: 0 0 20px;
}

.blog-filter-note button {
  background: none;
  border: none;
  color: var(--green, #10b981);
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

#page-blog .blog-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 3vw, 24px);
}

#page-blog .blog-card {
  min-width: 0;
}

#page-blog .blog-card-title {
  font-size: clamp(14px, 3.5vw, 16px);
  word-wrap: break-word;
}

#page-blog .blog-card-excerpt {
  font-size: 13px;
}

.blog-mosaic-pager {
  margin: 24px 0 8px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.blog-hub-seo-note {
  font-size: 12px;
  color: #5a7080;
  line-height: 1.5;
  margin-top: 10px;
}

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

  .blog-hub-sidebar {
    position: static;
    max-height: none;
    order: -1;
  }

  .blog-hub-panel--tags {
    order: 2;
  }
}

@media (max-width: 600px) {
  #page-blog .features-hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  #page-blog .section-title {
    font-size: clamp(22px, 6vw, 28px);
  }

  .blog-jump-nav {
    border-radius: 12px;
    padding: 10px;
    gap: 8px;
  }

  .blog-jump-nav a {
    flex: 1 1 45%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .blog-shelf {
    padding: 20px 8px 8px;
    margin-bottom: 40px;
  }

  .blog-spotlight-grid {
    gap: 16px;
  }

  .blog-card--spotlight .blog-card-img {
    height: 160px;
  }

  #page-blog .blog-card-img {
    height: 150px;
  }

  .blog-tag-cloud {
    max-height: 180px;
  }

  .blog-hub-panel {
    padding: 14px 12px;
  }
}
