/* Modern Blog Styles */
:root {
  --blog-card-bg: #ffffff;
  --blog-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --blog-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
  --blog-border-radius: 16px;
  --blog-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blog Content Section */
.blog-content-section {
  padding: 4rem 0;
  background: #f8f9fa;
  min-height: 80vh;
}

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Main Blog Area */
.blog-main {
  background: transparent;
}

.blog-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

/* Blog Cards */
.blog-card {
  background: var(--blog-card-bg);
  border-radius: var(--blog-border-radius);
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  transition: var(--blog-transition);
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: 280px;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--blog-shadow-hover);
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

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

/* Fix image paths in blog cards */
.blog-card-image img[src*="/assets/"] {
  /* This selector can be used to target incorrect paths if needed */
}

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

.blog-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.blog-card-category a {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.blog-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-card-title {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--primary-color);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Blog Sidebar */
.blog-sidebar {
  background: transparent;
}

.sidebar-widget {
  background: white;
  border-radius: var(--blog-border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--blog-shadow);
  transition: var(--blog-transition);
}

.sidebar-widget:hover {
  box-shadow: var(--blog-shadow-hover);
}

.widget-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* Search Form */
.search-form {
  display: flex;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.search-form:focus-within {
  border-color: var(--primary-color);
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-size: 0.95rem;
  background: transparent;
}

.search-form input:focus {
  outline: none;
}

.search-form button {
  padding: 12px 16px;
  background: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background: var(--secondary-color);
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.3s ease;
}

.category-list a:hover {
  color: var(--primary-color);
  padding-left: 10px;
}

.category-list .count {
  background: #f1f3f4;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

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

.recent-posts-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f3f4;
}

.recent-posts-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-posts-list a {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.recent-posts-list a:hover {
  transform: translateX(5px);
}

.recent-posts-list img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.post-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.post-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.tags-list a {
  background: #f1f3f4;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tags-list a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a {
  padding: 12px 16px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 48px;
  text-align: center;
}

.pagination a:hover,
.pagination a.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.pagination a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .blog-card-image {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .blog-content-section {
    padding: 2rem 0;
  }
  
  .blog-grid {
    gap: 1.5rem;
  }
  
  .blog-card-content {
    padding: 1.5rem;
  }
  
  .sidebar-widget {
    padding: 1.5rem;
  }
  
  .blog-card-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .blog-card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-form button {
    border-radius: 0 0 8px 8px;
  }
  
  .tags-list {
    justify-content: center;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
}

/* Animation for blog cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
