/* Enhanced Blog Post Styles */

/* Blog Hero Section */
.blog-hero-section {
  background: linear-gradient(135deg, #f8fafe 0%, #e0ecf2 100%);
  padding: 4rem 0 2rem 0;
}

.blog-hero-image {
  margin-bottom: 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.blog-hero-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-breadcrumb {
  margin-bottom: 1.5rem;
}

.blog-breadcrumb a {
  color: #6c757d;
  font-weight: 500;
  transition: color 0.3s ease;
}

.blog-breadcrumb a:hover {
  color: #3E97FF;
}

.blog-title {
  font-size: 3rem;
  font-weight: 700;
  color: #1b2e4b;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

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

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 2px solid #e0ecf2;
  overflow: hidden;
}

.author-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: #1b2e4b;
  font-size: 1rem;
}

.author-role {
  color: #6c757d;
  font-size: 0.9rem;
}

.blog-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6c757d;
  font-weight: 500;
}

.blog-date i {
  color: #3E97FF;
}

/* Main Content Section */
.blog-content-section {
  padding: 3rem 0;
}

.blog-article {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.blog-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.blog-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1b2e4b;
  margin: 3rem 0 1.5rem 0;
  scroll-margin-top: 100px;
}

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

.blog-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1b2e4b;
  margin: 2rem 0 0.75rem 0;
}

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

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

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

.blog-content blockquote {
  border-left: 4px solid #3E97FF;
  background: #f8fafe;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #555;
}

.blog-content a:not(.btn) {
  color: #3E97FF;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.blog-content a:not(.btn):hover {
  border-bottom-color: #3E97FF;
}

/* Article Footer */
.blog-article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0ecf2;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-label {
  font-weight: 600;
  color: #6c757d;
}

.tag-item {
  background: #e0ecf2;
  color: #3E97FF;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-label {
  font-weight: 600;
  color: #6c757d;
}

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

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

.share-btn:hover {
  transform: translateY(-2px);
}

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

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

.share-btn.email {
  background: #6c757d;
}

/* Blog Sidebar Styles */
.sidebar-widget {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1b2e4b;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #1b2e4b;
}

/* Recent Posts Styles */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-post-item {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
}

.recent-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-post-link {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.recent-post-link:hover {
  text-decoration: none;
  color: inherit;
}

.recent-post-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1b2e4b;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.recent-post-link:hover .recent-post-title {
  color: #3E97FF;
}

.recent-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recent-post-date {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
}

.recent-post-image {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 0.5rem;
}

.recent-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recent-post-link:hover .recent-post-image img {
  transform: scale(1.05);
}

/* Demo Widget Styles */
.demo-widget {
  text-align: center;
  padding: 1.5rem;
  margin: -1rem;
}

.demo-description {
  font-size: 0.95rem;
  color: #6c757d;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.btn-demo {
  background: linear-gradient(135deg, #3E97FF 0%, #2B7CE6 100%);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(62, 151, 255, 0.3);
}

.btn-demo:hover {
  background: linear-gradient(135deg, #2B7CE6 0%, #1E5BB8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(62, 151, 255, 0.4);
}

/* Blog Listing Page Styles */
.featured-blog-post {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  margin-bottom: 2rem;
}

.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-title {
  color: #1b2e4b;
  font-weight: 700;
  margin-bottom: 1rem;
}

.blog-excerpt {
  color: #6c757d;
  line-height: 1.6;
}

/* Pagination Styles */
.pagination .page-link {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 0 2px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination .page-link:hover {
  color: #000;
  background-color: #f8f9fa;
  border-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination .page-item.active .page-link {
  background-color: #000;
  border-color: #000;
  color: #fff;
  font-weight: 600;
}

.pagination .page-item.disabled .page-link {
  color: #999;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  cursor: not-allowed;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
  .blog-sidebar {
    padding-left: 0;
    margin-top: 3rem;
  }
  
  .sidebar-widget {
    padding: 1.5rem;
  }
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .blog-hero-section {
    padding: 2rem 0 1rem 0;
  }
  
  .blog-title {
    font-size: 2.5rem;
  }
  
  .blog-article {
    padding: 2rem;
  }
  
  .blog-meta {
    flex-direction: row; /* keep side by side on mobile */
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }
  
  .blog-article-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .blog-title {
    font-size: 2rem;
  }
  
  .blog-hero-image img {
    height: 250px;
  }
  
  .blog-article {
    padding: 1.5rem;
  }
  
  .blog-content {
    font-size: 1rem;
  }
  
  .blog-content h2 {
    font-size: 1.75rem;
  }
  
  .blog-content h3 {
    font-size: 1.25rem;
  }
}

/* Ensure anchor targets are not hidden under sticky navbar */
.blog-content h2 { 
  scroll-margin-top: 96px; 
}

@media (min-width: 992px) {
  .blog-content h2 { 
    scroll-margin-top: 112px; 
  }
}
