/* Blog Styles - Mobile First Approach */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  font-family: 'Source Sans Pro';
}

h1, h2 {
  font-family: 'Fira Sans' !important;
  font-weight: 700;
}

/* Blog Styles */
.blog-listing {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
  width: 100%;
}

.blog-posts {
  margin-top: 2rem;
}

.blog-preview {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.blog-preview:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Featured Image Styles for Blog Listing */
.blog-featured-image {
  flex-shrink: 0;
  width: 200px;
}

.blog-featured-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: transform 0.2s ease;
}

.blog-featured-image a:hover img {
  transform: scale(1.02);
}

.blog-preview-content {
  flex: 1;
  min-width: 0;
}

.blog-preview h2 {
  margin-bottom: 1rem;
  font-family: 'Fira Sans', sans-serif;
}

.blog-preview h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-preview h2 a:hover {
  color: var(--bs-primary);
}

.blog-meta {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-excerpt {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-tags {
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.read-more {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

/* Individual Blog Post Styles */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
  width: 100%;
}

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

.blog-header h1 {
  margin-bottom: 1rem;
  font-family: 'Fira Sans', sans-serif;
}

.blog-post p:has(img) {
  text-align: center;
}

.blog-post p img {
  border-radius: 5px;
}

/* Featured Image for Full Blog Post */
.blog-featured-image-full {
  margin: 2rem 0;
  text-align: center;
}

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

.blog-image-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
}

.blog-content {
  line-height: 1.7;
  margin-bottom: 3rem;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: 'Fira Sans', sans-serif;
}

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

.blog-content code {
  background-color: var(--bs-secondary-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.blog-content pre {
  background-color: var(--bs-secondary-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Blog Navigation */
.blog-navigation {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid #e9ecef;
  box-sizing: border-box;
  width: 100%;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-previous,
.nav-next {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 600;
  max-width: 45%;
}

.nav-previous:hover,
.nav-next:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

.nav-next {
  text-align: right;
}

/* Pagination Styles */
.pagination {
  margin-top: 3rem;
  text-align: center;
}

.pagination-list {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.pagination-link,
.pagination-current,
.pagination-previous,
.pagination-next {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  color: var(--bs-primary);
  transition: all 0.15s ease-in-out;
}

.pagination-current {
  background-color: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.pagination-link:hover,
.pagination-previous:hover,
.pagination-next:hover {
  background-color: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
  text-decoration: none;
}

/* Author Bio */
.author-bio {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
}

.author-details {
  text-align: center;
}

.author-image {
  border-radius: 100px !important;
  width: 70px;
}

.author-name {
  white-space: nowrap;
  margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-listing,
  .blog-post,
  .blog-navigation {
    padding: 1rem 0.75rem;
    margin: 0;
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  /* Stack blog preview content on mobile */
  .blog-preview {
    flex-direction: column;
    gap: 1rem;
  }
  
  .blog-featured-image {
    width: 100%;
  }
  
  .blog-featured-image img {
    height: 200px;
  }
  
  .blog-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .blog-content img {
    max-width: 100%;
    height: auto;
  }
  
  .blog-content pre {
    overflow-x: auto;
    white-space: pre-wrap;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-previous,
  .nav-next {
    max-width: 100%;
    text-align: center;
  }
  
  .pagination-list {
    flex-wrap: wrap;
  }
}