/* =============================================
   Blog Specific Styles - Data Stream Design
   Inherits base styles from ../styles.css
   ============================================= */

/* Layout */
.blog-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

.main-content {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Images */
.blog-hero-image,
.featured-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  display: block;
}

.blog-thumbnail,
.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Typography Overrides for Blog Content */
.main-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.main-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--accent-cyan);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-default);
}

.main-content h3 {
  color: var(--accent-teal);
  margin-top: 2rem;
}

/* Sidebar Widgets */
.sidebar-section,
.toc,
.ad-space {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.toc h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent-cyan);
  padding-bottom: 0.5rem;
  color: var(--text-primary);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  display: block;
  padding: 0.5rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.toc a:hover {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
}

/* Blog List (Index) */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.blog-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-content h2 a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
}

.blog-content h2 a:hover {
  color: var(--accent-cyan);
}

.blog-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.read-more {
  display: inline-block;
  margin-top: auto;
  color: var(--accent-cyan);
  font-weight: bold;
}

.read-more:hover {
  color: var(--accent-teal);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 1rem;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  text-decoration: none;
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--border-accent);
  color: var(--accent-cyan);
}

.pagination .current {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-default);
}

.related-articles h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Article Date */
.article-date,
.post-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.article-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.article-tags a:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

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

  .sidebar {
    order: -1;
  }
}
