/* Blog Page Styles */

.blog-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Blog Header */
.blog-header {
  background: linear-gradient(135deg, #1a336b 0%, #518ac8 100%);
  color: white;
  padding: 8rem 2rem 4rem;
  text-align: center;
  margin-top: 60px;
}

.blog-header-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

.blog-header-content p {
  font-size: 1.25rem;
  margin: 0;
  opacity: 0.9;
}

/* Category Filter */
.blog-filter {
  padding: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-container button {
  background: white;
  border: 2px solid #e5e5e5;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-container button:hover {
  border-color: #518ac8;
  color: #518ac8;
}

.filter-container button.active {
  background: #518ac8;
  border-color: #518ac8;
  color: white;
}

/* Blog Posts */
.blog-posts {
  flex: 1;
  padding: 4rem 2rem;
}

.posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.post-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: block;
}

.post-card:hover {
  border-color: #518ac8;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.post-category {
  display: inline-block;
  background: #dcf2fd;
  color: #518ac8;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a336b;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.post-excerpt {
  color: #666;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #888;
}

/* Newsletter */
.newsletter {
  background: #f8f9fa;
  padding: 5rem 2rem;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a336b;
  margin: 0 0 1rem;
}

.newsletter p {
  color: #666;
  margin: 0 0 2rem;
  font-size: 1.125rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #518ac8;
}

.newsletter-form button {
  white-space: nowrap;
}

.newsletter-note {
  font-size: 0.875rem;
  color: #888;
  margin: 0;
}

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

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .filter-container {
    gap: 0.5rem;
  }

  .filter-container button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* Blog Post Page */
.blog-post-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.post-not-found {
  padding: 8rem 2rem;
  text-align: center;
  margin-top: 60px;
}

.post-not-found h1 {
  font-size: 2.5rem;
  color: #1a336b;
  margin: 0 0 1rem;
}

.post-not-found p {
  color: #666;
  margin: 0 0 2rem;
  font-size: 1.125rem;
}

.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.post-category-badge {
  display: inline-block;
  background: #dcf2fd;
  color: #518ac8;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a336b;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #888;
  font-size: 0.9375rem;
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

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

.post-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: #1a336b;
  margin: 2rem 0 0.75rem;
}

.post-content p {
  margin: 0 0 1.5rem;
  color: #333;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.5rem 1.5rem;
  color: #333;
}

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

.post-content pre {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.9375rem;
  margin: 0 0 1.5rem;
}

.post-content a {
  color: #518ac8;
  text-decoration: none;
}

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

.post-content strong {
  font-weight: 600;
  color: #1a1a1a;
}

/* Share Section */
.post-share {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.post-share h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a336b;
  margin: 0 0 1rem;
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.share-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.9;
}

.share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.share-btn.linkedin {
  background: #0077b5;
  color: white;
}

.share-btn.facebook {
  background: #4267b2;
  color: white;
}

/* Related Posts */
.related-posts {
  background: #f8f9fa;
  padding: 5rem 2rem;
}

.related-posts h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a336b;
  margin: 0 0 2rem;
  text-align: center;
}

.related-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.related-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: block;
}

.related-card:hover {
  border-color: #518ac8;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.related-category {
  display: inline-block;
  background: #dcf2fd;
  color: #518ac8;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.related-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a336b;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.related-card p {
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-size: 0.875rem;
  color: #888;
}

/* Post CTA */
.post-cta {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #1a336b 0%, #518ac8 100%);
  color: white;
}

.post-cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.post-cta p {
  font-size: 1.25rem;
  margin: 0 0 2rem;
  opacity: 0.9;
}

.post-cta .cta-primary {
  background: white;
  color: #1a336b;
}

.post-cta .cta-primary:hover {
  background: #f0f0f0;
}

/* Responsive */
@media (max-width: 768px) {
  .post-header h1 {
    font-size: 2rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .share-buttons {
    flex-wrap: wrap;
  }
}
