/* Article + project page styles */
.article-page,.project-page{padding:64px 0 88px;background:#fff}
.article-container,.project-container{max-width:920px;margin:0 auto}
.article-head,.project-head{margin-bottom:40px;padding-bottom:32px;border-bottom:1px solid var(--line)}
.article-head h1,.project-head h1{font-size:clamp(2rem,4vw,2.8rem);margin:14px 0;line-height:1.25}
.project-hero h1{font-size:clamp(2rem,4.2vw,3rem);line-height:1.2}
.article-byline,.project-meta-line{font-size:.9rem;color:var(--ink-mute);font-weight:500}

.article-lead{font-size:1.28rem;color:var(--ink-mute);line-height:1.7;margin-bottom:32px;font-weight:500}
.article-page h2,.project-page h2{font-size:1.65rem;margin:38px 0 16px;color:var(--brand-deep)}
.article-page h3,.project-page h3{font-size:1.25rem;margin:24px 0 12px;color:var(--brand-deep)}
.article-page p,.project-page p{margin-bottom:18px;font-size:1.1rem;line-height:1.75;color:var(--ink)}
.article-page ul.bullets,.article-page ol.bullets,
.project-page ul.bullets,.project-page ol.bullets{
  list-style:disc;padding-left:26px;margin-bottom:22px;
}
.article-page ol.bullets,.project-page ol.bullets{list-style:decimal}
.article-page .bullets li,.project-page .bullets li{padding:7px 0;font-size:1.08rem;line-height:1.7}

/* Wrapper cho data-table — scroll ngang trên mobile khi bảng vượt width */
.article-page .data-table,.project-page .data-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
.data-table{
  width:100%;min-width:520px;border-collapse:collapse;margin:24px 0;
  font-size:1.02rem;border-radius:var(--radius-sm);
  box-shadow:var(--shadow);
}
.data-table th,.data-table td{padding:13px 15px;border-bottom:1px solid var(--line);text-align:left;line-height:1.55}
.data-table th{background:var(--bg-alt);color:var(--brand-deep);font-weight:700;font-size:.98rem}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover{background:var(--bg-alt)}

.article-footer,.project-footer{
  margin-top:48px;padding-top:32px;border-top:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;
}

.project-hero{
  background:linear-gradient(135deg,var(--brand),var(--brand-deep));
  color:#fff;padding:60px 0;
}
.project-hero h1{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.15)}
.project-hero .article-byline,.project-hero .project-meta-line{
  color:#fff;font-weight:600;font-size:1rem;
  letter-spacing:.01em;text-shadow:0 1px 2px rgba(0,0,0,.18);
}
.project-hero .badge{
  background:rgba(255,255,255,.18);color:#fff;
  border:1px solid rgba(255,255,255,.35);
  backdrop-filter:saturate(140%);
  font-weight:700;
}

.project-gallery{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;margin:28px 0 36px;
}
.project-gallery figure{margin:0;background:var(--bg-alt);border-radius:var(--radius-sm);overflow:hidden;box-shadow:var(--shadow)}
.project-gallery img{width:100%;height:240px;object-fit:cover;display:block;background:#e5e7eb;cursor:zoom-in;transition:transform .15s}
.project-gallery img:hover{transform:scale(1.02)}
.project-gallery figcaption{padding:14px 16px;font-size:.98rem;color:var(--ink-mute);line-height:1.55}
@media (max-width:960px){
  .article-container,.project-container{max-width:100%;padding:0 4px}
  .article-page,.project-page{padding:40px 0 60px}
  .article-page h2,.project-page h2{font-size:1.3rem;margin:28px 0 12px}
  .article-page p,.project-page p{font-size:1rem;line-height:1.7}
  .article-lead{font-size:1.08rem}
}
@media (max-width:640px){
  .project-gallery{grid-template-columns:1fr;gap:14px}
  .project-gallery img{height:200px}
  .article-figure img{max-height:420px}
  .article-figure figcaption{padding:10px 12px;font-size:.85rem}
  .article-head h1,.project-head h1,.project-hero h1{font-size:1.5rem;line-height:1.3}
  .data-table{font-size:.88rem;min-width:480px}
  .data-table th,.data-table td{padding:8px 10px}
  .project-stats-grid{padding:18px;gap:14px}
  .project-stats-grid strong{font-size:1.2rem}
}

/* Article figure — ảnh đơn trong bài viết */
.article-figure{margin:28px 0;background:var(--bg-alt);border-radius:var(--radius-sm);overflow:hidden;box-shadow:var(--shadow)}
.article-figure img{display:block;width:100%;max-height:600px;object-fit:contain;background:#0b1220;cursor:zoom-in;transition:opacity .15s}
.article-figure img:hover{opacity:.92}
.article-figure figcaption{padding:16px 20px;font-size:1rem;color:var(--ink-mute);line-height:1.6;border-top:1px solid var(--line)}
.article-figure figcaption strong{color:var(--brand-deep)}

/* Lightbox overlay */
.lb-overlay{position:fixed;inset:0;background:rgba(8,17,28,.92);display:none;align-items:center;justify-content:center;z-index:9999;padding:40px 20px;cursor:zoom-out}
.lb-overlay.show{display:flex}
.lb-overlay img{max-width:100%;max-height:calc(100vh - 140px);object-fit:contain;border-radius:6px;box-shadow:0 10px 40px rgba(0,0,0,.5);cursor:default}
.lb-caption{position:absolute;bottom:24px;left:0;right:0;text-align:center;color:#fff;font-size:.95rem;padding:0 40px;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.lb-close{position:absolute;top:18px;right:24px;width:44px;height:44px;border:none;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:1.6rem;cursor:pointer;display:flex;align-items:center;justify-content:center}
.lb-close:hover{background:rgba(255,255,255,.28)}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border:none;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:1.6rem;cursor:pointer;display:flex;align-items:center;justify-content:center}
.lb-nav:hover{background:rgba(255,255,255,.28)}
.lb-prev{left:24px}.lb-next{right:24px}
.lb-counter{position:absolute;top:24px;left:24px;color:#fff;font-size:.85rem;background:rgba(0,0,0,.4);padding:6px 12px;border-radius:14px}
@media (max-width:640px){
  .lb-nav{width:40px;height:40px;font-size:1.3rem}
  .lb-prev{left:8px}.lb-next{right:8px}
  .lb-close{top:10px;right:10px}
  .lb-caption{font-size:.85rem;padding:0 20px;bottom:14px}
}
.project-stats-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:20px;
  margin:32px 0;padding:24px;background:var(--bg-alt);
  border-radius:var(--radius);
}
.project-stats-grid div{text-align:center}
.project-stats-grid strong{display:block;color:var(--brand-deep);font-size:1.4rem;font-weight:800}
.project-stats-grid span{font-size:.85rem;color:var(--ink-mute);margin-top:4px;display:block}

@media (max-width:640px){
  .project-stats-grid{grid-template-columns:1fr 1fr}
  .article-footer,.project-footer{flex-direction:column;align-items:flex-start}
}

/* Internal linking — Bài viết liên quan */
.related-articles{margin:40px 0 8px;padding:22px 24px;background:var(--bg-alt);border-radius:var(--radius);border:1px solid var(--line)}
.related-articles h3{margin:0 0 12px;font-size:1.15rem;color:var(--brand-deep)}
.related-articles ul.bullets{margin:0;padding-left:20px}
.related-articles .bullets li{padding:5px 0;font-size:1.02rem;line-height:1.6}
.related-articles a{color:var(--brand);font-weight:600;text-decoration:none}
.related-articles a:hover{text-decoration:underline}
