/* Blog post (magazine layout) — all text/images still come from the DB */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 1100; background: linear-gradient(90deg, var(--bf-orange-500), #ffd27a); transform: scaleX(0); transform-origin: left; }

.post-hero { position: relative; color: #fff; padding: 2.6rem 0 3.2rem; overflow: hidden; isolation: isolate; background: var(--bf-green-900); }
.post-hero::before { content: ''; position: absolute; inset: -30px; background: var(--bg) center / cover; filter: blur(34px) saturate(1.2); opacity: .45; z-index: -2; }
.post-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(23, 63, 34, .95), rgba(31, 91, 46, .78)); z-index: -1; }
.post-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3.3rem); margin: .9rem 0 1.4rem; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.post-back { color: #ffd27a; font-size: .85rem; font-weight: 500; display: inline-block; margin-bottom: 1.1rem; }
.post-back:hover { color: #fff; }
.post-tag { display: inline-block; background: var(--bf-orange-500); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .9rem; border-radius: 999px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .9rem; }
.post-meta strong { display: block; line-height: 1.2; }
.post-meta small { opacity: .8; }
.post-meta .avatar { background: #fff; color: var(--bf-green-900); width: 46px; height: 46px; }
.read-chip { margin-left: .4rem; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: .3rem .9rem; border-radius: 999px; font-size: .82rem; }
.post-photo { aspect-ratio: 5 / 4; border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); border: 6px solid rgba(255, 255, 255, .92); transform: rotate(1.5deg); transition: transform .5s; }
.post-photo:hover { transform: rotate(0); }

/* Body */
.post-body { font-size: 1.08rem; line-height: 1.9; color: #3a4433; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin-bottom: 1.25rem; }
.post-body .lead-p { font-size: 1.3rem; line-height: 1.7; color: var(--bf-green-900); font-weight: 500; }
.post-body .lead-p::first-letter { float: left; font-family: var(--bf-font-head); font-weight: 700; font-size: 4.2rem; line-height: .85; padding: .35rem .6rem 0 0; color: var(--bf-orange-500); }
.post-body h3 { display: flex; align-items: center; gap: .8rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.8rem 0 1rem; padding-top: 1.6rem; border-top: 1px solid var(--bf-line); scroll-margin-top: 100px; }
.post-body h3:first-child, .post-body h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.post-body h3 .hn { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--bf-green-100); color: var(--bf-green-700); font-family: var(--bf-font-body); font-size: .95rem; font-weight: 600; display: grid; place-items: center; }
.post-body b, .post-body strong { color: var(--bf-green-900); background: linear-gradient(transparent 62%, rgba(240, 138, 28, .22) 0); padding: 0 .1em; }
.post-body ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: .65rem; }
.post-body ul li { position: relative; background: #fff; border: 1px solid var(--bf-line); border-radius: 14px; padding: .8rem 1rem .8rem 3rem; margin: 0; }
.post-body ul li::before { content: '\f06c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 1rem; top: .85rem; color: var(--bf-green-500); }
.post-body ol { padding-left: 1.3rem; } .post-body ol li { margin-bottom: .5rem; }
.post-body a { color: var(--bf-orange-600); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote { margin: 1.8rem 0; padding: 1.2rem 1.5rem; border-left: 5px solid var(--bf-orange-500); background: var(--bf-orange-100); border-radius: 0 16px 16px 0; font-family: var(--bf-font-head); font-size: 1.25rem; }
.post-body img { border-radius: 18px; margin: 1rem 0; box-shadow: var(--bf-shadow); }
.post-body hr { border: 0; border-top: 1px dashed var(--bf-line); margin: 2rem 0; }

/* Sidebar */
.post-side { position: sticky; top: 100px; display: grid; gap: 1.2rem; }
.toc, .share { background: #fff; border: 1px solid var(--bf-line); border-radius: 18px; padding: 1.2rem; }
.toc-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--bf-muted); font-weight: 600; margin-bottom: .8rem; }
.toc a { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem .5rem; margin: 0 -.5rem; border-radius: 10px; color: var(--bf-ink); font-size: .87rem; line-height: 1.35; transition: all .2s; }
.toc a span { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--bf-green-100); color: var(--bf-green-700); font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.toc a:hover, .toc a.on { background: var(--bf-green-100); color: var(--bf-green-900); }
.toc a.on span { background: var(--bf-orange-500); color: #fff; }
.share a, .share button { width: 42px; height: 42px; border-radius: 50%; background: var(--bf-green-100); color: var(--bf-green-700); border: 0; display: grid; place-items: center; transition: all .25s; }
.share a:hover, .share button:hover { background: var(--bf-green-700); color: #fff; transform: translateY(-3px); }

/* Author + CTA */
.post-author { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--bf-line); border-radius: 20px; padding: 1.2rem 1.4rem; margin-top: 2.5rem; }
.avatar.big { width: 56px; height: 56px; font-size: 1.4rem; }
.post-cta { margin-top: 2rem; background: linear-gradient(120deg, var(--bf-green-900), var(--bf-green-700)); color: #fff; border-radius: 24px; padding: 1.8rem; display: grid; gap: 1.2rem; position: relative; overflow: hidden; }
.post-cta::after { content: ''; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 138, 28, .5), transparent 70%); }
.post-cta h2, .post-cta h3 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; }
.post-cta .pc { position: relative; z-index: 2; display: flex; align-items: center; gap: .9rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: .7rem 1rem .7rem .7rem; color: #fff; flex: 1 1 240px; transition: all .25s; }
.post-cta .pc:hover { background: rgba(255, 255, 255, .22); transform: translateY(-3px); color: #fff; }
.post-cta .pc img { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.post-cta .pc span { flex: 1; }
.post-cta .pc strong, .post-cta .pc small { display: block; }
.post-cta .pc small { opacity: .8; }

@media (max-width: 991px) { .post-photo { transform: none; max-width: 420px; } .post-hero { padding: 1.8rem 0 2.4rem; } }
@media (max-width: 575px) { .post-body { font-size: 1rem; } .post-body .lead-p { font-size: 1.15rem; } .post-body .lead-p::first-letter { font-size: 3.4rem; } .post-body ul li { padding-left: 2.6rem; } .read-chip { margin-left: 0; } }
.post-body h3 { border-left: 0; padding-left: 0; }
