/* ساختار کلی صفحه مقاله */
.single-post-container {
    max-width: 850px; /* عرض بهینه برای خوانایی متن */
    margin: 40px auto 80px auto;
}

/* هدر و متادیتا */
.post-header {
    margin-bottom: 30px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.breadcrumb a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--cta-bg);
}

.post-title {
    font-size: 32px;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* تصویر شاخص */
.post-thumbnail {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* باکس فهرست مطالب (TOC) */
.toc-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
}

.toc-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 15px;
}

.toc-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-box a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
    display: block;
    padding: 5px 0;
}

.toc-box a:hover {
    color: var(--cta-bg);
}

/* سلسله مراتب H2 و H3 در TOC */
.toc-item-h2 {
    font-weight: bold;
    margin-top: 5px;
}
.toc-item-h3 {
    margin-right: 20px;
    font-size: 14px;
    position: relative;
}
.toc-item-h3::before {
    content: '';
    position: absolute;
    right: -12px;
    top: 15px;
    width: 6px;
    height: 1px;
    background: var(--border-color);
}

/* تایپوگرافی محتوای مقاله */
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-main);
}

.post-content h2, .post-content h3 {
    color: #ffffff;
    margin-top: 40px;
    margin-bottom: 15px;
}

/* استایل مدرن کامنت‌های وردپرس برای دارک مود */
.post-comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comment-respond {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}


.comment-reply-title a {
    background-color: var(--bg-surface-light);
    color: var(--text-main) !important;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: inline-block;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--cta-bg);
}

.comment-form .submit {
    background: var(--cta-bg);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.comment-form .submit:hover {
    background: var(--cta-hover);
}

/* =========================================
   استایل اختصاصی لیست نظرات و پاسخ‌ها
========================================= */
.comment-list, .comment-list .children {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* استایل تورفتگی پاسخ‌ها (Nested) */
.comment-list .children {
    margin-right: 40px; /* فاصله از راست برای سایت‌های فارسی */
    padding-right: 20px;
    border-right: 2px solid var(--border-color); /* خط راهنمای پاسخ */
    margin-top: 20px;
}

.custom-comment-item {
    margin-bottom: 20px;
}

.comment-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: background 0.3s ease;
}

/* پس‌زمینه متفاوت برای کامنت‌های پاسخ داده شده */
.children .comment-box {
    background: var(--bg-dark);
}

/* هدر کامنت */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-avatar {
    border-radius: 50%;
    border: 2px solid var(--border-color);
    width: 45px;
    height: 45px;
}

.comment-author-name {
    color: var(--text-main);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* تیک آبی مدیر سایت */
.admin-badge {
    color: #3498db; /* رنگ آبی کلاسیک تیک تأیید */
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.comment-meta-data {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-date {
    color: var(--text-muted);
    font-size: 12px;
}
/* استایل حرفه‌ای و خوانا برای دکمه پاسخ وردپرس */
a.comment-reply-link {
    background-color: var(--bg-surface-light); /* بک‌گراند کمی روشن‌تر از باکس کامنت */
    color: var(--text-main) !important; /* رنگ متن نقره‌ای/سفید (important برای خنثی کردن رنگ آبی پیش‌فرض) */
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: inline-block;
}

/* افکت هاور با رنگ سازمانی (قرمز پخته) */
a.comment-reply-link:hover {
    background-color: var(--cta-bg);
    color: #ffffff !important;
    border-color: var(--cta-bg);
    box-shadow: 0 4px 10px rgba(179, 57, 57, 0.3);
}

/* متن اصلی کامنت */
.comment-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.comment-text p {
    margin: 0 0 10px 0;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* هشدار در انتظار تأیید */
.comment-awaiting-moderation {
    color: #f39c12;
    font-size: 13px;
    background: rgba(243, 156, 18, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 576px) {
    .comment-list .children {
        margin-right: 15px;
        padding-right: 15px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
}