.mobile-container{
    position: fixed;
    top: 0;
}



:root {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #e8f5e9;
    --accent-gold: #ad974f;
    --text-dark: #2b2b2b;
    --text-gray: #5f6368;
    --border-light: #e6e6e6;
    --bg-soft: #fafafa;
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-sm: 8px;
}

.article-container {
    max-width: 860px;
    margin: 100px auto 60px;
    padding: 0 20px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--text-dark);
    line-height: 1.9;
}


/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb span {
    color: #bbb;
}

/* Header */
article > header h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--text-dark);
    margin-bottom: 16px;
    position: relative;
    padding-right: 16px;
    border-right: 4px solid var(--primary-color);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: var(--text-gray);
    margin-bottom: 28px;
}

.post-meta span,
.post-meta time {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-soft);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

/* Featured Image */
article > img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 36px;
    display: block;
}

/* Table of Contents */
.toc {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
}

.toc h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
    counter-reset: toc-counter;
}

.toc li {
    counter-increment: toc-counter;
}

.toc li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 4px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toc li a::before {
    content: counter(toc-counter);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.toc li a:hover {
    color: var(--primary-color);
    background: var(--bg-soft);
}

.toc li a:hover::before {
    background: var(--primary-color);
    color: #fff;
}

/* Content Section */
.content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-top: 48px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    position: relative;
}

.content h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}

.content h3 {
    font-size: 18.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 32px;
    margin-bottom: 14px;
    padding-right: 12px;
    border-right: 3px solid var(--accent-gold);
}

.content p {
    font-size: 16px;
    color: #3d3d3d;
    margin-bottom: 18px;
    text-align: justify;
}

.content ul,
.content ol {
    margin: 0 0 22px;
    padding-right: 24px;
}

.references_items{
    direction: ltr;
    text-align: left;
}

.content ul li,
.content ol li {
    font-size: 15.5px;
    color: #3d3d3d;
    margin-bottom: 10px;
    line-height: 1.85;
}

.content ul li::marker {
    color: var(--primary-color);
}

.content a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
    transition: all 0.2s ease;
}

.content a:hover {
    color: var(--primary-dark);
    border-bottom-style: solid;
}

/* Product links inside program section */
#program a {
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 6px;
    border-bottom: none;
}

#program a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Stage blocks */
#stage1, #stage2, #stage3 {
    scroll-margin-top: 100px;
}

/* References */
#references {
    scroll-margin-top: 100px;
}

.content ol#references,
.content > ol {
    counter-reset: ref-counter;
}

#references + ol,
ol:has(li) {
    font-size: 13.5px;
}

.content section#references ~ ol,
section .content ol {
    background: var(--bg-soft);
    padding: 20px 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.content ol li {
    font-size: 13.5px;
    color: var(--text-gray);
    line-height: 1.7;
}

/* Article Actions (Download & Share) */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    row-gap: 16px; 
    margin: 48px 0;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.download-buttons,
.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 260px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-soft);
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.share-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: all 0.25s ease;
}

.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-bale { background: #26e2e2; }

.share-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: var(--shadow-hover);
}

/* FAQ Section */
.faq-section {
    margin: 48px 0;
    padding: 32px;
    background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-section h2::before {
    content: "❓";
}

.faq-section h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 8px;
    padding: 14px 18px;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    cursor: default;
    position: relative;
    padding-right: 36px;
}

.faq-section h3::before {
    content: "Q";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.faq-section p {
    font-size: 14.5px;
    color: var(--text-gray);
    padding: 0 18px 16px;
    margin-bottom: 8px;
}

/* Related Articles */
.related-articles {
    margin: 48px 0;
}

.related-articles h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 18px;
}

.related-articles ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-articles li a {
    display: block;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.25s ease;
    position: relative;
    padding-right: 36px;
}

.related-articles li a::before {
    content: "→";
    position: absolute;
    right: 14px;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.25s ease;
}

.related-articles li a:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
    color: var(--primary-color);
}

.related-articles li a:hover::before {
    transform: translateX(-4px);
}

/* Article Footer */
.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.article-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 24px;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    transition: all 0.25s ease;
}

.article-footer a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .article-container {
        margin-top: 80px;
        padding: 0 16px;
    }

    article > header h1 {
        font-size: 22px;
    }

    .toc ul {
        grid-template-columns: 1fr;
    }

    .content h2 {
        font-size: 19px;
    }

    .content h3 {
        font-size: 16.5px;
    }

    .article-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .download-buttons,
    .share-buttons {
        justify-content: center;
    }

    .related-articles ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-meta {
        font-size: 12px;
        gap: 8px;
    }

    .post-meta span,
    .post-meta time {
        padding: 5px 10px;
    }
}
