/* Blog listing + 404 */
.blog-hero {
  background: linear-gradient(135deg, #1a1a4e 0%, #303078 50%, #1a1a4e 100%);
  color: var(--white);
  padding: 56px 0 56px; position: relative; overflow: hidden;
}
.blog-hero::after {
  content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(156,155,232,0.18) 0%, transparent 70%); pointer-events: none;
}
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-hero h1 { font-size: 2.75rem; max-width: 750px; margin-top: 10px; line-height: 1.15; }

.filter-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 32px; flex-wrap: wrap; }
.pill-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.blog-search {
  display: flex; align-items: center;
  background: var(--navy-surface); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; padding: 4px 4px 4px 18px; min-width: 260px;
  min-height: 52px;
}
.blog-search:focus-within { border-color: var(--primary); }
.blog-search.standalone { margin-top: 28px; max-width: 420px; }
.blog-search input {
  border: none; outline: none; background: transparent; color: var(--white);
  font-family: var(--body); font-size: 0.92rem; width: 100%;
}
.blog-search input::placeholder { color: var(--slate-light); }
.blog-search button { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; color: var(--slate-light); }
.blog-search button:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.blog-search button svg { width: 17px; height: 17px; }

.blog-meta { display: flex; justify-content: space-between; gap: 12px; padding: 28px 0 10px; color: var(--slate); font-size: 0.88rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  .blog-hero { padding: 36px 0; }
  .blog-hero h1 { font-size: 2rem; }
  .blog-search { width: 100%; min-width: 0; }

  /* Wrapped pills stacked into three rows and pushed the articles most of a
     screen down. A single horizontally scrolling row keeps the filter one tap
     tall. The row scrolls inside the normal page gutter so the first pill
     still lines up with the heading above it; padding on the right gives the
     last pill room to scroll clear of the edge, and scroll-snap lands each
     pill squarely under the finger. */
  .filter-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .pill-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 2px 0 6px;
    /* Room for the last pill to scroll into view, without shifting the first
       one out of alignment with the rest of the page. */
    margin-right: -24px;
    padding-right: 24px;
    scrollbar-width: none;
  }
  .pill-nav::-webkit-scrollbar { display: none; }
  .pill-nav .pill { flex: 0 0 auto; scroll-snap-align: start; }
  .blog-search.standalone { margin-top: 20px; }
}
