/* PixelCam — template styles: Blog: posts page, single posts, category/tag/author/date archives.
   Loaded after pixel-cam.css by ThemeHook (handle pixel-cam-template).
   Rules here are used ONLY on these screens; anything shared stays in pixel-cam.css.
   See templates/README.md before moving rules between files. */
.blog-pagination-wrap{display:block;padding-top:28px}
.blog-pagination-main{min-width:0}
.featured__media{display:block;aspect-ratio:16/9;background:#f2f2f2;overflow:hidden;position:relative;width:100%}
.featured__media img{width:100%;height:100%;max-width:100%;object-fit:cover;display:block;transition:transform .4s ease}
.featured__media--empty{display:flex;align-items:center;justify-content:center;color:#bdbdbd}
.featured__placeholder-icon{width:64px;height:64px}
.bcard__link:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:inherit}
.bcard__media--empty{display:flex;align-items:center;justify-content:center;color:#bdbdbd}
.bcard__placeholder-icon{width:42px;height:42px}
.tags-cloud{display:flex;flex-wrap:wrap;gap:6px}
.tags-cloud a{font-size:12.5px;background:var(--bg);border:1px solid var(--border);padding:5px 10px;border-radius:6px;color:var(--muted);transition:.15s}
.tags-cloud a:hover{border-color:var(--accent);color:var(--accent)}

/* ===== ARTICLE / BLOG POST ===== */
.post-layout{display:block;margin-top:24px}
.post-layout--with-toc{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,8fr);gap:clamp(28px,5vw,72px);align-items:start}
.post-layout__toc{min-width:0;position:sticky;top:112px}
.post-layout>article{min-width:0;width:100%;container-type:inline-size}
.post-author{display:flex;align-items:center;gap:10px}
.post-author b{font-size:14px;display:block}.post-author small{color:var(--muted);font-size:12.5px}
.post-cover{aspect-ratio:16/9;border-radius:14px;overflow:hidden;margin:24px 0 36px}

.post-intro{max-width:78ch}
.post-toc{position:static;border:1px solid var(--border);border-radius:10px;padding:16px 18px;background:var(--bg)}
.post-toc h5{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:12px}
.post-toc ol{list-style:none;display:flex;flex-direction:column;gap:8px;counter-reset:toc}
.post-toc li{font-size:13.5px;line-height:1.4;counter-increment:toc}
.post-toc li::before{content:counter(toc, decimal-leading-zero) ".";font-family:var(--mono);font-size:11px;color:var(--muted);margin-right:8px}
.post-toc a{color:var(--fg);transition:.15s}
.post-layout__toc .post-toc{padding:16px}
.post-layout__toc .post-toc h5{font-size:16px;font-weight:700;letter-spacing:-.01em;text-transform:none;color:var(--fg);margin-bottom:12px}
.post-layout__toc .post-toc ol{gap:8px}
.post-layout__toc .post-toc li{font-size:14px;line-height:1.45}
.post-layout__toc .post-toc a{color:var(--accent)}

@media(max-width:760px){
  .post-layout--with-toc{display:block}
  .post-layout__toc{position:static;margin-bottom:28px}
  .post-layout__toc .post-toc{padding:16px}
  .post-layout__toc .post-toc h5{font-size:18px;margin-bottom:14px}
  .post-layout__toc .post-toc li{font-size:15px;line-height:1.45}
}

/* post footer / tags */
.post-foot{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:22px 0;border-block:1px solid var(--border);margin:32px 0 0}
.post-tags{display:flex;gap:8px;flex-wrap:wrap}
.post-tags a{font-size:13px;background:var(--bg);border:1px solid var(--border);padding:6px 12px;border-radius:6px;color:var(--muted);transition:.15s}
.post-tags a:hover{border-color:var(--accent);color:var(--accent)}

/* === POST HEAD (sforum-style single post hero) ===============
   Mobile : image edge-to-edge, darkened filter, red category tag +
            title overlaid on the image, white card overlapping the
            image bottom with author + "Ngày cập nhật" row.
   Desktop: image normal, white card below with H1 + author row. */
.post-head{margin-block:8px 0;position:relative}
.post-head .post-cover{position:relative;aspect-ratio:16/9;overflow:hidden;
  margin:0;border-radius:14px;background:#f2f2f2}
.post-head .post-cover img{width:100%;height:100%;object-fit:cover;display:block}

/* Mobile overlay: hidden on desktop, shown on mobile */
.post-cover__overlay{display:none}

/* Brand sforum-style category tag */
.post-tag{display:inline-block;background:var(--accent);color:#fff;font-size:14px;
  font-weight:600;padding:5px 8px;border-radius:5px;text-decoration:none;
  line-height:1.2;letter-spacing:.01em}
.post-tag:hover,.post-tag:focus-visible{background:var(--accent-80);color:#fff}
.post-card__head .post-tag--inline{margin-bottom:12px}
.post-card__title{font-size:clamp(26px,3.4vw,40px);font-weight:700;line-height:1.15;
  letter-spacing:-.02em;margin:0 0 12px;text-wrap:wrap;text-wrap:pretty}
.post-card__sub{color:var(--muted);font-size:clamp(15px,1.5vw,18px);
  margin:0;max-width:60ch;line-height:1.55}

/* Author row inside the card (overrides the older .post-author defaults) */
.post-head .post-author{display:flex;align-items:center;gap:10px;
  padding-top:14px;border-top:1px solid var(--border);margin:0}
.post-author__av{display:inline-flex;width:42px;height:42px;border-radius:50%;
  background:#fff;flex-shrink:0;align-items:center;justify-content:center;
  border:0;padding:0;overflow:hidden}
.post-author__img{display:block;width:100%;height:100%;object-fit:cover;
  border-radius:50%;background:#f2f2f2}
.post-author__meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.post-author__name{font-size:14px;font-weight:600;display:block;color:var(--fg);
  line-height:1.2;text-decoration:none;transition:color .15s}
.post-author__name:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.post-author__date{color:#656565;font-size:12px;font-weight:300;
  display:inline-flex;align-items:center;gap:4px;line-height:1.3}
.post-author__date svg{color:var(--brand-secondary);flex-shrink:0}
@media(max-width:600px){
  .post-head{margin-block:0}
  /* Image breaks out of the .wrap gutter to become edge-to-edge */
  .post-head .post-cover{aspect-ratio:16/9;border-radius:0;
    margin:0 calc(-1 * clamp(16px,4vw,24px));
    width:calc(100% + clamp(16px,4vw,24px) * 2)}
  .post-head .post-cover img{filter:brightness(.5)}

  /* Overlay: red tag (top) + title (bottom) on the darkened image */
  .post-cover__overlay{
    display:block;
    position:absolute;left:0;right:0;bottom:18px;
    padding:0 12px;
  }
  .post-cover__title{
    color:#fff;font-size:18px;font-weight:700;line-height:1.3;margin:10px 0 0;
    text-shadow:0 1px 2px rgba(0,0,0,.35);
  }
  /* Hide desktop-only bits on mobile */
  .post-card__head .post-tag--inline{display:none}
  .post-card__title{display:none}
  .post-card__sub{display:none}
  .post-layout__toc{margin-bottom:20px}

  /* Author row mobile — red ring avatar + red author + gray date.
     No top padding here (card's own padding handles top spacing from cover),
     only bottom padding so the row reads as a unit. */
  .post-head .post-author{padding:0 0 4px;border-top:0}
  .post-author__av{width:35px;height:35px;border:1px solid var(--accent);padding:2px;background:#fff}
  .post-author__img{border-radius:50%}
  .post-author__name{color:var(--accent);font-size:14px;font-weight:600}
  .post-author__date{color:#656565;font-size:10px;font-weight:300}
  .post-author__date svg{width:11px;height:11px}
}
/* Post tags */
.post-tags a{font-size:13px;background:var(--bg);border:1px solid var(--border);padding:6px 12px;border-radius:6px;color:var(--muted);margin-right:6px;text-decoration:none}
.post-tags a:hover{border-color:var(--accent);color:var(--accent)}
/* Single post cover (16:9 box). */
.post-cover img{width:100%;height:100%;object-fit:cover;display:block;background:#f2f2f2}

/* ============================================================
    SINGLE POST — RELATED SECTIONS
    ============================================================ */
.post-related,
.post-related-products {
    padding: 32px 0;
}

.post-related > h2,
.post-related-products > h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.post-related-products .pcard .imgwrap {
    aspect-ratio: 1 / 1;
}

.post-related .bcard__media img,
.post-related .bcard > img {
    aspect-ratio: 16 / 9;
}
.block--newsletter h4{color:#fff;opacity:.85}
.block--newsletter p{font-size:14px;opacity:.95;margin-bottom:14px}
.block--newsletter input{width:100%;min-height:44px;padding:10px 12px;border-radius:8px;border:0;font:inherit;font-size:14px;margin-bottom:8px}
.block--newsletter button{width:100%;min-height:44px;background:#fff;color:var(--accent);border:0;border-radius:8px;padding:10px;font:inherit;font-weight:700;font-size:14px;cursor:pointer}