/* ==========================
   Shared CKEditor Content
========================== */
.rich-content * {
    max-width: 100%;
    box-sizing: border-box;
}

.rich-content {
    font-size:var(--fs-body);
    line-height: 2.2;
    color: #333;
    direction: rtl;
    text-align: justify;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Paragraphs */

.rich-content p {
    margin-bottom: 24px;
    text-align: justify;
}

/* Headings */

.rich-content h2 {
    margin-top: 60px;
    margin-bottom: 25px;
    font-size: 2rem;
    color: #222;
    line-height: 1.7;
}

.rich-content h3 {
    margin-top: 45px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
    line-height: 1.7;
}

.rich-content h4 {
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
    line-height: 1.7;
}

/* Lists */

.rich-content ul,
.rich-content ol {
    margin: 25px 0;
    padding-right: 25px;
    overflow-wrap: anywhere;
}

.rich-content li {
    margin-bottom: 12px;
    line-height: 2.2;
}

/* Images */

.rich-content img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 35px auto;
    border-radius: 12px;
}

.rich-content figure.image {
    margin: 40px auto;
}

.rich-content figure.image img {
    margin: 0 auto;
    max-width: 100%;
}

.rich-content figcaption {
    margin-top: 12px;
    font-size: .9rem;
    color: #666;
    text-align: center;
}

/* Links */

.rich-content a {
    color: #0d6efd;
    text-decoration: none;
    transition: color .3s ease;
}

.rich-content a:hover {
    color: #084298;
    text-decoration: underline;
}

/* Blockquote */

.rich-content blockquote {
    margin: 35px 0;
    padding: 20px;
    background: #f8f9fa;
    border-right: 5px solid #0d6efd;
    font-style: italic;
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    direction: ltr;
}

.rich-content th,
.rich-content td {
    padding: 14px;
    border: 1px solid #ddd;
    text-align: center;
    direction: rtl;
}

.rich-content th {
    background: #f5f5f5;
    font-weight: 700;
}

.rich-content tr:nth-child(even) {
    background: #fafafa;
}
.rich-content figure.table {
    overflow-x: auto;
}

/* ==========================
   Tablet
========================== */

@media (max-width: 992px) {

    .rich-content {
        font-size: 1.05rem;
    }

}

/* ==========================
   Mobile
========================== */

@media (max-width: 768px) {

    .rich-content {
      
        line-height: 2.1;
    }

    .rich-content h2 {
        font-size: 1.6rem;
        margin-top: 40px;
        margin-bottom: 18px;
    }

    .rich-content h3 {
        font-size: 1.35rem;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .rich-content h4 {
        font-size: 1.15rem;
    }

    .rich-content p {
        margin-bottom: 18px;
    }

    .rich-content ul,
    .rich-content ol {
        padding-right: 20px;
    }

    .rich-content li {
        line-height: 2;
    }

    .rich-content img {
        margin: 25px auto;
        border-radius: 10px;
    }

    .rich-content figure.image {
        margin: 30px auto;
    }

    .rich-content blockquote {
        padding: 15px;
    }

    .rich-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

}