/* =========================================================
   Public blog — listing and article pages
   ========================================================= */
.blog-hero { padding-bottom: 50px; }
.blog-hero .page-head h1 { margin-top: 10px; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.blog-cats__chip { padding: 8px 16px; border-radius: 50px; font-size: .88rem; font-weight: 600; color: #dfe5ff; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); transition: background .2s, border-color .2s; }
.blog-cats__chip small { opacity: .7; margin-left: 4px; }
.blog-cats__chip:hover { border-color: var(--border-strong); }
.blog-cats__chip.is-on { background: var(--grad-orange); border-color: transparent; color: #fff; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid var(--border); transition: transform .3s, border-color .3s, box-shadow .3s; }
.blog-card:hover { transform: translateY(-6px); border-color: rgba(255, 138, 0, .4); box-shadow: var(--shadow-lg); }
.blog-card__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: #05081c; }
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.blog-card:hover .blog-card__img img { transform: scale(1.05); }
.blog-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.blog-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.blog-card__cat { padding: 3px 10px; border-radius: 50px; font-weight: 700; color: var(--orange); background: rgba(255, 138, 0, .12); }
.blog-card h2 { font-size: 1.15rem; line-height: 1.35; margin-bottom: 10px; }
.blog-card h2 a:hover { color: var(--orange); }
.blog-card p { font-size: .93rem; flex: 1; }
.blog-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 600; font-size: .9rem; color: var(--sky); }
.blog-card__more .icon { width: 16px; height: 16px; }
.blog-card--featured { grid-column: span 3; flex-direction: row; }
.blog-card--featured .blog-card__img { flex: 0 0 55%; aspect-ratio: auto; min-height: 320px; }
.blog-card--featured .blog-card__body { justify-content: center; padding: 34px; }
.blog-card--featured h2 { font-size: 1.7rem; }
.blog-empty { text-align: center; padding: 60px 20px; border-radius: 20px; border: 1px dashed var(--border-strong); }
.blog-empty h2 { margin-bottom: 8px; }
.blog-empty p { margin-bottom: 22px; }
.blog-pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.blog-pager a { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 12px; font-weight: 600; color: #dfe5ff; border: 1px solid var(--border); }
.blog-pager a.is-on { background: var(--grad-orange); color: #fff; border-color: transparent; }

/* Article */
.blog-preview { position: relative; z-index: 5; margin-top: var(--header-h); padding: 10px 16px; text-align: center; font-weight: 600; color: #1c1204; background: #fbbf24; }
.blog-preview a { text-decoration: underline; }
.blog-preview + .post .post-hero { padding-top: 40px; }
.post-hero { padding-bottom: 40px; }
.post-hero__inner { max-width: 900px; }
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; line-height: 1.18; margin: 14px 0 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; color: #c7d2fe; }
.post-meta span { display: inline-flex; align-items: center; gap: 7px; }
.post-meta .icon { width: 16px; height: 16px; color: var(--orange); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 50px; padding-bottom: 80px; align-items: start; }
.post-cover { margin: 0 0 34px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); }
.post-cover img { width: 100%; height: auto; }
.post-content { font-size: 1.06rem; line-height: 1.85; color: #d6def2; }
.post-content > * + * { margin-top: 1.1em; }
.post-content h2 { font-size: 1.7rem; margin-top: 1.8em; }
.post-content h3 { font-size: 1.3rem; margin-top: 1.5em; }
.post-content a { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li + li { margin-top: .4em; }
.post-content blockquote { padding: 16px 22px; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0; background: rgba(255, 138, 0, .06); color: #fff; }
.post-content img { border-radius: 14px; }
.post-content code { padding: 2px 6px; border-radius: 6px; font-size: .9em; background: rgba(255, 255, 255, .08); }
.post-content pre { padding: 18px; border-radius: 12px; overflow-x: auto; background: #050820; border: 1px solid var(--border); }
.post-content pre code { padding: 0; background: none; }
.post-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.post-content th, .post-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.post-content th { color: #fff; background: rgba(255, 255, 255, .05); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.post-tags li { padding: 6px 12px; border-radius: 50px; font-size: .85rem; color: #c7d2fe; background: rgba(255, 255, 255, .05); }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.post-share strong { color: #fff; }
.post-share a { padding: 7px 14px; border-radius: 10px; font-size: .88rem; font-weight: 600; border: 1px solid var(--border-strong); }
.post-share a:hover { border-color: var(--orange); color: var(--orange); }
.post-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.post-side__box { padding: 24px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.post-side__box h3 { font-size: 1.05rem; margin-bottom: 10px; }
.post-side__box p { font-size: .9rem; margin-bottom: 16px; }
.post-related { display: grid; gap: 10px; }
.post-related a { font-size: .92rem; color: #dfe5ff; }
.post-related a:hover { color: var(--orange); }

@media (max-width: 992px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card--featured { grid-column: span 2; flex-direction: column; }
  .blog-card--featured .blog-card__img { flex: none; min-height: 0; aspect-ratio: 1200 / 630; }
  .post-layout { grid-template-columns: 1fr; }
  .post-side { position: static; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card--featured { grid-column: auto; }
  .blog-card--featured .blog-card__body { padding: 22px; }
  .blog-card--featured h2 { font-size: 1.3rem; }
}

/* ---- Table of contents ---- */
.post-toc { margin: 0 0 30px; padding: 18px 22px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.post-toc summary { cursor: pointer; font-weight: 700; color: #fff; list-style: none; display: flex; justify-content: space-between; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary::after { content: '▾'; color: #ff8a00; transition: transform .2s; }
.post-toc details:not([open]) summary::after { transform: rotate(-90deg); }
.post-toc ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: toc; }
.post-toc li { font-size: .93rem; }
.post-toc .post-toc__h2 { counter-increment: toc; }
.post-toc .post-toc__h2 a::before { content: counter(toc) '. '; color: #ff8a00; font-weight: 700; }
.post-toc .post-toc__h3 { padding-left: 22px; font-size: .88rem; }
.post-toc a { color: #c9d1f5; }
.post-toc a:hover { color: #ff8a00; }
.post-content h2[id], .post-content h3[id], .post-faq { scroll-margin-top: 100px; }
.post-content img { max-width: 100%; height: auto; border-radius: 14px; }

/* ---- FAQ ---- */
.post-faq { margin-top: 44px; }
.post-faq h2 { font-size: 1.6rem; margin-bottom: 16px; }
.post-faq__item { margin-bottom: 10px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.post-faq__item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.post-faq__item summary::-webkit-details-marker { display: none; }
.post-faq__item summary::after { content: '+'; color: #ff8a00; font-size: 1.3rem; line-height: 1; }
.post-faq__item[open] summary::after { content: '−'; }
.post-faq__item p { padding: 0 20px 18px; line-height: 1.75; }
a.blog-card__cat:hover { color: #fff; }
