/* ==========================================================================
   AL-KHWARIZMI JOURNAL: CLEAN & FIX EDITION
   (Simple, Blue, & Correct Sizes)
   ========================================================================== */

/* 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', sans-serif !important;
}
html { scroll-behavior: smooth; }

/* 2. الهيدر (Header) */
.pkp_site_name .is_img img {
    max-height: 110px; width: auto; margin: 5px 0;
}
.pkp_site_name > .is_text { display: none !important; }
.pkp_structure_head { border-bottom: 3px solid #004080; }

/* 3. القوائم (Navigation) */
.pkp_navigation_primary a, .pkp_navigation_user a, .pkp_nav_list a { 
    text-transform: none !important; font-weight: 500; font-size: 16px;
}
/* القوائم المنسدلة (زرقاء ونظيفة) */
.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);
}
.dropdown-item:hover, .dropdown-menu a:hover {
    background-color: #00bcd4 !important; color: #ffffff !important;
}

/* 4. الشريط الجانبي (Sidebar) - توسيط فقط بدون صناديق ثقيلة */
.pkp_structure_sidebar_right .pkp_block {
    margin-bottom: 30px !important; padding: 15px; 
    background-color: #f9f9f9; /* خلفية خفيفة جداً */
    border: 1px solid #eee; border-radius: 6px;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; text-align: center !important;
}
.pkp_structure_sidebar_right .content, .block_language ul {
    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: 1px solid #ddd; padding-bottom: 10px;
}
.pkp_structure_sidebar_right li a {
    display: block; padding: 5px 0; border-bottom: 1px solid #f5f5f5;
}

/* زر التقديم الجانبي */
.block_make_submission a {
    background-color: #004080; color: #ffffff !important; padding: 12px;
    border-radius: 4px; text-align: center; display: block; width: 100%;
    font-weight: 700; text-decoration: none; margin-top: 5px;
}

/* 5. الفوتر (Footer) */
.pkp_structure_footer_wrapper, .pkp_structure_footer, .pkp_site_footer {
    background: #004080 !important; color: #ffffff !important; border: none !important;
}
.pkp_structure_footer_wrapper *, .pkp_site_footer * { color: #ffffff !important; }

/* 6. تنسيق المقالات في القوائم (نظيف وبسيط) */
.obj_article_summary {
    margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee;
}
.obj_article_summary .title a {
    color: #004080 !important; font-weight: 700; font-size: 1.2rem; text-decoration: none;
}
.obj_article_summary .title a:hover { color: #00bcd4 !important; }

/* 7. أزرار PDF (الحل الجذري للأحجام) */

/* أ) إزالة الخلفية الرمادية المزعجة */
.obj_galley_link, .galleys_links, .galleys_links li {
    background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important;
}

/* ب) التصميم الأساسي للزر (أزرق) */
a.obj_galley_link.pdf, .obj_galley_link.file {
    background-color: #004080 !important; color: #ffffff !important;
    text-decoration: none !important; display: inline-block !important;
    border-radius: 30px !important; transition: all 0.2s;
}
a.obj_galley_link.pdf:hover { background-color: #0059b3 !important; }

/* ج) الزر في القائمة الرئيسية (الصفحة الرئيسية) -> صغير وأنيق */
.obj_article_summary a.obj_galley_link.pdf, 
.obj_article_summary .obj_galley_link.file {
    padding: 5px 20px !important; /* حشوة صغيرة */
    font-size: 0.85em !important; /* خط صغير */
    margin-top: 8px !important;
    width: auto !important; /* العرض حسب النص فقط */
    min-width: 0 !important; /* إلغاء أي حد أدنى للعرض */
}

/* د) الزر في صفحة المقالة الداخلية -> كبير وواضح */
.page_article a.obj_galley_link.pdf, 
.page_article .obj_galley_link.file {
    padding: 15px 60px !important; /* حشوة كبيرة */
    font-size: 1.2em !important; /* خط كبير */
    font-weight: 700 !important;
    margin-top: 20px !important;
    min-width: 250px !important; /* عريض */
    display: block !important; /* في سطر لوحده */
    margin-left: auto; margin-right: auto; /* توسيط الزر */
    text-align: center;
}

/* 8. صفحة المقالة الداخلية (بدون بطاقات ضخمة) */
.page_article .page_title {
    color: #004080 !important; font-size: 1.8em !important; font-weight: 700 !important;
    text-align: center !important; margin-bottom: 20px;
}

/* تحسين بسيط للملخص والبيانات بدون إطارات ثقيلة */
.item.abstract .label, .item.keywords .label {
    color: #004080; font-weight: bold; display: block; margin-bottom: 5px;
}
.item.abstract, .item.keywords {
    margin-bottom: 20px; line-height: 1.6; text-align: justify;
}

/* تمييز DOI */
.item.doi .value a {
    color: #004080 !important; background: #e3f2fd; padding: 4px 10px;
    border-radius: 4px; text-decoration: none;
}

/* مربع الاقتباس (How to Cite) */
.item.citation .card-header {
    background-color: #004080 !important; color: #fff !important; text-align: center !important;
}
.item.citation .card-body {
    background-color: #f8f9fa !important; text-align: justify !important;
}
.item.citation button.btn.dropdown-toggle {
    background-color: #004080 !important; color: #fff !important; width: 100%; margin-top: 10px;
}

/* 9. الموبايل (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 a { text-transform: none !important; font-size: 15px !important; }
    
    /* زر PDF يملأ الشاشة في الموبايل */
    .page_article a.obj_galley_link.pdf { width: 100% !important; box-sizing: border-box; }
}