/* ================================================
   SocialGrowth Theme - Blog CSS
   ================================================ */

/* Force visibility overrides for core.css conflicts */
.sg-page-header,
.sg-page-header * {
  visibility: visible !important;
}
.sg-blog-section,
.sg-blog-section * {
  visibility: visible !important;
}
.sg-page-header .sg-page-title {
  color: #fff !important;
  font-size: 36px;
  font-weight: 800;
}
.sg-page-header .breadcrumb-item a {
  color: rgba(255,255,255,0.8) !important;
}
.sg-page-header .breadcrumb-item.active {
  color: rgba(255,255,255,0.6) !important;
}

/* Blog Section */
.sg-blog-section {
  padding: 60px 0 80px;
  background: #F8FAFC;
  color: #1A1A2E;
}

/* Blog Cards */
.sg-blog-card {
  background: #FFFFFF;
  background: var(--sg-bg-card, #FFFFFF);
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  border-color: var(--sg-border, #E5E7EB);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sg-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sg-shadow-lg);
}

.sg-blog-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.sg-blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--sg-transition);
}

.sg-blog-card:hover .sg-blog-card-img img {
  transform: scale(1.05);
}

.sg-blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sg-blog-meta {
  margin-bottom: 8px;
}

.sg-blog-meta span {
  font-size: 12px;
  color: #6B7280 !important;
  font-weight: 500;
}

.sg-blog-meta span i {
  margin-right: 4px;
  color: var(--sg-primary-light);
}

.sg-blog-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #1A1A2E !important;
}

.sg-blog-card-title a {
  color: #1A1A2E !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sg-blog-card-title a:hover {
  color: #6C5CE7 !important;
}

.sg-blog-card-excerpt {
  font-size: 14px;
  color: #6B7280 !important;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--sg-primary);
  text-decoration: none;
  transition: var(--sg-transition);
  margin-top: auto;
}

.sg-read-more:hover {
  color: #5A4BD1;
}

.sg-read-more i {
  margin-left: 4px;
  transition: var(--sg-transition);
}

.sg-read-more:hover i {
  transform: translateX(4px);
}

/* Sidebar Widgets */
.sg-sidebar-widget {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  padding: 24px;
  margin-bottom: 24px;
}

.sg-widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sg-border);
  position: relative;
}

.sg-widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--sg-primary);
}

.sg-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sg-category-list li {
  margin-bottom: 8px;
}

.sg-category-list li a {
  color: var(--sg-text);
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 6px 0;
  transition: var(--sg-transition);
}

.sg-category-list li a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sg-primary-light);
  margin-right: 10px;
  flex-shrink: 0;
}

.sg-category-list li a:hover {
  color: var(--sg-primary);
  padding-left: 4px;
}

/* Recent Posts */
.sg-recent-post-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sg-border);
}

.sg-recent-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sg-recent-post-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sg-recent-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-recent-post-info a {
  font-size: 13px;
  font-weight: 600;
  color: var(--sg-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: var(--sg-transition);
}

.sg-recent-post-info a:hover {
  color: var(--sg-primary);
}

.sg-recent-post-date {
  font-size: 11px;
  color: var(--sg-text-light);
  margin-top: 4px;
  display: block;
}

/* Single Article */
.sg-article {
  background: var(--sg-bg-card);
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
  overflow: hidden;
  margin-bottom: 40px;
}

.sg-article-featured-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.sg-article-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-article-meta {
  padding: 24px 28px 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.sg-article-meta span {
  font-size: 13px;
  color: var(--sg-text-light);
}

.sg-article-meta span i {
  margin-right: 4px;
  color: var(--sg-primary-light);
}

.sg-article-content {
  padding: 20px 28px 28px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--sg-text);
}

.sg-article-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.sg-article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 10px;
}

.sg-article-content p {
  margin-bottom: 16px;
}

.sg-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.sg-article-content ul,
.sg-article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.sg-article-content li {
  margin-bottom: 8px;
}

.sg-article-content blockquote {
  border-left: 4px solid var(--sg-primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: rgba(108, 92, 231, 0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Social Share */
.sg-article-share {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--sg-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sg-article-share span {
  font-size: 14px;
  font-weight: 600;
  color: var(--sg-text);
}

.sg-article-share a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sg-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sg-text-light);
  text-decoration: none;
  transition: var(--sg-transition);
}

.sg-article-share a:hover {
  background: var(--sg-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Pagination */
.sg-pagination .page-item .page-link {
  border: none;
  color: var(--sg-text);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  margin: 0 2px;
  transition: var(--sg-transition);
}

.sg-pagination .page-item.active .page-link {
  background: var(--sg-primary);
  color: #fff;
}

.sg-pagination .page-item .page-link:hover {
  background: rgba(108, 92, 231, 0.1);
  color: var(--sg-primary);
}

/* Empty State */
.sg-empty-state {
  padding: 60px 20px;
}

.sg-empty-state i {
  display: block;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 991.98px) {
  .sg-blog-section {
    padding: 40px 0 60px;
  }
}
