/**
 * Blog Page Styles - MetaCortex Design System
 * Proper spacing (8px grid), responsive, matches variables.css
 * Breakpoints: 320px → 640px (sm) → 768px (md) → 1024px (lg)
 */

.blog-page {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Hero - clear section separation */
.blog-hero {
  min-height: auto;
}

/* Blog content - top padding for visual separation from hero */
.blog-content {
  /* pt-8 sm:pt-12 applied via Tailwind */
}

/* Category Pills - proper spacing, touch-friendly */
.blog-pill {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-body, #5B6B82);
  background: var(--color-card-bg, #FFFFFF);
  border: 1px solid var(--color-border-light, #E6ECF5);
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 40px;
}

.blog-pill:hover {
  color: var(--color-primary, #1E73E8);
  border-color: #93c5fd;
  background: #eff6ff;
}

.blog-pill-active {
  color: white !important;
  background: linear-gradient(135deg, var(--color-gradient-start, #1E73E8), var(--color-gradient-mid, #6A5CFF)) !important;
  border-color: transparent !important;
}

.blog-pill-active:hover {
  background: linear-gradient(135deg, var(--color-primary-hover, #0F4DC7), #5A4BFF) !important;
  color: white !important;
}

/* Line clamp utilities */
.blog-featured .line-clamp-2,
.blog-featured .line-clamp-3,
.blog-card .line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured .line-clamp-2,
.blog-card .line-clamp-2 {
  -webkit-line-clamp: 2;
}

.blog-featured .line-clamp-3 {
  -webkit-line-clamp: 3;
}

/* Newsletter - brand gradient */
.blog-newsletter {
  background: linear-gradient(135deg, var(--color-gradient-start, #1E73E8), var(--color-gradient-mid, #6A5CFF));
}

/* Image zoom on hover */
.blog-card img,
.blog-featured img {
  will-change: transform;
}

/* ===== RESPONSIVE ===== */
/* Featured: stack on mobile, side-by-side on lg */
@media (max-width: 1023px) {
  .blog-featured .lg\:grid-cols-2 {
    display: flex;
    flex-direction: column;
  }
  .blog-featured .order-1 {
    order: 1;
  }
  .blog-featured .order-2 {
    order: 2;
  }
}

/* Cards: single column on small screens */
@media (max-width: 639px) {
  .blog-hero h1 {
    font-size: 1.875rem;
  }
  .blog-pill {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-height: 36px;
  }
}


/* Prevent text overflow */
.blog-card h2,
.blog-featured h2 {
  word-break: break-word;
}

/* Dynamic admin-authored article body */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #334155;
}
.article-body h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #0f172a;
  margin: 2rem 0 1rem;
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.75rem 0 0.75rem;
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.5rem 0 0.5rem;
}
.article-body p {
  margin-bottom: 1rem;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1rem 1.25rem;
  padding-left: 1rem;
}
.article-body ul {
  list-style: disc;
}
.article-body ol {
  list-style: decimal;
}
.article-body a {
  color: #2563eb;
  text-decoration: underline;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1rem 0;
}
.article-body blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: #475569;
  font-style: italic;
}
