/* Trending page list */
.trending-wrap{
  width: min(1040px, 100%);
  max-width: 100%;
  margin: 1rem auto;
}

.trending-h1{
  margin: .25rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #444;
}

/* Card shell: borrow the upload page “post-box” vibe */
.trend-card{
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  gap: 18px;
  padding: 18px;
  margin: 0 0 14px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  width: 100%;
}

.trend-big {
  display: block;
}

.trend-big img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.trend-title{
  display: block;      /* was inline-block */
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 4px;  /* small breathing room */
}

.trend-thumbs {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.trend-thumbs .thumb{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trend-thumbs .thumb img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Responsive: stack */
@media (max-width: 820px){
  .trend-card{
    grid-template-columns: 1fr;
  }
  .trend-big img{
    max-height: 240px;
  }
  .trend-thumbs{
    grid-template-columns: repeat(4, minmax(60px, 1fr));
  }
  .trend-thumbs .thumb img{
    width: 100%;
    height: 70px;
  }
}

/* ---- Thread pager (copied from thread.css for exact match) -------------- */
.thread-pager{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin:8px 0 32px; padding:8px 0;
}

.pager-btn{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #bbb;
  cursor: pointer;
  background: linear-gradient(#f8f8f8, #e0e0e0);
  color: #444;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.pager-btn.is-disabled{ opacity:.5; pointer-events:none; }

.pager-pages{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  color: #444;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.pager-page{
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:6px;
  border: 1px solid #bbb;
  background: linear-gradient(#ffffff, #f6f6f6);
  color:#555;
  font-size:.85rem;
  text-decoration:none;
  color: #00a0e9; /* blue text for inactive option */
}
.pager-page:hover{ background:#e9e9e9; }
.pager-page.is-current{
  background:#f0f0f0;
  color: #444;
  pointer-events: none;
  border: 1px solid #bbb;
}

.pager-ellipsis{ padding:0 4px; color:#aaa; }

.pager-sorts{ display:flex; align-items:center; gap:8px; }

/* stack nicely on narrow screens */
@media (max-width: 640px){
  .thread-pager{ flex-wrap:wrap; gap:8px; }
  .pager-pages{ order:2; width:100%; justify-content:center; }
  .pager-sorts{ order:3; width:100%; justify-content:center; }
}

.trending-wrap,
.trending-wrap *{
  box-sizing: border-box;
}

.trend-sub{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.trend-sub img{
  width: 14px;
  height: 14px;
  display: block;
  transform: translateY(-0.5px); /* lift slightly instead of pushing down */
  opacity: 0.65;                 /* reduce visual weight */
}

/* Make "Trending" link look exactly like plain tags-header text */
.tags-header a,
.tags-header a:visited,
.tags-header a:hover,
.tags-header a:active,
.tags-header a:focus {
  color: inherit;
  text-decoration: none;
}

.tags-header a { cursor: pointer; }

.tags-header a:hover {
  text-decoration: underline;
}