/* ==========================================================================
   BananaTech — Blog & Artikel
   Memakai design token dari css/styles.css (--banana-yellow, --brand-dark, dst.)
   ========================================================================== */

/* --------------------------------------------------------------- Blog hero */

.blog-hero {
  position: relative;
  padding: 9rem 0 3.5rem;
  background: var(--brand-dark);
  overflow: hidden;
}

.blog-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--banana-yellow-glow), transparent 68%);
  pointer-events: none;
}

.blog-hero .container { position: relative; z-index: 1; }

.blog-hero-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  color: var(--brand-dark);
  background: var(--banana-yellow);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.blog-hero h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  color: var(--brand-white);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
}

.blog-hero p {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------- Blog list */

.blog-list-section { padding: 4rem 0 5rem; background: var(--brand-cream); }

.blog-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E2E5EB;
}

.blog-list-head h2 {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.blog-count { color: var(--text-subtle); font-size: 0.85rem; font-weight: 600; }

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

/* --------------------------------------------------------------- Featured */

#blog-featured { margin-bottom: 3rem; }

.post-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
  color: var(--brand-white);
  background: var(--brand-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal);
}

.post-featured:hover { transform: translateY(-4px); }

.post-featured-media { min-height: 320px; background: var(--bg-card-dark); }
.post-featured-media img { width: 100%; height: 100%; object-fit: cover; }

.post-featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 2.5rem;
}

.post-featured-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.post-featured-body p { color: var(--text-muted); line-height: 1.65; }
.post-featured-meta { color: var(--text-subtle); font-size: 0.82rem; }
.post-featured-body .btn { margin-top: auto; }

/* --------------------------------------------------------------- Post card */

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  background: var(--brand-white);
  border: 1px solid #E7EAF0;
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--banana-yellow);
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.28);
}

.post-card-media { position: relative; aspect-ratio: 16 / 10; background: var(--brand-dark); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }

.post-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--banana-yellow);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.post-card-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  color: var(--brand-dark);
  background: var(--banana-yellow);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-featured-body .post-card-tag { position: static; }

.post-card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem; }

.post-card-date { color: var(--text-subtle); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.post-card-title {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 1.14rem;
  line-height: 1.32;
}

.post-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: #5B5B5B;
  font-size: 0.9rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card-more { margin-top: auto; padding-top: 0.6rem; color: var(--brand-dark); font-size: 0.85rem; font-weight: 700; }
.post-card:hover .post-card-more { color: var(--banana-yellow-hover); }

/* --------------------------------------------------------------- Empty state */

.blog-empty {
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--brand-white);
  border: 1px dashed #D5DAE3;
  border-radius: var(--radius-lg);
}

.blog-empty h3 { margin-bottom: 0.6rem; color: var(--text-dark); font-family: var(--font-display); font-size: 1.3rem; }
.blog-empty p { max-width: 480px; margin: 0 auto 1.5rem; color: #5B5B5B; line-height: 1.65; }

/* --------------------------------------------------------------- Blog CTA */

.blog-cta-section { padding: 0 0 5rem; background: var(--brand-cream); }

.blog-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem;
  color: var(--brand-white);
  background: var(--brand-dark);
  border-radius: var(--radius-lg);
}

.blog-cta h2 { margin-bottom: 0.5rem; font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.blog-cta p { max-width: 560px; color: var(--text-muted); line-height: 1.65; }
.blog-cta .btn { flex: none; }

/* --------------------------------------------------------------- Artikel */

.post-section { padding: 8rem 0 3rem; background: var(--brand-white); }
.post-container { max-width: 820px; }

.post-back { display: inline-block; margin-bottom: 2rem; color: #6B6B6B; font-size: 0.88rem; font-weight: 600; }
.post-back:hover { color: var(--banana-yellow-hover); }

.post-header { margin-bottom: 2rem; }

.post-category {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  color: var(--brand-dark);
  background: var(--banana-yellow);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-title {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.2;
}

.post-lead { margin-bottom: 1.25rem; color: #4F4F4F; font-size: 1.08rem; line-height: 1.7; }

.post-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--text-subtle); font-size: 0.85rem; font-weight: 600; }

.post-cover { display: block; width: 100%; margin: 0 0 2.5rem; border-radius: var(--radius-lg); }

.post-body { color: #333333; font-size: 1.04rem; line-height: 1.85; }
.post-body h2 { margin: 2.5rem 0 0.9rem; color: var(--text-dark); font-family: var(--font-display); font-size: 1.5rem; line-height: 1.3; }
.post-body h3 { margin: 2rem 0 0.7rem; color: var(--text-dark); font-family: var(--font-display); font-size: 1.2rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { margin: 0 0 1.4rem 1.3rem; }
.post-body li { margin-bottom: 0.55rem; }
.post-body strong { color: var(--text-dark); font-weight: 700; }
.post-body a { color: var(--banana-yellow-hover); font-weight: 600; text-decoration: underline; }

.post-body blockquote {
  margin: 1.75rem 0;
  padding: 1.1rem 1.5rem;
  color: #3D3D3D;
  background: var(--brand-cream);
  border-left: 4px solid var(--banana-yellow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.post-figure { margin: 2rem 0; }
.post-figure img { width: 100%; border-radius: var(--radius-md); }
.post-figure figcaption { margin-top: 0.7rem; color: var(--text-subtle); font-size: 0.82rem; text-align: center; }

.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.post-tag { padding: 0.3rem 0.7rem; color: #5B5B5B; background: var(--brand-cream); border: 1px solid #E2E5EB; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 600; }

.post-cta {
  margin-top: 3rem;
  padding: 2.25rem;
  color: var(--brand-white);
  background: var(--brand-dark);
  border-radius: var(--radius-lg);
}

.post-cta h2 { margin-bottom: 0.6rem; font-family: var(--font-display); font-size: 1.4rem; }
.post-cta p { margin-bottom: 1.4rem; color: var(--text-muted); line-height: 1.65; }

.post-not-found { padding: 3rem 0; text-align: center; }
.post-not-found h1 { margin-bottom: 0.75rem; color: var(--text-dark); font-family: var(--font-display); font-size: 1.9rem; }
.post-not-found p { margin-bottom: 1.75rem; color: #5B5B5B; }

.post-related-section { padding: 0 0 5rem; background: var(--brand-white); }
.post-related-title { margin-bottom: 1.75rem; color: var(--text-dark); font-family: var(--font-display); font-size: 1.5rem; }

/* --------------------------------------------------------------- Responsive */

@media (max-width: 900px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-media { min-height: 220px; aspect-ratio: 16 / 9; }
  .post-featured-body { padding: 1.75rem; }
  .blog-cta { flex-direction: column; align-items: flex-start; padding: 2rem; }
}

@media (max-width: 640px) {
  .blog-hero { padding: 7rem 0 2.5rem; }
  .blog-list-section { padding: 2.75rem 0 3.5rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .post-section { padding: 6.5rem 0 2.5rem; }
  .post-body { font-size: 1rem; }
}
