﻿
    /* ---------------- Headings ---------------- */
    .ck-content h1,
    .ck-content h2,
    .ck-content h3,
    .ck-content h4,
    .ck-content h5,
    .ck-content h6 {
        margin: 20px 0 12px;
        font-weight: 700;
        color: #1f3b1a;
        line-height: 1.3;
    }

    /* ---------------- Lists (FIXED: أرقام ونقط ظاهرة بوضوح) ---------------- */
    .ck-content ul,
    .ck-content ol {
        margin: 0 0 16px 32px;
        padding-right: 18px;
    }

    .ck-content ul {
        list-style-type: disc !important; /* نقط */
    }

        .ck-content ul ul {
            list-style-type: circle !important; /* نقط أصغر */
        }

    .ck-content ol {
        list-style-type: decimal !important; /* أرقام */
    }

    .ck-content li {
        margin: 8px 0;
    }

    /* إجبار الـ CKEditor يعرض النقط */
    .ck-content ul li,
    .ck-content ol li {
        display: list-item !important;
    }
    /* ===================== الحل النهائي: سكرول أفقي بس + ارتفاع صف ثابت ===================== */

    .ck-content .table-wrapper {
        display: block;
        overflow-x: auto; 
        margin: 25px 0;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.09);
        -webkit-overflow-scrolling: touch;
    }

        /* سكرول بار أنيق ورفيع */
        .ck-content .table-wrapper::-webkit-scrollbar {
            height: 11px;
        }

        .ck-content .table-wrapper::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .ck-content .table-wrapper::-webkit-scrollbar-thumb {
            background: #87c508;
            border-radius: 10px;
        }

            .ck-content .table-wrapper::-webkit-scrollbar-thumb:hover {
                background: #6d9900;
            }

        /* الجدول نفسه */
        .ck-content .table-wrapper table {
            width: 100%;
            /*min-width: 900px;*/ /* عشان يضمن سكرول أفقي لو الشاشة صغيرة */
            table-layout: auto !important;
            border-collapse: separate;
            border-spacing: 0;
            background: #fff;
            border-radius: 10px;
            overflow: hidden;
        }

            /* كل صف (row) له ارتفاع ثابت - غيّر الرقم زي ما تحب */
            .ck-content .table-wrapper table tbody tr {

                max-height: 200px; /* ممنوع يزيد أبدًا */
            }

            /* الرأس برضو ارتفاع ثابت وشيك */
            .ck-content .table-wrapper table thead tr {
                height: 64px;
                min-height: 64px;
            }

            /* خلايا الرأس */
            .ck-content .table-wrapper table thead th {
                background: #87c508;
                color: #fff;
                padding: 0 18px;
                text-align: right;
                font-weight: 700;
                white-space: nowrap;
                vertical-align: middle;
                min-width: 250px;
                border-bottom: 3px solid #74a806;
            }

            /* خلايا الجسم - الأهم عشان الكلام ما يزودش الارتفاع */
            .ck-content .table-wrapper table tbody td {
                padding: 12px 18px;
                border-right: 1px solid #e5e5e5;
                text-align: right;
                vertical-align: middle;
                min-width: 250px;
                white-space: normal !important;
                word-break: break-word;
                overflow: hidden; /* مهم جدًا */
                -webkit-line-clamp: 3; /* أقصى 2 أسطر بس داخل الصف */
                -webkit-box-orient: vertical;
                line-height: 1.5;
                font-size: 15px;
            }

            /* إزالة الحد الأيمن من العمود الأول */
            .ck-content .table-wrapper table td:first-child,
            .ck-content .table-wrapper table th:first-child {
                border-right: none;
            }

            /* صفوف متناوبة */
            .ck-content .table-wrapper table tbody tr:nth-child(even) {
                background-color: #f9fcf1;
            }

            .ck-content .table-wrapper table tbody tr:hover {
                background-color: #edf8e0 !important;
            }
    /* ---------------- Blockquote ---------------- */
    .ck-content blockquote {
        margin: 16px 0;
        padding: 12px 18px;
        border-right: 4px solid #87c508;
        background: #f7f9f5;
        font-style: italic;
    }

    /* ---------------- Images ---------------- */
    .ck-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 14px auto;
        border-radius: 8px;
    }

    /* ---------------- Code Blocks ---------------- */
    .ck-content pre {
        background: #0f1720;
        color: #e6eef4;
        padding: 12px;
        border-radius: 8px;
        overflow-x: auto;
    }

    .ck-content code {
        background: #f2f2f2;
        padding: 2px 6px;
        border-radius: 4px;
        font-family: "Courier New", monospace;
    }

    /* ---------------- Universal Protection ---------------- */
    .ck-content * {
        box-sizing: border-box;
        max-width: 100%;
        word-break: break-word; /* FIX للغة العربية */
    }
