/* ============================================================
   HIENPHAN.VN — Blog Page Styles
   ============================================================ */

/* ---------- Active nav link ---------- */
.nav-links a.active {
  color: var(--mauve);
  font-weight: 600;
}

/* ---------- Blog Hero / Cover ---------- */
.blog-hero {
  padding-top: 72px; /* navbar clearance */
  background: var(--gradient-blush);
  line-height: 0;   /* removes phantom space below img */
}

.blog-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fallback khi không load được ảnh */
.blog-hero.no-image {
  min-height: 180px;
  background: linear-gradient(135deg, #b8c6e8 0%, #c4b5f4 100%);
}

/* Mobile — ảnh rộng 3600px nên thu nhỏ lại vẫn đủ cao */
@media (max-width: 600px) {
  .blog-hero {
    padding-top: 64px;
  }
  .blog-hero-img {
    min-height: 120px;
    object-fit: cover;
    object-position: center;
  }
}

/* ---------- Filter bar ---------- */
.blog-filter-bar {
  background: #fff;
  border-bottom: 1px solid rgba(217,215,247,0.4);
  padding: 1rem 0;
  position: sticky;
  top: 72px;
  z-index: 90;
}

.blog-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px; /* tránh clip shadow */
  flex-wrap: nowrap;
}
.blog-filters::-webkit-scrollbar { display: none; }

.blog-filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(64, 73, 105, 0.18);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.blog-filter-btn:hover {
  border-color: var(--lavender-mid);
  color: var(--purple-dark);
  background: var(--blush);
}

.blog-filter-btn.active {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  color: #fff;
}

/* ---------- Blog list section ---------- */
.blog-list-section {
  padding: 2rem 0 4rem;
  background: var(--gradient-blush);
}

/* Blog grid — 3 cột trên desktop, 2 cột tablet, 1 cột mobile */
.blog-grid-page {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

/* ---------- Load more ---------- */
.blog-load-more {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.blog-load-btn {
  min-width: 220px;
}

/* ---------- CTA strip ---------- */
.blog-cta-strip {
  background: var(--gradient-dark);
  padding: 4rem 0;
}

.blog-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-cta-strip h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.blog-cta-strip p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  font-size: 1rem;
}

.blog-cta-strip .btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .blog-grid-page {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .blog-hero {
    min-height: 200px;
  }
  .blog-intro h1 {
    font-size: 1.6rem;
  }
  .blog-grid-page {
    grid-template-columns: 1fr;
  }
  .blog-filter-bar {
    top: 64px;
  }
  .blog-filters {
    gap: 0.4rem;
  }
  .blog-filter-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }
}
