/* category-page.css — externalised from category.php; loads after style-core.css. */

/* ═══════════════════════════════════════════
   CATEGORY PAGE STYLES
═══════════════════════════════════════════ */

/* ── Hero ── */
.catp-hero {
  position: relative; background: var(--void);
  overflow: hidden; padding: 80px 0 64px;
}
.catp-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at -5% 55%, var(--ch-glow, rgba(139,92,246,.2)) 0%, transparent 52%),
    radial-gradient(ellipse 55% 50% at 105% 15%, rgba(6,182,212,.1) 0%, transparent 50%),
    radial-gradient(ellipse 45% 45% at 55% 110%, rgba(37,99,235,.08) 0%, transparent 55%);
}
.catp-hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
}
.catp-hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.catp-hero-icon {
  width: 88px; height: 88px; border-radius: 24px; flex-shrink: 0;
  background: var(--ch-grad, linear-gradient(135deg,#7c3aed,#a78bfa));
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  box-shadow: 0 16px 48px var(--ch-glow, rgba(139,92,246,.4));
  animation: fadeUp .5s .1s both;
}
.catp-hero-body { flex: 1; min-width: 200px; }
.catp-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ch-color, #a78bfa); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
  animation: fadeUp .5s .15s both;
}
.catp-h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(28px,5vw,52px); font-weight: 900; color: #fff;
  letter-spacing: -1.5px; line-height: 1.06; margin-bottom: 14px;
  animation: fadeUp .6s .2s both;
}
.catp-sub {
  font-size: 15px; color: rgba(255,255,255,.42); line-height: 1.8;
  max-width: 560px; animation: fadeUp .6s .28s both;
}
.catp-hero-stats {
  display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px;
  animation: fadeUp .6s .34s both;
}
.catp-hero-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.catp-hero-stat-n {
  font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 900;
  color: var(--ch-color, #a78bfa);
}
.catp-hero-stat-l { font-size: 12px; color: rgba(255,255,255,.35); font-weight: 500; }

/* ── Toolbar ── */
.catp-toolbar {
  background: var(--bg-alt); border-bottom: 1px solid var(--hr);
  padding: 14px 0; position: sticky; top: 64px; z-index: 88;
  backdrop-filter: blur(16px);
}
.catp-toolbar-inner {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.catp-diff-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.catp-fpill {
  padding: 6px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--bg-card); color: var(--mid);
  border: 1px solid var(--hr2); text-decoration: none;
  transition: all .2s; font-family: inherit; display: inline-flex;
}
.catp-fpill.on, .catp-fpill:hover {
  background: var(--pill-on-bg, rgba(139,92,246,.1));
  color: var(--pill-on-color, #a78bfa);
  border-color: var(--pill-on-border, rgba(139,92,246,.3));
}
.catp-sort-select {
  margin-left: auto; background: var(--bg-card); border: 1.5px solid var(--hr2);
  color: var(--ink); padding: 6px 12px; border-radius: 10px;
  font-size: 12px; font-family: inherit; font-weight: 600; cursor: pointer; outline: none;
}

/* ── Post list ── */
.catp-list { padding: 44px 0 16px; }

.catp-post-card {
  background: var(--bg-card); border: 1.5px solid var(--hr);
  border-radius: var(--r2); padding: 24px 24px 22px;
  text-decoration: none; color: inherit; display: block;
  transition: all .3s; position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.catp-post-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ch-color, #a78bfa);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.catp-post-card:hover { transform: translateX(4px); box-shadow: var(--s2); border-color: var(--hr2); }
.catp-post-card:hover::before { transform: scaleY(1); }

.cp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cp-diff {
  padding: 2px 10px; border-radius: 100px; font-size: 11px; font-weight: 800;
}
.cp-diff-beginner     { background: rgba(16,185,129,.1);  color: #10b981; border: 1px solid rgba(16,185,129,.2); }
.cp-diff-intermediate { background: rgba(245,158,11,.1);  color: #f59e0b; border: 1px solid rgba(245,158,11,.2); }
.cp-diff-advanced     { background: rgba(239,68,68,.1);   color: #ef4444; border: 1px solid rgba(239,68,68,.2); }

.cp-date  { font-size: 12px; color: var(--muted); font-weight: 500; }
.cp-views { font-size: 12px; color: var(--muted); font-weight: 500; }
.cp-title {
  font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 800;
  color: var(--ink); line-height: 1.3; margin-bottom: 8px; letter-spacing: -.3px;
}
.catp-post-card:hover .cp-title { color: var(--ch-color, #a78bfa); }
.cp-excerpt { font-size: 14px; color: var(--mid); line-height: 1.7; }
.cp-footer  { display: flex; align-items: center; justify-content: flex-end; margin-top: 12px; }
.cp-read-more {
  font-size: 13px; font-weight: 700; color: var(--ch-color, #a78bfa);
  display: flex; align-items: center; gap: 5px; transition: gap .2s;
}
.catp-post-card:hover .cp-read-more { gap: 8px; }

/* ── Pagination ── */
.catp-pagination {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  padding: 20px 0 60px;
}
.pg-btn {
  min-width: 40px; height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1.5px solid var(--hr2);
  background: var(--bg-card); color: var(--mid);
  font-size: 14px; font-weight: 700; font-family: inherit;
  text-decoration: none; display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer;
}
.pg-btn:hover  { border-color: var(--ch-color, #a78bfa); color: var(--ch-color, #a78bfa); }
.pg-btn.active { background: var(--ch-color, #a78bfa); border-color: var(--ch-color, #a78bfa); color: #fff; }
.pg-btn.disabled { opacity: .35; pointer-events: none; cursor: default; }

/* ── Sidebar / related ── */
.catp-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.catp-sidebar { padding-top: 44px; }
.catp-sidebar-card {
  background: var(--bg-card); border: 1.5px solid var(--hr);
  border-radius: var(--r2); padding: 22px 20px; margin-bottom: 20px;
}
.catp-sc-title {
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 900;
  color: var(--ink); text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.catp-related-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--hr); text-decoration: none; color: inherit;
  transition: all .2s;
}
.catp-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.catp-related-item:hover .cri-name { color: var(--b3); }
.cri-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--slate); border: 1px solid var(--hr3);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.cri-name { font-size: 13px; font-weight: 700; color: var(--ink2); line-height: 1.3; }
.cri-count { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Empty state ── */
.catp-empty { text-align: center; padding: 64px 20px; }
.catp-empty-ico { font-size: 48px; margin-bottom: 14px; }
.catp-empty-txt { font-size: 16px; color: var(--mid); margin-bottom: 20px; }

@media (max-width: 900px) {
  .catp-layout { grid-template-columns: 1fr; }
  .catp-sidebar { padding-top: 0; }
}
@media (max-width: 600px) {
  .catp-hero-inner { flex-direction: column; gap: 20px; }
  .catp-hero-icon  { width: 68px; height: 68px; font-size: 30px; }
}

/* Multi-paragraph category intro (pillar hub copy) — added with the intro upgrade */
.catp-sub p { margin: 0 0 .8em; color: rgba(255,255,255,.66); }
.catp-sub p:last-child { margin-bottom: 0; }
.catp-sub a { color:#fff; text-decoration: underline; text-underline-offset: 2px; }
