/* ================= CKEditor content ================= */

.prose-custom {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-color);
}

/* Heading ها */
.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4,
.prose-custom h5,
.prose-custom h6 {
    font-weight: 800;
    line-height: 1.4;
    margin-top: 1.8rem;
    margin-bottom: 0.9rem;
    color: var(--text-color);
}

.prose-custom h1 { font-size: 2rem; }
.prose-custom h2 { font-size: 1.7rem; }
.prose-custom h3 { font-size: 1.4rem; }
.prose-custom h4 { font-size: 1.2rem; }

/* پاراگراف‌ها */
.prose-custom p {
    margin: 0 0 1rem;
    color: var(--text-color);
}

/* لیست‌ها */
.prose-custom ul,
.prose-custom ol {
    margin: 0 0 1rem;
    padding-right: 1.5rem;   /* چون RTL هستی */
}

.prose-custom ul {
    list-style-type: disc;
}

.prose-custom ol {
    list-style-type: decimal;
}

.prose-custom li {
    margin-bottom: 0.25rem;
}

/* نقل‌قول */
.prose-custom blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-right: 4px solid #a3e635;
    background-color: rgba(148, 163, 184, 0.08);
    border-radius: 0.75rem;
    font-style: italic;
}

/* لینک‌ها */
.prose-custom a {
    color: #16a34a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.prose-custom a:hover {
    color: #22c55e;
}

/* جدول‌ها – که الان گم شده! */
.prose-custom table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    overflow: hidden;
    border-radius: 0.75rem;
}

.prose-custom thead {
    background-color: rgba(148, 163, 184, 0.16);
}

.prose-custom th,
.prose-custom td {
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    text-align: right;
}

.prose-custom th {
    font-weight: 700;
}

.prose-custom tbody tr:nth-child(odd) {
    background-color: rgba(148, 163, 184, 0.06);
}

/* تصاویر داخل متن */
.prose-custom img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1.25rem auto;
    display: block;
}

/* کد و pre */
.prose-custom code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    background-color: rgba(15, 23, 42, 0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 0.35rem;
}

.prose-custom pre {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background-color: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    overflow-x: auto;
}

.prose-custom pre code {
    background: transparent;
    padding: 0;
}

/* حالت دارک */
html.dark .prose-custom blockquote {
    background-color: rgba(15, 23, 42, 0.85);
    border-right-color: #a3e635;
}

html.dark .prose-custom table {
    border-color: rgba(148, 163, 184, 0.6);
}

html.dark .prose-custom thead {
    background-color: rgba(31, 41, 55, 0.95);
}

html.dark .prose-custom th,
html.dark .prose-custom td {
    border-color: rgba(75, 85, 99, 0.9);
}

html.dark .prose-custom tbody tr:nth-child(odd) {
    background-color: rgba(17, 24, 39, 0.9);
}
