/* ============================================================
   دار بسمة — نظام الخطوط الموحّد | Rubik
   النسخة النظيفة — سبتمبر 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap');

/* ============================================================
   1. المتغيرات والقاعدة العامة
   ============================================================ */
:root {
    --font-primary: 'Rubik', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body,
.primary-font,
header .master-menu ul.navbar-nav,
header .social-barre .search-bar,
header .master-menu .navbar-brand p,
.alert,
.blog-card,
.master-content .contact-form,
section .h2, section h2,
section p,
footer .copyright,
footer .designer,
footer .partenaire,
footer .signature span,
footer .signature ul.submenu,
footer .block-newsletter .title-newsletter .h2,
footer .block-newsletter .title-newsletter h2,
footer .block-newsletter .title-newsletter p,
footer .block-newsletter .newsletter input,
footer .block-newsletter .newsletter select {
    font-family: var(--font-primary) !important;
}

body {
    font-size: 17px;
    font-weight: 400;
    color: #1A1A1A;
    line-height: 1.7;
}

/* ============================================================
   2. محاذاة عامة لكل الفقرات
   ============================================================ */
p {
    text-align: justify !important;
    text-justify: inter-word !important;
    text-align-last: right !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* استثناءات لا تحتاج justify */
.navbar p,
footer .copyright p,
.btn p,
.alert p,
.edition-boxes .edition-item .info-edition p.writer {
    text-align: right !important;
    text-align-last: right !important;
}

/* ============================================================
   3. المدونة
   ============================================================ */
.main-content article,
.main-content .post-body,
.main-content .blog-content,
.main-content .post-content {
    max-width: 750px;
    margin-inline: auto;
}

.main-content article h1,
.main-content .post-body h1,
.post-title-main {
    font-family: var(--font-primary) !important;
    font-size: 34px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
}

.main-content article h2,
.main-content .post-body h2 {
    font-family: var(--font-primary) !important;
    font-size: 26px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.main-content article h3,
.main-content .post-body h3 {
    font-family: var(--font-primary) !important;
    font-size: 22px;
    font-weight: 600;
    color: #2B2B2B;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.main-content article p,
.main-content .post-body p,
.main-content article p[dir],
.main-content .post-body p[dir],
div.main-content p[style*="justify"],
article p[style*="justify"],
.main-content p[dir="RTL"],
.main-content p[dir="rtl"] {
    font-family: var(--font-primary) !important;
    font-size: 17px;
    font-weight: 400;
    color: #2B2B2B;
    line-height: 1.8;
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word !important;
}

.main-content article a,
.main-content .post-body a {
    color: #0581bf;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.main-content article a:hover,
.main-content .post-body a:hover {
    color: #035f8a;
}

/* ============================================================
   4. صفحات الكتب
   ============================================================ */
.master-content .edition-details p.title_book {
    font-family: var(--font-primary) !important;
    font-size: 34px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    text-align: right !important;
    text-align-last: right !important;
}

/* نبذة الكتاب */
.book-brief-text,
.book-brief-text *,
.book-brief-text p,
.book-brief-text p[style],
.book-brief-text p *,
.book-brief-text span,
.book-brief-text span[style],
.book-brief-text div,
.book-brief-text div[style] {
    font-family: var(--font-primary) !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word !important;
    direction: rtl !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* نبذة المؤلف */
.master-content .author,
.master-content .edition-details .author {
    overflow: hidden !important;
}

.master-content .author .avatar,
.master-content .edition-details .author .avatar {
    float: right !important;
    margin: 0 0 10px 12px !important;
}

.master-content .author p,
.master-content .author p[style],
.master-content .author p *,
.master-content .author p span,
.master-content .author p span[style],
.master-content .edition-details .author p,
.master-content .edition-details .author p * {
    font-family: var(--font-primary) !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word !important;
    direction: rtl !important;
    hyphens: none !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* ============================================================
   5. شبكة الإصدارات — بطاقات الكتب
   ============================================================ */
.edition-boxes .edition-item .info-edition .edition-item__title,
.edition-boxes .edition-item .info-edition h3,
.edition-boxes .edition-item .info-edition .h3 {
    font-family: var(--font-primary) !important;
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edition-boxes .edition-item .info-edition p.writer {
    font-family: var(--font-primary) !important;
    font-size: 14px;
    font-weight: 400;
    color: #555555;
    text-align: right;
}

/* ============================================================
   6. أزرار CTA
   ============================================================ */
.master-content a.button,
.btn-primary,
.btn-success,
.btn-warning,
.btn-outline-primary {
    font-family: var(--font-primary) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* ============================================================
   7. Responsive — الهاتف (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    body { font-size: 16px; }

    .main-content article,
    .main-content .post-body,
    .main-content .blog-content,
    .main-content .post-content {
        max-width: 100%;
    }

    .main-content article h1,
    .main-content .post-body h1,
    .post-title-main,
    .master-content .edition-details p.title_book {
        font-size: 26px !important;
    }

    .main-content article h2,
    .main-content .post-body h2 {
        font-size: 20px !important;
    }

    .main-content article h3,
    .main-content .post-body h3 {
        font-size: 19px !important;
    }

    .main-content article p,
    .main-content .post-body p,
    .main-content p[dir="RTL"],
    .main-content p[dir="rtl"],
    div.main-content p[style*="justify"] {
        font-size: 15px !important;
        line-height: 1.9 !important;
    }

    .book-brief-text,
    .book-brief-text *,
    .book-brief-text p,
    .book-brief-text span {
        font-size: 15px !important;
        line-height: 1.75 !important;
    }

    .master-content .author p,
    .master-content .edition-details .author p,
    .master-content .edition-details .author p * {
        font-size: 15px !important;
        line-height: 1.75 !important;
    }

    .edition-boxes .edition-item .info-edition .edition-item__title,
    .edition-boxes .edition-item .info-edition h3 {
        font-size: 15px !important;
    }

    .edition-boxes .edition-item .info-edition p.writer {
        font-size: 13px !important;
    }

    .master-content a.button,
    .edition-details .btn,
    .btn-primary,
    .btn-success,
    .btn-warning {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 400px) {

    .main-content article h1,
    .main-content .post-body h1,
    .post-title-main,
    .master-content .edition-details p.title_book {
        font-size: 24px !important;
    }

    .main-content article h2,
    .main-content .post-body h2 {
        font-size: 19px !important;
    }
}

/* ============================================================
   الفوتر — توسيط النص الرئيسي
   ============================================================ */
footer .partenaire,
footer .partenaire p,
footer .signature p,
footer p.text-center,
footer .footer-desc,
footer .col p {
    text-align: center !important;
    text-align-last: center !important;
}

/* ============================================================
   الفوتر — توسيط النص الرئيسي
   ============================================================ */
footer .signature p.d-block.text-white {
    text-align: center !important;
    text-align-last: center !important;
}

/* ============================================================
   الفوتر — توسيط كل النصوص + تصغير للهاتف
   ============================================================ */

/* النص الرئيسي */
footer .signature .darbasma p,
footer .signature .darbasma p.d-block,
footer p.d-block.text-white {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* وسائل الدفع */
footer .partenaire,
footer .partenaire p {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 13px !important;
}

/* حقوق النشر والروابط */
footer .copyright,
footer .copyright p,
footer .designer,
footer .designer p {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 13px !important;
}

@media (max-width: 768px) {

    footer .signature .darbasma p,
    footer p.d-block.text-white {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    footer .copyright,
    footer .copyright p,
    footer .designer,
    footer .designer p,
    footer .partenaire p {
        font-size: 12px !important;
        text-align: center !important;
    }
}

/* ============================================================
   الفوتر — توسيط كل النصوص + تصغير حجم الخط
   ============================================================ */

/* النص الرئيسي */
footer .darbasma p.d-block {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* وسائل الدفع */
footer .payments p {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 13px !important;
}

/* حقوق النشر والروابط */
footer p.copyright {
    text-align: center !important;
    text-align-last: center !important;
    font-size: 13px !important;
}

@media (max-width: 768px) {

    footer .darbasma p.d-block {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    footer .payments p,
    footer p.copyright {
        font-size: 12px !important;
    }
}
