/* ═══════════════════════════════════════════════════════
   iPredicta — Insights styles
   Loaded on /insights/ pages, after shared.css and learn.css.

   Insights articles reuse the .learn-article wrapper from learn.css
   to inherit article-body typography (h1/h2/h3/p.lead/figures/share-row),
   and add an .insights-article class for everything bespoke to the
   editorial surface. Learn pages are unaffected — every selector below
   is scoped under .insights-article.
═══════════════════════════════════════════════════════ */

/* Compensate for the fixed site nav (mirrors learn pages' inline rule). */
body { padding-top: 68px; }

/* ── Breadcrumb chain (full Home › Insights › Category) ── */
.insights-article .breadcrumb-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: .82rem;
  font-family: "DM Sans", sans-serif;
  color: var(--text-light);
}
.insights-article .breadcrumb-chain a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.insights-article .breadcrumb-chain a:hover {
  text-decoration: underline;
}
.insights-article .breadcrumb-sep {
  color: var(--text-light);
  font-size: .9em;
}
.insights-article .breadcrumb-chain [aria-current="page"] {
  color: var(--text-mid);
  font-weight: 500;
}

/* ── Category pill ── */
.insights-article .category-pill {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-family: "DM Sans", sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ── Above-the-fold affiliate CTA (compact) ── */
.insights-article .cta-affiliate-inline {
  background: var(--navy);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  margin: 28px 0 8px;
}
.insights-article .cta-affiliate-inline a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-family: "DM Sans", sans-serif;
  font-size: .95rem;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
}
.insights-article .cta-affiliate-inline a:hover {
  color: var(--blue-light);
}
.insights-article .cta-affiliate-inline .cta-arrow {
  font-size: 1.1rem;
  color: var(--blue-light);
  flex-shrink: 0;
}

/* ── Below-the-article affiliate CTA (full block) ── */
.insights-article .cta-affiliate-block {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 36px 36px;
  margin: 48px 0 24px;
  color: var(--white);
}
.insights-article .cta-affiliate-block h3 {
  font-family: "Syne", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.insights-article .cta-affiliate-block p {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 520px;
}
.insights-article .cta-affiliate-block-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: all .2s;
}
.insights-article .cta-affiliate-block-button:hover {
  background: #1a63d4;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ── Pull-quote (insights only — won't affect /learn/) ── */
.insights-article .article-body blockquote {
  border-left: 4px solid var(--blue);
  padding: 4px 0 4px 1.25rem;
  margin: 1.6em 0;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-mid);
}

/* ── Related articles section ── */
.insights-article .related-articles {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1.5px solid var(--border);
}
.insights-article .related-articles h2 {
  font-family: "Syne", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 22px;
}
.insights-article .related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.insights-article .related-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: block;
  color: var(--text-dark);
  text-decoration: none;
  transition: all .2s;
}
.insights-article .related-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.insights-article .related-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: block;
}
.insights-article .related-card-pill {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}
.insights-article .related-card h3 {
  font-family: "Syne", sans-serif;
  font-size: .98rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 6px;
}
.insights-article .related-card-meta {
  font-size: .75rem;
  color: var(--text-light);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .insights-article .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .insights-article .related-articles-grid {
    grid-template-columns: 1fr;
  }
  /* Full-bleed hero + below-fold CTA on small screens. The .learn-article
     wrapper has 28px 1.25rem padding on mobile, so we reach back -1.25rem
     to bleed image and CTA edge-to-edge. */
  .insights-article .hero-image {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    width: calc(100% + 2.5rem);
    border-radius: 0;
  }
  .insights-article .cta-affiliate-block {
    padding: 26px 22px;
    margin: 36px -1.25rem 20px;
    border-radius: 0;
  }
  .insights-article .related-articles {
    margin-top: 44px;
  }
}

/* ═══════════════════════════════════════════════════════
   Listing page (/insights/index.html)
═══════════════════════════════════════════════════════ */

.insights-landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 2rem 80px;
}
.insights-landing .section-label {
  font-family: "DM Sans", sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.insights-landing h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.insights-landing .insights-lead {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 36px;
}

/* Filter bar + count row */
.insights-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
}
.insights-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.insights-filter {
  font-family: "DM Sans", sans-serif;
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all .2s;
}
.insights-filter:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.insights-filter.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.insights-count {
  font-family: "DM Sans", sans-serif;
  font-size: .82rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Card grid */
.insights-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.insights-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-dark);
  transition: all .2s;
}
.insights-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
/* The card sets display:flex above, which beats the UA [hidden]{display:none}
   rule. When the filter JS sets card.hidden=true, this explicit author-level
   rule (specificity 0,2,0 vs .insights-card's 0,1,0) makes the card hide. */
.insights-card[hidden] { display: none; }
.insights-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.insights-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.insights-card-pill {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
  align-self: flex-start;
}
.insights-card h3 {
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 8px;
}
.insights-card-dek {
  font-size: .85rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insights-card-meta {
  font-size: .75rem;
  color: var(--text-light);
  margin-top: auto;
}

/* Empty state (zero published articles) */
.insights-listing-empty {
  text-align: center;
  padding: 80px 2rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}
.insights-listing-empty h2 {
  font-family: "Syne", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.insights-listing-empty p {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Pagination */
.insights-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}
.insights-pagination a,
.insights-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: "DM Sans", sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  transition: all .2s;
}
.insights-pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.insights-pagination .current {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.insights-pagination .disabled {
  opacity: .35;
  pointer-events: none;
}

/* Filter empty-state (when filter hides all cards on the current page) */
.insights-filter-empty {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  font-size: .95rem;
  color: var(--text-mid);
  text-align: center;
}

@media (max-width: 900px) {
  .insights-listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .insights-landing {
    padding: 36px 1.25rem 60px;
  }
  .insights-listing-grid {
    grid-template-columns: 1fr;
  }
  .insights-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
