/* =============================================================
   TransRisk v3 — insights.css
   Post list for /insights/. Cards are generated at build time from
   src/content/insights/*.md — see src/lib/insights.ts.
============================================================= */

.insights-section {
  background: var(--color-light);
}

.insights-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.insight-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.insight-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 122, 58, 0.28);
}

/* Fixed 1.91:1 box — LinkedIn's native share ratio (1200x627), so social
   creatives drop in uncropped. Images that differ are centre-cropped, which
   keeps the list even without forcing every asset to one size. */
.insight-media {
  aspect-ratio: 1.91 / 1;
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
}

.insight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insight-body {
  padding: 28px 32px 32px;
}

.insight-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}

.insight-author {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.insight-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0 0 14px;
}

.insight-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0 0 0.9em;
}

.insight-text:last-of-type {
  margin-bottom: 0;
}

.insight-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-green-dark);
  text-decoration: none;
  transition: gap var(--transition);
}

.insight-link:hover {
  gap: 10px;
}

.insights-empty {
  text-align: center;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .insight-body {
    padding: 22px 20px 24px;
  }

  .insight-title {
    font-size: 1.125rem;
  }
}


/* =============================================================
   HOMEPAGE TEASER STRIP
   Three latest posts — title, date, one-line excerpt. Deliberately
   sparse: the full bodies live on /insights/ only, so this never
   duplicates that text. Sits low on the page, above the final CTA,
   so it does not intercept the primary conversion path.
============================================================= */

.insights-teaser-section {
  background: var(--color-light);
  border-top: 1px solid var(--color-border);
}

/* Flex rather than grid so a partial row centres — the strip shows up to
   three posts, and there may legitimately be one or two. */
.insights-teaser-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.insights-teaser-grid > .insight-teaser {
  flex: 0 1 calc((100% - 2 * 24px) / 3);
  min-width: 0;
}

.insight-teaser {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: box-shadow var(--transition), border-color var(--transition),
    transform var(--transition);
}

.insight-teaser:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 133, 64, 0.28);
  transform: translateY(-2px);
}

.insight-teaser:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
}

.insight-teaser-date {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}

.insight-teaser-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0 0 10px;
}

.insight-teaser-excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0 0 18px;
}

/* pushes the affordance to the bottom so cards align regardless of length */
.insight-teaser-more {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-green-dark);
}

.insights-teaser-all {
  text-align: center;
  margin: 34px 0 0;
}

.insights-teaser-all a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-green-dark);
  text-decoration: none;
}

.insights-teaser-all a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .insights-teaser-grid {
    gap: 16px;
  }
  .insights-teaser-grid > .insight-teaser {
    flex-basis: 100%;
  }
}
