
 
.article-container {
    padding: 2.5rem;
    background: var(--wn-primary-dark) !important;
    box-shadow: var(--shadow-box);
    border-radius: var(--radius-lg);
    position: relative;
    margin-top: 1.5rem !important;
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
 
.article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--before-section);
}
 
/* ---------- تصویر شاخص ---------- */
.article-thumbnail {
    margin-bottom: 2.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px var(--shadow-color);
}
 
.article-thumbnail img {
    display: block;
    width: 100%;
    height: clamp(220px, 38vw, 450px);   
    object-fit: cover;
    transition: transform 0.5s ease;
}
 
.article-thumbnail:hover img {
    transform: scale(1.02);
}
 
/* ---------- هدر مقاله ---------- */
.article-header {
    margin-bottom: 2rem;
    text-align: center;
}
 
.article-header h1 {
    font-size: clamp(1.4rem, 1rem + 1.8vw, 2rem);   
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
 
.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;         
    gap: 1.2rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    opacity: 0.75;
}
 
.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
 
.article-meta i {
    color: var(--secondary-color);
}
 
/* ---------- متن مقاله ---------- */
.article-content {
    color: var(--text-primary);
    font-size: 1rem;           
    line-height: 2;             
    padding: 0 1rem;
    overflow-wrap: anywhere;    
}
 
.article-content > *:first-child {
    margin-top: 0;
}
 
.article-content p {
    margin-bottom: 1.2rem;
}
 
.article-content h2 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);   
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-color);
    margin: 2rem 0 0.8rem;
}
 
.article-content h3 {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);    
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-color);
    margin: 1.6rem 0 0.6rem;
}
 
.article-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 1.4rem 0 0.5rem;
}
 
.article-content ul,
.article-content ol {
    padding-inline-start: 1.5rem;
    margin: 0 0 1.2rem;
}
 
.article-content li {
    margin-bottom: 0.4rem;
}
 
.article-content strong {
    font-weight: 700;
}
 
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
 
.article-content a:hover {
    color: var(--secondary-color);
}
 
.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: var(--radius-md);
}
 
.article-content blockquote {
    margin: 1.5rem 0;
    padding: 0.8rem 1.2rem;
    border-inline-start: 4px solid var(--secondary-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}
 
.article-content blockquote p:last-child {
    margin-bottom: 0;
}
 
.article-content table {
    display: block;          
    max-width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-collapse: collapse;
}
 
.article-content th,
.article-content td {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}
 
/* ---------- برچسب‌ها ---------- */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
 
.article-tags h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}
 
.tag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}
 
.tag-list a {
    background: var(--gradient-bg);
    color: var(--text-dark);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}
 
.tag-list a:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}
 
/* ---------- اشتراک‌گذاری ---------- */
.article-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
 
.article-share h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}
 
.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}
 
.share-btn {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}
 
.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
}
 
.share-btn.telegram { background-color: #0088cc; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.whatsapp { background-color: #25d366; }
 
/* ============================================================
   ناوبری مقالات
   ============================================================ */
.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
 
.nav-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    box-shadow: var(--shadow-box);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 200px;
    max-width: 48%;
}
 
.nav-card:hover {
    box-shadow: 0 6px 18px var(--shadow-hover);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}
 
.nav-card.disabled {
    background: #fafafa;
    color: #ccc;
    pointer-events: none;
    opacity: 0.6;
}
 
.nav-card.disabled .arrow {
    background: #f0f0f0;
}
 
.nav-card.disabled .arrow::before {
    border-color: #ddd;
}
 
/* ===== فلش ===== */
.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: #f5f5f5;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: var(--shadow-box);
}
 
.arrow::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border: 2px solid var(--primary-light);
    border-width: 2px 2px 0 0;
    transition: all 0.3s ease;
}
 
/* ===== مقاله قبلی (سمت راست) — فلش سمت راست ===== */
.nav-card.left {
    flex-direction: row;
    text-align: right;
}
 
.nav-card.left .arrow {
    order: 2;
    margin-right: 8px;
}
 
.nav-card.left .arrow::before {
    transform: rotate(-135deg);
}
 
.nav-card.left .nav-text {
    order: 1;
    text-align: right;
}
 
/* ===== مقاله بعدی (سمت چپ) — فلش سمت چپ ===== */
.nav-card.right {
    flex-direction: row;
    text-align: left;
}
 
.nav-card.right .arrow {
    order: 0;
    margin-left: 8px;
}
 
.nav-card.right .arrow::before {
    transform: rotate(45deg);
}
 
.nav-card.right .nav-text {
    order: 1;
    text-align: left;
}
 
/* ===== متن ===== */
.nav-text {
    flex: 1;
    padding: 0 0.5rem;
    overflow: hidden;
}
 
.nav-text small {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}
 
.nav-text p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
 
.nav-card:hover .nav-text small {
    color: var(--primary-light);
}
 
.arrow:hover {
    transform: scale(1.1);
}
 
/* ============================================================
   ریسپانسیو (از بزرگ به کوچک، بدون @media تو در تو)
   ============================================================ */
@media (max-width: 992px) {
    .article-container {
        margin-top: 8rem !important;
        padding: 2rem;
        border-radius: var(--radius-md);
    }
    .article-thumbnail img {
        border-radius: var(--radius-sm);
    }
}
 
@media (max-width: 768px) {
    .article-container {
        margin-top: 6rem !important;
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }
 
    .article-meta {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 1rem;
        font-size: 0.85rem;
    }
 
    .article-meta .meta-label {
        display: none;
    }
 
    .article-navigation {
        flex-direction: column;
        align-items: stretch;
    }
 
    .nav-card {
        max-width: 100%;
        min-width: unset;
        border-radius: var(--radius-sm);
    }
}
 
@media (max-width: 480px) {
    .article-container {
        padding: 1rem;
        margin-top: 1rem !important;
        border-radius: var(--radius-sm);
    }
 
    .article-content {
        padding: 0;
    }
 
    .article-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
 
    .tag-list {
        justify-content: flex-start;
    }
 
    .tag-list a {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
        border-radius: var(--radius-full);
    }
 
    .nav-card {
        padding: 0.8rem;
        border-radius: var(--radius-xs);
    }
 
    .nav-text p {
        font-size: 0.85rem;
    }
 
    .arrow {
        width: 28px;
        height: 28px;
    }
 
    .arrow::before {
        width: 6px;
        height: 6px;
    }
}
.article-content figure.image,
.article-content figure.table {
    margin: 1.5rem auto;
    text-align: center;
}

.article-content figure.image {
    display: table;          
    max-width: 100%;
}

.article-content figure.image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.article-content figure.image > figcaption {
    display: table-caption;
    caption-side: bottom;
    padding: 8px 6px 0;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #666;
    text-align: right;
    word-break: break-word;
}
 
