/* ============================================================
   Clean Bees — /insights/ overrides
   Builds on tokens declared in styles.css (--cb-yellow, --cb-ink,
   --font-display, --font-body, --gutter, --max-width).
   ============================================================ */

/* ---- Layout wrapper ---- */
.cb-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Page hero (Insights heading) ---- */
.cb-page-hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--cb-line);
  margin: 0 0 56px;
}
@media (max-width: 700px) {
  .cb-page-hero { padding: 56px 0 32px; margin-bottom: 40px; }
}
.cb-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--cb-ink);
  margin: 0 0 16px;
}
.cb-insights-hero p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--cb-ink-2);
  max-width: 640px;
  margin: 0;
}

/* ---- Blog grid ---- */
.cb-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}
@media (max-width: 1000px) {
  .cb-blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .cb-blog-grid { grid-template-columns: 1fr; gap: 20px; }
}

.cb-blog-card {
  background: var(--cb-cream);
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.cb-blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--cb-yellow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cb-blog-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cb-cream-2);
}
.cb-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cb-blog-card:hover .cb-blog-thumb img {
  transform: scale(1.04);
}
.cb-blog-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--cb-mist);
  text-align: center;
}

.cb-blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.cb-blog-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cb-yellow-dark);
  margin: 0 0 12px;
  font-weight: 500;
}

.cb-blog-title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--cb-ink);
}
.cb-blog-title a {
  color: inherit;
  text-decoration: none;
}

.cb-blog-excerpt {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cb-ink-2);
  margin: 0 0 16px;
  flex: 1 1 auto;
}

.cb-blog-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--cb-ink);
  text-decoration: none;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
}
.cb-blog-link::after {
  content: "→";
  transition: transform 0.2s ease;
  display: inline-block;
}
.cb-blog-link:hover::after { transform: translateX(3px); }

/* ---- Pagination ---- */
.cb-blog-pagination {
  margin: 56px 0 96px;
  display: flex;
  justify-content: center;
}
.cb-blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cb-blog-pagination .page-numbers {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--cb-ink-2);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--cb-line);
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  min-width: 40px;
  text-align: center;
}
.cb-blog-pagination .page-numbers:hover { border-color: var(--cb-yellow); color: var(--cb-ink); }
.cb-blog-pagination .page-numbers.current {
  background: var(--cb-yellow);
  color: var(--cb-ink);
  border-color: var(--cb-yellow);
  font-weight: 600;
}

/* ---- Single post layout ---- */
.cb-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  padding: 56px 0 96px;
}
@media (max-width: 1000px) {
  .cb-post-layout { grid-template-columns: 1fr; gap: 48px; padding: 40px 0 64px; }
}

.cb-post-main { min-width: 0; }

.cb-post-header {
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cb-line);
}
.cb-post-header .cb-blog-meta {
  margin: 0 0 12px;
}
.cb-post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--cb-ink);
  margin: 0;
}

.cb-post-featured-image {
  margin: 0 0 40px;
  border-radius: 12px;
  overflow: hidden;
}
.cb-post-featured-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* ---- Post body ---- */
.cb-post-content {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--cb-ink);
  max-width: 720px;
}
.cb-post-content > * { margin: 0 0 1.1em; }
.cb-post-content > *:last-child { margin-bottom: 0; }

.cb-post-content h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.5em;
  color: var(--cb-ink);
}
.cb-post-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.25;
  margin: 1.4em 0 0.4em;
  color: var(--cb-ink);
}

.cb-post-content a {
  color: var(--cb-ink);
  text-decoration: underline;
  text-decoration-color: var(--cb-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.cb-post-content a:hover { text-decoration-color: var(--cb-yellow-dark); }

.cb-post-content ul, .cb-post-content ol {
  padding-left: 1.4em;
  margin: 1em 0 1.1em;
}
.cb-post-content li { margin: 0.4em 0; }

.cb-post-content blockquote {
  border-left: 3px solid var(--cb-yellow);
  margin: 1.4em 0;
  padding: 6px 0 6px 22px;
  font-style: italic;
  color: var(--cb-ink-2);
}

.cb-post-content img {
  border-radius: 8px;
  height: auto;
}
.cb-post-content figure { margin: 1.4em 0; }

/* ---- Sidebar (recent posts) ---- */
.cb-post-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
}
@media (max-width: 1000px) {
  .cb-post-sidebar { position: static; }
}

.cb-post-sidebar-card {
  background: var(--cb-cream);
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  padding: 24px;
}
.cb-post-sidebar-card h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cb-yellow-dark);
  margin: 0 0 20px;
  font-weight: 500;
}

.cb-post-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cb-post-recent-item { padding: 0; }

.cb-post-recent-link {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}
.cb-post-recent-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cb-cream-2);
}
.cb-post-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cb-post-recent-thumb-placeholder { display: block; }
.cb-post-recent-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cb-post-recent-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cb-ink);
}
.cb-post-recent-link:hover .cb-post-recent-title { color: var(--cb-yellow-dark); }
.cb-post-recent-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cb-stone);
}
