/* ===================== SINGLE POST — BOT4ORGE ===================== */

/* POST HERO */
.post-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-bottom: 60px;
}

.post-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    background-color: #050d1a;
}
.post-hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5,13,26,0.5) 0%,
        rgba(5,13,26,0.75) 50%,
        rgba(5,13,26,0.95) 100%
    );
}
.post-hero-no-img {
    background: linear-gradient(145deg, #050d1a 0%, #0d2847 50%, #1558a8 100%);
}

.post-hero-grid {
    position: absolute; inset: 0; z-index: 1;
    background-image:
        linear-gradient(rgba(21,88,168,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21,88,168,0.10) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}

.post-hero-inner {
    position: relative; z-index: 2;
    max-width: 860px;
    padding-top: 140px;
}

.post-hero-meta {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 20px;
}

.post-hero-cat {
    background: rgba(213,130,10,0.2);
    border: 1px solid rgba(213,130,10,0.4);
    color: #f0a832;
    padding: 5px 14px; border-radius: 100px;
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; transition: all 0.2s;
}
.post-hero-cat:hover { background: rgba(213,130,10,0.35); color: #f0a832; }

.post-hero-date, .post-hero-read {
    font-size: 0.78rem; color: rgba(255,255,255,0.55);
}
.post-hero-dot { color: rgba(255,255,255,0.3); }

.post-hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900; line-height: 1.1;
    color: white; margin-bottom: 20px;
}

.post-hero-excerpt {
    font-size: 1rem; color: rgba(255,255,255,0.7);
    line-height: 1.75; max-width: 620px; margin-bottom: 28px;
}

.post-hero-author {
    display: flex; align-items: center; gap: 12px;
}
.post-hero-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.post-hero-avatar-ph {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #1558a8, #2d78c8);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: white;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.post-hero-author-name {
    font-size: 0.88rem; font-weight: 700; color: white;
    display: block;
}
.post-hero-author-role {
    font-size: 0.75rem; color: rgba(255,255,255,0.55);
    display: block;
}

/* POST BODY LAYOUT */
.post-body {
    background: #f8fafd;
    padding: 60px 0 100px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* ARTICLE CONTENT */
.post-article {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.post-content {
    padding: 48px 52px;
}

/* Typography */
.post-content h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem; font-weight: 800;
    color: var(--text); line-height: 1.2;
    margin: 40px 0 16px;
    padding-top: 8px;
}
.post-content h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem; font-weight: 800;
    color: var(--text); line-height: 1.3;
    margin: 32px 0 12px;
}
.post-content h4 {
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin: 24px 0 10px;
}
.post-content p {
    font-size: 1rem; color: #374151;
    line-height: 1.85; margin-bottom: 20px;
}
.post-content a {
    color: var(--primary); font-weight: 600;
    text-decoration: underline; text-underline-offset: 3px;
    transition: color 0.2s;
}
.post-content a:hover { color: var(--primary-dark); }

.post-content ul, .post-content ol {
    margin: 0 0 20px 24px;
}
.post-content li {
    font-size: 1rem; color: #374151;
    line-height: 1.8; margin-bottom: 8px;
}

/* Blockquote */
.post-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    margin: 28px 0;
    padding: 20px 28px;
    border-radius: 0 12px 12px 0;
}
.post-content blockquote p {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem; font-style: italic;
    color: var(--primary-dark); margin: 0;
    line-height: 1.7;
}

/* Code */
.post-content code {
    background: #f1f5f9;
    color: var(--primary-dark);
    padding: 2px 7px; border-radius: 5px;
    font-size: 0.88em; font-family: monospace;
}
.post-content pre {
    background: #0f172a;
    border-radius: 12px; padding: 24px;
    overflow-x: auto; margin: 24px 0;
}
.post-content pre code {
    background: none; color: #e2e8f0;
    padding: 0; font-size: 0.88rem;
    line-height: 1.7;
}

/* Images inside content */
.post-content img {
    width: 100%; border-radius: 12px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

/* Callout box */
.post-callout {
    background: linear-gradient(135deg, rgba(21,88,168,0.06), rgba(21,88,168,0.12));
    border: 1px solid rgba(21,88,168,0.2);
    border-radius: 14px; padding: 24px 28px;
    margin: 28px 0;
}
.post-callout-icon { font-size: 1.5rem; margin-bottom: 10px; }
.post-callout p { margin: 0; color: var(--primary-dark); font-weight: 500; }

/* POST TAGS + SHARE */
.post-footer {
    padding: 28px 52px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center;
    justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
}

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag {
    padding: 5px 14px; border-radius: 100px;
    background: var(--bg-soft); color: var(--text-dim);
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid var(--border);
    text-decoration: none; transition: all 0.2s;
}
.post-tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }

.post-share { display: flex; align-items: center; gap: 10px; }
.post-share-label { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.share-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; text-decoration: none;
    border: 1.5px solid var(--border);
    color: var(--text-dim); transition: all 0.2s;
}
.share-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* AUTHOR BIO */
.post-author-bio {
    margin-top: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px; overflow: hidden;
    border-top: 4px solid var(--primary);
}
.author-bio-inner {
    padding: 36px 40px;
    display: flex; gap: 24px; align-items: flex-start;
}
.author-bio-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 3px solid var(--primary-light);
}
.author-bio-avatar-ph {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #050d1a, #1558a8);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', serif; font-size: 1.5rem;
    font-weight: 800; color: white; flex-shrink: 0;
    border: 3px solid var(--primary-light);
}
.author-bio-label {
    font-size: 0.68rem; font-weight: 700;
    color: var(--primary); text-transform: uppercase;
    letter-spacing: 0.12em; margin-bottom: 4px;
}
.author-bio-name {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem; font-weight: 800;
    color: var(--text); margin-bottom: 8px;
}
.author-bio-text {
    font-size: 0.88rem; color: var(--text-dim);
    line-height: 1.75;
}

/* RELATED POSTS */
.post-related {
    margin-top: 24px;
}
.post-related-title {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem; font-weight: 800;
    color: var(--text); margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary-light);
}
.related-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.related-card {
    background: white; border-radius: 14px;
    border: 1px solid var(--border); overflow: hidden;
    transition: all 0.25s; text-decoration: none;
    display: flex; flex-direction: column;
}
.related-card:hover { box-shadow: 0 8px 32px rgba(5,13,26,0.1); transform: translateY(-3px); }
.related-img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.related-img-ph {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(145deg, #050d1a, #1558a8);
}
.related-body { padding: 16px; flex: 1; }
.related-cat {
    font-size: 0.65rem; font-weight: 700;
    color: var(--primary); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 6px;
    display: block;
}
.related-title {
    font-family: 'Fraunces', serif;
    font-size: 0.92rem; font-weight: 800;
    color: var(--text); line-height: 1.35;
}

/* SIDEBAR */
.post-sidebar {
    display: flex; flex-direction: column;
    gap: 24px; position: sticky; top: 100px;
}

/* Table of Contents */
.toc-widget {
    background: white; border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
    border-top: 4px solid var(--primary);
}
.toc-header {
    padding: 20px 24px 0;
    font-family: 'Fraunces', serif;
    font-size: 0.9rem; font-weight: 800;
    color: var(--text);
}
.toc-list {
    list-style: none; padding: 16px 24px 20px;
    display: flex; flex-direction: column; gap: 2px;
}
.toc-list li a {
    display: block; padding: 7px 10px;
    border-radius: 7px; text-decoration: none;
    font-size: 0.82rem; color: var(--text-dim);
    transition: all 0.2s; line-height: 1.4;
    border-left: 2px solid transparent;
}
.toc-list li a:hover,
.toc-list li a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 14px;
}
.toc-list .toc-h3 a { padding-left: 20px; font-size: 0.78rem; }
.toc-list .toc-h3 a:hover,
.toc-list .toc-h3 a.active { padding-left: 26px; }

/* Sidebar CTA */
.post-sidebar-cta {
    position: relative; border-radius: 16px;
    overflow: hidden; border: none;
}
.pscta-bg {
    position: absolute; inset: 0;
    background: linear-gradient(145deg, #050d1a 0%, #0d2847 50%, #1558a8 100%);
}
.pscta-content {
    position: relative; z-index: 1;
    padding: 28px 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.pscta-tag {
    display: inline-block;
    background: rgba(240,168,50,0.2);
    border: 1px solid rgba(240,168,50,0.4);
    color: #f0a832; font-size: 0.65rem; font-weight: 700;
    padding: 4px 10px; border-radius: 100px;
    letter-spacing: 0.1em; text-transform: uppercase;
    width: fit-content;
}
.pscta-title {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem; font-weight: 800;
    color: white; line-height: 1.3;
}
.pscta-sub {
    font-size: 0.82rem; color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

/* Sidebar recent posts */
.post-sidebar .sidebar-widget { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.post-sidebar .widget-title { font-family: 'Fraunces', serif; font-size: 0.9rem; font-weight: 800; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.post-sidebar .sidebar-recent { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.post-sidebar .sidebar-recent li a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; transition: opacity 0.2s; }
.post-sidebar .sidebar-recent li a:hover { opacity: 0.7; }
.post-sidebar .recent-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.post-sidebar .recent-thumb-ph { width: 52px; height: 52px; border-radius: 8px; background: linear-gradient(135deg, #050d1a, #1558a8); flex-shrink: 0; }
.post-sidebar .recent-title { font-size: 0.8rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.post-sidebar .recent-date { font-size: 0.7rem; color: var(--text-dim); margin-top: 3px; display: block; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { position: static; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .post-hero { min-height: 60vh; padding-bottom: 40px; }
    .post-hero-inner { padding-top: 110px; }
    .post-hero-title { font-size: 1.9rem; }
    .post-content { padding: 28px 24px; }
    .post-footer { padding: 20px 24px; }
    .author-bio-inner { flex-direction: column; padding: 24px; }
    .related-grid { grid-template-columns: 1fr; }
    .post-content h2 { font-size: 1.4rem; }
    .post-content h3 { font-size: 1.1rem; }
}
@media (max-width: 480px) {
    .post-hero-title { font-size: 1.6rem; }
    .post-body { padding: 32px 0 60px; }
}

/* ── NAVIGATION OVERRIDE FOR SINGLE POSTS ── */
body.single-post #site-nav {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

body.single-post #site-nav.scrolled {
    background: rgba(255,255,255,0.98) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 2px 16px rgba(21,88,168,0.10) !important;
}

body.single-post .logo {
    color: white !important;
}
body.single-post #site-nav.scrolled .logo {
    color: var(--primary) !important;
}

body.single-post .nav-links a {
    color: rgba(255,255,255,0.85) !important;
}
body.single-post #site-nav.scrolled .nav-links a {
    color: var(--text-dim) !important;
}

body.single-post .nav-btn {
    background: white !important;
    color: var(--primary) !important;
}
body.single-post #site-nav.scrolled .nav-btn {
    background: var(--primary) !important;
    color: white !important;
}

body.single-post #nav-toggle span {
    background: white !important;
}
body.single-post #site-nav.scrolled #nav-toggle span {
    background: var(--text) !important;
}

@media (max-width: 768px) {
    body.single-post .nav-links a {
        color: var(--text-dim) !important;
    }
    body.single-post .nav-links a:hover {
        color: var(--primary) !important;
    }
}