@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --brand: #9E0B22;       /* Do sam chu dao KRI */
  --brand-dark: #7A081A;  /* Do sam khi hover */
  --brand-soft: #FDF2F4;  /* Nen hong nhat cho badge/CTA */
  --brand-border: #F2CCD2;
  --ink: #171717;
  --text: #3F3F46;
  --muted: #71717A;
  --bg: #FFFFFF;
  --surface: #FAF8F6;     /* Nen card kem am nhu mau */
  --border: #ECE8E3;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 2px 8px rgba(23, 23, 23, 0.04);
  --shadow-md: 0 14px 32px rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  display: block;
}

/* ================= NAVBAR ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav a.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav a.logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link-subtle {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav-link-subtle:hover {
  color: var(--brand);
}

.nav .cta {
  background: var(--brand);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(158, 11, 34, 0.2);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav .cta:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(158, 11, 34, 0.28);
}

/* Fallback cho navbar cu trong cac bai viet chi tiet */
.nav:not(:has(.nav-inner)) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px max(24px, calc((100% - 760px) / 2));
}

/* ================= BLOG ARCHIVE LAYOUT ================= */
/* 1. Cho phep .archive-wrap rong 1120px (ghi de .wrap 760px) */
.wrap.archive-wrap,
.archive-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

/* 2. Giu ty le 16:10 cho anh ben cot Latest posts de khong bi cat chu */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: stretch;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.latest-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  margin: -6px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.latest-item img {
  width: 124px;
  height: 78px;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}

.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 430px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #241316;
  box-shadow: var(--shadow-sm);
}

.featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.featured-card:hover img {
  transform: scale(1.03);
}

/* Lop phu gradient mo o nua duoi giong anh mau */
.featured-overlay {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
  background: linear-gradient(
    to top,
    rgba(28, 8, 12, 0.92) 0%,
    rgba(68, 14, 24, 0.72) 55%,
    rgba(68, 14, 24, 0) 100%
  );
  backdrop-filter: blur(2px);
}

.featured-card h1 {
  color: #fff;
  font-size: 28px;
  line-height: 1.28;
  margin: 14px 0 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.featured-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

/* Category Pill Badge */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cat-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Sidebar: Latest Posts */
.latest-col {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  margin: -6px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.latest-item:hover {
  background: var(--surface);
}

.latest-item img {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}

.latest-item h3 {
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  transition: color 0.18s ease;
}

.latest-item:hover h3 {
  color: var(--brand);
}

.latest-meta {
  font-size: 12px;
  color: var(--muted);
}

/* Lower Section: 3-Column Editorial Grid */
.section-block {
  padding-top: 40px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-head .section-title {
  margin: 0;
}

.section-sub {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.section-sub:hover {
  color: var(--brand);
}

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

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-border);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.post-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #EDE8E2;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.post-body {
  padding: 0 6px 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card h2 {
  font-size: 17.5px;
  line-height: 1.38;
  font-weight: 600;
  color: var(--ink);
  margin: 12px 0 8px;
  letter-spacing: -0.015em;
  transition: color 0.18s ease;
}

.post-card:hover h2 {
  color: var(--brand);
}

.post-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
  flex: 1;
}

.post-meta {
  font-size: 12px;
  color: var(--muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nums {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.page-num.active {
  background: var(--brand);
  color: #fff;
}

.page-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.page-arrow:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ================= SINGLE ARTICLE PAGE ================= */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--brand);
}

article h1 {
  font-size: 35px;
  line-height: 1.22;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 8px 0 12px;
}

article h2 {
  font-size: 23px;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}

article h3 {
  font-size: 18.5px;
  line-height: 1.35;
  color: var(--ink);
  margin: 26px 0 8px;
}

article p {
  margin: 0 0 18px;
}

article ul, article ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

article li {
  margin-bottom: 8px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.lead {
  font-size: 18px;
  line-height: 1.65;
  color: #4B5563;
}

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
}

.box strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}

.box ol, .box ul {
  margin-bottom: 0;
}

.cta-box {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin: 34px 0;
}

.cta-box strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.cta-box a.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 11px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(158, 11, 34, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

.cta-box a.btn:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
}

.scroll {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 14.5px;
  background: #fff;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

th {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

details {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
}

details[open] {
  border-color: var(--brand-border);
  background: #FFFDFD;
}

summary {
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 15px 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--brand);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 15px;
}

/* ================= FOOTER ================= */
.foot {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
}

.foot a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.foot a:hover {
  color: var(--brand);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 920px) {
  .nav-links {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .featured-card {
    min-height: 360px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav-inner {
    padding: 12px 16px;
  }
  .nav-link-subtle {
    display: none;
  }
  .archive-wrap {
    padding: 24px 16px 56px;
  }
  .featured-card {
    min-height: 320px;
  }
  .featured-overlay {
    padding: 22px 20px;
  }
  .featured-card h1 {
    font-size: 22px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  article h1 {
    font-size: 27px;
  }
}


/* ===== BLOG CATEGORIES (02/12/2026) ===== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.cat-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.cat-tabs a span {
  font-size: 12px;
  color: var(--muted);
}
.cat-tabs a:hover {
  border-color: var(--brand-border);
  color: var(--brand);
}
.cat-tabs a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.cat-tabs a.active span {
  color: rgba(255, 255, 255, .8);
}
.cat-hero {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  margin: 0 0 24px;
}
.cat-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.cat-hero p {
  margin: 0 0 18px;
  max-width: 640px;
  color: var(--text);
}
.cat-hero a.cat-btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.cat-hero a.cat-btn:hover {
  background: var(--brand-dark);
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state a {
  color: var(--brand);
  font-weight: 600;
}
/* ===== CUSTOMER JOURNEY (03/12/2026) ===== */
.section-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.journey-section .section-head { align-items: flex-end; }
.journey-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.journey-card {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 90px;
}
.journey-card strong {
  display: block;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
  margin: 6px 0 8px;
}
.journey-card p {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 16px;
}
.journey-card a.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.journey-card a.btn:hover { background: var(--brand-dark); }
.journey-card p.journey-alt { margin: 12px 0 0; font-size: 13px; }
.journey-card p.journey-alt a { color: var(--brand); font-weight: 600; }
.journey-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
}
/* Next-step block at the end of each post */
.journey {
  margin: 40px 0 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.journey-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
}
.journey-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
}
.journey-steps li span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--border);
}
.journey-steps li.done { color: var(--text); }
.journey-steps li.active { background: var(--brand); color: #fff; }
.journey-steps li.active span { background: #fff; color: var(--brand); border-color: #fff; }
.journey-card--wide { position: static; }
.journey-next {
  display: block;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.journey-next span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.journey-next:hover { border-color: var(--brand-border); color: var(--brand); }
@media (max-width: 920px) {
  .journey-grid { grid-template-columns: 1fr; }
  .journey-card { position: static; }
}
@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .journey-steps li { font-size: 12px; padding: 6px 8px; }
}
@media (max-width: 620px) {
  .cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 4px;
  }
  .cat-tabs a { flex-shrink: 0; }
  .cat-hero { padding: 22px 20px; }
  .cat-hero h1 { font-size: 26px; }
}
