
/* ========================================
   StudyEG - Article Content
   ======================================== */

/* ========================================
   Main Layout
   ======================================== */

.eg-single-main {
    width: 100%;
    min-width: 0;
}

/* صندوق المحتوى */
.eg-article-content {
    width: 100%;
    max-width: 950px;
    overflow: hidden;
}

/* الصورة المميزة */
.eg-featured-image {
    margin-bottom: 23px !important;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
}

.eg-featured-image img {
    width: 950px;
    height: 500px;
    object-fit: cover;
}

/* ========================================
   Article Body
   ======================================== */

.eg-post-body {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eee8df;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(80, 55, 25, 0.045);
    direction: rtl;
    text-align: right;
    padding: 25px;
    color: #212121;
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.9;
    overflow-wrap: break-word;
}

/* ========================================
   Paragraphs
   ======================================== */

.eg-post-body p {
    margin: 0 0 22px;
    color: #333333;
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    line-height: 1.9;
    font-weight: 500 !important;
}

/* ========================================
   Headings
   ======================================== */

/* العناوين الرئيسية */
.eg-post-body h2 {
    position: relative;
    margin: 22px 0 10px;
    padding: 0 15px 10px 0;
    color: #68451E;
    font-family: 'Alexandria', sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.7;
    border-bottom: 1px solid #eee5d8;
}

.eg-post-body h2::before {
    content: "";
    position: absolute;
    right: 0;
    top: 5px;
    width: 5px;
    height: 30px;
    border-radius: 5px;
    background: linear-gradient(180deg, #C99543, #80501D);
}

/* العناوين الفرعية */
.eg-post-body h3 {
    margin: 32px 0 15px;
    color: #80501D;
    font-family: 'Alexandria', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.8;
}

.eg-post-body h4 {
    margin: 25px 0 12px;
    color: #68451E;
    font-family: 'Alexandria', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.8;
}

/* ========================================
   Links
   ======================================== */

.eg-post-body a {
    color: #966522;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 149, 67, 0.35);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.eg-post-body a:hover {
    color: #68451E;
    border-color: #68451E;
}

/* ========================================
   Lists
   ======================================== */

.eg-post-body ul,
.eg-post-body ol {
    margin: 18px 0 20px;
    padding-right: 27px;
    color: #333333;
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    line-height: 2;
}

.eg-post-body li {
    padding-right: 5px;
    margin-bottom: 3px;
    font-weight: 500 !important;
}

.eg-post-body ul li::marker {
    color: #C99543;
}

.eg-post-body ol li::marker {
    color: #80501D;
    font-weight: 700;
}

/* ========================================
   Important Text
   ======================================== */

.eg-post-body strong,
.eg-post-body b {
    color: #68451E;
    font-weight: 700;
}

/* ========================================
   Tables
   ======================================== */

.eg-post-body .eg-article-table-wrap {
    width: 100%;
    margin: 28px 0 35px;
    overflow-x: auto;
    border: 1px solid #eee5d8;
    border-radius: 12px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.eg-post-body table {
    width: 100%;
    min-width: 550px;
    border-collapse: collapse;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    text-align: right;
}

.eg-post-body table th {
    padding: 16px 18px;
    background: #68451E;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.eg-post-body table td {
    padding: 14px 18px;
    color: #4b4b4b;
    border-bottom: 1px solid #eeeae4;
    background: #ffffff;
}

.eg-post-body table tr:nth-child(even) td {
    background: #fffcf7;
}

.eg-post-body table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Article Notes
   ======================================== */

.eg-post-body .eg-article-note {
    position: relative;
    margin: 28px 0;
    padding: 20px 24px;
    background: #fff9ef;
    border: 1px solid #f0e3cf;
    border-right: 4px solid #C99543;
    border-radius: 10px;
    color: #68451E;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    line-height: 1.9;
}

.eg-post-body .eg-article-note p {
    margin: 0;
    color: inherit;
}

/* ========================================
   Blockquotes
   ======================================== */

.eg-post-body blockquote {
    margin: 30px 0;
    padding: 22px 26px;
    background: #faf8f4;
    border-right: 4px solid #80501D;
    border-radius: 10px;
    color: #68451E;
    font-family: 'Tajawal', sans-serif;
    font-size: 18px;
    line-height: 2;
}

.eg-post-body blockquote p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Images & Figures
   ======================================== */

.eg-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.eg-post-body figure {
    margin: 28px 0;
}

.eg-post-body figcaption {
    margin-top: 10px;
    color: #888;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    text-align: center;
}

/* ========================================
   Separators
   ======================================== */

.eg-post-body hr {
    margin: 38px 0;
    border: 0;
    border-top: 1px solid #eee7dc;
}


/* ========================================
   Responsive - Tablet
   Screens: 701px - 950px
   ======================================== */

@media (max-width: 950px) {

    /* المحتوى */
    .eg-article-content {
        padding: 32px 30px;
    }

    /* الصورة المميزة */
    .eg-featured-image {
        height: 380px;
    }

    .eg-featured-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* جسم المقال */
    .eg-post-body {
        padding: 22px;
        font-size: 17px;
    }

    /* الفقرات */
    .eg-post-body p {
        font-size: 17px;
    }

    /* العناوين */
    .eg-post-body h2 {
        font-size: 20px;
    }

    .eg-post-body h3 {
        font-size: 19px;
    }

    .eg-post-body h4 {
        font-size: 17px;
    }

    /* القوائم */
    .eg-post-body ul,
    .eg-post-body ol {
        font-size: 17px;
    }

    /* الاقتباسات */
    .eg-post-body blockquote {
        font-size: 17px;
    }
}


/* ========================================
   Responsive - Mobile
   Screens: 381px - 700px
   ======================================== */

@media (max-width: 700px) {

    /* المحتوى */
    .eg-article-content {
        padding: 25px 0;
        border-radius: 14px;
    }

    /* الصورة المميزة */
    .eg-featured-image {
        height: auto;
        margin-bottom: 10px !important;
        border-radius: 12px;
    }

    .eg-featured-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* جسم المقال */
    .eg-post-body {
        padding: 15px 12px;
        border-radius: 14px;
        font-size: 13px;
        line-height: 1.9;
    }

    /* الفقرات */
    .eg-post-body p {
        font-size: 13px;
        line-height: 1.9;
        margin-bottom: 10px;
    }

    /* العناوين */
    .eg-post-body h2 {
        margin-top: 25px;
        margin-bottom: 15px;
        padding-bottom: 6px;
        padding-right: 13px;
        font-size: 16px;
        line-height: 1.8;
    }

    .eg-post-body h2::before {
        height: 25px;
        width: 4px;
    }

    .eg-post-body h3 {
        margin-top: 14px;
        margin-bottom: 11px;
        font-size: 14px;
    }

    .eg-post-body h4 {
        margin-top: 13px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    /* القوائم */
    .eg-post-body ul,
    .eg-post-body ol {
        margin: 12px 0 10px;
        padding-right: 16px;
        font-size: 13px;
        line-height: 1.9;
    }

    .eg-post-body li {
        padding-right: 3px;
        margin-bottom: 3px;
    }

    /* الملاحظات */
    .eg-post-body .eg-article-note {
        margin: 22px 0;
        padding: 16px 17px;
        font-size: 15px;
    }

    /* الاقتباسات */
    .eg-post-body blockquote {
        margin: 22px 0;
        padding: 17px;
        font-size: 15px;
        line-height: 1.9;
    }

    /* الجداول */
    .eg-post-body .eg-article-table-wrap {
        width: 100%;
        max-width: 100%;
        margin: 22px 0 28px;
        border-radius: 9px;
        overflow-x: auto;
        box-sizing: border-box;
    }

    .eg-post-body table {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
        font-size: 12px;
        line-height: 1.7;
    }

    .eg-post-body table th {
        padding: 10px 7px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .eg-post-body table td {
        padding: 9px 7px;
        overflow-wrap: anywhere;
        word-break: normal;
        white-space: normal;
    }

    /* الصور */
    .eg-post-body figure {
        margin: 22px 0;
    }

    .eg-post-body figcaption {
        font-size: 13px;
    }

    /* الفواصل */
    .eg-post-body hr {
        margin: 28px 0;
    }
}


/* ========================================
   Responsive - Small Mobile
   Screens: 380px and below
   ======================================== */

@media (max-width: 380px) {

    /* المحتوى */
    .eg-article-content {
        padding: 20px 0;
    }

    /* الصورة المميزة */
    .eg-featured-image {
        height: auto;
        margin-bottom: 10px !important;
    }

    /* جسم المقال */
    .eg-post-body {
        padding: 15px 12px;
        font-size: 12px;
    }

    /* الفقرات */
    .eg-post-body p {
        font-size: 13px;
        margin-bottom: 10px;
        line-height: 1.80;
    }

    /* العناوين */
    .eg-post-body h2 {
        font-size: 16px;
        margin-top: 25px;
        margin-bottom: 13px;
        padding-bottom: 6px;
    }

    .eg-post-body h2::before {
        height: 23px;
    }

    .eg-post-body h3 {
        font-size: 14px;
        margin-top: 13px;
    }

    .eg-post-body h4 {
        font-size: 13px;
    }

    /* القوائم */
    .eg-post-body ul,
    .eg-post-body ol {
        font-size: 13px;
        padding-right: 16px;
    }

    .eg-post-body li {
        padding-right: 3px;
        margin-bottom: 3px;
        font-weight: 500 !important;
    }

    /* الملاحظات والاقتباسات */
    .eg-post-body .eg-article-note {
        padding: 14px;
        font-size: 13px;
    }

    .eg-post-body blockquote {
        padding: 14px;
        font-size: 13px;
    }

    /* الجداول */
    .eg-post-body .eg-article-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
    }

    .eg-post-body table {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
        font-size: 11px;
    }

    .eg-post-body table th,
    .eg-post-body table td {
        padding: 8px 5px;
        overflow-wrap: anywhere;
        word-break: normal;
        white-space: normal;
    }
}

/* =========================================
   Mobile Article Table of Contents
========================================= */

/* إخفاء نسخة الموبايل على الشاشات الكبيرة */
.eg-mobile-toc {
    display: none;
}

/* زر فتح وإغلاق جدول الموبايل */
.eg-mobile-toc-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
}

.eg-mobile-toc-title {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.eg-mobile-toc-title strong {
    color: #68451E;
    font-family: 'Alexandria', sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
}

.eg-mobile-toc-title small {
    margin-top: 4px;
    color: #A09280;
    font-family: 'Tajawal', sans-serif;
    font-size: 11px;
    line-height: 1.7;
}

.eg-mobile-toc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: auto;
    color: #986B31;
    background: #F7F0E5;
    border-radius: 8px;
    transition: transform .25s ease, background .25s ease;
}

.eg-mobile-toc-arrow svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eg-mobile-toc-toggle[aria-expanded="true"] .eg-mobile-toc-arrow {
    transform: rotate(180deg);
    background: #F0E4D1;
}

.eg-mobile-toc-nav[hidden] {
    display: none !important;
}

/* إظهار جدول الموبايل وإخفاء جدول Sidebar */
@media (max-width: 700px) {

    .eg-single-sidebar .eg-toc-box {
        display: none;
    }

    .eg-mobile-toc {
        display: block;
        width: 100%;
        margin: 20px 0 25px;
    }

    .eg-mobile-toc .eg-toc-box {
        padding: 17px 15px;
    }

    .eg-mobile-toc .eg-toc-heading {
        gap: 11px;
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 0;
    }

    .eg-mobile-toc .eg-toc-heading-icon {
        width: 39px;
        height: 39px;
        flex: 0 0 39px;
    }

    .eg-mobile-toc .eg-toc-heading-icon svg {
        width: 19px;
        height: 19px;
    }

    .eg-mobile-toc .eg-mobile-toc-nav:not([hidden]) {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-top: 14px;
        margin-top: 14px;
        border-top: 1px solid #F0E9DF;
    }

    .eg-mobile-toc .eg-toc-link {
        font-size: 12px;
        padding: 10px 8px;
    }

    .eg-mobile-toc .eg-toc-number {
        flex: 0 0 27px;
        width: 27px;
        height: 27px;
        font-size: 10px;
    }
}

/* الشاشات الصغيرة */
@media (max-width: 380px) {

    .eg-mobile-toc {
        margin: 16px 0 20px;
    }

    .eg-mobile-toc .eg-toc-box {
        padding: 14px 12px;
    }

    .eg-mobile-toc-title strong {
        font-size: 13px;
    }

    .eg-mobile-toc-title small {
        font-size: 10px;
    }

    .eg-mobile-toc .eg-toc-link {
        font-size: 11px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .eg-mobile-toc *,
    .eg-mobile-toc *::before,
    .eg-mobile-toc *::after {
        transition: none !important;
    }

}
