/* Blog Styles - WordPress-like Design */

/* Blog Hero */
.blog-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
  z-index: 1;
}

.blog-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.blog-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.blog-hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* Main Blog Layout */
.blog-main {
  padding: 4rem 0;
  background: #f8f9fa;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #667eea;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 0.5rem;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
}

.search-btn {
  padding: 0.75rem 1rem;
  background: #667eea;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: #5568d3;
}

/* Categories */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 0.75rem;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 1rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-list a:hover {
  background: #f3f4f6;
  color: #667eea;
  transform: translateX(-4px);
}

.category-list .count {
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Recent Posts */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-post-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.recent-post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-post-item a {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.recent-post-item a:hover {
  opacity: 0.8;
}

.recent-post-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  opacity: 1;
  display: block;
}

.recent-post-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.recent-post-date {
  font-size: 0.8125rem;
  color: #9ca3af;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

/* Blog Content */
.blog-content {
  min-width: 0;
}

/* Blog Post Card */
.blog-post {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-post:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-category {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem 1rem;
  background: #667eea;
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2;
}

.post-content {
  padding: 2rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.post-meta svg {
  flex-shrink: 0;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: #667eea;
}

.post-excerpt {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.read-more:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-link {
  padding: 0.75rem 1.25rem;
  background: white;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.page-link:hover:not(.disabled) {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.page-link.active {
  background: #667eea;
  color: white;
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: 250px 1fr;
    gap: 2rem;
  }
  
  .post-thumbnail {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 6rem 1rem 3rem;
    min-height: 400px;
  }
  
  .blog-hero-title {
    font-size: 2rem;
  }
  
  .blog-hero-description {
    font-size: 1rem;
  }
  
  .blog-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
  
  .blog-sidebar {
    position: static;
    order: 2;
  }
  
  .blog-content {
    order: 1;
  }
  
  .post-thumbnail {
    height: 250px;
  }
  
  .post-content {
    padding: 1.5rem;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .post-meta {
    gap: 1rem;
    font-size: 0.8125rem;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
  
  .page-link {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 5rem 0.75rem 2rem;
    min-height: 350px;
  }
  
  .post-thumbnail {
    height: 200px;
  }
  
  .post-content {
    padding: 1rem;
  }
  
  .post-title {
    font-size: 1.25rem;
  }
  
  .post-excerpt {
    font-size: 0.9375rem;
  }
  
  .sidebar-widget {
    padding: 1rem;
  }
}
