/* Blog-specific styles */

/* Blog layout */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1rem;
}

.blog-description {
  font-size: 1.125rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

/* Blog content layout */
.blog-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .blog-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Posts grid */
.posts-grid {
  display: grid;
  gap: 2rem;
}

.post-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.post-header h2 a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-header h2 a:hover {
  color: #2563eb;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.post-meta time {
  font-weight: 500;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.tag:hover {
  background: #bfdbfe;
  color: #1e40af;
}

.post-excerpt {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-footer {
  display: flex;
  justify-content: between;
  align-items: center;
}

.read-more {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: #1d4ed8;
}

/* Blog sidebar */
.blog-sidebar {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2563eb;
}

/* Search section */
.search-section input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-section input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Popular calculators */
.popular-calculators {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-calculators li {
  margin-bottom: 1rem;
}

.popular-calculators li:last-child {
  margin-bottom: 0;
}

.popular-calculators a {
  display: block;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.popular-calculators a:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.popular-calculators strong {
  color: #1f2937;
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.25rem;
}

.calculator-description {
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Recent posts */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.recent-posts li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-posts a {
  color: #1f2937;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.recent-posts a:hover {
  color: #2563eb;
}

.recent-posts time {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* No posts message */
.no-posts {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.pagination-link {
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.pagination-link.current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Single post styles */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-post .post-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.blog-post .post-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-post .post-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-post .post-content {
  color: #374151;
  line-height: 1.7;
  font-size: 1.125rem;
}

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

.blog-post .post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 1rem 0;
}

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

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

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

.blog-post .post-content blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #6b7280;
  font-style: italic;
}

.blog-post .post-content code {
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.blog-post .post-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-post .post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
}

.nav-prev,
.nav-next {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-prev:hover,
.nav-next:hover {
  color: #1d4ed8;
}

/* Post sharing */
.post-share {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
}

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

.post-share a {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.post-share a:hover {
  background: #e5e7eb;
}