/* blog.css — blog reader (S10) + blog typography (S12.1). Requires base.css. */
/* ==================== Blog page (Session 10) ==================== */

/* ---- Featured post hero ---- */
.blog-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  background-color: #FFFFFF;
  border: 1px solid #DCE6F4;
  box-shadow: 0 16px 40px -20px rgba(245, 182, 34, 0.4);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px -24px rgba(11, 46, 99, 0.3);
}

@media (min-width: 768px) {
  .blog-hero {
    grid-template-columns: 5fr 4fr;
  }
}

.blog-hero-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.1) 100%);
}

.blog-hero-cover .emoji {
  font-size: 7rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
  position: relative;
  z-index: 1;
}

/* Featured flag chip trên cover hero */
.blog-hero-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: #0B2E63;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.25);
}

.blog-hero-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .blog-hero-body {
    padding: 40px;
  }
}

/* ---- Category pills (filter) ---- */
.blog-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.blog-category-pills::-webkit-scrollbar { display: none; }

.blog-category-pills button {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #C6D5E9;
  color: #3D556F;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.blog-category-pills button:hover:not(.is-active) {
  border-color: #0B2E63;
  color: #0C2340;
}

.blog-category-pills button.is-active {
  background-color: #0C2340;
  color: #FFFFFF;
  border-color: #0C2340;
}

/* ---- Search input ---- */
.blog-search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #C6D5E9;
  font-family: inherit;
  /* 16px: chống iOS Safari auto-zoom viewport khi focus input */
  font-size: 16px;
  color: #0C2340;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-search-input:focus {
  border-color: #0B2E63;
  box-shadow: 0 0 0 3px rgba(11, 46, 99, 0.15);
}

.blog-search-input::placeholder {
  color: #93A6C2;
}

@media (min-width: 640px) {
  .blog-search-input {
    width: 240px;
  }
}

/* ---- Blog post card ---- */
.blog-card {
  background-color: #FFFFFF;
  border: 1px solid #DCE6F4;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 46, 99, 0.3);
  box-shadow: 0 16px 32px -16px rgba(245, 182, 34, 0.5);
}

.blog-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.08) 100%);
}

.blog-card-cover .emoji {
  font-size: 4rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18));
  position: relative;
  z-index: 1;
}

.blog-card-body {
  /* 24px = p-6, the documented "small card" padding floor (05-design-system.md).
     Was 18px — below floor. Hero card legitimately keeps its own larger
     28px/40px padding (p-7/p-10 "featured" tier) — that gap is intentional
     visual hierarchy, not a bug, so left as-is. */
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-category-mini {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background-color: rgba(11, 46, 99, 0.1);
  color: #0B2E63;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  align-self: flex-start;
}

.blog-card-title {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 700;
  /* 20px = H3 floor (05-design-system.md, 20-32px) — was 16px, below floor */
  font-size: 20px;
  color: #0C2340;
  line-height: 1.3;
  /* 12px matches the featured card's h2→excerpt gap (Tailwind mb-3) — was 8px */
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  /* 14px = Body floor (05-design-system.md, 14-18px) — was 13px, below floor */
  font-size: 14px;
  color: #3D556F;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  /* 12px matches the featured card's meta row (Tailwind text-xs) — was 11px */
  font-size: 12px;
  color: #5B6E8C;
  padding-top: 10px;
  border-top: 1px solid #DCE6F4;
}

.blog-card-meta .sep { color: #9BAFC9; }

/* ---- Sidebar widget ---- */
.sidebar-widget {
  background-color: #FFFFFF;
  border: 1px solid #DCE6F4;
  border-radius: 22px;
  padding: 20px;
}

.sidebar-widget h3 {
  /* 20px = H3 floor (05-design-system.md, 20-32px) — was unstyled, inheriting
     the 16px Tailwind base size */
  font-size: 20px;
}

.sidebar-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #DCE6F4;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sidebar-popular-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sidebar-popular-item:first-child {
  padding-top: 0;
}

.sidebar-popular-item:hover {
  opacity: 0.7;
}

.sidebar-popular-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-popular-info {
  flex: 1;
  min-width: 0;
}

.sidebar-popular-info .title {
  font-size: 13px;
  font-weight: 600;
  color: #0C2340;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-popular-info .meta {
  font-size: 11px;
  color: #5B6E8C;
}

/* ---- Post detail modal ---- */
.post-detail-modal {
  background-color: #FFFFFF;
  border-radius: 28px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalScaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
}

.post-detail-modal::-webkit-scrollbar { width: 8px; }
.post-detail-modal::-webkit-scrollbar-thumb { background: #C6D5E9; border-radius: 4px; }
.post-detail-modal::-webkit-scrollbar-track { background: transparent; }

.post-detail-close {
  /* sticky trong khối cuộn (.post-detail-modal) → nút ✕ luôn thấy khi cuộn bài dài.
     margin-left:auto canh phải (KHÔNG dùng float để tránh ép hẹp ảnh cover);
     margin-bottom âm để nút không chiếm chỗ, nằm đè lên góc trên phải cover. */
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 12px 12px -44px auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #C6D5E9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #3D556F;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.post-detail-close:hover {
  background-color: #0B2E63;
  color: #FFFFFF;
  border-color: #0B2E63;
}

.post-detail-cover {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-detail-cover .emoji {
  font-size: 5rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
}

.post-detail-body {
  padding: 28px;
}

@media (min-width: 640px) {
  .post-detail-body { padding: 36px; }
}

.post-detail-content p {
  font-size: 15px;
  color: #3D556F;
  line-height: 1.7;
  margin-bottom: 14px;
}

.post-detail-content p:last-child { margin-bottom: 0; }

.post-detail-content strong {
  color: #0C2340;
  font-weight: 700;
}

.post-detail-content em {
  color: #5B6E8C;
  font-style: italic;
}

/* ---- Reader typography (Bug 6 — rich content h2/h3/list/quote/link/img) ---- */
.post-detail-content {
  font-size: 15px;
  line-height: 1.75;
  color: #3D556F;
}

.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4 {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  color: #0C2340;
  font-weight: 700;
  line-height: 1.25;
  margin: 28px 0 12px;
}

.post-detail-content h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  /* Vạch cam đầu h2 — chia bài thành khối rõ ràng khi lướt nhanh */
  padding-left: 12px;
  border-left: 4px solid #0B2E63;
  scroll-margin-top: 16px;
}
.post-detail-content h3 {
  font-size: 18px;
  color: #082249;
  scroll-margin-top: 16px;
}
.post-detail-content h4 { font-size: 16px; scroll-margin-top: 16px; }
.post-detail-content > h2:first-child,
.post-detail-content > h3:first-child { margin-top: 0; }

.post-detail-content ul,
.post-detail-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.post-detail-content ul { list-style: disc; }
.post-detail-content ol { list-style: decimal; }

.post-detail-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-detail-content li::marker { color: #0B2E63; }

.post-detail-content a {
  color: #0B2E63;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
  word-break: break-word;
}

.post-detail-content a:hover { color: #082249; }

.post-detail-content blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid #0B2E63;
  background-color: rgba(11, 46, 99, 0.05);
  border-radius: 0 10px 10px 0;
  color: #3D556F;
  font-style: italic;
}

.post-detail-content blockquote p:last-child { margin-bottom: 0; }

.post-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 18px 0;
  display: block;
}

.post-detail-content hr {
  border: 0;
  border-top: 1px solid #C6D5E9;
  margin: 24px 0;
}

.post-detail-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background-color: rgba(27, 79, 160, 0.12);
  color: #0C2340;
  padding: 2px 6px;
  border-radius: 6px;
}

.post-detail-content pre {
  background-color: #0C2340;
  color: #FFFFFF;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.6;
}

.post-detail-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---- Load more button (Bug 9 — pagination) ---- */
.blog-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #C6D5E9;
  color: #0C2340;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-load-more:hover {
  border-color: #0B2E63;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(11, 46, 99, 0.4);
}

.blog-load-more:active { transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blog-hero,
  .blog-card,
  .post-detail-modal,
  .blog-search-input,
  .post-detail-close,
  .blog-load-more {
    transition: none !important;
    animation: none !important;
  }
  .blog-hero:hover,
  .blog-card:hover,
  .blog-load-more:hover {
    transform: none !important;
  }
}


/* ==================== Blog typography (S12.1 — admin auto-format text) ==================== */
/* Apply to <p> wraps generated by plainTextToBlogHTML(). Render trong post-detail-modal
   của blog.html cũng như preview admin. Override post-detail-content p với justify. */
.blog-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  line-height: 1.75;
  font-size: 15px;
  color: #3D556F;
  margin-bottom: 14px;
}

.blog-justify:last-child { margin-bottom: 0; }

.blog-justify strong {
  color: #0C2340;
  font-weight: 700;
}

.blog-justify em {
  color: #5B6E8C;
  font-style: italic;
}

/* Mobile: bỏ justify để tránh khoảng trắng quá lớn giữa từ */
@media (max-width: 640px) {
  .blog-justify {
    text-align: left;
    hyphens: none;
  }
}


/* =============================================================================
   Khối trình bày trong bài viết — bộ class "bp-*"
   =============================================================================
   Sanitizer trong blog.html CHỈ giữ lại class khớp /^bp-[a-z0-9-]+$/ và xoá mọi
   attribute khác (kể cả style). Muốn thêm khối mới: định nghĩa class ở đây và
   dùng đúng tên bp-* trong nội dung bài, không cần sửa sanitizer.

   KHÔNG dùng class tiện ích Tailwind cho mấy khối này — tailwind.css là bản
   build sẵn, class chưa có trong đó sẽ im lặng không ăn.
   ========================================================================== */

/* --- Đoạn mở bài, chữ to hơn --- */
.post-detail-content .bp-lead {
  font-size: 17px;
  line-height: 1.7;
  color: #0C2340;
  font-weight: 500;
}

/* --- Mục lục --- */
.post-detail-content .bp-toc {
  background: #FFFFFF;
  border: 1px solid #C6D5E9;
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.post-detail-content .bp-toc-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5B6E8C;
  margin: 0 0 10px;
}

.post-detail-content .bp-toc ol,
.post-detail-content .bp-toc ul {
  margin: 0;
  padding-left: 20px;
}

.post-detail-content .bp-toc li { margin-bottom: 6px; }

.post-detail-content .bp-toc a {
  color: #3D556F;
  font-weight: 500;
  text-decoration: none;
}

.post-detail-content .bp-toc a:hover {
  color: #0B2E63;
  text-decoration: underline;
}

/* --- Hộp nhấn mạnh: khung chung --- */
.post-detail-content .bp-key,
.post-detail-content .bp-tip,
.post-detail-content .bp-warn,
.post-detail-content .bp-note,
.post-detail-content .bp-source {
  border-radius: 16px;
  padding: 16px 20px;
  margin: 22px 0;
  border-left: 4px solid;
  font-size: 14.5px;
  line-height: 1.7;
}

.post-detail-content .bp-key > :last-child,
.post-detail-content .bp-tip > :last-child,
.post-detail-content .bp-warn > :last-child,
.post-detail-content .bp-note > :last-child,
.post-detail-content .bp-source > :last-child { margin-bottom: 0; }

.post-detail-content .bp-box-title {
  font-weight: 800;
  color: #0C2340;
  margin: 0 0 8px;
  font-size: 14px;
}

/* Tóm tắt nhanh — cam, đặt đầu bài */
.post-detail-content .bp-key {
  background: rgba(11, 46, 99, 0.07);
  border-left-color: #0B2E63;
}

/* Mẹo thực chiến — teal */
.post-detail-content .bp-tip {
  background: rgba(27, 79, 160, 0.1);
  border-left-color: #1B4FA0;
}

/* Cảnh báo — đỏ đậm */
.post-detail-content .bp-warn {
  background: rgba(224, 16, 0, 0.08);
  border-left-color: #E01000;
}

/* Ghi chú trung tính — peach */
.post-detail-content .bp-note {
  background: rgba(245, 182, 34, 0.16);
  border-left-color: #F5B622;
}

/* Khối dẫn nguồn cuối bài */
.post-detail-content .bp-source {
  background: #F6F9FD;
  border-left-color: #5B6E8C;
  font-size: 13px;
  color: #3D556F;
}

/* --- Danh sách có dấu tick --- */
.post-detail-content .bp-check {
  list-style: none;
  padding-left: 0;
}

.post-detail-content .bp-check li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.post-detail-content .bp-check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(91, 168, 90, 0.18);
  color: #2F7A2E;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Các bước đánh số --- */
.post-detail-content .bp-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: bpstep;
}

.post-detail-content .bp-steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
  counter-increment: bpstep;
}

.post-detail-content .bp-steps li::before {
  content: counter(bpstep);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0B2E63;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Bảng so sánh --- */
.post-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14px;
  background: #FFFFFF;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #C6D5E9;
}

.post-detail-content th {
  background: rgba(11, 46, 99, 0.1);
  color: #0C2340;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #C6D5E9;
}

.post-detail-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #DCE6F4;
  vertical-align: top;
}

.post-detail-content tr:last-child td { border-bottom: none; }

/* Bảng rộng: cho cuộn ngang trong khung riêng, KHÔNG để tràn cả trang */
.post-detail-content .bp-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  -webkit-overflow-scrolling: touch;
}

.post-detail-content .bp-table-wrap table { margin: 0; min-width: 420px; }

/* --- Trích dẫn --- */
.post-detail-content blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid #F5B622;
  color: #0C2340;
  font-style: italic;
}

/* --- Chỉ số nổi bật --- */
.post-detail-content .bp-stat {
  display: inline-block;
  background: rgba(11, 46, 99, 0.1);
  border: 1px solid rgba(11, 46, 99, 0.25);
  border-radius: 10px;
  padding: 2px 10px;
  font-weight: 800;
  color: #082249;
  font-size: 14px;
}

@media (max-width: 640px) {
  .post-detail-content .bp-key,
  .post-detail-content .bp-tip,
  .post-detail-content .bp-warn,
  .post-detail-content .bp-note,
  .post-detail-content .bp-source,
  .post-detail-content .bp-toc {
    padding: 14px 16px;
    border-radius: 14px;
  }
  .post-detail-content h2 { font-size: 19px; }
  .post-detail-content .bp-lead { font-size: 16px; }
}

/* =============================================================================
   Trang bài viết render sẵn — /blog/<slug>  (src/app/blog/[slug]/page.tsx)
   Dùng lại .post-detail-content + bộ bp-* ở trên, chỉ thêm phần khung trang.
   ========================================================================== */
.post-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.post-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
}

.post-page-brand {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #0C2340;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.post-page-back {
  font-size: 13px;
  font-weight: 600;
  color: #0B2E63;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid #C6D5E9;
  background: #FFFFFF;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.post-page-back:hover {
  border-color: #0B2E63;
  background: #F6F9FD;
}

.post-page-card {
  background: #FFFFFF;
  border: 1px solid #DCE6F4;
  border-radius: 28px;
  padding: 26px 22px;
  box-shadow: 0 16px 40px -24px rgba(245, 182, 34, 0.5);
}

@media (min-width: 768px) {
  .post-page-card { padding: 40px; }
  .post-page { padding: 28px 20px 72px; }
}

.post-page-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5B6E8C;
  margin-bottom: 14px;
}

.post-page-crumbs a {
  color: #5B6E8C;
  text-decoration: none;
}

.post-page-crumbs a:hover {
  color: #0B2E63;
  text-decoration: underline;
}

.post-page-title {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0C2340;
  margin: 14px 0 16px;
}

@media (min-width: 768px) {
  .post-page-title { font-size: 34px; }
}

.post-page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #5B6E8C;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid #DCE6F4;
}

/* Khối liên hệ cuối bài */
.post-page-cta {
  margin-top: 22px;
  background: linear-gradient(135deg, rgba(11, 46, 99, 0.1), rgba(245, 182, 34, 0.16));
  border: 1px solid rgba(11, 46, 99, 0.25);
  border-radius: 24px;
  padding: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #3D556F;
}

.post-page-cta-title {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #0C2340;
  margin: 0 0 6px;
}

.post-page-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 11px 22px;
  border-radius: 9999px;
  background: #0068FF;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-page-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(0, 104, 255, 0.55);
}

.post-page-foot {
  text-align: center;
  font-size: 12px;
  color: #5B6E8C;
  margin-top: 32px;
}

@media (prefers-reduced-motion: reduce) {
  .post-page-cta-btn { transition: none; }
  .post-page-cta-btn:hover { transform: none; }
}

/* Thanh báo bản xem trước — chỉ hiện khi admin mở bài chưa đăng */
.post-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(11, 46, 99, 0.14), rgba(245, 182, 34, 0.2));
  border: 1px dashed #0B2E63;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #3D556F;
}

.post-preview-tag {
  background: #0B2E63;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

.post-preview-back {
  margin-left: auto;
  font-weight: 700;
  color: #082249;
  text-decoration: none;
  white-space: nowrap;
}

.post-preview-back:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .post-preview-back { margin-left: 0; }
}
