/* Blog Styles */

:root {
  --primary: #6356E5;
  --primary-dark: #4A3FB3;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Blog Hero */
.blog-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.blog-hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Blog List */
.blog-list {
  padding: 3rem 0;
  background: #f8f9fc;
}

.blog-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e5e7eb;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

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

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-meta {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.blog-card h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
  color: #111827;
  font-weight: 700;
}

.blog-card p {
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.meta-divider {
  margin: 0 0.5rem;
  color: #9ca3af;
}

.post-category {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: 600;
}

/* Blog Post */
.blog-post {
  padding: 3rem 0;
  background: #ffffff;
}

.post-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-header h1 {
  font-size: 2.25rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: #111827;
  font-weight: 800;
}

.post-subtitle {
  font-size: 1.25rem;
  color: #374151;
}

.post-meta {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Post Content */
.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1f2937;
}

.post-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #111827;
  font-weight: 700;
}

.post-content h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #111827;
  font-weight: 600;
}

.post-content p {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #1f2937;
}

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

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #374151;
  background: #f8f9fc;
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

.post-content code {
  background: #e5e7eb;
  color: #1f2937;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.post-content th,
.post-content td {
  border: 1px solid #d1d5db;
  padding: 0.75rem 1rem;
  text-align: left;
}

.post-content th {
  background: #f3f4f6;
  font-weight: 600;
  color: #111827;
}

.post-content td {
  color: #1f2937;
}

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

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
}

.post-content a:hover {
  text-decoration: none;
}

/* Post CTA */
.post-cta {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
}

.post-cta h3 {
  margin-bottom: 0.5rem;
}

.post-cta p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.post-cta .store-buttons {
  justify-content: center;
}

/* Post Navigation */
.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.back-link {
  color: var(--primary, #6366f1);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

/* Recent Posts Section */
.recent-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.recent-posts h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

.recent-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.recent-post-card {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e5e7eb;
}

.recent-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: #ffffff;
}

.recent-post-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.recent-post-card p {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .blog-list {
    background: #111827;
  }
  
  .blog-card {
    background: #1f2937;
    border-color: #374151;
  }
  
  .blog-card h2 {
    color: #f9fafb;
  }
  
  .blog-card p {
    color: #d1d5db;
  }
  
  .blog-card-meta {
    color: #9ca3af;
  }
  
  .blog-post {
    background: #111827;
  }
  
  .post-header h1 {
    color: #f9fafb;
  }
  
  .post-content {
    color: #e5e7eb;
  }
  
  .post-content p,
  .post-content li {
    color: #e5e7eb;
  }
  
  .post-content h2, .post-content h3 {
    color: #f9fafb;
  }
  
  .post-content blockquote {
    background: #1f2937;
    color: #d1d5db;
  }
  
  .post-content code {
    background: #374151;
    color: #e5e7eb;
  }
  
  .post-content th {
    background: #1f2937;
    color: #f9fafb;
  }
  
  .post-content td {
    color: #e5e7eb;
    border-color: #374151;
  }
  
  .recent-posts h3 {
    color: #f9fafb;
  }
  
  .recent-post-card {
    background: #1f2937;
    border-color: #374151;
  }
  
  .recent-post-card:hover {
    background: #374151;
  }
  
  .recent-post-card h4 {
    color: #f9fafb;
  }
  
  .recent-post-card p {
    color: #d1d5db;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .blog-hero h1 {
    font-size: 2rem;
  }
  
  .post-header h1 {
    font-size: 1.75rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
}
