/* ================= TRANG BÀI VIẾT ================= */
.blog-page { background: #F7F8FA; }

/* ---------- thanh trên cùng ---------- */
.blog-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 78px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 5vw, 76px);
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.06);
}
.blog-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #1b2a1a; }
.blog-logo em { font-style: normal; color: var(--moss); }
.blog-nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1px solid #e3e7df; color: #2b3322; font-weight: 600; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s;
}
.nav-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }

/* ---------- phần đầu ---------- */
.blog-hero {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 170px 16px 120px; background: linear-gradient(180deg, #0F2A33 0%, #10242E 55%, #141C2B 100%);
}
.blog-hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 50% 30%, rgba(46, 180, 130, .12), transparent 70%); }
.blog-badge {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(62, 214, 150, .35); background: rgba(62, 214, 150, .08);
  color: #3ED696; font-size: 12px; font-weight: 700; letter-spacing: .12em;
}
.blog-hero h1 { position: relative; margin: 26px 0 22px; font-weight: 700; font-size: clamp(38px, 5.4vw, 60px); line-height: 1.1; }
.blog-hero h1 span { color: #3ED696; }
.blog-hero p { position: relative; margin: 0 auto; max-width: 680px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: rgba(255,255,255,.72); }

/* ---------- thanh lọc ---------- */
.blog-list { padding: 80px 0 90px; }
.blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 50px; }
.blog-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.blog-tabs button {
  padding: 10px 24px; border-radius: 999px; border: 1px solid #dfe3dc; background: #fff; color: #33402a;
  font-weight: 600; font-size: 15px; transition: background .15s, color .15s, box-shadow .15s;
}
.blog-tabs button:hover { border-color: #b9c4b3; }
.blog-tabs button.active { background: var(--moss); border-color: var(--moss); color: #fff; box-shadow: 0 8px 18px rgba(106,128,66,.3); }
.blog-search {
  display: flex; align-items: center; gap: 10px; width: min(320px, 100%); height: 46px; padding: 0 16px;
  background: #fff; border: 1px solid #dfe3dc; border-radius: 12px; color: #8a96a3;
}
.blog-search:focus-within { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(106,128,66,.15); }
.blog-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 15px; color: #1b2a1a; }

/* ---------- ảnh bìa minh hoạ ---------- */
.cover { position: relative; overflow: hidden; background: var(--c1); }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-cat {
  position: absolute; top: 18px; left: 18px; z-index: 2; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.9); color: #3b4a2c; font-size: 11px; font-weight: 800; letter-spacing: .06em;
}

/* ---------- bài nổi bật ---------- */
.post-featured {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin-bottom: 60px; text-align: left; width: 100%;
  background: #fff; border-radius: 28px; box-shadow: 0 20px 50px rgba(20, 40, 30, .08); transition: transform .25s, box-shadow .25s;
}
.post-featured:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(20, 40, 30, .12); }
.post-featured .cover { min-height: 310px; }
.post-featured .cover-cat { background: #2F4A24; color: #fff; }
.pf-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 50px); }
.pf-body h2 { margin: 18px 0 36px; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.25; color: #0f1b2d; }
.read-more { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--moss); font-size: 18px; }
.read-more svg { transition: transform .2s; }
.post-featured:hover .read-more svg, .post-card:hover .read-more svg { transform: translateX(4px); }

/* ---------- lưới bài viết ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; text-align: left; width: 100%;
  background: #fff; border-radius: 22px; box-shadow: 0 10px 30px rgba(20, 40, 30, .06); transition: transform .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(20, 40, 30, .1); }
.post-card .cover { aspect-ratio: 16 / 9.3; }
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.pc-body h3 { flex: 1; margin: 12px 0 22px; font-size: 20px; line-height: 1.35; color: #0f1b2d; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid #eef0ec; }
.pc-foot .read-more { font-size: 15px; }
.pc-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f2f4f0; color: #8a96a3; }
.post-meta { display: flex; gap: 16px; margin: 0; font-size: 12.5px; color: #7b8794; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; background: #fff; border-radius: 22px; color: #55616e; }
.post-empty b { display: block; font-size: 18px; color: #0f1b2d; margin-bottom: 6px; }

/* ---------- đăng ký nhận bài ---------- */
.blog-subscribe { padding: 80px 16px; text-align: center; background: #6A8042; color: #fff; }
.blog-subscribe > svg { color: rgba(255,255,255,.55); }
.blog-subscribe h2 { margin: 18px 0 16px; font-size: clamp(26px, 3vw, 36px); }
.blog-subscribe > p { margin: 0 auto 32px; max-width: 720px; color: rgba(255,255,255,.85); font-size: 17px; line-height: 1.6; }
.sub-form { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.sub-form input {
  width: min(324px, 100%); height: 58px; padding: 0 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 16px; outline: none;
}
.sub-form input::placeholder { color: rgba(255,255,255,.65); }
.sub-form input:focus { border-color: #fff; }
.sub-form input.invalid { border-color: #ffb4a8; }
.sub-form button { height: 58px; padding: 0 32px; border-radius: 999px; background: #fff; color: #4f6630; font-weight: 700; font-size: 16px; box-shadow: 0 10px 22px rgba(0,0,0,.15); transition: transform .15s; }
.sub-form button:hover { transform: translateY(-2px); }
.sub-msg { min-height: 1.3em; margin: 16px 0 0; font-weight: 700; }
.blog-page .footer { margin-top: 0; }

/* ---------- xem bài (tạm) ---------- */
.post-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.post-modal[hidden] { display: none; }
.post-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 30, .6); backdrop-filter: blur(3px); }
.post-modal-box { position: relative; width: min(640px, 100%); overflow: hidden; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: postPop .25s ease; }
@keyframes postPop { from { transform: translateY(12px) scale(.97); opacity: 0; } }
.post-modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); }
.post-modal-cover .cover { aspect-ratio: 16 / 7; }
.post-modal-body { padding: 24px 28px 30px; }
.post-modal-body h2 { margin: 10px 0 12px; font-size: 24px; line-height: 1.3; color: #0f1b2d; }
.post-modal-body > p:last-child { margin: 0; color: #55616e; line-height: 1.7; }

@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 700px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .cover { min-height: 200px; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 130px 16px 80px; }
  .blog-list { padding-top: 50px; }
  .blog-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; width: 100%; }
  .blog-tabs button { flex: none; }
  .blog-search { width: 100%; }
}
@media (max-width: 480px) {
  .blog-logo span:last-child { display: none; }
}
/* thân bài viết (soạn trong trang quản trị) */
.post-modal-text { color: #34414e; font-size: 16px; line-height: 1.8; }
.post-modal-text p { margin: 0 0 14px; }
.post-modal-text h3, .post-modal-text h4 { margin: 22px 0 10px; color: #0f1b2d; }
.post-modal-text ul { margin: 0 0 14px; padding-left: 22px; }
.post-modal-text img { max-width: 100%; border-radius: 12px; margin: 8px 0; }
.post-modal-text a { color: #2563eb; text-decoration: underline; }
.post-modal-box { max-height: calc(100vh - 40px); overflow-y: auto; }
