/* ===========================================================
   pages.css — style cho trang con (landing tuyến, blog, bài
   viết, trang phụ). Tái dùng biến thiết kế trong style.css.
   =========================================================== */

.container.narrow { max-width: var(--container-narrow); }

/* ----------------------------- Breadcrumb ---------------------- */
.breadcrumb { border-bottom: 1px solid var(--c-line); background: var(--c-bg-alt); }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  list-style: none;
  /* margin/padding ngang để .container quyết định — giữ thẳng hàng với nội dung trang */
  margin: 0 auto; padding-top: 12px; padding-bottom: 12px;
  font-size: .85rem; color: var(--c-muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.breadcrumb li:not(:last-child)::after { content: "›"; color: var(--c-line-strong); }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent-2); }
.breadcrumb li[aria-current] {
  color: var(--c-ink); font-weight: 600;
  /* Tiêu đề bài dài: cắt 1 dòng để breadcrumb không chiếm 3 dòng trên mobile */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw;
}

/* ----------------------------- Page head ---------------------- */
.page-head { padding: clamp(28px, 4vw, 52px) 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0 0 10px; }
.page-head p { color: var(--c-muted); max-width: 720px; font-size: 1.02rem; }

/* ----------------------------- Prose -------------------------- */
.prose { color: var(--c-ink-2); font-size: 1.04rem; line-height: 1.75; }
.prose > h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 1.6em 0 .5em; line-height: 1.25; color: var(--c-ink); }
.prose > h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; color: var(--c-ink); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose a { color: var(--c-accent-2); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--c-accent); }
.prose strong { color: var(--c-ink); }

/* Bảng giá trong prose / bài viết */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.price-table th, .price-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-line); }
.price-table thead th { background: var(--c-bg-alt); font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.price-table tbody tr:hover { background: var(--p-amber-bg); }
.price-table td:first-child { font-weight: 600; }

/* Callout / CTA box trong bài */
.post-callout {
  margin: 1.6em 0; padding: 18px 20px;
  background: var(--p-amber-bg); border: 1px solid rgba(168,84,8,.18);
  border-radius: var(--r-lg); border-left: 4px solid var(--c-accent);
}
.post-callout p { margin: 0; color: var(--c-ink-2); }

/* ====================== LANDING TUYẾN ======================== */
.lp-hero {
  padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 32px);
  background:
    radial-gradient(1200px 280px at 80% -40%, var(--p-amber-bg), transparent 70%),
    var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.lp-hero__eyebrow { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--c-accent-2); font-weight: 700; margin: 0 0 10px; }
.lp-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.12; margin: 0 0 12px; max-width: 18ch; }
.lp-hero__lead { font-size: 1.08rem; color: var(--c-ink-2); max-width: 640px; margin: 0 0 18px; line-height: 1.6; }

.lp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.lp-stats > div {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 10px 16px; min-width: 120px; box-shadow: var(--s-1);
}
.lp-stats span { display: block; font-size: .78rem; color: var(--c-muted); }
.lp-stats b { font-size: 1.05rem; color: var(--c-ink); }

.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.lp-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.lp-main > h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 1.5em 0 .6em; }
.lp-main > h2:first-child { margin-top: 0; }

.lp-highlights { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.lp-highlights li {
  position: relative; padding: 12px 14px 12px 42px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
}
.lp-highlights li::before {
  content: "✓"; position: absolute; left: 12px; top: 11px;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--p-green-bg); color: var(--p-green-tx); border-radius: 50%; font-weight: 800; font-size: .8rem;
}
.lp-note { font-size: .9rem; color: var(--c-muted); margin: 0 0 1em; }

/* Price cards */
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 1em; }
.price-card {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-xl); padding: 18px 16px; text-align: center; box-shadow: var(--s-1);
}
.price-card--best { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent), var(--s-2); }
.price-card__tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--c-accent); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.price-card__label { display: block; font-size: .85rem; color: var(--c-muted); margin-bottom: 6px; }
.price-card__value { display: block; font-size: 1.3rem; font-weight: 800; color: var(--c-ink); }

/* Aside box */
.lp-aside { position: sticky; top: 84px; }
.lp-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-2xl); padding: 20px; box-shadow: var(--s-2); display: grid; gap: 10px; }
.lp-box h3 { margin: 0; font-size: 1.15rem; }
.lp-box p { margin: 0 0 4px; color: var(--c-muted); font-size: .92rem; }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--c-ink);
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--c-accent-2); font-size: 1.3rem; font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding: 0 16px 14px; color: var(--c-ink-2); }
.faq-item__body p { margin: 0; }

/* Related cards */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rel-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 16px; transition: transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--s-hover); }
.rel-card__label { font-weight: 700; color: var(--c-ink); }
.rel-card__price { color: var(--c-accent-2); font-weight: 600; font-size: .95rem; }
.rel-card__go { color: var(--c-muted); font-size: .85rem; margin-top: 4px; }

/* ======================== BLOG INDEX ========================= */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-xl);
  box-shadow: var(--s-1); transition: transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--s-hover); }
.post-card__media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--c-bg-alt); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.post-card__cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-accent-2); font-weight: 700; }
.post-card__title {
  font-size: 1.1rem; font-weight: 700; color: var(--c-ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__excerpt {
  font-size: .92rem; color: var(--c-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__meta { font-size: .8rem; color: var(--c-muted); margin-top: auto; }

/* ========================= BLOG POST ========================= */
.post__wrap { max-width: var(--container-narrow); }
.post__cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-accent-2); font-weight: 700; margin: 0 0 8px; }
.post h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.15; margin: 0 0 10px; }
.post__meta { color: var(--c-muted); font-size: .9rem; margin: 0 0 20px; }
.post__hero { margin: 0 0 24px; border-radius: var(--r-2xl); overflow: hidden; box-shadow: var(--s-2); }
.post__hero img { width: 100%; height: auto; display: block; aspect-ratio: 1200/630; object-fit: cover; }
.post__relh { font-size: 1.3rem; margin: 1.8em 0 .7em; }
.post-grid--rel { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Link "Chi tiết" trong thẻ tuyến trang chủ */
.route__more {
  font-size: .85rem; font-weight: 600; color: var(--c-accent-2);
  text-decoration: none; margin-right: auto; white-space: nowrap;
  padding: 10px 0; /* tap target ≥ 40px cho mobile */
}
.route__more:hover { color: var(--c-accent); text-decoration: underline; }

/* --------------------------- Responsive ---------------------- */
@media (max-width: 880px) {
  .lp-grid { grid-template-columns: 1fr; }
  .lp-aside { position: static; }
}
@media (max-width: 600px) {
  /* Nút CTA full-width trên điện thoại — dễ bấm bằng ngón cái, tăng tỉ lệ gọi */
  .lp-cta-row { flex-direction: column; }
  .lp-cta-row .btn { width: 100%; justify-content: center; }
  .lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lp-stats > div { min-width: 0; padding: 8px 10px; }
  .lp-stats b { font-size: .92rem; }
  .lp-hero h1 { max-width: none; }
  .post__hero { border-radius: var(--r-lg); }
}
@media print {
  .breadcrumb, .lp-aside, .post-callout { display: none; }
}

/* =============================================================
   BLOG v2 — bố cục 2 cột, mục lục, CTA giữa bài
   ============================================================= */
.post__head { padding: clamp(24px, 3.5vw, 44px) 0 18px; max-width: 820px; }
.post__cat {
  display: inline-block; margin: 0 0 12px;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-brand-ink); background: var(--c-brand-50);
  border: 1px solid var(--c-brand-100);
  padding: 5px 12px; border-radius: 999px;
}
.post__head h1 {
  font-size: clamp(1.75rem, 3.8vw, 2.7rem); line-height: 1.15;
  letter-spacing: -.02em; margin: 0 0 14px;
}
.post__lede { font-size: 1.1rem; color: var(--c-muted); line-height: 1.65; margin: 0 0 18px; }
.post__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  font-size: .86rem; color: var(--c-muted);
  padding-top: 14px; border-top: 1px solid var(--c-line);
}
.post__meta b { color: var(--c-ink-2); font-weight: 700; }
.post__meta > span { display: inline-flex; align-items: center; gap: 8px; }
.post__meta > span:not(:last-child)::after {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--c-line-strong);
}
.post__upd { color: var(--c-brand-ink) !important; font-weight: 600; }

.post__hero { margin: 0 auto 32px; }
.post__hero img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-xl); box-shadow: var(--s-2);
}
.post__hero figcaption {
  margin-top: 8px; font-size: .75rem; color: var(--c-muted); text-align: right;
}

/* Bố cục 2 cột: bài viết + cột phụ dính */
.post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.post__main { min-width: 0; }
.post__aside { position: sticky; top: 108px; display: grid; gap: 16px; }

/* Mục lục — giúp lướt nhanh và tạo cơ hội sitelink phụ trên Google */
.toc {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--r-lg);
  padding: 18px 22px; margin: 0 0 28px;
}
.toc__title {
  margin: 0 0 10px; font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--c-muted);
}
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.toc li { color: var(--c-muted); font-size: .94rem; }
.toc a { color: var(--c-ink-2); text-decoration: none; }
.toc a:hover { color: var(--c-brand-ink); text-decoration: underline; }

/* CTA chèn giữa bài */
.post-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin: 2em 0;
  background: var(--c-primary); color: #fff;
  border-radius: var(--r-xl); padding: 22px 26px;
}
.post-cta__kicker { margin: 0 0 4px; font-weight: 700; font-size: 1.05rem; }
.post-cta__text   { margin: 0; font-size: .92rem; color: rgba(255,255,255,.8); max-width: 46ch; }
.post-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.post-cta .btn--ghost { --bg: rgba(255,255,255,.12); --fg: #fff; --bd: rgba(255,255,255,.28); }
.post-cta .btn--ghost:hover { --bg: #fff; --fg: var(--c-primary); --bd: #fff; }

/* Hộp cột phụ */
.post-box {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.post-box h3 { margin: 0 0 8px; font-size: 1rem; letter-spacing: -.01em; }
.post-box > p { margin: 0 0 14px; font-size: .88rem; color: var(--c-muted); line-height: 1.55; }
.post-box .btn { margin-bottom: 8px; }
.post-box__list { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--c-line); display: grid; gap: 7px; }
.post-box__list li { font-size: .86rem; color: var(--c-muted); }
.post-box__list b { color: var(--c-accent-2); }
.post-box--links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.post-box--links a {
  display: block; padding: 7px 9px; border-radius: var(--r-sm);
  font-size: .88rem; color: var(--c-ink-2); text-decoration: none;
}
.post-box--links a:hover { background: var(--c-brand-50); color: var(--c-brand-ink); }

/* Điều hướng bài trước / bài sau */
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.post__nav-item {
  display: block; padding: 16px 18px;
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  background: var(--c-surface); text-decoration: none;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.post__nav-item:hover { border-color: var(--c-brand); box-shadow: var(--s-2); }
.post__nav-item span { display: block; font-size: .74rem; color: var(--c-muted); margin-bottom: 5px; }
.post__nav-item b { display: block; font-size: .92rem; color: var(--c-ink); line-height: 1.4; font-weight: 600; }
.post__nav-item--next { text-align: right; }

.post__relh { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin: 44px 0 18px; }

@media (max-width: 980px) {
  .post__layout { grid-template-columns: 1fr; gap: 32px; }
  .post__aside  { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .post__aside { grid-template-columns: 1fr; }
  .post__nav   { grid-template-columns: 1fr; }
  .post__nav-item--next { text-align: left; }
  .post-cta { flex-direction: column; align-items: flex-start; }
  .post-cta__actions .btn { flex: 1 1 auto; }
}

/* ───────────── Trang danh sách blog ───────────── */
.blog-cats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.blog-cats li {
  font-size: .82rem; color: var(--c-brand-ink);
  background: var(--c-brand-50); border: 1px solid var(--c-brand-100);
  padding: 6px 13px; border-radius: 999px;
}

/* Bài nổi bật khổ lớn */
.post-lead {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-xl); overflow: hidden; text-decoration: none;
  margin-bottom: 28px;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.post-lead:hover { border-color: var(--c-brand); box-shadow: var(--s-hover); }
.post-lead__media img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
.post-lead__body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.post-lead__title { font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.25; color: var(--c-ink); font-weight: 700; letter-spacing: -.015em; }
.post-lead__excerpt { color: var(--c-muted); font-size: .98rem; line-height: 1.6; }
.post-lead__more { color: var(--c-brand-ink); font-weight: 700; font-size: .9rem; margin-top: 4px; }

@media (max-width: 820px) {
  .post-lead { grid-template-columns: 1fr; }
  .post-lead__media img { min-height: 200px; aspect-ratio: 16/9; }
}

/* ───────────── Trang giới thiệu ───────────── */
.about-stats {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--c-line); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); overflow: hidden;
}
.about-stats li { background: var(--c-surface); padding: 20px 16px; text-align: center; }
.about-stats b { display: block; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--c-brand-ink); letter-spacing: -.02em; }
.about-stats span { display: block; font-size: .82rem; color: var(--c-muted); margin-top: 3px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; align-items: start; }

.about-gallery { position: sticky; top: 108px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-gallery figure { margin: 0; }
.about-gallery__lead { grid-column: 1 / -1; }
.about-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--c-line);
}
.about-gallery__lead img { aspect-ratio: 16 / 10; }
.about-gallery__note { grid-column: 1 / -1; margin: 2px 0 0; font-size: .76rem; color: var(--c-muted); text-align: center; }

@media (max-width: 940px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-gallery { position: static; }
}
@media (max-width: 560px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
}

/* Ảnh minh hoạ trong trang tuyến */
.lp-figure { margin: 0 0 26px; }
.lp-figure img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--c-line);
}
.lp-figure figcaption { margin-top: 7px; font-size: .74rem; color: var(--c-muted); text-align: right; }
