/* ===== BLOG STYLES ===== */

/* Blog Card Styles */
.blog-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid rgba(59, 130, 246, 0.1);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* Category Tags */
.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}

.category-ai {
  background: #dbeafe;
  color: #1e40af;
}

.category-ml {
  background: #dcfce7;
  color: #166534;
}

.category-web {
  background: #fef3c7;
  color: #92400e;
}

.category-data {
  background: #e0e7ff;
  color: #3730a3;
}

.category-tutorial {
  background: #fce7f3;
  color: #be185d;
}

/* Search Highlight */
.search-highlight {
  background: #fef08a;
  padding: 0.1rem 0.2rem;
  border-radius: 0.25rem;
}

/* Blog Content Styles */
.blog-content {
  line-height: 1.7;
}

.blog-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.blog-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
}

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

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

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

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

.blog-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.blog-content code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.blog-content pre code {
  background: transparent;
  padding: 0;
}

.blog-content blockquote {
  border-left: 4px solid #3b82f6;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.blog-content a {
  color: #3b82f6;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s;
}

.blog-content a:hover {
  text-decoration-color: #3b82f6;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Blog Search and Filter */
.blog-search {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

.blog-search:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.blog-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* Blog Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover,
.pagination-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

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

/* Responsive Blog Design */
@media (max-width: 768px) {
  .blog-content h1 {
    font-size: 2rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
  }

  .blog-content h3 {
    font-size: 1.25rem;
  }

  .blog-filter {
    flex-direction: column;
  }

  .filter-btn {
    text-align: center;
  }

  .blog-pagination {
    flex-wrap: wrap;
  }
}
