/* ==========================================================================
   MASTER STYLE: AL-KHWARIZMI JOURNAL (PLATINUM EDITION)
   ========================================================================== */

/* 1. الخطوط العامة */
@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. الهيدر واللوجو */
.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_structure_head { border-bottom: 3px solid #004080; }

/* 3. القوائم المنسدلة (Dropdowns) - إصلاح جذري للون الرمادي */
/* استهداف مباشر لعنصر القائمة المنسدلة في Bootstrap/OJS */
.dropdown-menu {
    background-color: #004080 !important; /* اللون الأزرق */
    border: 1px solid #003366 !important;
    padding: 0 !important;
}

/* روابط القائمة المنسدلة */
.dropdown-item, 
.dropdown-menu a {
    color: #ffffff !important; /* نص أبيض */
    padding: 10px 15px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* تأثير المرور (Hover) */
.dropdown-item:hover, 
.dropdown-item:focus,
.dropdown-menu a:hover {
    background-color: #00bcd4 !important; /* سماوي */
    color: #ffffff !important;
}

/* القوائم الرئيسية */
.pkp_navigation_primary a, 
.pkp_navigation_user a,
.pkp_nav_list a { 
    text-transform: none !important; 
    font-weight: 500;
    font-size: 16px;
}

/* 4. تنسيق النصوص */
p, .obj_article_summary .abstract, .cmp_breadcrumbs, .pkp_block .content {
    text-align: justify !important;
    text-justify: inter-word;
}

/* 5. الشريط الجانبي (توسيط) */
.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, .pkp_structure_sidebar_right .content {
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
}
.pkp_structure_sidebar_right img { margin: 0 auto !important; display: block; }
.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;
}

/* 6. زر تقديم بحث (Sidebar 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);
}

/* 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;
}

/* 8. عناوين المقالات (List Title) */
.obj_article_summary .title a {
    color: #004080 !important; font-weight: 700; font-size: 1.2rem;
    text-decoration: none; transition: color 0.3s ease !important;
}
.obj_article_summary .title a:hover { color: #00bcd4 !important; }

/* ==========================================================================
   9. أزرار PDF - (الذكية: صغيرة في القائمة، كبيرة في المقال)
   ========================================================================== */

/* أ) التنسيق المشترك (اللون والشكل) */
.obj_galley_link.file, 
a.obj_galley_link.pdf {
    background-color: #004080 !important; /* أزرق */
    color: #ffffff !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-block !important;
    border: 1px solid #003366 !important;
    font-weight: 500 !important;
    transition: all 0.2s;
}

/* ب) في القوائم الرئيسية (Compact Style) - حل مشكلة "الضخامة" */
/* هذا يستهدف الأزرار الموجودة داخل ملخص المقال في القائمة */
.obj_article_summary .obj_galley_link.file, 
.obj_article_summary a.obj_galley_link.pdf {
    padding: 6px 20px !important; /* حشوة صغيرة */
    font-size: 0.9em !important;  /* خط أصغر */
    min-width: auto !important;   /* عرض تلقائي حسب النص */
    box-shadow: none !important;  /* بدون ظل ضخم */
    margin-top: 10px;
}

/* ج) في صفحة المقالة الداخلية فقط (Call to Action Style) - الزر الكبير */
.page_article .obj_galley_link.file, 
.page_article a.obj_galley_link.pdf {
    padding: 15px 50px !important; /* حشوة كبيرة */
    font-size: 1.1em !important;   /* خط أكبر */
    font-weight: 700 !important;
    min-width: 200px !important;   /* عرض محدد */
    box-shadow: 0 4px 8px rgba(0, 64, 128, 0.3) !important;
    margin-top: 20px;
}

/* تأثير المرور (مشترك) */
.obj_galley_link.file:hover, 
a.obj_galley_link.pdf:hover {
    background-color: #0059b3 !important;
    transform: translateY(-1px) !important;
}

/* 10. مربع الاقتباس (How to Cite) */
.item.citation .card-header {
    background-color: #004080 !important; color: #ffffff !important;
    font-weight: 700 !important; text-align: center !important; border: none !important;
}
.item.citation .card-body {
    background-color: #f8f9fa !important; border: 1px solid #ddd !important;
    text-align: justify !important; color: #333 !important;
}
.item.citation button.btn.dropdown-toggle {
    background-color: #004080 !important; color: #ffffff !important;
    width: 100% !important; margin-top: 10px;
}

/* 11. الموبايل (Mobile) */
@media only screen and (max-width: 991px) {
    .pkp_site_name .is_img img {
        max-height: 85px !important; margin: 5px auto !important; display: block;
    }
    .pkp_head_wrapper { height: auto !important; min-height: 90px !important; }
    .pkp_site_name { padding: 0 !important; flex-grow: 1; display: flex; justify-content: center; }
    
    .pkp_nav_list ul, .pkp_nav_list li, .pkp_nav_list a {
        text-transform: none !important; font-size: 15px !important;
    }
    .pkp_nav_list li {
        margin-bottom: 8px !important; border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    /* زر PDF في موبايل (صفحة المقالة فقط) */
    .page_article .obj_galley_link.file {
        width: 90% !important; display: block; margin: 10px auto !important;
    }
}