
/* ===================== پایه‌ی محتوا ===================== */
.ck-content {
    direction: rtl;
    text-align: right;
    line-height: 1.9;
    word-wrap: break-word;
}

/* ===================== عنوان‌ها (رفع تداخل بوت‌استرپ/دیتاتیبل) ===================== */
.ck-content h1, .ck.ck-editor__editable h1,
.ck-content h2, .ck.ck-editor__editable h2,
.ck-content h3, .ck.ck-editor__editable h3,
.ck-content h4, .ck.ck-editor__editable h4,
.ck-content h5, .ck.ck-editor__editable h5,
.ck-content h6, .ck.ck-editor__editable h6 {
    margin: 1.2em 0 .6em 0 !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    color: inherit;
}
.ck-content h1, .ck.ck-editor__editable h1 { font-size: 2em !important; }
.ck-content h2, .ck.ck-editor__editable h2 { font-size: 1.6em !important; }
.ck-content h3, .ck.ck-editor__editable h3 { font-size: 1.35em !important; }
.ck-content h4, .ck.ck-editor__editable h4 { font-size: 1.15em !important; }
.ck-content h5, .ck.ck-editor__editable h5 { font-size: 1em !important; }
.ck-content h6, .ck.ck-editor__editable h6 { font-size: .9em !important; }

/* ===================== پاراگراف و متن ===================== */
.ck-content p, .ck.ck-editor__editable p {
    margin: 0 0 1em 0 !important;
    font-size: revert;
    line-height: 1.9 !important;
}
.ck-content span, .ck.ck-editor__editable span { display: inline; }
.ck-content strong, .ck-content b,
.ck.ck-editor__editable strong, .ck.ck-editor__editable b { font-weight: 700; }
.ck-content em, .ck-content i,
.ck.ck-editor__editable em, .ck.ck-editor__editable i { font-style: italic; }

/* ===================== لیست‌ها ===================== */
.ck-content ul, .ck.ck-editor__editable ul {
    list-style-type: disc !important;
    margin: 0 0 1em 0 !important;
    padding-inline-start: 2em !important;
}
.ck-content ol, .ck.ck-editor__editable ol {
    list-style-type: decimal !important;
    margin: 0 0 1em 0 !important;
    padding-inline-start: 2em !important;
}
.ck-content ul ul, .ck.ck-editor__editable ul ul { list-style-type: circle !important; }
.ck-content ul ul ul, .ck.ck-editor__editable ul ul ul { list-style-type: square !important; }
.ck-content ol ol, .ck.ck-editor__editable ol ol { list-style-type: lower-alpha !important; }
.ck-content li, .ck.ck-editor__editable li {
    list-style-position: outside !important;
    display: list-item !important;
    margin-bottom: .35em !important;
}
.ck-content li > ul, .ck-content li > ol,
.ck.ck-editor__editable li > ul, .ck.ck-editor__editable li > ol {
    margin: .35em 0 .35em 0 !important;
}
.ck-content ul.todo-list, .ck.ck-editor__editable ul.todo-list {
    list-style: none !important;
    padding-inline-start: 0 !important;
}
.ck-content ul.todo-list li, .ck.ck-editor__editable ul.todo-list li {
    display: block !important;
}

/* ===================== نقل‌قول ===================== */
.ck-content blockquote, .ck.ck-editor__editable blockquote {
    border-right: 4px solid #2f6df0 !important;
    border-left: none !important;
    margin: 1em 0 !important;
    padding: .5em 1.2em !important;
    background: #f7f9fc;
    color: #4d5156;
    font-style: italic;
}

/* ===================== لینک ===================== */
.ck-content a, .ck.ck-editor__editable a { color: #1a0dab; text-decoration: underline; }

/* ===================== تصویر ===================== */
.ck-content img, .ck.ck-editor__editable img { max-width: 100%; height: auto; }
.ck-content figure.image, .ck.ck-editor__editable figure.image { display: table; margin: 1em auto; max-width: 100%; }
.ck-content figure.image > figcaption, .ck.ck-editor__editable figure.image > figcaption {
    display: table-caption; caption-side: bottom; padding: .6em;
    font-size: .85em; color: #5a6478; text-align: center; background: #f7f9fc;
}

/* ===================== جدول (رفع تداخل با جدول‌های دیتاتیبل) ===================== */
.ck-content table, .ck.ck-editor__editable table.ck-table-resized,
.ck.ck-editor__editable figure.table table {
    border-collapse: collapse !important;
    margin: 1em auto !important;
    width: auto;
    max-width: 100%;
}
.ck-content table td, .ck-content table th,
.ck.ck-editor__editable figure.table td, .ck.ck-editor__editable figure.table th {
    border: 1px solid #cfd6e4 !important;
    padding: .5em .8em !important;
    min-width: 2em;
}
.ck-content table th, .ck.ck-editor__editable figure.table th { background: #f2f5fa; font-weight: 700; }

/* ===================== خط افقی و کد ===================== */
.ck-content hr, .ck.ck-editor__editable hr { border: none; border-top: 1px solid #e3e8f0; margin: 1.5em 0; }
.ck-content pre, .ck.ck-editor__editable pre {
    background: #1f2733; color: #e6edf3; padding: 1em; border-radius: 8px;
    overflow: auto; direction: ltr; text-align: left;
}
.ck-content code, .ck.ck-editor__editable code {
    background: #f0f2f7; padding: .15em .4em; border-radius: 5px; direction: ltr;
}
.ck-content pre code, .ck.ck-editor__editable pre code { background: transparent; padding: 0; }

/* ===================== اندازه‌های فونت CKEditor ===================== */
.ck-content .text-tiny, .ck.ck-editor__editable .text-tiny { font-size: .7em; }
.ck-content .text-small, .ck.ck-editor__editable .text-small { font-size: .85em; }
.ck-content .text-big, .ck.ck-editor__editable .text-big { font-size: 1.4em; }
.ck-content .text-huge, .ck.ck-editor__editable .text-huge { font-size: 1.8em; }