/* =============================================
   styles.css — Blog Listing
   MUHAZU Global  |  Prefix: bl-
   ============================================= */

html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }

/* ---- Keyframes ---- */
@keyframes bl-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll reveal ---- */
.bl-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
  transition-delay: var(--bl-delay, 0ms);
}

.bl-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Load anims ---- */
.bl-anim-1, .bl-anim-2, .bl-anim-3, .bl-anim-4 { opacity: 0; }
body.is-loaded .bl-anim-1 { animation: bl-fade-up 400ms ease forwards; animation-delay: 0ms; }
body.is-loaded .bl-anim-2 { animation: bl-fade-up 600ms ease forwards; animation-delay: 100ms; }
body.is-loaded .bl-anim-3 { animation: bl-fade-up 500ms ease forwards; animation-delay: 220ms; }
body.is-loaded .bl-anim-4 { animation: bl-fade-up 700ms ease forwards; animation-delay: 80ms; }

/* ============================================= */
/* SECTION 01 — HERO (split: text left, img right) */
/* ============================================= */

.bl-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0D0D0D;
  padding: 120px 5% 80px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.bl-hero::before {
  content: "";
  position: absolute;
  inset: -24px;
  background-image: url('/assets/images/thumbnail_hero_blog.webp');
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.08);
  z-index: 0;
}

.bl-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.6);
  z-index: 1;
}

.bl-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.bl-hero-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #CCF045;
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 2px solid #CCF045;
  width: fit-content;
  margin-bottom: 1.25rem;
}

.bl-hero-h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  max-width: 520px;
  margin: 0 0 16px;
}

.bl-hero-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  max-width: 440px;
  margin: 0;
}

.bl-hero-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.bl-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .bl-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .bl-hero        { padding: 100px 5% 60px; }
  .bl-hero-img    { aspect-ratio: 16 / 9; }
}

@media (max-width: 600px) {
  .bl-hero { padding: 90px 5% 48px; }
}

/* ============================================= */
/* SECTION 02 — BLOG GRID                        */
/* ============================================= */

.bl-grid-section {
  background: #F9F9F7;
  padding: 80px 5%;
}

.bl-grid-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Category filter tabs ---- */
.bl-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.bl-filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: transparent;
  color: #666666;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.bl-filter-btn:hover {
  border-color: #0D0D0D;
  color: #0D0D0D;
}

.bl-filter-btn--active {
  background: #0D0D0D;
  border-color: #0D0D0D;
  color: #ffffff;
  font-weight: 600;
}

/* ---- 3-column grid ---- */
.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 52px;
}

/* ---- Blog card ---- */
.bl-card {
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.07);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.bl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* Card image */
.bl-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.bl-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.bl-card:hover .bl-card-img img {
  transform: scale(1.04);
}

/* Card body */
.bl-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Meta row */
.bl-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bl-meta-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #CCF045;
  color: #0D0D0D;
  padding: 2px 8px;
  border-radius: 4px;
}

.bl-meta-sep {
  color: rgba(0,0,0,0.2);
  font-size: 0.5rem;
}

.bl-card-date {
  font-size: 0.78rem;
  color: #888888;
}

/* Title */
.bl-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0D0D0D;
  line-height: 1.4;
  margin: 0;
}

/* Excerpt */
.bl-card-excerpt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(0,0,0,0.55);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more link */
.bl-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0D0D0D;
  margin-top: auto;
}

.bl-link-arrow {
  transition: transform 200ms ease;
  display: inline-block;
}

.bl-card:hover .bl-link-arrow {
  transform: translateX(4px);
}

/* Responsive grid */
@media (max-width: 1024px) {
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .bl-grid         { grid-template-columns: 1fr; }
  .bl-grid-section { padding: 56px 5%; }
}

/* ============================================= */
/* PAGINATION                                    */
/* ============================================= */

.bl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bl-page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: #555555;
  transition: all 200ms ease;
}

.bl-page-btn:hover {
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.04);
  color: #0D0D0D;
}

.bl-page-btn--active {
  background: #0D0D0D;
  color: #ffffff;
  border-color: #0D0D0D;
  font-weight: 600;
}

.bl-page-ellipsis {
  font-size: 0.875rem;
  color: #AAAAAA;
  padding: 0 4px;
}

.bl-page-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: #0D0D0D;
  transition: all 200ms ease;
  margin-left: 8px;
}

.bl-page-next:hover {
  background: #0D0D0D;
  color: #ffffff;
  border-color: #0D0D0D;
}

/* ============================================= */
/* SECTION 03 — CTA BANNER                       */
/* ============================================= */

.bl-cta {
  background: #0D0D0D;
  padding: 100px 5%;
  position: relative;
  overflow: hidden;
}

.bl-cta::before {
  content: 'BLOG';
  position: absolute;
  bottom: -0.1em;
  right: 5%;
  font-size: clamp(8rem, 22vw, 20rem);
  font-weight: 800;
  color: #ffffff;
  opacity: 0.025;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.bl-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.bl-cta-h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 0;
}

.bl-cta-h2 br { display: block; }

.bl-cta-para {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin: 0;
  line-height: 1.7;
}

.bl-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #CCF045;
  color: #0D0D0D;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.bl-cta-btn:hover {
  background: #d4f55e;
  box-shadow: 0 8px 28px rgba(204,240,69,0.3);
}

@media (max-width: 600px) {
  .bl-cta      { padding: 64px 5%; }
  .bl-cta-h2   { font-size: 1.5rem; }
  .bl-cta-h2 br { display: none; }
  .bl-cta-btn  { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-reveal { transition: none; opacity: 1; transform: none; }
  .bl-anim-1, .bl-anim-2, .bl-anim-3, .bl-anim-4 { opacity: 1; animation: none; }
}
