/* ========================================
   BLOG PAGE STYLES
   Matches Sadiq Project theme colors
   ======================================== */

/* Use the site's design tokens */
.blog-hero {
  background: linear-gradient(135deg, var(--primary, #1F4015) 0%, var(--primary-700, #17310F) 100%);
  padding: 7rem 0 4rem;
  text-align: center;
  color: #fff;
}

.blog-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.blog-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.blog-hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
}

/* Category Filters Section */
.blog-filters-section {
  background: var(--bg, #F7F4EE);
  padding: 2rem 0;
  position: sticky;
  top: 80px;
  z-index: 100;
  border-bottom: 1px solid var(--border, rgba(31, 64, 21, 0.15));
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.filter-pill {
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  border: 1.5px solid var(--border, rgba(31, 64, 21, 0.15));
  background: var(--bg-white, #FFFFFF);
  color: var(--ink, #212121);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--primary, #1F4015);
  color: var(--primary, #1F4015);
  background: var(--primary-100, rgba(31, 64, 21, 0.1));
}

.filter-pill.active {
  background: var(--primary, #1F4015);
  border-color: var(--primary, #1F4015);
  color: #fff;
}

/* Blog Grid Section */
.blog-grid-section {
  background: var(--bg, #F7F4EE);
  padding: 3rem 0 6rem;
  min-height: 60vh;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Blog Card */
.blog-card {
  background: var(--bg-white, #FFFFFF);
  border-radius: 16px;
  border: 1px solid var(--border, rgba(31, 64, 21, 0.15));
  padding: 1.75rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  height: 100%;
}

.blog-card:hover {
  box-shadow: 0 12px 40px rgba(31, 64, 21, 0.12);
  transform: translateY(-4px);
  border-color: var(--primary-300, rgba(31, 64, 21, 0.3));
}

/* Card Header: Category & Read Time */
.blog-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blog-card-category {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--primary, #1F4015);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 20px;
}

.blog-card-read-time {
  font-size: 0.85rem;
  color: var(--ink-muted, #4A4A4A);
}

/* Card Title */
.blog-card-title {
  font-family: 'Source Sans Pro', -apple-system, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink, #212121);
  line-height: 1.35;
  margin-bottom: 0.875rem;
}

/* Card Excerpt */
.blog-card-excerpt {
  font-size: 0.95rem;
  color: var(--ink-muted, #4A4A4A);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* Card Footer: Date & Read More */
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border, rgba(31, 64, 21, 0.15));
}

.blog-card-date {
  font-size: 0.875rem;
  color: var(--ink-muted, #4A4A4A);
}

.blog-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary, #1F4015);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-link {
  gap: 0.6rem;
  color: var(--primary-700, #17310F);
}

/* Loading State */
.blog-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted, #4A4A4A);
}

.blog-loading i {
  font-size: 2.5rem;
  color: var(--primary, #1F4015);
  margin-bottom: 1rem;
  display: block;
}

.blog-loading p {
  font-size: 1rem;
}

/* Empty State */
.blog-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--ink-muted, #4A4A4A);
}

.blog-empty i {
  font-size: 4rem;
  color: var(--border, rgba(31, 64, 21, 0.3));
  margin-bottom: 1.5rem;
}

.blog-empty h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  color: var(--ink, #212121);
  margin-bottom: 0.75rem;
}

.blog-empty p {
  font-size: 1rem;
}

/* No results for filter */
.blog-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted, #4A4A4A);
}

.blog-no-results i {
  font-size: 3rem;
  color: var(--border, rgba(31, 64, 21, 0.3));
  margin-bottom: 1rem;
}

.blog-no-results h3 {
  font-size: 1.25rem;
  color: var(--ink, #212121);
  margin-bottom: 0.5rem;
}

/* Featured Card - first card larger */
.blog-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

@media (max-width: 768px) {
  .blog-card.featured {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .blog-hero {
    padding: 6rem 0 3rem;
  }
  
  .blog-filters-section {
    padding: 1.25rem 0;
    top: 70px;
  }
  
  .blog-filters {
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .blog-filters::-webkit-scrollbar {
    display: none;
  }
  
  .filter-pill {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  
  .blog-grid-section {
    padding: 2rem 0 4rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .blog-card {
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .blog-card-title {
    font-size: 1.2rem;
  }
  
  .blog-card-excerpt {
    font-size: 0.9rem;
  }
}

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

.blog-card {
  animation: fadeInUp 0.4s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }
