/* Insights / Blog — Design 5 */

/* Category color tokens (insights-specific) */
:root {
  --blue-rgb: 30, 102, 204;
  --green-rgb: 0, 168, 132;
  --amber-rgb: 217, 119, 6;
  --rose-rgb: 196, 75, 122;
  --purple-rgb: 74, 93, 212;
  --blue: #1e66cc;
  --green: #00a884;
  --amber: #d97706;
  --rose: #c44b7a;
  --purple: #4a5dd4;
}

/* Cover gradient classes */
.cv-blue   { background: linear-gradient(135deg, #1a3a6e, #1e66cc); }
.cv-green  { background: linear-gradient(135deg, #0a4a3a, #00a884); }
.cv-amber  { background: linear-gradient(135deg, #5a3000, #d97706); }
.cv-rose   { background: linear-gradient(135deg, #5a0a2a, #c44b7a); }
.cv-purple { background: linear-gradient(135deg, #1a1a5e, #4a5dd4); }

/* Nav active state */
nav .nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

body {
  background: var(--bg);
}

/* ── Hero ── */
.insights-hero {
  background: linear-gradient(135deg, #0f2d5e 0%, #1e66cc 55%, #3a85e0 100%);
  padding: 96px 56px 56px;
  position: relative;
  overflow: hidden;
}

.insights-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(0,0,0,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.insights-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.ih-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.ih-h1 {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.ih-h1 span {
  color: rgba(255,255,255,0.55);
}

.ih-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 28px;
}

.ih-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 28px;
  max-width: 480px;
}

.ih-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
}

.ih-search input::placeholder {
  color: rgba(255,255,255,0.35);
}

.ih-search-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: background 0.2s;
}

.ih-search-btn:hover {
  background: rgba(255,255,255,0.2);
}

.ih-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hs-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.hs-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.hs-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}

.hs-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hs-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
}

/* Stats panel */
.ih-stats {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 24px;
  backdrop-filter: blur(12px);
}

.ih-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-cell {
  text-align: center;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-lbl {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

/* Transition band */
.transition-band {
  height: 6px;
  background: linear-gradient(90deg, #0f2d5e, #1e66cc, #3a85e0, #1e66cc, #0f2d5e);
}

/* ── Body layout ── */
.insights-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 56px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.cat-filter-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.cpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  user-select: none;
}

.cpill:hover {
  border-color: rgba(30,102,204,0.25);
  color: var(--text);
}

.cpill.active {
  background: var(--trust-dim);
  border-color: var(--trust-border);
  color: var(--blue);
  font-weight: 600;
}

.cpill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.result-info {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-3);
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gc {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.gc:hover {
  border-color: rgba(30,102,204,0.25);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(30,102,204,0.1);
}

.gc-img {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.gc-img-inner {
  width: 100%;
  height: 100%;
}

.gc-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
}

.t-blue   { color: var(--blue); }
.t-green  { color: var(--green); }
.t-amber  { color: var(--amber); }
.t-purple { color: var(--purple); }
.t-rose   { color: var(--rose); }

.gc-body {
  padding: 18px 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-exc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gc-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.gc-aname {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Pagination */
.pag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.pb {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
}

.pb:hover:not(.disabled) {
  border-color: rgba(30,102,204,0.25);
  color: var(--text);
}

.pb.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.pb.disabled {
  opacity: 0.4;
  cursor: default;
}

.pb.wide {
  padding: 7px 18px;
}

.pag-ellipsis {
  color: var(--text-3);
  font-size: 13px;
  padding: 0 4px;
}

/* Newsletter bar */
.nl-bar {
  margin-top: 48px;
  background: linear-gradient(135deg, #0f2d5e, #1e66cc);
  border-radius: 14px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nl-t h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.nl-t p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  max-width: 420px;
}

.nl-f {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.nl-i {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  outline: none;
  width: 220px;
}

.nl-i::placeholder {
  color: rgba(255,255,255,0.35);
}

.nl-b {
  background: #fff;
  color: var(--blue);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nl-b:hover {
  opacity: 0.9;
}

/* ── Sidebar ── */
.insights-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sb-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.sb-card h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.sb-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

.sb-search input::placeholder {
  color: var(--text-3);
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cat-row:last-child {
  border-bottom: none;
}

.cat-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-name {
  font-size: 13px;
  color: var(--text-2);
}

.cat-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 10px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.recent-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
}

.recent-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.recent-title:hover {
  color: var(--blue);
}

.recent-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  margin-top: 3px;
}

.sb-nl {
  background: var(--surface);
}

.sb-nl-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.sb-nl-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 14px;
}

.sb-nl-inp {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  outline: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.sb-nl-btn {
  width: 100%;
  background: var(--btn-bg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: background 0.2s;
}

.sb-nl-btn:hover {
  background: var(--btn-bg-hover);
}

/* ── Post page ── */
.post-hero {
  background: linear-gradient(135deg, #0f2d5e 0%, #1e66cc 60%, #3a85e0 100%);
  padding: 96px 56px 48px;
}

.post-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.post-back {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.post-back:hover {
  color: #fff;
}

.post-badge {
  display: inline-flex;
  border-radius: 20px;
  padding: 4px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid;
  margin-bottom: 16px;
}

.post-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.post-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.post-author-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}

.post-date,
.post-read {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.post-cover-full {
  height: 320px;
  max-width: 100%;
}

.post-body-wrap {
  max-width: 780px;
  margin: 56px auto;
  padding: 0 56px;
}

.post-prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-prose h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}

.post-prose p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 20px;
}

.post-prose ul,
.post-prose ol {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
  padding-left: 24px;
}

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

.post-prose strong {
  color: var(--text);
  font-weight: 600;
}

.post-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* Related posts */
.related-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 56px 80px;
}

.related-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.related-card:hover {
  border-color: var(--trust-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,102,204,0.08);
}

.related-cover {
  height: 120px;
}

.related-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 16px 4px;
}

.related-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  padding: 0 16px 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  padding: 0 16px 14px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .insights-hero-inner {
    grid-template-columns: 1fr;
  }

  .ih-stats {
    max-width: 400px;
  }

  .insights-body {
    grid-template-columns: 1fr;
    padding: 32px 24px 60px;
  }

  .insights-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

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

@media (max-width: 700px) {
  .insights-hero {
    padding: 88px 24px 40px;
  }

  .ih-h1 {
    font-size: 32px;
  }

  .ih-strip {
    grid-template-columns: 1fr;
  }

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

  .insights-sidebar {
    grid-template-columns: 1fr;
  }

  .nl-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .nl-f {
    width: 100%;
    flex-direction: column;
  }

  .nl-i {
    width: 100%;
  }

  .post-title {
    font-size: 28px;
  }

  .post-body-wrap {
    padding: 0 24px;
    margin: 40px auto;
  }

  .related-section {
    padding: 0 24px 60px;
  }

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

  nav .nav-links {
    display: none;
  }
}
