/* ==========================================================================
   NAGA Concept — blog.css (danh sách + chi tiết bài viết)
   ========================================================================== */

.eyebrow{
  letter-spacing:.16em;
  font-size:11px;
  font-weight:700;
  color:#333;
  margin-bottom:14px;
}

/* --- Tiêu đề trang (dùng lại ngôn ngữ của trang Dự án) ------------------- */
.page-title{
  display:grid;
  grid-template-columns:1fr 320px;
  border-bottom:1px solid var(--line);
}
.title-left{
  padding:54px 34px 42px;
  border-right:1px solid var(--line);
}
.title-left h1{
  margin:0;
  font-size:86px;
  line-height:.9;
  letter-spacing:-.08em;
  font-weight:800;
}
.title-left p{
  max-width:720px;
  margin:28px 0 0;
  line-height:1.65;
  color:#333;
  font-size:15px;
}
.title-right{
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.stat{
  border-bottom:1px solid var(--line);
  padding-bottom:20px;
  margin-bottom:20px;
}
.stat-last{border-bottom:0;padding-bottom:0;margin-bottom:0}
.stat strong{
  display:block;
  font-size:44px;
  line-height:1;
  letter-spacing:-.05em;
}
.stat span{
  display:block;
  margin-top:8px;
  text-transform:uppercase;
  font-size:11px;
  letter-spacing:.12em;
  font-weight:700;
  color:#555;
}

/* --- Thanh chuyên mục ---------------------------------------------------- */
.category-bar{
  display:flex;
  flex-wrap:wrap;
  border-bottom:1px solid var(--line);
  background:var(--paper);
  position:sticky;
  top:var(--header-h);
  z-index:var(--z-sticky-bar);
}
.category-bar a{
  padding:18px 26px;
  border-right:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:11px;
  font-weight:700;
  transition:.18s;
}
.category-bar a:hover{background:var(--soft)}
.category-bar a.active{
  background:var(--ink);
  color:var(--paper);
}

/* Viền dưới khép khối bài viết với footer. Bản thân lưới thẻ không cần đường kẻ
   ở container nữa: từ khi mỗi thẻ tự mang viền dưới của nó, hàng cuối không đầy
   cũng không để lại đường kẻ cụt. */
.blog-main{
  padding:0;
  border-bottom:1px solid var(--line);
}
.blog-empty{
  padding:60px 34px;
  border-bottom:1px solid var(--line);
  font-size:15px;
  line-height:1.6;
}

/* --- Bài nổi bật --------------------------------------------------------- */
.post-featured{
  display:grid;
  grid-template-columns:52% 48%;
  min-height:440px;
  border-bottom:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
}
.post-featured-visual{
  position:relative;
  border-right:1px solid var(--line);
  background:
    linear-gradient(28deg, transparent 49.8%, rgba(0,0,0,.22) 50%, transparent 50.2%),
    linear-gradient(-28deg, transparent 49.8%, rgba(0,0,0,.16) 50%, transparent 50.2%),
    var(--paper-2);
}
.post-featured-visual::before{
  content:"";
  position:absolute;
  left:14%;
  right:10%;
  top:24%;
  height:44%;
  border:1px solid var(--line);
}
.post-featured-copy{
  padding:46px 38px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.post-featured-copy h2{
  margin:0 0 20px;
  font-size:44px;
  line-height:1.03;
  letter-spacing:-.055em;
  font-weight:700;
}
.post-featured-copy p{
  margin:0 0 26px;
  max-width:620px;
  font-size:15px;
  line-height:1.75;
  color:#3f3a34;
}
.post-more{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:26px;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:11px;
  font-weight:800;
}
.post-more .icon{transition:transform .18s}
.post-featured:hover .post-more .icon{transform:translateX(4px)}

/* Nhãn chuyên mục đặt trên ảnh */
.post-category{
  position:absolute;
  top:16px;
  left:16px;
  padding:7px 10px;
  background:var(--paper);
  border:1px solid var(--line);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:10px;
  font-weight:700;
}

/* --- Lưới bài viết -------------------------------------------------------
   Cùng luật với .project-grid ở projects.css: có padding quanh lưới, có gap
   giữa các thẻ, ảnh mang viền của riêng nó.

   Bản trước dùng lưới sát nhau ngăn bằng viền 1px. Cách đó hợp với .highlight ở
   trang chủ — khối chữ nhỏ, không ảnh — nhưng ở đây mỗi thẻ có một ảnh nền kẻ ô
   tràn sát mép, nên hai ảnh cạnh nhau chỉ cách một sợi tóc và dính thành một
   mảng. Lưới dự án đã giải đúng bài toán này rồi; blog theo cho nhất quán. */
.post-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:30px 24px;
  padding:30px 34px 42px;
}
.post-card{
  display:flex;
  flex-direction:column;
  border-bottom:1px solid var(--line);
  padding-bottom:18px;
  color:var(--ink);
  text-decoration:none;
  transition:.18s;
}
.post-card:hover{transform:translateY(-3px)}
/* Ảnh trong khung cao cố định phải bị CẮT, không được đẩy khung giãn ra.
   `img{max-width:100%}` ở base.css chỉ chặn tràn ngang — chiều cao vẫn theo tỉ
   lệ ảnh, nên thẻ bài viết sẽ cao gấp đôi khi có ảnh. */
.post-thumb img,
.post-featured-visual img,
.post-hero-visual img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.post-thumb{
  position:relative;
  overflow:hidden;
  height:210px;
  border:1px solid var(--line);
  margin-bottom:16px;
  background:
    linear-gradient(28deg, transparent 49.8%, rgba(0,0,0,.2) 50%, transparent 50.2%),
    linear-gradient(-28deg, transparent 49.8%, rgba(0,0,0,.14) 50%, transparent 50.2%),
    var(--paper-2);
}
/* Padding ngang giờ do .post-grid lo, thân thẻ chỉ giữ nhịp dọc. */
.post-body{
  flex:1;
  padding:0;
}
.post-body h2{
  margin:0 0 12px;
  font-size:23px;
  line-height:1.2;
  letter-spacing:-.04em;
  font-weight:700;
}
.post-excerpt{
  margin:0;
  font-size:13.5px;
  line-height:1.7;
  color:#4b4640;
}
.post-meta{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  padding:16px 0 0;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700;
  color:#555;
}
.post-meta span{
  display:inline-flex;
  align-items:center;
  gap:7px;
}
.post-featured .post-meta{padding:0}

/* --- Chi tiết bài viết --------------------------------------------------- */
.post-hero{
  display:grid;
  grid-template-columns:58% 42%;
  min-height:460px;
  border-bottom:1px solid var(--line);
}
.post-hero-copy{
  padding:52px 38px;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.post-breadcrumb{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:22px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:10px;
  font-weight:800;
}
.post-breadcrumb a{
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.post-breadcrumb a:hover{border-bottom-color:var(--ink)}
.post-hero-copy h1{
  margin:0 0 22px;
  font-size:54px;
  line-height:1.02;
  letter-spacing:-.06em;
  font-weight:800;
}
.post-standfirst{
  margin:0 0 28px;
  max-width:660px;
  font-size:17px;
  line-height:1.7;
  color:#3a352f;
}
.post-hero-visual{
  position:relative;
  background:
    linear-gradient(28deg, transparent 49.8%, rgba(0,0,0,.22) 50%, transparent 50.2%),
    linear-gradient(-28deg, transparent 49.8%, rgba(0,0,0,.16) 50%, transparent 50.2%),
    var(--paper-2);
}
.post-hero-visual::before{
  content:"";
  position:absolute;
  left:14%;
  right:10%;
  top:26%;
  height:42%;
  border:1px solid var(--line);
}

.post-content-wrap{
  display:grid;
  grid-template-columns:1fr 320px;
  border-bottom:1px solid var(--line);
}

/* Đây chính là style cho nội dung do biên tập viên nhập — phần duy nhất của
   blog.css sống sót nguyên vẹn khi lên WordPress (the_content). */
.post-content{
  padding:52px 38px 60px;
  border-right:1px solid var(--line);
  max-width:78ch;
}
.post-content .lead{
  margin:0 0 30px;
  font-size:21px;
  line-height:1.6;
  letter-spacing:-.02em;
  color:var(--ink);
}
.post-content h2{
  margin:44px 0 16px;
  font-size:30px;
  line-height:1.15;
  letter-spacing:-.045em;
  font-weight:700;
}
.post-content h2:first-child{margin-top:0}
.post-content p{
  margin:0 0 20px;
  font-size:16px;
  line-height:1.8;
  color:#33302b;
}
.post-content ul{
  margin:0 0 24px;
  padding-left:0;
  list-style:none;
}
.post-content li{
  position:relative;
  padding:0 0 12px 26px;
  font-size:15.5px;
  line-height:1.7;
  color:#33302b;
}
/* Gạch đầu dòng vuông, không phải chấm tròn — thiết kế này không có góc bo nào */
.post-content li::before{
  content:"";
  position:absolute;
  left:2px;
  top:11px;
  width:7px;
  height:1px;
  background:var(--ink);
}
.post-content blockquote{
  margin:34px 0;
  padding:26px 28px;
  border:1px solid var(--line);
  background:var(--soft);
  font-size:19px;
  line-height:1.55;
  letter-spacing:-.025em;
}

.post-aside{
  padding:52px 28px;
  display:flex;
  flex-direction:column;
  gap:18px;
  align-content:start;
  position:sticky;
  top:var(--header-h);
  height:max-content;
}
.post-aside-box{
  border:1px solid var(--line);
  padding:22px;
}
.post-aside-box p{
  margin:0 0 18px;
  font-size:13px;
  line-height:1.65;
  color:#4b4640;
}
.post-aside-box .eyebrow{margin-bottom:12px}

/* .post-related là <section> nên đã có border-bottom từ base.css — đó chính là
   đường đóng lưới, không cần thêm. */

.post-missing{
  padding:90px 34px;
  text-align:left;
}
.post-missing h1{
  margin:0 0 16px;
  font-size:52px;
  letter-spacing:-.06em;
}
.post-missing p{
  margin:0 0 28px;
  color:#4b4640;
  line-height:1.7;
}

/* --- Responsive ---------------------------------------------------------- */
@media(max-width:1000px){
  .site{width:100%;margin:0;border-left:0;border-right:0}
  .page-title,.post-featured,.post-hero,.post-content-wrap{grid-template-columns:1fr}
  .title-left,.post-featured-visual,.post-hero-copy,.post-content{
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .title-left h1{font-size:60px}
  .post-featured-visual,.post-hero-visual{min-height:260px}
  .post-grid{grid-template-columns:1fr 1fr}
  .post-aside{
    position:static;
    flex-direction:row;
    flex-wrap:wrap;
    padding:28px 22px;
  }
  .post-aside-box{flex:1 1 260px}
  .post-content{max-width:none}
}
@media(max-width:680px){
  .title-left{padding:40px 22px 32px}
  .title-left h1{font-size:44px}
  .title-right{padding:24px 22px}
  .category-bar{
    /* Cuộn ngang thay vì xuống dòng: giữ được nhịp một hàng của thiết kế và
       không đẩy nội dung xuống quá sâu trên màn hình nhỏ. */
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .category-bar a{
    padding:15px 18px;
    white-space:nowrap;
  }
  /* Một cột: gap đã tách các thẻ, không cần luật viền theo vị trí nữa. */
  .post-grid{
    grid-template-columns:1fr;
    padding:26px 22px 36px;
  }
  .post-featured-copy{padding:32px 22px}
  .post-featured-copy h2{font-size:31px}
  .post-hero-copy{padding:34px 22px}
  .post-hero-copy h1{font-size:34px}
  .post-standfirst{font-size:15px}
  .post-content{padding:34px 22px 44px}
  .post-content .lead{font-size:18px}
  .post-content h2{font-size:24px}
  .post-content p{font-size:15px}
  .post-content blockquote{
    padding:20px;
    font-size:17px;
  }
  .post-missing{padding:60px 22px}
  .post-missing h1{font-size:36px}
}
