/* ===== BLOG STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1a1a1a;
  --ink-2: #3d3d3d;
  --ink-3: #6b6b6b;
  --ink-4: #999;
  --rule: #e0e0e0;
  --accent: #c2410c;
  --accent-light: #fff7ed;
  --green: #14532d;
  --bg: #fafaf8;
  --font-serif: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-sans: 'Be Vietnam Pro', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 17px; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); line-height: 1.75; -webkit-font-smoothing: antialiased; letter-spacing: .01em; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ===== MASTHEAD ===== */
.masthead {
  border-bottom: 3px double var(--ink);
  padding: 20px 0 16px;
  text-align: center;
  background: #fff;
}
.masthead__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  color: var(--ink-3);
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  transition: color .2s;
}
.masthead__back:hover { color: var(--accent); }
.masthead__inner { position: relative; display: inline-block; }
.masthead__kicker {
  font-size: .75rem;
  letter-spacing: .01em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.masthead__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1.1;
}
.masthead__title span { color: var(--accent); }
.masthead__tagline {
  font-size: .8125rem;
  color: var(--ink-3);
  margin-top: 6px;
  font-style: normal;
}
.masthead__date {
  font-size: .75rem;
  color: var(--ink-4);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  letter-spacing: .01em;
}

/* ===== NAV BAR ===== */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 8px 0;
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
.topbar__link {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255,255,255,.75);
  padding: 4px 14px;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: color .2s;
}
.topbar__link:last-child { border-right: none; }
.topbar__link:hover { color: #fff; }
.topbar__link--active { color: #fff; }

/* ===== FEATURED STRIP (index) ===== */
.featured {
  background: var(--ink);
  color: #fff;
  padding: 40px 0;
}
.featured__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}
.featured__main {}
.featured__tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.featured__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #fff;
}
.featured__title:hover { color: #fde68a; }
.featured__excerpt {
  font-size: .9375rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  margin-bottom: 16px;
}
.featured__meta {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.featured__meta strong { color: rgba(255,255,255,.7); }

.featured__sidebar {
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.featured__side-item {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.featured__side-item:last-child { border-bottom: none; padding-bottom: 0; }
.featured__side-item .featured__title { font-size: 1.0625rem; }
.featured__side-item .featured__excerpt { font-size: .875rem; }

/* ===== ARTICLE GRID ===== */
.articles { padding: 40px 0 64px; }
.articles__section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.articles__section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}
.articles__rule {
  flex: 1;
  height: 2px;
  background: var(--ink);
}
.articles__rule--thin { height: 1px; background: var(--rule); }

.articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}
.article-card {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
}
.article-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f0fdf4, #fff7ed);
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--ink-4);
  overflow: hidden;
}
.article-card__tag {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--accent);
  margin-bottom: 6px;
}
.article-card__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color .2s;
}
.article-card__title:hover { color: var(--accent); }
.article-card a:hover .article-card__title { color: var(--accent); }
.article-card__excerpt {
  font-size: .875rem;
  color: var(--ink-3);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__meta {
  font-size: .75rem;
  color: var(--ink-4);
}

/* ===== ARTICLE PAGE ===== */
.article-header {
  background: #fff;
  border-bottom: 2px solid var(--rule);
  padding: 40px 0 32px;
}
.article-header__category {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
  margin-bottom: 18px;
}
.article-header__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 720px;
}
.article-header__deck {
  font-size: 1.125rem;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 660px;
  margin-bottom: 20px;
  font-style: normal;
}
.article-header__byline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.byline__author { font-weight: 700; color: var(--ink); }
.byline__dot { color: var(--rule); }

/* ===== ARTICLE BODY ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  padding: 40px 0 64px;
}
.article-body { min-width: 0; }

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  letter-spacing: -.2px;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.225rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 12px;
  letter-spacing: -.1px;
}
.article-body p {
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-style: normal; }
.article-body ul, .article-body ol {
  padding-left: 26px;
  margin-bottom: 22px;
}
.article-body li {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.article-body ul li::marker { color: var(--accent); }

.article-body .pullquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
}
.article-body .pullquote p {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-style: normal;
  color: var(--accent);
  margin-bottom: 0;
  line-height: 1.6;
}
.article-body .img-block {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f0fdf4, #fff7ed);
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.article-body .img-caption {
  text-align: center;
  font-size: .8125rem;
  color: var(--ink-4);
  margin-top: -14px;
  margin-bottom: 24px;
  font-style: normal;
}

figure.img-figure {
  margin: 28px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
figure.img-figure img {
  width: 100%;
  height: auto;
  display: block;
}
figure.img-figure figcaption {
  text-align: center;
  font-size: .8125rem;
  color: var(--ink-4);
  padding: 8px 12px;
  font-style: normal;
  background: #fafaf9;
}

/* ===== SIDEBAR ===== */
.article-sidebar { position: sticky; top: 24px; }
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-widget__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.sidebar-widget__title--accent { border-top-color: var(--accent); color: var(--accent); }

.cta-widget {
  background: var(--green);
  color: #fff;
  border-top-color: var(--green);
}
.cta-widget .sidebar-widget__title { color: #fff; border-color: rgba(255,255,255,.2); }
.cta-widget p { font-size: .9rem; color: rgba(255,255,255,.8); line-height: 1.6; margin-bottom: 14px; }
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  font-size: .9375rem;
  padding: 12px 20px;
  border-radius: 6px;
  width: 100%;
  transition: background .2s;
}
.cta-btn:hover { background: #ea580c; }

.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item__num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rule);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}
.related-item__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  transition: color .2s;
}
.related-item:hover .related-item__title { color: var(--accent); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .8rem; padding: 4px 10px; background: var(--bg); border: 1px solid var(--rule); border-radius: 100px; color: var(--ink-3); transition: all .2s; }
.tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== ARTICLE FOOTER ===== */
.article-footer {
  background: #fff;
  border-top: 2px solid var(--rule);
  padding: 32px 0 48px;
}
.article-footer__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
}

/* ===== FOOTER ===== */
.blog-footer {
  background: var(--ink);
  color: rgba(255,255,255,.55);
  padding: 24px 0;
  text-align: center;
  font-size: .8125rem;
}
.blog-footer a { color: rgba(255,255,255,.7); }
.blog-footer a:hover { color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__sidebar { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .featured__side-item { padding-bottom: 0; border-bottom: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .articles__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .masthead { padding: 60px 24px 16px; }
  .masthead__back { top: 18px; transform: none; }
  .featured__sidebar { grid-template-columns: 1fr; }
  .articles__grid { grid-template-columns: 1fr; }
  .article-header__title { font-size: 1.75rem; }
  .topbar__inner { gap: 0; }
  .topbar__link { font-size: .72rem; padding: 4px 8px; }
}


/* ===== SITE BAR (quay về trang chủ + gọi điện) ===== */
.sitebar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid var(--rule);
}
.sitebar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
}
.sitebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--green);
  font-size: 1rem;
  white-space: nowrap;
}
.sitebar__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.sitebar__links a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 8px;
}
.sitebar__links a:hover { background: var(--accent-light); color: var(--accent); }
.sitebar__links .sitebar__home { font-weight: 700; color: var(--green); }
.sitebar__call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f6a01a;
  color: #0f2a17;
  font-weight: 700;
  font-size: .9375rem;
  padding: 9px 16px;
  border-radius: 10px;
  white-space: nowrap;
}
.sitebar__call:hover { background: #ffb23d; }
.sitebar__call svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== QUICK CONTACT: Gọi + Zalo luôn hiện ===== */
.quick-contact {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-contact__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: .9375rem;
  box-shadow: 0 6px 22px rgba(15, 42, 23, .3);
}
.quick-contact__btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quick-contact__btn--call { background: #f6a01a; color: #0f2a17; }
.quick-contact__btn--call:hover { background: #ffb23d; }
.quick-contact__btn--zalo { background: #0068ff; color: #fff; }
.quick-contact__btn--zalo:hover { background: #0053cc; }

@media (max-width: 820px) {
  .sitebar__links a:not(.sitebar__home) { display: none; }
  .sitebar__links { margin-left: auto; }
  .sitebar__call-text { display: none; }
  .sitebar__call { padding: 10px 12px; }
  body { padding-bottom: 68px; }
  .quick-contact {
    left: 0; right: 0; bottom: 0;
    flex-direction: row;
    gap: 8px;
    background: #fff;
    border-top: 1px solid var(--rule);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(15, 42, 23, .12);
  }
  .quick-contact__btn { flex: 1; border-radius: 10px; box-shadow: none; padding: 13px 12px; font-size: 1rem; }
}
@media (max-width: 480px) {
  .sitebar__brand span { display: none; }
}


/* <picture> bọc ảnh WebP, không ảnh hưởng bố cục */
picture { display: contents; }
