/**
 * Frontend Single Stylesheet for Shantia Article & SEO Manager
 * * استایل‌های اختصاصی سمت کاربر (Frontend) برای صفحه مقالات (Single Post).
 * شامل ساختار محتوا، فهرست مطالب، باکس نویسنده، مقالات مرتبط و فوتر هاردکد شده.
 */
:root {
    --primary-green: #059669;
    --primary-green-dark: #047857;
    --primary-green-light: #34d399;
    --sacred-red: #991b1b;
    --sacred-red-dark: #7f1d1d;
    --sacred-red-light: #fca5a5;
    --text-dark: #1f2937;
    --text-body: #374151;
    --text-muted: #6b7280;
    --text-light: #f3f4f6;
    --bg-main: #f9fafb;
    --bg-paper: #ffffff;
    --bg-footer: #1f2937;
    --bg-footer-bottom: #111827;
    --border-color: #e5e7eb;
    
    --font-body: 'Vazirmatn', Tahoma, sans-serif;
    --font-heading: 'Lalezar', cursive;
    
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}
body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.8;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* مخفی‌سازی فقط فوتر پیش‌فرض قالب (هدر و منو را آزاد گذاشتیم تا منوی همبرگری کار کند) */
footer#colophon {
    display: none !important;
}

/* ==========================================================================
   ۱. نوار پیشرفت مطالعه
   ========================================================================== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-green), var(--primary-green-light));
    width: 0%;
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ==========================================================================
   ۲. هدر مقاله (Hero Section)
   ========================================================================== */
.article-hero {
    position: relative;
    padding: 100px 20px 140px;
    background-size: cover;
    background-position: center 20%;
    color: white;
    text-align: center;
    margin-bottom: -60px;
}
.article-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.article-category {
    display: inline-block;
    background-color: var(--primary-green);
    color: white;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 25px;
}
.article-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.article-hero p.subtitle {
    font-size: 1.25rem;
    color: #d1d5db;
    margin-bottom: 40px;
    font-weight: 300;
}
.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    color: #9ca3af;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}
.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-meta i {
    color: var(--primary-green-light);
}

/* ==========================================================================
   ۳. ساختار اصلی و سایدبار
   ========================================================================== */
.article-main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    align-items: start;
}

/* ==========================================================================
   ۴. محتوای مقاله (Typography)
   ========================================================================== */
.article-content-wrapper {
    background: var(--bg-paper);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 50px 60px;
    margin-bottom: 60px;
}
.post-content {
    font-size: 1.15rem;
    color: var(--text-body);
    text-align: justify;
}
.post-content p {
    margin-bottom: 1.8rem;
    line-height: 2.1;
}
.post-content .dropcap::first-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--primary-green);
    float: right;
    line-height: 1;
    margin-left: 15px;
    margin-top: 5px;
    text-shadow: 2px 2px 0px rgba(5, 150, 105, 0.2);
}
.post-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-dark);
    margin: 3rem 0 1.5rem;
    position: relative;
    padding-right: 20px;
}
.post-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 6px;
    background-color: var(--primary-green);
    border-radius: 4px;
}
.post-content h3 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}
.post-content img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}
.post-content img:hover {
    transform: scale(1.02);
}
.post-content figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-style: italic;
}
.post-content blockquote {
    background: rgba(5, 150, 105, 0.04);
    border-right: 5px solid var(--primary-green);
    padding: 30px 40px 30px 30px;
    margin: 3rem 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-dark);
    position: relative;
}
.post-content blockquote::before {
    content: '\f10e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 15px;
    font-size: 3rem;
    color: rgba(5, 150, 105, 0.1);
}
.post-content ul, 
.post-content ol {
    margin-bottom: 2rem;
    padding-right: 2rem;
}
.post-content li {
    margin-bottom: 0.8rem;
    position: relative;
}
.post-content ul li::marker {
    color: var(--primary-green);
}

/* ==========================================================================
   ۵. دکمه‌های اشتراک‌گذاری
   ========================================================================== */
.inline-share {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}
.inline-share span {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition-fast);
}
.share-btn.tg { background: #0088cc; }
.share-btn.wa { background: #25D366; }
.share-btn.tw { background: #1DA1F2; }
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   ۶. ویجت‌های سایدبار
   ========================================================================== */
.sidebar-wrapper {
    position: sticky;
    top: 100px;
}
.toc-widget {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}
.toc-widget h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.toc-widget h4 i {
    color: var(--primary-green);
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toc-list li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-fast);
    display: block;
    position: relative;
    padding-right: 15px;
    border-right: 2px solid transparent;
}
.toc-list li a::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--border-color);
    border-radius: 50%;
    transition: var(--transition-fast);
}
.toc-list li a:hover, 
.toc-list li a.active {
    color: var(--primary-green);
    border-right-color: var(--primary-green);
    font-weight: bold;
}
.toc-list li a:hover::before, 
.toc-list li a.active::before {
    background: var(--primary-green);
    box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
}
.banner-widget {
    background: linear-gradient(135deg, var(--sacred-red) 0%, var(--sacred-red-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
}
.banner-widget h4 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 15px;
}
.banner-widget p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    opacity: 0.9;
}
.banner-widget .btn-cta {
    display: inline-block;
    background: white;
    color: var(--sacred-red-dark);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition-fast);
}
.banner-widget .btn-cta:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* ==========================================================================
   ۷. نویسنده و مقالات مرتبط
   ========================================================================== */
.author-box {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    gap: 30px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 60px;
}
.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-green-light);
    padding: 3px;
}
.author-info h4 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.author-info p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
}
.author-social {
    display: flex;
    gap: 10px;
}
.author-social a {
    color: var(--primary-green);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}
.author-social a:hover {
    color: var(--primary-green-dark);
    transform: scale(1.1);
}
.related-section {
    margin-bottom: 80px;
}
.related-section h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.related-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}
.related-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(5, 150, 105, 0.3);
}
.related-img {
    height: 200px;
    overflow: hidden;
}
.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.related-card:hover .related-img img {
    transform: scale(1.1);
}
.related-content {
    padding: 20px;
}
.related-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.5;
}
.related-content h4 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}
.related-content h4 a:hover {
    color: var(--primary-green);
}

/* ==========================================================================
   ۸. بخش نظرات
   ========================================================================== */
.comments-section {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 80px;
}
#comments {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-main);
    padding-bottom: 15px;
}

/* ==========================================================================
   ۹. استایل‌های فوتر (هاردکد شده ایثارین)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 80px 0 0;
    position: relative;
    border-top: 5px solid var(--primary-green);
    width: 100vw !important;
    max-width: 100vw !important;
    margin-right: calc(50% - 50vw) !important;
    margin-left: calc(50% - 50vw) !important;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 50px;
}
.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-green-light);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-green);
    border-radius: 3px;
}
.footer-col p {
    color: #d1d5db;
    line-height: 2;
    font-size: 1.05rem;
    margin-bottom: 25px;
    text-align: justify;
}
.social-icons-wrapper {
    display: flex;
    gap: 18px;
}
.social-icons-wrapper a {
    color: #ffffff;
    background-color: #374151;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: var(--transition-normal);
    text-decoration: none;
}
.social-icons-wrapper a:hover {
    background-color: var(--primary-green);
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 18px;
}
.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    font-size: 1.05rem;
}
.footer-links a::before {
    content: '\f104';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 10px;
    color: var(--primary-green);
    font-size: 0.85rem;
    transition: var(--transition-normal);
}
.footer-links a:hover {
    color: var(--primary-green-light);
    transform: translateX(-8px);
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    color: #d1d5db;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.03);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}
.contact-row:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(-5px);
}
.contact-row i {
    color: var(--primary-green-light);
    font-size: 1.4rem;
    width: 30px;
    text-align: center;
}
.trust-seals-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}
.trust-seal-item {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    max-width: 140px;
}
.trust-seal-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}
.trust-seal-item img {
    max-width: 100%;
    height: auto;
}
.footer-bottom {
    background-color: var(--bg-footer-bottom);
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #374151;
}
.footer-bottom p {
    color: #9ca3af;
    font-size: 1.05rem;
    margin: 0;
}
.footer-bottom a {
    color: var(--primary-green-light);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition-normal);
    padding: 0 5px;
}
.footer-bottom a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   ۱۰. واکنش‌گرایی (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
    .article-main-container {
        grid-template-columns: 1fr;
    }
    .sidebar-wrapper {
        display: none;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 60px 5% 30px;
        height: 45vh;
        min-height: 350px;
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
    }
    .article-hero h1 {
        font-size: 2.2rem;
    }
    .article-content-wrapper {
        padding: 30px 20px;
        margin-top: -30px;
    }
    .post-content h2 {
        font-size: 1.8rem;
    }
    .post-content blockquote {
        font-size: 1.1rem;
        padding: 20px;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        gap: 40px;
    }
    
    /* اصلاح فوق‌تهاجمی کشیدگی تصاویر در موبایل (برای تمام عکس‌های داخل قالب و محتوا) */
    article img, 
    .single-post img,
    .post-thumbnail img,
    figure img {
        object-fit: cover !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 250px !important;
    }
    
    article [style*="background-image"],
    .single-post [style*="background-image"] {
        background-size: cover !important;
        background-position: center !important;
        background-attachment: scroll !important;
    }
}