/* BAIVIET.CSS — trang công khai đọc bài, cùng nhận diện với trang chủ */
:root{
  --c-bg:#06090f; --c-surface:#0d1420; --c-card:#111827; --c-border:#1e2d45;
  --c-gold:#c8952a; --c-gold-lt:#e8b84b; --c-gold-dim:rgba(200,149,42,.15);
  --c-white:#f5f0e8; --c-muted:#8a96a8; --c-accent:#3b82f6;
  --f-display:'Cormorant Garamond',Georgia,serif;
  --f-body:'DM Sans',sans-serif;
  --f-mono:'Space Mono',monospace;
  --rong:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--c-bg); color:var(--c-white);
  font-family:var(--f-body); font-size:16px; line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:inherit}

/* ══ ĐẦU TRANG ══ */
.bv-dau{
  position:sticky; top:0; z-index:100;
  background:rgba(8,12,20,.9); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid var(--c-border);
}
.bv-dau-trong{
  max-width:var(--rong); margin:0 auto; padding:0 2rem; height:72px;
  display:flex; align-items:center; justify-content:space-between; gap:2rem;
}
.bv-logo{display:flex; align-items:center; gap:12px; text-decoration:none; flex-shrink:0}
.bv-logo img{width:40px; height:40px; object-fit:contain; transition:transform .4s cubic-bezier(.22,.68,0,1)}
.bv-logo:hover img{transform:rotate(28deg)}
.bv-logo span{display:flex; flex-direction:column; line-height:1}
.bv-logo em{font-family:var(--f-display); font-style:italic; font-size:1.2rem; font-weight:600}
.bv-logo small{font-family:var(--f-mono); font-size:.54rem; letter-spacing:.2em;
  text-transform:uppercase; color:var(--c-gold); margin-top:5px; opacity:.85}
.bv-nav{display:flex; align-items:center; gap:4px}
.bv-nav a{
  padding:9px 15px; font-size:.85rem; color:rgba(255,255,255,.62);
  text-decoration:none; border-radius:8px; transition:color .24s; position:relative;
}
.bv-nav a:hover{color:#fff}
.bv-nav a.on{color:var(--c-gold)}
.bv-nav a.on::after{
  content:''; position:absolute; left:50%; bottom:2px; width:4px; height:4px;
  margin-left:-2px; border-radius:50%; background:var(--c-gold);
}
.bv-goi{
  display:flex; align-items:center; gap:9px; margin-left:8px;
  padding:9px 18px !important; border-radius:100px;
  border:1px solid rgba(200,149,42,.45); color:var(--c-gold) !important;
  font-family:var(--f-mono); font-size:.78rem !important; font-weight:700;
  transition:background .3s, color .3s;
}
.bv-goi:hover{background:var(--c-gold); color:var(--c-bg) !important}
.bv-goi i{font-size:.72rem}
@media(max-width:700px){
  .bv-dau-trong{padding:0 1.1rem; height:64px; gap:1rem}
  .bv-nav a:not(.bv-goi){display:none}
  .bv-goi span{display:none}
  .bv-goi{padding:9px 13px !important}
}

/* ══ KHUNG CHÍNH ══ */
.bv-main{max-width:var(--rong); margin:0 auto; padding:3rem 2rem 4rem}
@media(max-width:700px){ .bv-main{padding:2rem 1.1rem 3rem} }

.bv-hero{text-align:center; margin-bottom:2.6rem}
.bv-hero h1{
  font-family:var(--f-display); font-size:clamp(2rem,5vw,2.9rem); font-weight:600;
  margin:0 0 .7rem; line-height:1.2;
}
.bv-hero p{color:var(--c-muted); max-width:620px; margin:0 auto; font-size:1.02rem}

/* Lọc chuyên mục */
.bv-loc{display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-bottom:2.2rem}
.bv-chip{
  padding:9px 19px; border-radius:100px; cursor:pointer; font-family:var(--f-body); font-size:.85rem;
  background:none; border:1px solid var(--c-border); color:var(--c-muted); transition:all .22s;
}
.bv-chip:hover{border-color:rgba(200,149,42,.45); color:var(--c-white)}
.bv-chip.on{background:var(--c-gold); border-color:var(--c-gold); color:var(--c-bg); font-weight:600}

/* ══ LƯỚI BÀI ══ */
.bv-luoi{display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:1.7rem}
.bv-luoi.nho{grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:1.2rem}
.bv-the{
  display:flex; flex-direction:column; text-decoration:none; overflow:hidden;
  background:var(--c-card); border:1px solid var(--c-border); border-radius:16px;
  transition:border-color .26s, transform .26s;
}
.bv-the:hover{border-color:rgba(200,149,42,.4); transform:translateY(-3px)}
.bv-the.noi{grid-column:span 2}
@media(max-width:760px){ .bv-the.noi{grid-column:span 1} }
.bv-the-anh{position:relative; aspect-ratio:16/9; background:var(--c-surface); overflow:hidden}
.bv-the.noi .bv-the-anh{aspect-ratio:2/1}
.bv-the-anh img{width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.22,.68,0,1)}
.bv-the:hover .bv-the-anh img{transform:scale(1.04)}
.bv-the-trong{width:100%; height:100%; display:grid; place-items:center; color:var(--c-muted); opacity:.3; font-size:1.7rem}
.bv-the-dm{
  position:absolute; top:11px; left:11px; font-size:.68rem; font-weight:600;
  padding:4px 11px; border-radius:100px;
  background:rgba(8,12,20,.85); backdrop-filter:blur(8px); color:var(--c-white);
  border:1px solid var(--c-border);
}
.bv-the-than{padding:1.1rem 1.25rem 1.3rem; display:flex; flex-direction:column; flex:1}
.bv-the-than h2{
  font-family:var(--f-display); font-size:1.28rem; font-weight:600; margin:0; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.bv-the.noi .bv-the-than h2{font-size:1.6rem}
.bv-the-than p{
  color:var(--c-muted); font-size:.88rem; margin:.6rem 0 0; line-height:1.65; flex:1;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.bv-the-ngay{font-family:var(--f-mono); font-size:.68rem; color:var(--c-muted); opacity:.7; margin-top:.9rem}

.bv-trong{grid-column:1/-1; text-align:center; padding:4rem 1rem; color:var(--c-muted)}
.bv-trong i{font-size:2.6rem; opacity:.3; display:block; margin-bottom:1rem}
.bv-trong p{margin:0 0 1.2rem}
.bv-dangtai{grid-column:1/-1; text-align:center; padding:3rem; color:var(--c-muted); font-size:.9rem}
.bv-quay{
  display:inline-block; width:15px; height:15px; margin-right:8px; vertical-align:-2px;
  border:2px solid var(--c-border); border-top-color:var(--c-gold); border-radius:50%;
  animation:bvQuay .8s linear infinite;
}
@keyframes bvQuay{to{transform:rotate(360deg)}}

/* ══ CHI TIẾT BÀI ══ */
.bv-quaylai{
  display:inline-flex; align-items:center; gap:8px; margin-bottom:1.8rem;
  font-size:.85rem; color:var(--c-muted); text-decoration:none; transition:color .2s;
}
.bv-quaylai:hover{color:var(--c-gold)}

.bv-bai{max-width:760px; margin:0 auto}
.bv-bai-dau{margin-bottom:2rem}
.bv-bai-dm{
  display:inline-block; font-size:.72rem; font-weight:600; color:var(--c-gold);
  padding:4px 12px; border-radius:100px; background:var(--c-gold-dim); margin-bottom:1rem;
}
.bv-tieude{
  font-family:var(--f-display); font-size:clamp(1.9rem,4.6vw,2.7rem); font-weight:600;
  line-height:1.22; margin:0 0 1rem;
}
.bv-tomtat{font-size:1.1rem; color:var(--c-muted); line-height:1.75; margin:0 0 1.2rem}
.bv-bai-meta{display:flex; gap:1.4rem; flex-wrap:wrap; font-family:var(--f-mono);
  font-size:.72rem; color:var(--c-muted); opacity:.8}
.bv-bai-meta i{margin-right:5px; opacity:.7}

.bv-bia{width:100%; border-radius:16px; margin-bottom:2.2rem; border:1px solid var(--c-border)}

/* Nội dung */
.bv-doan{margin:0 0 1.5rem; font-size:1.06rem; line-height:1.85; color:rgba(245,240,232,.9)}
.bv-doan b,.bv-doan strong{color:var(--c-white); font-weight:600}
.bv-doan a{color:var(--c-gold); text-decoration:underline; text-underline-offset:3px}
.bv-doan ul,.bv-doan ol{margin:1rem 0 1.5rem; padding-left:1.5rem}
.bv-doan li{margin:.5rem 0}
.bv-h{
  font-family:var(--f-display); font-weight:600; line-height:1.3;
  margin:2.6rem 0 1rem; scroll-margin-top:90px;
}
h2.bv-h{font-size:1.75rem}
h3.bv-h{font-size:1.38rem}

.bv-anh{margin:2rem 0}
.bv-anh img{width:100%; border-radius:14px; border:1px solid var(--c-border)}
.bv-anh figcaption,.bv-ts figcaption{
  text-align:center; font-size:.83rem; color:var(--c-muted); margin-top:.7rem; font-style:italic;
}
.bv-phong-duoc{cursor:zoom-in; transition:opacity .2s}
.bv-phong-duoc:hover{opacity:.9}

/* Trước / Sau */
.bv-ts{margin:2rem 0}
.bv-ts-khung{
  position:relative; aspect-ratio:16/10; border-radius:14px; overflow:hidden;
  border:1px solid var(--c-border); background:var(--c-surface); user-select:none; touch-action:none;
}
.bv-ts-khung img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.bv-ts-b{clip-path:inset(0 0 0 var(--vt,50%))}
.bv-ts-keo{
  position:absolute; top:0; bottom:0; left:var(--vt,50%); width:3px;
  background:var(--c-gold); cursor:grab; z-index:3; touch-action:none;
}
.bv-ts-khung.keo .bv-ts-keo{cursor:grabbing}
.bv-ts-keo::before{content:''; position:absolute; top:0; bottom:0; left:50%; width:36px; transform:translateX(-50%)}
.bv-ts-keo::after{
  content:'⟺'; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:44px; height:44px; border-radius:50%; background:var(--c-gold); color:var(--c-bg);
  display:grid; place-items:center; font-size:1rem; box-shadow:0 4px 16px rgba(0,0,0,.5);
  transition:transform .2s cubic-bezier(.22,.68,0,1.3);
}
.bv-ts-keo:hover::after{transform:translate(-50%,-50%) scale(1.1)}
.bv-ts-khung.keo .bv-ts-keo::after{transform:translate(-50%,-50%) scale(.94)}
.bv-ts-nhan{
  position:absolute; bottom:13px; z-index:2; font-size:.68rem; font-weight:700;
  padding:5px 13px; border-radius:100px; background:rgba(6,9,15,.85); color:var(--c-white);
}
.bv-ts-nhan.t{left:13px}
.bv-ts-nhan.s{right:13px; background:rgba(34,197,94,.9); color:#052e21}

/* Hỏi & Đáp */
.bv-hoidap{margin:2.4rem 0}
.bv-hd{
  border:1px solid var(--c-border); border-radius:12px; margin-bottom:10px;
  background:var(--c-card); overflow:hidden; transition:border-color .2s;
}
.bv-hd[open]{border-color:rgba(200,149,42,.35)}
.bv-hd summary{
  padding:1.05rem 1.3rem; cursor:pointer; font-weight:600; font-size:1rem;
  list-style:none; display:flex; align-items:center; justify-content:space-between; gap:1rem;
}
.bv-hd summary::-webkit-details-marker{display:none}
.bv-hd summary::after{content:'+'; font-size:1.4rem; color:var(--c-gold); font-weight:300;
  transition:transform .26s cubic-bezier(.22,.68,0,1); flex-shrink:0}
.bv-hd[open] summary::after{transform:rotate(45deg)}
.bv-hd summary:hover{color:var(--c-gold)}
.bv-hd-dap{padding:0 1.3rem 1.2rem; color:var(--c-muted); line-height:1.8}
.bv-hd-dap b{color:var(--c-white)}
.bv-hd-dap a{color:var(--c-gold)}

/* Bảng giá */
.bv-bang-boc{margin:2.4rem 0}
.bv-bang{width:100%; border-collapse:collapse; border-radius:12px; overflow:hidden;
  border:1px solid var(--c-border); font-size:.95rem}
.bv-bang thead th{
  background:var(--c-surface); padding:.9rem 1.1rem; text-align:left; font-weight:600;
  font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; color:var(--c-muted);
  border-bottom:1px solid var(--c-border);
}
.bv-bang tbody td{padding:.9rem 1.1rem; border-bottom:1px solid rgba(30,45,69,.5)}
.bv-bang tbody tr:last-child td{border-bottom:none}
.bv-bang tbody tr:hover{background:rgba(200,149,42,.04)}
.bv-gia{font-family:var(--f-mono); font-weight:700; color:var(--c-gold); text-align:right; white-space:nowrap}
.bv-bang-ghi{font-size:.82rem; color:var(--c-muted); font-style:italic; margin:.8rem 0 0}

/* Các bước */
.bv-buoc-boc{margin:2.4rem 0}
.bv-buoc{list-style:none; counter-reset:b; margin:0; padding:0}
.bv-buoc li{
  counter-increment:b; position:relative; padding:0 0 1.4rem 3.4rem;
  border-left:2px solid var(--c-border); margin-left:1.1rem;
}
.bv-buoc li:last-child{border-left-color:transparent; padding-bottom:0}
.bv-buoc li::before{
  content:counter(b); position:absolute; left:-1.15rem; top:-.15rem;
  width:2.3rem; height:2.3rem; border-radius:50%;
  background:var(--c-gold); color:var(--c-bg);
  display:grid; place-items:center; font-family:var(--f-mono); font-weight:700; font-size:.88rem;
}
.bv-buoc li b{display:block; font-size:1.05rem; color:var(--c-white); margin-bottom:.25rem}
.bv-buoc li span{color:var(--c-muted); line-height:1.75}

/* Ghi chú */
.bv-luuy{
  display:flex; gap:1rem; margin:2rem 0; padding:1.2rem 1.4rem; border-radius:12px;
  background:var(--c-gold-dim); border:1px solid rgba(200,149,42,.28);
}
.bv-luuy i{color:var(--c-gold); font-size:1.15rem; flex-shrink:0; margin-top:.2rem}
.bv-luuy div{line-height:1.8; color:rgba(245,240,232,.92)}
.bv-luuy b{color:var(--c-white)}

/* Từ khoá */
.bv-tags{display:flex; flex-wrap:wrap; gap:8px; margin:2.8rem 0 0;
  padding-top:1.8rem; border-top:1px solid var(--c-border)}
.bv-tag{font-size:.76rem; padding:5px 13px; border-radius:100px;
  background:var(--c-surface); border:1px solid var(--c-border); color:var(--c-muted)}

/* Liên hệ cuối bài */
.bv-lienhe{
  max-width:760px; margin:3.5rem auto 0; padding:2.4rem 2rem; border-radius:18px;
  text-align:center; background:var(--c-surface); border:1px solid var(--c-border);
}
.bv-lienhe h2{font-family:var(--f-display); font-size:1.6rem; font-weight:600; margin:0 0 .6rem}
.bv-lienhe p{color:var(--c-muted); margin:0 0 1.6rem}
.bv-lienhe-nut{display:flex; gap:11px; justify-content:center; flex-wrap:wrap}
.bv-nut{
  display:inline-flex; align-items:center; gap:9px; padding:12px 24px; border-radius:100px;
  text-decoration:none; font-size:.9rem; font-weight:500; transition:all .26s;
  border:1px solid var(--c-border); color:var(--c-white);
}
.bv-nut:hover{border-color:rgba(200,149,42,.5); background:rgba(200,149,42,.07)}
.bv-nut.chinh{background:var(--c-gold); border-color:var(--c-gold); color:var(--c-bg); font-weight:600}
.bv-nut.chinh:hover{background:var(--c-gold-lt)}

.bv-khac{max-width:var(--rong); margin:4rem auto 0}
.bv-khac-dau{font-family:var(--f-display); font-size:1.6rem; font-weight:600; margin:0 0 1.5rem; text-align:center}

/* ══ CHÂN TRANG ══ */
.bv-chan{border-top:1px solid var(--c-border); background:var(--c-surface); margin-top:4rem}
.bv-chan-trong{
  max-width:var(--rong); margin:0 auto; padding:2.4rem 2rem;
  display:flex; justify-content:space-between; gap:2rem; flex-wrap:wrap;
  font-size:.86rem; color:var(--c-muted); line-height:1.9;
}
.bv-chan-trong b{color:var(--c-white); font-family:var(--f-display); font-size:1.05rem; letter-spacing:.02em}
.bv-chan a{color:var(--c-muted); text-decoration:none; transition:color .2s}
.bv-chan a:hover{color:var(--c-gold)}
.bv-chan-link{display:flex; flex-direction:column; gap:6px}

/* ══ XEM ẢNH PHÓNG TO ══ */
.bv-lightbox{
  position:fixed; inset:0; z-index:9000; background:rgba(0,0,0,.94);
  display:none; align-items:center; justify-content:center; padding:3.5rem 1.5rem;
}
.bv-lightbox.hien{display:flex; animation:bvHien .22s ease}
@keyframes bvHien{from{opacity:0}to{opacity:1}}
.bv-lightbox img{max-width:100%; max-height:84vh; object-fit:contain; border-radius:8px;
  box-shadow:0 24px 70px rgba(0,0,0,.8)}
.bv-lb-dong,.bv-lb-truoc,.bv-lb-sau{
  position:absolute; z-index:2; cursor:pointer; color:#fff;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16);
  display:grid; place-items:center; transition:all .2s; backdrop-filter:blur(8px);
}
.bv-lb-dong{top:18px; right:18px; width:42px; height:42px; border-radius:50%; font-size:1rem}
.bv-lb-truoc,.bv-lb-sau{top:50%; transform:translateY(-50%); width:48px; height:48px;
  border-radius:50%; font-size:1.7rem; line-height:0}
.bv-lb-truoc{left:18px}
.bv-lb-sau{right:18px}
.bv-lb-dong:hover,.bv-lb-truoc:hover,.bv-lb-sau:hover{background:var(--c-gold); color:var(--c-bg); border-color:var(--c-gold)}
.bv-lb-duoi{
  position:absolute; left:0; right:0; bottom:18px; text-align:center;
  display:flex; flex-direction:column; gap:5px; color:rgba(255,255,255,.8); font-size:.85rem; padding:0 1.5rem;
}
.bv-lb-duoi span:last-child{font-family:var(--f-mono); font-size:.72rem; opacity:.6}
@media(max-width:600px){
  .bv-lb-truoc,.bv-lb-sau{width:40px; height:40px; font-size:1.4rem}
  .bv-lb-truoc{left:8px} .bv-lb-sau{right:8px}
}

@media(prefers-reduced-motion:reduce){
  *{animation:none !important; transition:none !important}
}
