/* Blog layout (list + post). Loaded only on /blog pages; uses the site's own variables. */

.blog-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 992px) { .blog-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; } }

/* ---------- list ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.blog-chip { display: inline-flex; align-items: center; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--slate-200); background: #fff; color: var(--slate-700); font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .15s; }
.blog-chip:hover { border-color: var(--brand-300); color: var(--brand-700); }
.blog-chip.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.blog-note { margin: 0 0 1.25rem; color: var(--slate-600); font-size: .95rem; }
.blog-note a { color: var(--brand-600); font-weight: 600; }

.blog-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.blog-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; height: 100%; }
.blog-card__img { aspect-ratio: 1200 / 630; background: linear-gradient(135deg, var(--slate-900), var(--brand-800)); overflow: hidden; }
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.blog-card:hover .blog-card__img img { transform: scale(1.04); }
.blog-card__body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.blog-card__cat { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600); }
.blog-card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.35; color: var(--slate-900); }
.blog-card__excerpt { font-size: .9rem; line-height: 1.6; color: var(--slate-600); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card__meta { font-size: .78rem; color: var(--slate-500); }

.blog-featured { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .blog-featured .blog-card { flex-direction: row; }
  .blog-featured .blog-card__img { flex: 0 0 54%; aspect-ratio: 1200 / 630; align-self: flex-start; }
  .blog-featured .blog-card__body { justify-content: center; padding: 1.75rem; }
  .blog-featured .blog-card__title { font-size: 1.5rem; }
}

.blog-pager { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.blog-pager a, .blog-pager span { min-width: 2.4rem; height: 2.4rem; padding: 0 .8rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--slate-200); font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--slate-700); background: #fff; }
.blog-pager a:hover { border-color: var(--brand-300); color: var(--brand-700); }
.blog-pager .is-current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ---------- sidebar ---------- */
.blog-side { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 992px) { .blog-side { position: sticky; top: 5.5rem; } }
.blog-side__box { border: 1px solid var(--slate-200); border-radius: 16px; padding: 1.25rem; background: #fff; }
.blog-side__title { display: block; margin: 0 0 .8rem; font-size: .95rem; font-weight: 800; color: var(--slate-900); }
.blog-search__row { display: flex; gap: .5rem; }
.blog-search__row input { flex: 1; min-width: 0; height: 2.6rem; padding: 0 .8rem; border: 1px solid var(--slate-300); border-radius: 10px; font: inherit; font-size: .9rem; }
.blog-search__row input:focus { outline: 2px solid var(--brand-300); border-color: var(--brand-400); }
.blog-search__row .btn-primary { padding: 0 1rem; height: 2.6rem; border-radius: 10px; }
.blog-side__list { list-style: none; margin: 0; padding: 0; }
.blog-side__list li + li { border-top: 1px solid var(--slate-100); }
.blog-side__list a { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem 0; color: var(--slate-700); text-decoration: none; font-size: .92rem; font-weight: 500; }
.blog-side__list a:hover { color: var(--brand-600); }
.blog-side__list em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--slate-500); background: var(--slate-100); border-radius: 999px; padding: .05rem .55rem; align-self: center; }
.blog-side__recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.blog-side__recent a { display: flex; gap: .7rem; align-items: center; text-decoration: none; color: var(--slate-800); font-size: .88rem; font-weight: 600; line-height: 1.35; }
.blog-side__recent a:hover { color: var(--brand-600); }
.blog-side__recent img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.blog-side__cta { background: var(--slate-950); border-color: var(--slate-950); text-align: center; }
.blog-side__cta .blog-side__title { color: #fff; font-size: 1.05rem; }
.blog-side__cta p { color: var(--slate-300); font-size: .9rem; line-height: 1.55; margin: 0 0 1rem; }
.blog-side__cta .btn-primary { width: 100%; justify-content: center; }

/* ---------- post ---------- */
.post-hero-meta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; color: var(--slate-300); font-size: .9rem; }
.post-hero-meta .dot { color: var(--slate-600); }
.post-cat-badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--brand-600); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.post-cat-badge:hover { background: var(--brand-700); color: #fff; }
.post-cover { margin: 0 0 1.75rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--slate-200); }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }

.post-toc { margin: 0 0 1.75rem; padding: 1.1rem 1.25rem; border: 1px solid var(--slate-200); border-left: 4px solid var(--brand-600); border-radius: 12px; background: var(--slate-50); }
.post-toc__title { margin: 0 0 .5rem; font-size: .95rem; font-weight: 800; color: var(--slate-900); }
.post-toc ol { margin: 0; padding-left: 1.2rem; }
.post-toc li { margin: .25rem 0; font-size: .95rem; }
.post-toc a { color: var(--slate-700); text-decoration: none; }
.post-toc a:hover { color: var(--brand-600); text-decoration: underline; }
.post-body h2 { scroll-margin-top: 5.5rem; }

.post-tags { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.post-tags__label { font-size: .85rem; font-weight: 700; color: var(--slate-900); }
.post-tag { padding: .3rem .75rem; border-radius: 8px; background: var(--slate-100); color: var(--slate-700); font-size: .82rem; font-weight: 600; text-decoration: none; }
.post-tag:hover { background: var(--brand-50); color: var(--brand-700); }

.post-author { margin-top: 2rem; display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 1px solid var(--slate-200); border-radius: 16px; background: #fff; }
.post-author__logo { flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--slate-950); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; }
.post-author__name { margin: 0; font-weight: 800; color: var(--slate-900); }
.post-author__bio { margin: .25rem 0 0; font-size: .92rem; line-height: 1.6; color: var(--slate-600); }

.post-share { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; font-weight: 700; color: var(--slate-900); }
.post-share a { padding: .35rem .8rem; border-radius: 8px; border: 1px solid var(--slate-200); color: var(--slate-700); text-decoration: none; font-weight: 600; }
.post-share a:hover { border-color: var(--brand-300); color: var(--brand-700); }

.post-nav { margin-top: 2rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; padding: 1rem 1.15rem; border: 1px solid var(--slate-200); border-radius: 14px; text-decoration: none; background: #fff; transition: all .15s; }
.post-nav a:hover { border-color: var(--brand-300); box-shadow: var(--shadow-md); }
.post-nav small { display: block; margin-bottom: .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600); }
.post-nav span { font-weight: 700; color: var(--slate-900); line-height: 1.4; font-size: .98rem; }
.post-nav__next { text-align: right; }
.post-nav .is-empty { visibility: hidden; }

.post-related { margin-top: 2.75rem; }
.post-related h2 { margin: 0 0 1rem; font-size: 1.3rem; }

/* list markers (the site's reset removes them) */
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-toc ol { list-style: decimal; }
