/* === READING PROGRESS BAR === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1001;
    width: 0%;
    transition: width 0.1s linear;
}

/* === POST HERO === */
.post-hero {
    padding: 100px 24px 0;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(91,94,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.post-hero-inner {
    max-width: 780px;
    margin: 0 auto;
    padding-bottom: 24px;
    position: relative;
    z-index: 1;
}

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-light); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text-mid); }

.post-title {
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--text);
}

.post-subtitle {
    font-size: 18px;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 32px;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.author-info { display: flex; align-items: center; gap: 12px; }

.author-name { font-weight: 700; font-size: 14px; color: var(--text); }
.author-role { font-size: 12px; color: var(--text-light); }

.post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    margin-right: auto;
}

.post-stats span { display: flex; align-items: center; gap: 4px; }

/* === COVER IMAGE === */
.post-cover {
    max-width: 860px;
    margin: 0 auto;
    height: 380px;
    border-radius: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(32px);
}

.post-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.12);
}

.post-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.post-cover span { position: relative; z-index: 1; }

@media (max-width: 768px) {
    .post-cover { height: 220px; font-size: 64px; border-radius: 16px; }
}

/* === POST LAYOUT === */
.post-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px 60px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: start;
}

@media (max-width: 900px) {
    .post-layout { grid-template-columns: 1fr; gap: 40px; }
    .post-sidebar { order: 2; }
}

/* === ARTICLE CONTENT === */
.post-content {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-mid);
}

.post-content h2 {
    font-size: clamp(20px, 3vw, 28px);
    color: var(--text);
    margin: 48px 0 16px;
    line-height: 1.4;
    scroll-margin-top: 80px;
}

.post-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 12px;
}

.post-content p { margin-bottom: 20px; }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.post-content a:hover { color: var(--accent); }

.post-content ul, .post-content ol {
    margin: 0 0 20px 0;
    padding-right: 24px;
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* === CALLOUT BOX === */
.callout {
    background: var(--primary-soft);
    border-right: 4px solid var(--primary);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
    color: var(--text-mid);
    font-size: 15px;
    line-height: 1.8;
}

.callout strong { color: var(--primary); }

/* === STEP BOX === */
.step-block {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 16px 0;
    transition: border-color 0.2s;
}

.step-block:hover {
    border-color: rgba(91,94,255,0.2);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-text h4 { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.step-text p { font-size: 14px; color: var(--text-mid); margin: 0; }

/* === IMAGE PLACEHOLDER === */
.post-img {
    width: 100%;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--bg-mid) 0%, var(--bg-soft) 100%);
    border: 1px solid var(--border);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 28px 0;
    overflow: hidden;
}

.post-img img { width: 100%; height: 100%; object-fit: cover; }

/* === DIVIDER === */
.post-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* === TAGS === */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }

.tag {
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* === SHARE === */
.share-box {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin-top: 40px;
}

.share-box p { font-size: 14px; color: var(--text-mid); margin-bottom: 16px; font-weight: 600; }

.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    cursor: pointer;
    font-family: 'IranYekanX', sans-serif;
    transition: all 0.2s;
}

.share-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }

.share-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
}

/* === COPY FEEDBACK === */
.copied-msg {
    display: none;
    margin-top: 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

/* === SIDEBAR === */
.post-sidebar { position: sticky; top: 90px; }

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.sidebar-card:hover {
    border-color: rgba(91,94,255,0.15);
}

.sidebar-card h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* === TOC === */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 8px; }

.toc-list a {
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    line-height: 1.5;
    padding: 4px 8px;
    border-radius: 6px;
}

.toc-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: all 0.2s;
}

.toc-list a:hover { color: var(--primary); background: var(--primary-soft); }
.toc-list a:hover::before { background: var(--primary); }

.toc-list a.active {
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 600;
}

.toc-list a.active::before {
    background: var(--primary);
    width: 8px;
    height: 8px;
}

/* === RELATED POSTS === */
.related-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.related-post:last-child { border-bottom: none; padding-bottom: 0; }
.related-post:hover .related-title { color: var(--primary); }

.related-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s;
}

.related-post:hover .related-thumb { transform: scale(1.05); }

.related-thumb.g1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.related-thumb.g2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.related-thumb.g3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.related-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.5; margin-bottom: 4px; transition: color 0.2s; }
.related-date { font-size: 11px; color: var(--text-light); }

/* === SIDEBAR CTA === */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.sidebar-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.sidebar-cta .cta-icon { font-size: 40px; margin-bottom: 12px; position: relative; z-index: 1; }
.sidebar-cta h4 { font-size: 16px; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1; }
.sidebar-cta p { font-size: 13px; opacity: 0.85; margin-bottom: 16px; line-height: 1.6; position: relative; z-index: 1; }

.sidebar-cta a {
    display: block;
    background: white;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}

.sidebar-cta a:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* === POST FOOTER TUNING === */
footer .footer-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

footer .footer-brand-name {
    font-size: 18px;
}

/* === MOBILE === */
@media (max-width: 768px) {
    .post-hero {
        padding: 90px 16px 0;
    }

    .post-subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .post-layout {
        padding: 56px 12px 36px;
        gap: 28px;
    }

    .post-content {
        font-size: 16px;
        line-height: 1.85;
    }

    .post-content h2 {
        margin: 36px 0 12px;
    }

    .callout,
    .share-box,
    .sidebar-card,
    .sidebar-cta {
        padding: 20px;
    }

    .step-block {
        gap: 14px;
        padding: 16px;
    }

    .post-sidebar {
        position: static;
    }

    .share-btns {
        gap: 8px;
    }
}
