/* ═══════════════════════════════════════════════════════════════
   BLOG PAGE STYLES - Base styles for blog listing and article views
   ═══════════════════════════════════════════════════════════════ */

/* ─── Blog Page Layout ─── */
.blog-page {
  min-height: 100vh;
  padding: 120px 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.blog-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.blog-page-subtitle {
  font-size: 1rem;
  opacity: 0.7;
  max-width: 500px;
  margin: 0 auto;
}

/* ─── Blog List ─── */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-list-loading {
  text-align: center;
  padding: 3rem;
  opacity: 0.6;
}

/*
 * Blog list cards use theme-specific renderers for consistent styling
 * with the landing page. The .blog-list-card class is added for any
 * blog page specific adjustments needed.
 */
.blog-list .blog-card {
  /* Theme styles handle the card appearance */
}

/* Meta separator (used in fallback renderer) */
.meta-separator {
  opacity: 0.3;
}

/* ─── Pagination ─── */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination-num:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

.pagination-num.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ─── Article Page ─── */
.article-page {
  max-width: 750px;
  margin: 0 auto;
  padding: 120px 2rem 4rem;
}

.article-header {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  opacity: 0.6;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  opacity: 1;
}

.back-arrow {
  font-size: 1.1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.6;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-cover {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.article-cover-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Article Content ─── */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.25rem; }
.article-content h4 { font-size: 1.1rem; }

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  opacity: 0.7;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  font-style: italic;
  opacity: 0.9;
}

.article-content pre {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.article-content pre code {
  padding: 0;
  background: none;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.article-content hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Article Footer ─── */
.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Not Found ─── */
.not-found {
  text-align: center;
  padding: 4rem 2rem;
}

.not-found h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.not-found p {
  opacity: 0.7;
  margin-bottom: 2rem;
}

/* ─── Blog Header ─── */
.blog-header {
  background: transparent;
}

.blog-header .brand-link {
  text-decoration: none;
  color: inherit;
}

/* ─── Blog Footer ─── */
.blog-footer {
  padding: 2rem;
  text-align: center;
  opacity: 0.5;
  font-size: 0.85rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .blog-page {
    padding: 100px 1rem 3rem;
  }

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

  /* Blog cards use theme-specific responsive styles */

  .article-page {
    padding: 100px 1rem 3rem;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination-numbers {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
  }
}

/* ─── Fade In Animation ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}
