@import url("main-base.css");

/* Bộ chữ sans-serif hệ thống: rõ nét, hỗ trợ tiếng Việt và không tải font ngoài. */
body,
button,
input,
.entry-content {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.brand strong,
.hero h1,
.section-intro h2,
.section-heading h2,
.promise-section h2,
.category-card strong,
.card-body h3,
.promise-list h3,
.archive-header h1,
.article-header h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.sidebar-box h2,
.widget-title,
.empty-state h2,
.error-page h1,
.site-footer h2,
.sidebar-post h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -.025em;
}

.hero h1 em {
  font-style: normal;
  font-weight: 700;
}

.hero-note strong,
.promise-list > div > span,
.error-page > .container > span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.entry-content {
  letter-spacing: -.005em;
  line-height: 1.78;
}

/* Danh sách bài viết thu gọn trong sidebar. */
.article-sidebar .widget {
  padding: 22px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(22, 53, 36, .05);
}

.article-sidebar .widget-title {
  position: relative;
  margin: 0 0 17px;
  padding-bottom: 13px;
  color: var(--green-950);
  font-size: 20px;
  border-bottom: 1px solid var(--line);
}

.article-sidebar .widget-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 42px;
  height: 2px;
  content: "";
  background: var(--green-700);
}

.sidebar-post-list {
  display: grid;
  gap: 0;
}

.sidebar-post {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #e9ede8;
}

.sidebar-post:first-child { padding-top: 0; }
.sidebar-post:last-child { padding-bottom: 0; border-bottom: 0; }

.sidebar-post-image {
  height: 64px;
  overflow: hidden;
  background: var(--green-100);
  border-radius: 8px;
}

.sidebar-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post-content { min-width: 0; }

.sidebar-post h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sidebar-post h3 a:hover { color: var(--green-700); }

.sidebar-post-content > span {
  color: #849087;
  font-size: 10px;
  line-height: 1.2;
}

@media (max-width: 980px) {
  .article-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 38px;
    padding-top: 0;
  }

  .article-sidebar .sidebar-box { grid-column: 1 / -1; }
  .article-sidebar .widget { margin-bottom: 0; }
}

@media (max-width: 620px) {
  .article-sidebar { grid-template-columns: 1fr; }
  .article-sidebar .sidebar-box { grid-column: auto; }
}
