/* Blog Listing Page */
.blog-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
              url('../assets/images/blog.jpg') center/cover;
  color: white;
  text-align: center;
  padding: 5rem 1rem;
}

.search-container {
  max-width: 600px;
  margin: 2rem auto 0;
  display: flex;
}

/* Blog Content Styling */
#post-content {
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: #2d3748;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

#post-content h1,
#post-content h2,
#post-content h3,
#post-content h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #1a202c;
  margin: 1.5em 0 0.75em;
}

#post-content h1 {
  font-size: 2rem;
}

#post-content h2 {
  font-size: 1.75rem;
}

#post-content h3 {
  font-size: 1.5rem;
}

#post-content h4 {
  font-size: 1.25rem;
}

#post-content p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

#post-content a {
  color: #3182ce;
  text-decoration: underline;
}

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

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

#post-content blockquote {
  border-left: 4px solid #3182ce;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #4a5568;
  font-style: italic;
}

#post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}
@media (max-width: 768px) {
  #post-content h1 {
    font-size: 1.75rem;
  }

  #post-content h2 {
    font-size: 1.5rem;
  }

  .social-share {
    justify-content: center;
    margin: 1rem 0;
  }
}

#blog-search {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

#search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-filter {
  background: #f0f0f0;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.tag-filter:hover {
  background: var(--primary-color);
  color: white;
}

#sort-options {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}

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

.blog-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.card-body p {
  color: #666;
  margin-bottom: 1.5rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-controls button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 4px;
}

.pagination-controls button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

.spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
  color: #d9534f;
}

.error-message i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}


/* Blog Detail Page */
.blog-detail-section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

#post-meta {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 600;
  display: block;
}

.post-date {
  color: #666;
  font-size: 0.9rem;
}

.social-share {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: white;
  cursor: pointer;
  transition: opacity 0.3s;
}

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

.share-btn.facebook {
  background: #3b5998;
}

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

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

.featured-image {
  margin-bottom: 2rem;
}

.featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.image-caption {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 0.5rem;
}

.post-body {
  line-height: 1.8;
}

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

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-body h2, 
.post-body h3 {
  margin: 2rem 0 1rem;
  color: var(--primary-color);
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

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

.post-tag {
  background: #f0f0f0;
  color: #333;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
}

.post-tag:hover {
  background: var(--primary-color);
  color: white;
}

.view-count {
  color: #666;
  font-size: 0.9rem;
}

.related-posts {
  margin: 4rem 0;
}

.related-posts h2 {
  margin-bottom: 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .post-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}


.social-share {
  display: flex;
  gap: 12px;
  margin: 1.5rem 0;
  align-items: center;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f7fa;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.share-btn.facebook:hover {
  background: #3b5998;
  color: white;
}

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

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

.share-label {
  font-weight: 600;
  color: #4a5568;
  margin-right: 8px;
  font-size: 0.9rem;
}

.share-btn.share-native:hover {
  background: #4a5568;
  color: white;
}