/* ==========================================================================
   1. الخطوط العامة (General Typography)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body, h1, h2, h3, h4, h5, h6, p, a, li, span, div, input, button {
    font-family: 'Roboto', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

/* ==========================================================================
   2. رأس الصفحة واللوجو والقوائم (Header & Navigation) - PC & Submenus
   ========================================================================== */
.pkp_site_name .is_img img {
    max-height: 110px; 
    width: auto;       
    margin-top: 5px;
    margin-bottom: 5px;
}

.pkp_site_name > .is_text {
    display: none !important; 
}

/* --- إصلاح القوائم (الرئيسية والفرعية) --- */
.pkp_navigation_primary a, 
.pkp_navigation_user a,
.pkp_navigation_primary ul li a { 
    text-transform: none !important; 
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.pkp_structure_head {
    border-bottom: 3px solid #004080;
}

/* ==========================================================================
   3. تنسيق النصوص والمحاذاة (Text Justification)
   ========================================================================== */
p, 
.obj_article_summary .abstract,
.cmp_breadcrumbs,
.pkp_block .content {
    text-align: justify !important;
    text-justify: inter-word;
}

/* ==========================================================================
   4. الشريط الجانبي (Sidebar) - توسيط كامل
   ========================================================================== */
.pkp_structure_sidebar_right .pkp_block {
    margin-bottom: 30px !important;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.block_language, 
.block_language .content,
.block_language ul,
.pkp_block.block_custom .content {
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.block_language li {
    display: block !important;
    text-align: center !important;
    margin: 5px auto !important;
}

.pkp_structure_sidebar_right img {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    max-width: 100%;
}

.pkp_block .title {
    width: 100%;
    text-align: center !important;
    margin-bottom: 15px;
    font-weight: 700;
    color: #004080;
    border-bottom: 2px solid #dde2e6;
    padding-bottom: 10px;
}

.pkp_structure_sidebar_right li a {
    display: block;
    padding: 6px 0;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

/* ==========================================================================
   5. زر تقديم بحث جديد (Submission Button)
   ========================================================================== */
.block_make_submission a {
    background-color: #004080;
    color: #ffffff !important;
    padding: 16px 20px;
    border-radius: 6px;
    text-align: center;
    display: block;
    width: 90%;
    margin: 0 auto;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease-in-out;
}

.block_make_submission a:hover {
    background: linear-gradient(180deg, #0059b3 0%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}

/* ==========================================================================
   6. تنسيق المقالات (Articles)
   ========================================================================== */
.obj_article_summary {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.obj_article_summary .title a {
    color: #004080;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}

/* ==========================================================================
   7. التذييل (Footer) - الإصلاح النهائي والشامل
   ========================================================================== */
/* استهداف الحاوية الخارجية والداخلية لإجبار الخلفية الزرقاء */
.pkp_structure_footer_wrapper, 
.pkp_structure_footer, 
.pkp_site_footer {
    background: #004080 !important;      /* اللون الأزرق */
    background-color: #004080 !important; /* تأكيد اللون */
    color: #ffffff !important;            /* النص أبيض */
    border: none !important;
}

/* إجبار جميع العناصر داخل الفوتر (روابط، نصوص، عناوين) على اللون الأبيض */
.pkp_structure_footer_wrapper *,
.pkp_structure_footer *,
.pkp_site_footer * {
    color: #ffffff !important;
}

/* تحسين شكل الروابط عند مرور الماوس */
.pkp_site_footer a:hover {
    color: #cccccc !important; /* لون رمادي فاتح عند التحويم */
    text-decoration: underline !important;
}

/* ==========================================================================
   8. إصلاحات الهاتف (Mobile Responsiveness)
   ========================================================================== */
@media only screen and (max-width: 991px) {
    
    .pkp_site_name .is_img img {
        max-height: 50px !important;
        margin-top: 0 !important;
    }

    .pkp_site_name {
        padding: 5px 0 !important;
        display: flex;
        align-items: center;
    }

    .pkp_nav_list ul, 
    .pkp_nav_list li, 
    .pkp_nav_list a {
        text-transform: none !important;
        font-size: 15px !important;
        letter-spacing: normal !important;
        line-height: 1.6 !important;
    }

    .pkp_nav_list li {
        margin-bottom: 8px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}