/* Blog Page Specific Styles */

/* Override global section padding for blog page */
main section {
  padding: 2rem 0 !important;
  transition: all 0.3s ease;
}

/* Ensure no gaps between sections */
main section + section {
  margin-top: 0;
}

/* Hero Section for Blog */
.hero {
  text-align: center;
  padding: 6rem 0 3rem !important;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--card-background) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 205, 66, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .lead {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.8;
  color: var(--text-color);
}

/* Search Section */
.search-section {
  margin-top: 2rem;
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
}

.search-box input {
  width: 100%;
  padding: 1rem 3rem 1rem 3rem;
  border: 2px solid transparent;
  border-radius: var(--radius-medium);
  background: var(--card-background);
  color: var(--text-color);
  font-size: 1rem;
  transition: var(--transition-medium);
  box-shadow: var(--shadow-light);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition-fast);
  display: none;
}

.clear-btn:hover {
  background: var(--hover-color);
  color: var(--text-color);
}

.clear-btn.show {
  display: block;
}

/* Filter Container */
.filter-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-small);
  background: var(--card-background);
  color: var(--text-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-medium);
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select:hover {
  border-color: var(--accent-color);
}

/* Stats */
.stats {
  text-align: center;
  color: var(--text-color);
  font-size: 0.9rem;
  opacity: 0.8;
}

.stats span {
  font-weight: var(--weight-bold);
  color: var(--primary-color);
}

/* Loading Section */
.loading-section {
  padding: 2rem 0 !important;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.loading-section[style*="display: none"] {
  padding: 0 !important;
  min-height: 0;
  margin: 0;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner i {
  font-size: 2rem;
  color: var(--primary-color);
}

.loading-spinner p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Blog Section */
.blog-section {
  padding: 2rem 0 !important;
  background: var(--background-color);
  margin: 0;
  position: relative;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Article Card */
.article-card {
  background: var(--card-background);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-medium);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  position: relative;
  backdrop-filter: blur(10px);
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 2;
}

.article-card:hover::before {
  transform: scaleX(1);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.article-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  position: relative;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

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

.article-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
  z-index: 1;
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-category {
  background: var(--primary-color);
  color: var(--text-color-two);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-small);
  font-weight: var(--weight-semibold);
  font-size: 0.7rem;
}

.article-title {
  font-size: 1.3rem;
  font-weight: var(--weight-bold);
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.article-excerpt {
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.article-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.article-stat i {
  color: var(--primary-color);
}

.read-more {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: var(--weight-semibold);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more:hover {
  color: var(--primary-color);
}

/* Featured Article */
.featured-section {
  padding: 2rem 0 !important;
  background: var(--card-background);
  margin: 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
  font-size: 2.5rem;
  font-weight: var(--weight-bold);
}

.featured-article {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-background);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-medium);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  backdrop-filter: blur(10px);
  position: relative;
}

.featured-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 2;
}

.featured-article:hover::before {
  transform: scaleX(1);
}

.featured-article:hover {
  box-shadow: var(--shadow-hover);
  background: var(--bg-primary);
}

.featured-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  position: relative;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.featured-article:hover .featured-image img {
  transform: scale(1.05);
}

.featured-content {
  padding: 2rem;
}

.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.featured-category {
  background: var(--primary-color);
  color: var(--text-color-two);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-small);
  font-weight: var(--weight-semibold);
  font-size: 0.8rem;
}

.featured-title {
  font-size: 2rem;
  font-weight: var(--weight-bold);
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.featured-excerpt {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.featured-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.featured-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-stat i {
  color: var(--primary-color);
}

.featured-read-more {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: var(--weight-semibold);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent-color);
  border-radius: var(--radius-small);
}

.featured-read-more:hover {
  color: var(--text-color-two);
  background: var(--accent-color);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* No Results Section */
.no-results-section {
  padding: 2rem 0 !important;
  text-align: center;
}

.no-results {
  max-width: 400px;
  margin: 0 auto;
}

.no-results i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.no-results h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Category Colors */
.category-machine-learning { 
  background: #ff6b6b; 
}
.category-computer-vision { 
  background: #4ecdc4; 
}
.category-data-analysis { 
  background: #45b7d1; 
}
.category-python { 
  background: #96ceb4; 
}
.category-tutorial { 
  background: #feca57; 
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .lead {
    font-size: 1.1rem;
  }
  
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-select {
    min-width: auto;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .article-card {
    margin-bottom: 1rem;
  }
  
  .featured-title {
    font-size: 1.5rem;
  }
  
  .featured-content {
    padding: 1.5rem;
  }
  
  .featured-image {
    height: 200px;
  }
  
  .featured-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 0 3rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .search-box input {
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
  }
  
  .article-content {
    padding: 1rem;
  }
  
  .article-title {
    font-size: 1.1rem;
  }
  
  .featured-content {
    padding: 1rem;
  }
  
  .featured-title {
    font-size: 1.3rem;
  }
}

/* Animation for article cards */
.article-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for multiple cards */
.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

/* Progress bar */
.progress-container {
  position: fixed;
  width: 100%;
  height: 4px;
  top: 0;
  left: 0;
  background: transparent;
  z-index: 9999;
}

.progress-bar {
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Active navigation link */
.nav-link.active {
  color: var(--primary-color);
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transform: scaleX(1);
}

/* Loading skeleton animation */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--card-background) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Error state */
.error-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}

.error-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--error-color);
}

/* Success state */
.success-state {
  text-align: center;
  padding: 2rem 0;
  color: var(--success-color);
}

/* Filter active state */
.filter-select:focus,
.filter-select.active {
  border-color: var(--primary-color);
  background: var(--hover-color);
}

/* Search active state */
.search-box.active input {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Article placeholder */
.article-placeholder {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.article-placeholder i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Reading time indicator */
.reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.reading-time i {
  color: var(--primary-color);
}

/* Article tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.article-tag {
  background: var(--hover-color);
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-small);
  font-size: 0.7rem;
  font-weight: var(--weight-semibold);
  transition: var(--transition-fast);
}

.article-tag:hover {
  background: var(--primary-color);
  color: var(--text-color-two);
} 