/* =================================================================== */
/* === 1. استایل‌های اصلی (دسکتاپ) === */
/* =================================================================== */

.single-page-layout { display: flex; gap: 30px; align-items: flex-start; }
.post-content-area { flex: 1; min-width: 0; }
.sidebar-area { width: 320px; flex-shrink: 0; position: -webkit-sticky; position: sticky; top: 100px; }
.page-single .menu-toggle-button { display: none; }

/* --- استایل‌های عمومی پست --- */
.breadcrumbs { margin-bottom: 20px; font-size: 14px; color: var(--text-color-light); }
.breadcrumbs a { color: var(--text-color-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-color); }
.breadcrumbs .separator { margin: 0 8px; }

.single-post { background-color: var(--card-bg-color); padding: 30px; border-radius: 15px; margin-bottom: 40px; box-shadow: 0 4px 25px rgba(0,0,0,0.05); }
.single-post .post-header .post-title { font-size: 2.5rem; margin: 0 0 20px 0; line-height: 1.3; }
.single-post .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; font-size: 14px; color: var(--text-color-light); margin-bottom: 25px; }
.single-post .post-meta .post-category a { color: var(--primary-color); text-decoration: none; }

.featured-image { margin-bottom: 30px; }
.featured-image img { width: 100%; height: auto; border-radius: 15px; display: block; }

/* --- استایل محتوای اصلی و قوانین ضد-سرریز --- */
.entry-content { line-height: 1.8; overflow-wrap: break-word; }
.dark-mode .entry-content p, .dark-mode .entry-content li, .dark-mode .entry-content .has-black-color { color: #e5e5e5 !important; }
.entry-content img, .entry-content video, .entry-content iframe, .entry-content figure { max-width: 100%; height: auto !important; }
.entry-content table { width: 100% !important; display: block; overflow-x: auto; }
.entry-content h2 { font-size: 1.8rem; margin: 40px 0 20px 0; }
.entry-content h3 { font-size: 1.5rem; margin: 30px 0 15px 0; }
.entry-content blockquote { background-color: var(--bg-color); border-right: 4px solid var(--primary-color); padding: 20px 25px; margin: 30px 0; }
.entry-content ul { list-style: none; padding-right: 20px; }
.entry-content ul li { position: relative; margin-bottom: 10px; }
.entry-content ul li::before { content: '\f111'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 8px; color: var(--primary-color); position: absolute; right: -20px; top: 8px; }

/* --- فوتر پست و باکس نویسنده --- */
.post-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.author-box { display: flex; gap: 20px; align-items: flex-start; background-color: #F1F8FF; padding: 30px; border-radius: 15px; margin: 40px 0; box-shadow: 0 4px 25px rgba(0,0,0,0.05); }
.dark-mode .author-box { background-color: #1e2f45; }
.author-avatar { width: 100px; height: 100px; flex-shrink: 0; }
.author-avatar img { border-radius: 50%; width: 100%; height: 100%; display: block; object-fit: cover; }
.author-info h4 { margin: 0 0 10px 0; font-size: 1.2rem; }
.author-info p { margin: 0 0 15px 0; font-size: 14px; color: var(--text-color-light); }

/* --- استایل سایدبار --- */
.sidebar-area .widget { background-color: var(--card-bg-color); padding: 25px; border-radius: 15px; margin-bottom: 30px; box-shadow: 0 4px 25px rgba(0,0,0,0.05); }
/* --- استایل بخش دیدگاه‌ها (کامل و اصلاح شده) --- */
.comments-section { background-color: transparent; padding: 0; border-radius: 0; margin: 40px 0; box-shadow: none; }
.comments-section .section-title { font-size: 1.5rem; margin-bottom: 30px; }
.comment-form { background-color: var(--card-bg-color); padding: 30px; border-radius: 15px; box-shadow: 0 4px 25px rgba(0,0,0,0.05); display: flex; flex-wrap: wrap; justify-content: space-between; }
.comment-form p.comment-notes { font-size: 14px; color: var(--text-color-light); width: 100%;}
.form-group { margin-bottom: 20px; width: 100%;}
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; background-color: var(--bg-color); color: var(--text-color-dark); box-sizing: border-box; }
.form-group-checkbox { display: flex; align-items: center; gap: 10px; font-size: 14px; width: 100%;}
.submit-btn { background: var(--primary-gradient); color: #fff; border: none; padding: 12px 30px; border-radius: 50px; font-size: 15px; cursor: pointer; }
.comment-form .form-group-author, .comment-form .form-group-email { width: calc(50% - 10px); }
.comment-form .form-submit{ width: 100%; }
.comment-list { list-style: none; padding: 0; margin: 40px 0 0 0; position: relative; }
.comment-list::before { content: ''; position: absolute; top: 0; bottom: 0; right: 24px; width: 2px; background-color: var(--border-color); }
.comment-list .comment { position: relative; padding: 0 80px 30px 0; }
.comment-list .comment::before { content: ''; position: absolute; top: 18px; right: 18px; width: 14px; height: 14px; border-radius: 50%; background-color: var(--primary-color); border: 2px solid var(--bg-color); z-index: 2; }
.comment-body { background-color: var(--card-bg-color); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; position: relative; }
.comment-author .avatar { position: absolute; top: 0; right: -80px; width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--bg-color); z-index: 3; }
.comment-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.comment-author .fn { font-weight: 700; font-size: 1rem; color: var(--text-color-dark); }
.says { display: none; }
.comment-metadata a { font-size: 12px; color: var(--text-color-light); }
.comment-content { line-height: 1.7; font-size: 0.95rem; color: var(--text-color-light); overflow-wrap: break-word; word-break: break-word; }
.comment-content p { margin: 0; }
.comment-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); }
.reply .comment-reply-link { background: none; border: none; color: var(--primary-color); font-weight: 500; font-size: 14px; cursor: pointer; padding: 0; }
.comment-list .children { list-style: none; padding-right: 40px; margin-top: 30px; }

/* =================================================================== */
/* === 2. استایل‌های رسپانسیو (تبلت و موبایل) === */
/* =================================================================== */

@media (max-width: 992px) {
    .single-page-layout {
        flex-direction: column;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }
    .post-content-area, .sidebar-area { width: 100%; margin: 0; padding: 0; }
    .sidebar-area { position: static; margin-top: 40px; }
}

@media (max-width: 768px) {
    .single-post {
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 0;   /* <<-- فاصله کناری حذف شد */
        padding-right: 0;  /* <<-- فاصله کناری حذف شد */
        border-radius: 0;
        margin-bottom: 30px;
    }
    .single-post .post-header .post-title { font-size: 1.7rem; line-height: 1.4; padding: 0 15px; }
    .single-post .post-meta { padding: 0 15px; }
    .entry-content { padding: 0 15px; }
    .entry-content h2 { font-size: 1.4rem; }
    .entry-content h3 { font-size: 1.2rem; }
    
    .post-footer { padding-left: 15px; padding-right: 15px; }
    .author-box { border-radius: 0; }
    .comment-form .form-group-author, .comment-form .form-group-email { width: 100%; }
    .comment-list .comment { padding: 0 0 25px 0; }
    .comment-list::before, .comment-list .comment::before, .comment-author .avatar { display: none; }
    .comment-body { padding: 15px; }
    .comment-list .children { padding-right: 20px; }
}