/* =============================================================================
   Blog Listing Styles (index.php & blog related pages)
   ============================================================================= */

/* Blog Page Styles */
.blog-page {
  padding: 4rem 0;
  background: white;
}

.blog-page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  margin-top: 2rem;
}

.blog-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.blog-page-description {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.blog-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #007bff;
  border: 1px solid rgba(0, 123, 255, 0.2);
}

.blog-stat-item i {
  font-size: 1rem;
}

/* Blog Categories Filter */
.blog-categories-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.category-filter-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-filter-btn:hover {
  border-color: #007bff;
  color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.category-filter-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.category-filter-btn.ses-filter {
  border-color: #2196f3;
  color: #2196f3;
}

.category-filter-btn.ses-filter:hover,
.category-filter-btn.ses-filter.active {
  background: #2196f3;
  border-color: #2196f3;
  color: white;
}

.category-filter-btn.estate-filter {
  border-color: #4caf50;
  color: #4caf50;
}

.category-filter-btn.estate-filter:hover,
.category-filter-btn.estate-filter.active {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

/* Blog Grid Enhanced */
.blog-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card-enhanced {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

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

.blog-card-enhanced .blog-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

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

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

.blog-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.blog-card-enhanced:hover .blog-image-overlay {
  opacity: 1;
}

.blog-image-overlay span {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Blog Content Enhanced */
.blog-content-enhanced {
  padding: 1.5rem;
}

.blog-meta-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #666;
}

.blog-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

.blog-title-enhanced {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-title-enhanced a {
  color: #2c3e50;
  transition: color 0.3s ease;
}

.blog-title-enhanced a:hover {
  color: #007bff;
}

.blog-excerpt-enhanced {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-category-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid;
}

.blog-category-tag.ses-tag {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
  border-color: #2196f3;
}

.blog-category-tag.ses-tag:hover {
  background: #2196f3;
  color: white;
}

.blog-category-tag.estate-tag {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border-color: #4caf50;
}

.blog-category-tag.estate-tag:hover {
  background: #4caf50;
  color: white;
}

.blog-category-tag.default-tag {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border-color: #6c757d;
}

.blog-category-tag.default-tag:hover {
  background: #6c757d;
  color: white;
}

.blog-footer-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.blog-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

.blog-read-more {
  color: #007bff;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.blog-read-more:hover {
  color: #0056b3;
  gap: 0.5rem;
}

/* Featured Post Enhanced */
.featured-post-enhanced {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 2rem;
  border: 2px solid #007bff;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.featured-post-enhanced .blog-image {
  height: 300px;
}

.featured-post-enhanced .blog-content-enhanced {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge-enhanced {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.featured-post-enhanced .blog-title-enhanced {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.featured-post-enhanced .blog-excerpt-enhanced {
  font-size: 1.1rem;
  -webkit-line-clamp: 4;
  margin-bottom: 1.5rem;
}

/* Blog Search */
.blog-search-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  text-align: center;
}

.blog-search-form {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.blog-search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.blog-search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.blog-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.1rem;
}

.blog-search-submit {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: #007bff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.blog-search-submit:hover {
  background: #0056b3;
}

/* Pagination Enhanced */
.pagination-enhanced {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination-info {
  color: #666;
  font-size: 0.9rem;
  padding: 0 1rem;
}

.pagination-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: white;
  color: #6c757d;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination-btn:hover {
  background: #007bff;
  border-color: #007bff;
  color: white;
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.disabled:hover {
  background: white;
  border-color: #dee2e6;
  color: #6c757d;
  transform: none;
}

.pagination-prev,
.pagination-next {
  padding: 0 1rem;
  width: auto;
  gap: 0.5rem;
}

/* Load More Button */
.load-more-section {
  text-align: center;
  margin: 3rem 0;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.load-more-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004494);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.load-more-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
      transform: rotate(360deg);
  }
}

/* Blog Sidebar */
.blog-sidebar {
  margin-top: 2rem;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.sidebar-widget h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.sidebar-widget h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #007bff;
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-post-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.recent-post-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.recent-post-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
  line-height: 1.3;
}

.recent-post-content h4 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.recent-post-content h4 a:hover {
  color: #007bff;
}

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

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-list li {
  margin-bottom: 0.5rem;
}

.categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: #555;
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.categories-list a:hover {
  color: #007bff;
}

.category-count {
  background: #f8f9fa;
  color: #6c757d;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud-item {
  padding: 0.3rem 0.75rem;
  background: #f8f9fa;
  color: #6c757d;
  text-decoration: none;
  border-radius: 15px;
  font-size: 0.8rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.tag-cloud-item:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  text-align: center;
}

.newsletter-widget h3 {
  color: white;
  margin-bottom: 1rem;
}

.newsletter-widget h3::after {
  background: rgba(255, 255, 255, 0.3);
}

.newsletter-form {
  margin-top: 1rem;
}

.newsletter-input {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.newsletter-submit {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.newsletter-submit:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-page-title {
      font-size: 2rem;
  }
  
  .blog-stats {
      gap: 1rem;
  }
  
  .blog-categories-filter {
      justify-content: flex-start;
      overflow-x: auto;
      padding-bottom: 1rem;
  }
  
  .blog-grid-enhanced {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }
  
  .featured-post-enhanced {
      grid-template-columns: 1fr;
  }
  
  .featured-post-enhanced .blog-image {
      height: 200px;
  }
  
  .featured-post-enhanced .blog-content-enhanced {
      padding: 1.5rem;
  }
  
  .featured-post-enhanced .blog-title-enhanced {
      font-size: 1.4rem;
  }
  
  .pagination-enhanced {
      gap: 0.5rem;
  }
  
  .pagination-info {
      width: 100%;
      text-align: center;
      margin-bottom: 1rem;
  }
  
  .blog-sidebar {
      margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .blog-page-header {
      padding: 1.5rem 1rem;
  }
  
  .blog-page-title {
      font-size: 1.8rem;
  }
  
  .blog-stats {
      flex-direction: column;
      align-items: center;
  }
  
  .blog-card-enhanced .blog-content-enhanced {
      padding: 1rem;
  }
  
  .featured-post-enhanced .blog-content-enhanced {
      padding: 1rem;
  }
  
  .pagination-btn {
      width: 40px;
      height: 40px;
  }
  
  .pagination-prev,
  .pagination-next {
      padding: 0 0.75rem;
  }
}