/**
 * Blackturn — Single Post Styles
 * Post Hero | TOC | Reading Progress | Post Navigation | Continuous Reader
 */

/* ============ POST HERO ============ */
.btnb-post-hero { position: relative; overflow: hidden; width: 100%; }

.btnb-post-hero--overlay {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    border-radius: 12px;
}
.btnb-post-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--btnb-ov-t, rgba(0,0,0,0.2)) 0%, var(--btnb-ov-b, rgba(0,0,0,0.85)) 100%);
    pointer-events: none;
}
.btnb-post-hero--overlay .btnb-post-hero-inner {
    position: relative; z-index: 2;
    padding: 40px 48px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    color: #fff;
}
.btnb-post-hero--overlay .btnb-post-hero-title,
.btnb-post-hero--overlay .btnb-post-hero-meta,
.btnb-post-hero--overlay .btnb-post-hero-meta a,
.btnb-post-hero--overlay .btnb-post-hero-crumbs,
.btnb-post-hero--overlay .btnb-post-hero-crumbs a { color: #fff; }
.btnb-post-hero--overlay .btnb-post-hero-crumbs { color: rgba(255,255,255,0.85); }

.btnb-post-hero--classic { padding: 30px 0; }
.btnb-post-hero--classic .btnb-post-hero-inner { padding: 0 20px; max-width: 900px; margin: 0 auto; }
.btnb-post-hero--classic .btnb-post-hero-img-wrap { margin-top: 24px; }
.btnb-post-hero--classic .btnb-post-hero-img-wrap img {
    width: 100%; height: auto; display: block;
    border-radius: 10px;
}

.btnb-post-hero--minimal { padding: 30px 0 20px; }
.btnb-post-hero--minimal .btnb-post-hero-inner { padding: 0 20px; max-width: 820px; margin: 0 auto; }

.btnb-post-hero-crumbs ol {
    list-style: none; padding: 0; margin: 0 0 14px;
    display: flex; flex-wrap: wrap; gap: 6px;
    font-size: 13px; color: #777;
}
.btnb-post-hero-crumbs li { display: flex; align-items: center; }
.btnb-post-hero-crumbs li + li::before { content: '/'; margin-right: 6px; opacity: 0.6; }
.btnb-post-hero-crumbs a { color: inherit; text-decoration: none; transition: opacity .2s; }
.btnb-post-hero-crumbs a:hover { opacity: 0.7; }

.btnb-post-hero-cat {
    display: inline-block;
    background: #e53935; color: #fff;
    padding: 6px 14px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 16px;
    text-decoration: none;
}
.btnb-post-hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
    color: #111;
}
.btnb-post-hero-meta {
    display: flex; align-items: center;
    flex-wrap: wrap; gap: 10px;
    font-size: 14px; color: #666;
}
.btnb-post-hero-meta a { color: inherit; text-decoration: none; font-weight: 600; }
.btnb-post-hero-meta a:hover { color: #e53935; }
.btnb-post-hero-meta .btnb-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    margin-right: 4px;
}
.btnb-post-hero-meta .btnb-sep {
    display: inline-block; width: 3px; height: 3px;
    border-radius: 50%; background: currentColor; opacity: 0.5;
}
.btnb-post-hero-meta .btnb-rt::before { content: "⏱ "; margin-right: 2px; }

/* ============ TOC ============ */
.btnb-toc {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px 24px;
    font-size: 14px;
}
.btnb-toc-empty { color: #999; font-style: italic; }
.btnb-toc-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.btnb-toc-title { margin: 0; font-size: 15px; font-weight: 700; color: #111; text-transform: uppercase; letter-spacing: 0.8px; }

.btnb-toc-toggle {
    background: transparent; border: 0; cursor: pointer;
    width: 26px; height: 26px;
    position: relative; padding: 0;
}
.btnb-toc-toggle span {
    position: absolute; top: 50%; left: 25%;
    width: 50%; height: 2px; background: #444;
    transition: transform .3s;
}
.btnb-toc-toggle span:nth-child(2) { transform: rotate(90deg); }
.btnb-toc.btnb-toc--collapsed .btnb-toc-toggle span:nth-child(1) { transform: rotate(0); }
.btnb-toc:not(.btnb-toc--collapsed) .btnb-toc-toggle span:nth-child(2) { transform: rotate(0); }

.btnb-toc-list {
    list-style: none; padding: 0; margin: 0;
    counter-reset: toc-counter;
    max-height: 500px;
    overflow: auto;
    transition: max-height .4s ease, opacity .2s;
}
.btnb-toc.btnb-toc--collapsed .btnb-toc-list { max-height: 0; opacity: 0; overflow: hidden; }

.btnb-toc-list li { margin: 0; padding: 0; }
.btnb-toc-list a {
    display: block;
    padding: 6px 0 6px 0;
    color: #444;
    text-decoration: none;
    line-height: 1.5;
    transition: color .2s, padding-left .2s;
    border-left: 2px solid transparent;
    padding-left: 10px;
}
.btnb-toc-list a:hover { color: #e53935; padding-left: 14px; }
.btnb-toc-list a.btnb-toc-active {
    color: #e53935; font-weight: 600;
    border-left-color: #e53935;
}
.btnb-toc-list .btnb-toc-lvl-2 { font-weight: 500; }
.btnb-toc-list .btnb-toc-lvl-3 { padding-left: 16px; font-size: 13px; }
.btnb-toc-list .btnb-toc-lvl-4 { padding-left: 32px; font-size: 12.5px; }

.btnb-toc--numbered .btnb-toc-list { padding-left: 0; }
.btnb-toc--numbered .btnb-toc-list .btnb-toc-lvl-2 { counter-increment: toc-counter; }
.btnb-toc--numbered .btnb-toc-list .btnb-toc-lvl-2 a::before {
    content: counter(toc-counter) ". ";
    color: #e53935; font-weight: 700;
    margin-right: 4px;
}

.btnb-toc--sticky { position: sticky; top: 80px; z-index: 5; }

/* ============ READING PROGRESS ============ */
.btnb-rp {
    position: relative;
    width: 100%; height: 4px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
    z-index: 999;
}
.btnb-rp-pos-top .btnb-rp,
.btnb-rp-pos-below-nav .btnb-rp {
    position: fixed;
    left: 0; right: 0; top: 0;
}
.btnb-rp-fill {
    width: 0%; height: 100%;
    background: #e53935;
    transition: width 0.1s ease-out;
}
.btnb-rp-label {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    font-size: 11px; font-weight: 600;
    color: #fff; mix-blend-mode: difference;
}

/* ============ POST NAVIGATION ============ */
.btnb-pnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}
.btnb-pnav-placeholder {}
.btnb-pnav-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    align-items: center;
    min-height: 100px;
}
.btnb-pnav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border-color: #e53935;
}
.btnb-pnav-item--next {
    text-align: right;
    flex-direction: row-reverse;
}
.btnb-pnav-thumb {
    width: 90px; height: 80px; flex-shrink: 0;
    border-radius: 8px; overflow: hidden; background: #f2f2f2;
}
.btnb-pnav-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btnb-pnav-content { flex: 1; min-width: 0; }
.btnb-pnav-label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: #888; margin-bottom: 4px;
}
.btnb-pnav-cat {
    display: inline-block;
    font-size: 11px; font-weight: 700; color: #e53935;
    letter-spacing: 0.6px; text-transform: uppercase;
    margin-bottom: 4px;
}
.btnb-pnav-title {
    margin: 0; font-size: 15px; font-weight: 700;
    color: #111; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color .2s;
}

/* ============ CONTINUOUS READER ============ */
.btnb-cr { position: relative; width: 100%; }
.btnb-cr-preview {
    padding: 40px 20px; text-align: center;
    color: #888; background: #f8f9fa;
    border: 2px dashed #ddd; border-radius: 10px;
    font-size: 14px;
}
.btnb-cr-sentinel { position: absolute; top: -200px; height: 1px; width: 100%; pointer-events: none; }
.btnb-cr-inserts { width: 100%; }

.btnb-cr-divider {
    display: flex; align-items: center;
    margin: 80px 0 40px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase;
    color: #888;
    gap: 16px;
}
.btnb-cr-divider::before, .btnb-cr-divider::after {
    content: ''; flex: 1; height: 1px;
    background: #e5e5e5;
}

.btnb-cr-article { margin-bottom: 40px; }
.btnb-cr-article-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #f2f2f2;
}
.btnb-cr-article-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.btnb-cr-cat {
    display: inline-block;
    background: #e53935; color: #fff;
    padding: 5px 12px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 12px;
    text-decoration: none;
}
.btnb-cr-title {
    font-size: 32px; font-weight: 800;
    line-height: 1.2; margin: 0 0 12px;
    letter-spacing: -0.3px;
}
.btnb-cr-title a { color: #111; text-decoration: none; transition: color .2s; }
.btnb-cr-title a:hover { color: #e53935; }
.btnb-cr-meta {
    font-size: 13px; color: #777;
    margin-bottom: 24px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.btnb-cr-meta a { color: inherit; text-decoration: none; font-weight: 600; }
.btnb-cr-meta a:hover { color: #e53935; }
.btnb-cr-meta .btnb-dot {
    display: inline-block; width: 3px; height: 3px;
    border-radius: 50%; background: currentColor; opacity: 0.5;
}
.btnb-cr-content {
    font-size: 16px; line-height: 1.75;
    color: #333;
}
.btnb-cr-content p { margin: 0 0 1.2em; }
.btnb-cr-content h2, .btnb-cr-content h3, .btnb-cr-content h4 {
    margin: 1.6em 0 0.6em;
    line-height: 1.3;
    color: #111;
}
.btnb-cr-content h2 { font-size: 1.6em; font-weight: 700; }
.btnb-cr-content h3 { font-size: 1.3em; font-weight: 700; }
.btnb-cr-content img {
    max-width: 100%; height: auto;
    border-radius: 8px; margin: 1em 0;
}
.btnb-cr-content a { color: #e53935; text-decoration: underline; text-underline-offset: 3px; }
.btnb-cr-content blockquote {
    border-left: 4px solid #e53935;
    padding: 10px 20px; margin: 1.5em 0;
    background: #f8f9fa; font-style: italic;
}
.btnb-cr-content ul, .btnb-cr-content ol { margin: 0 0 1.2em 1.5em; }

.btnb-cr-loader {
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}
.btnb-cr-spinner {
    width: 24px; height: 24px;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: #e53935;
    border-radius: 50%;
    animation: btnb-spin 0.8s linear infinite;
}
@keyframes btnb-spin {
    to { transform: rotate(360deg); }
}

.btnb-cr-end {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .btnb-post-hero--overlay { min-height: 400px; }
    .btnb-post-hero--overlay .btnb-post-hero-inner { padding: 28px; }
    .btnb-post-hero-title { font-size: 32px; }
    .btnb-cr-title { font-size: 26px; }
}
@media (max-width: 640px) {
    .btnb-post-hero--overlay { min-height: 320px; border-radius: 8px; }
    .btnb-post-hero--overlay .btnb-post-hero-inner,
    .btnb-post-hero--classic .btnb-post-hero-inner,
    .btnb-post-hero--minimal .btnb-post-hero-inner { padding: 20px; }
    .btnb-post-hero-title { font-size: 24px; }
    .btnb-post-hero-meta { font-size: 13px; gap: 8px; }
    .btnb-post-hero-meta .btnb-avatar { width: 28px; height: 28px; }

    .btnb-toc { padding: 16px 18px; font-size: 13px; }

    .btnb-pnav { grid-template-columns: 1fr; gap: 12px; }
    .btnb-pnav-item { padding: 12px; gap: 12px; }
    .btnb-pnav-item--next { flex-direction: row; text-align: left; }
    .btnb-pnav-thumb { width: 70px; height: 70px; }
    .btnb-pnav-title { font-size: 14px; }

    .btnb-cr-title { font-size: 22px; }
    .btnb-cr-content { font-size: 15px; line-height: 1.7; }
    .btnb-cr-divider { margin: 50px 0 30px; letter-spacing: 2px; }
}

/* ============================================================
 * POST TAGS WIDGET
 * ============================================================ */

.btnb-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}
.btnb-tags-label-top.elementor-widget .btnb-tags { flex-direction: column; align-items: flex-start; }

.btnb-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    flex-shrink: 0;
}
.btnb-tag-icon { display: inline-block; vertical-align: middle; }

.btnb-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.btnb-tag {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1.3;
    transition: all .25s ease;
    white-space: nowrap;
}

/* Filled Pills */
.btnb-tags--pills .btnb-tag {
    background: #f1f1f1;
    color: #333;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 100px;
}
.btnb-tags--pills .btnb-tag:hover {
    background: #e53935;
    color: #fff;
    transform: translateY(-1px);
}

/* Outline Pills */
.btnb-tags--outline .btnb-tag {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 100px;
}
.btnb-tags--outline .btnb-tag:hover {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
    transform: translateY(-1px);
}

/* Inline Hashtag */
.btnb-tags--inline .btnb-tag {
    color: #e53935;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
}
.btnb-tags--inline .btnb-tag:hover {
    color: #111;
}

/* Empty state */
.btnb-tags--empty {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

/* Label position: top */
.btnb-tags-label-top .btnb-tags {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.btnb-tags-label-top .btnb-tags-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

/* Responsive */
@media (max-width: 640px) {
    .btnb-tags-label { font-size: 13px; }
    .btnb-tags--pills .btnb-tag,
    .btnb-tags--outline .btnb-tag { font-size: 12px; padding: 5px 12px; }
}
