/* Blog Post Styling */
.blog-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

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

.blog-content h1 {
  font-size: 2.5rem;
  color: #1a1a1a;
  border-bottom: 3px solid #007bff;
  padding-bottom: 0.5rem;
}

.blog-content h2 {
  font-size: 2rem;
  color: #333;
  margin-top: 3rem;
}

.blog-content h3 {
  font-size: 1.5rem;
  color: #555;
  margin-top: 2.5rem;
}

.blog-content h4 {
  font-size: 1.25rem;
  color: #666;
}

.blog-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
  color: #444;
}

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

.blog-content li {
  margin-bottom: 0.5rem;
  color: #444;
}

.blog-content li strong {
  color: #333;
  font-weight: 600;
}

.blog-content blockquote {
  border-left: 4px solid #007bff;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.blog-content code {
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #e83e8c;
}

.blog-content pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content pre code {
  background-color: transparent;
  padding: 0;
  color: #333;
}

.blog-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

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

.blog-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-content .highlight {
  background-color: #fff3cd;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
}

/* Social sharing buttons */
.social-share {
  position: sticky;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 1000;
}

.social-share .btn {
  display: block;
  margin-bottom: 0.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blog navigation */
.blog-nav {
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
  margin: 2rem 0;
}

.blog-nav .nav-link {
  color: #007bff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.blog-nav .nav-link:hover {
  background-color: #f8f9fa;
  color: #0056b3;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, #007bff, #0056b3);
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Print styles */
@media print {
  .blog-content {
    font-size: 12pt;
    line-height: 1.6;
  }
  
  .blog-content h1,
  .blog-content h2,
  .blog-content h3 {
    page-break-after: avoid;
  }
  
  .blog-content img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  .social-share,
  .blog-nav,
  .btn {
    display: none !important;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .blog-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .blog-content h1 {
    font-size: 2rem;
  }
  
  .blog-content h2 {
    font-size: 1.75rem;
  }
  
  .blog-content h3 {
    font-size: 1.5rem;
  }
  
  .social-share {
    position: static;
    transform: none;
    display: flex;
    justify-content: center;
    margin: 2rem 0;
  }
  
  .social-share .btn {
    margin: 0 0.25rem;
    width: 40px;
    height: 40px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .blog-content {
    color: #e9ecef;
  }
  
  .blog-content h1,
  .blog-content h2,
  .blog-content h3,
  .blog-content h4,
  .blog-content h5,
  .blog-content h6 {
    color: #f8f9fa;
  }
  
  .blog-content p,
  .blog-content li {
    color: #ced4da;
  }
  
  .blog-content blockquote {
    background-color: #343a40;
    color: #f8f9fa;
  }
  
  .blog-content code {
    background-color: #343a40;
    color: #f8f9fa;
  }
  
  .blog-content pre {
    background-color: #343a40;
  }
  
  .blog-content table th {
    background-color: #495057;
    color: #f8f9fa;
  }
  
  .blog-content table td {
    border-color: #495057;
    color: #e9ecef;
  }
}

/* Author bio section */
.author-bio {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.author-bio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #007bff, #6f42c1);
}

.author-bio img {
  max-width: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Related posts styling */
.related-posts .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-posts .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-posts .card-img-top {
  transition: transform 0.3s ease;
}

.related-posts .card:hover .card-img-top {
  transform: scale(1.05);
}

/* Tags styling */
.tags .badge {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.tags .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.back-to-top:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.back-to-top.show {
  display: flex;
}
