.blog-page {
  padding-top: 0;
}

.blog-hero,
.blog-detail-hero {
  padding: 78px 0 58px;
  color: #fff;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--heroGradientStart, #4b3df2) 0%,
    var(--heroGradientMid, #8a7aff) 48%,
    var(--heroGradientSoft, #eef0ff) 78%,
    var(--heroGradientEnd, #ffffff) 100%
  );
  border-radius: 0 0 35px 35px;
}

.blog-hero h1,
.blog-detail-hero h1 {
  max-width: 760px;
  margin: 10px auto;
  font-size: 42px;
  font-weight: 800;
}

.blog-hero p,
.blog-detail-hero p {
  max-width: 720px;
  margin: auto;
  color: rgba(255, 255, 255, 0.9);
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.blog-filter a,
.category-link {
  padding: 9px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--blueMid);
  font-weight: 700;
  text-decoration: none;
}

.blog-filter a.active,
.blog-filter a:hover,
.category-link:hover {
  background: var(--blueMid);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.blog-grid-card,
.blog-article,
.sidebar-box,
.comments-panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.06);
}

.blog-grid-card {
  overflow: hidden;
}

.blog-grid-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.blog-grid-card div {
  padding: 20px;
}

.blog-grid-card span,
.blog-detail-hero small {
  color: var(--blueMid);
  font-weight: 700;
}

.blog-grid-card h2 {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 800;
}

.blog-grid-card h2 a {
  color: #111827;
  text-decoration: none;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.blog-article {
  padding: 24px;
}

.blog-detail-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
}

.blog-content-body {
  color: #40506c;
  font-size: 16px;
  line-height: 1.85;
}

.blog-content-body p {
  margin-bottom: 18px;
}

.blog-actions-row {
  display: flex;
  justify-content: flex-end;
  margin: 26px 0;
}

.like-btn {
  border: 0;
  border-radius: 25px;
  padding: 10px 18px;
  background: #f5f6ff;
  color: var(--blueMid);
  font-weight: 800;
}

.like-btn.liked,
.like-btn:hover {
  background: var(--blueMid);
  color: #fff;
}

.comments-panel {
  padding: 22px;
}

.comments-panel h2,
.sidebar-box h3 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 800;
}

.comment-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.comment-list article {
  padding: 14px;
  border-radius: 14px;
  background: #f5f8ff;
}

.comment-list small,
.recent-post small {
  display: block;
  color: #75839d;
}

.blog-sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.sidebar-box {
  padding: 20px;
}

.recent-post {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  color: #111827;
  text-decoration: none;
}

.recent-post img {
  width: 82px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
}

.category-link {
  display: block;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .blog-grid,
  .blog-detail-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

/* Blog typography follows the public site scale. */
.blog-hero h1,
.blog-detail-hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
}

.blog-hero p,
.blog-detail-hero p,
.blog-content-body,
.blog-grid-card p,
.comments-panel,
.sidebar-box {
  font-size: 16px;
  line-height: 1.7;
}

.blog-grid-card h2,
.comments-panel h2,
.sidebar-box h3 {
  font-size: 22px;
  line-height: 1.3;
}

.blog-filter a,
.category-link,
.like-btn,
.blog-grid-card small,
.recent-post small,
.comment-list small {
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .blog-hero h1,
  .blog-detail-hero h1 {
    font-size: 32px;
  }

  .blog-grid-card h2,
  .comments-panel h2,
  .sidebar-box h3 {
    font-size: 20px;
  }

  .blog-hero p,
  .blog-detail-hero p,
  .blog-content-body,
  .blog-grid-card p,
  .comments-panel,
  .sidebar-box {
    font-size: 15px;
  }
}
