/*
 * Blog - Blog grid, cards, pagination, and post detail styles
 */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--slate-50);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-placeholder {
  color: var(--slate-300);
  width: 80px;
  height: 80px;
}

.blog-card-content {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-bottom: 12px;
}

.blog-card-author {
  font-weight: 500;
}

.blog-card-separator {
  color: var(--slate-300);
}

.blog-card-title {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.4;
}

.blog-card-excerpt {
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.blog-card-read-more {
  color: var(--brand-red);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.blog-card-link:hover .blog-card-read-more {
  color: var(--brand-red-dark);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  padding: 0 24px;
}

.pagination-numbers {
  display: flex;
  gap: 4px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--slate-600);
  background: var(--white);
  border: 1px solid var(--slate-200);
  transition: all 0.2s;
}

.pagination-link:hover:not(.disabled):not(.current) {
  background: var(--slate-50);
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.pagination-link.current {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: var(--white);
}

.pagination-link.disabled {
  color: var(--slate-300);
  cursor: not-allowed;
}

/* Blog Post Detail */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.blog-post-header {
  margin-bottom: 32px;
}

.blog-post-meta {
  margin-bottom: 16px;
}

.blog-post-back {
  color: var(--brand-red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.blog-post-back:hover {
  color: var(--brand-red-dark);
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--slate-800);
  line-height: 1.2;
  margin: 0 0 16px 0;
}

.blog-post-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--slate-500);
}

.blog-post-author {
  font-weight: 600;
  color: var(--slate-600);
}

.blog-post-separator {
  color: var(--slate-300);
}

.blog-post-image {
  margin-bottom: 48px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.blog-post-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--slate-700);
}

.blog-post-body h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 48px 0 24px 0;
  line-height: 1.3;
}

.blog-post-body h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 36px 0 20px 0;
  line-height: 1.3;
}

.blog-post-body p {
  margin-bottom: 24px;
}

.blog-post-body a {
  color: var(--brand-red);
  text-decoration: underline;
}

.blog-post-body a:hover {
  color: var(--brand-red-dark);
}

.blog-post-body ul,
.blog-post-body ol {
  margin-bottom: 24px;
  padding-left: 32px;
}

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

.blog-post-body blockquote {
  margin: 32px 0;
  padding-left: 24px;
  border-left: 4px solid var(--brand-red);
  font-style: italic;
  color: var(--slate-600);
}

.blog-post-body code {
  background: var(--slate-50);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

.blog-post-body pre {
  background: var(--slate-700);
  color: var(--slate-200);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.blog-post-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 32px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-post-title {
    font-size: 2rem;
  }
}
