/* ==========================================================================
   MASTER STYLE: AL-KHWARIZMI JOURNAL (STRICT FONT FIX)
   Based exactly on 'alkej aprroved.css'
   ========================================================================== */

/* 1. الإعدادات الأساسية والخطوط (تعديل ذكي) */
/* نستدعي Roboto للإنجليزية و Tajawal للعربية */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Tajawal:wght@400;500;700;800&display=swap');

body, h1, h2, h3, h4, h5, h6, p, a, li, span, div, input, button {
    /* الترتيب مهم: Roboto أولاً (للإنجليزي)، ثم Tajawal (للعربي) */
    font-family: 'Roboto', 'Tajawal', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

html { scroll-behavior: smooth; }

::selection {
    background-color: #004080; color: #ffffff;
}

/* 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. القوائم والتنقل */
.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-item:focus, .dropdown-menu a:hover {
    background-color: #00bcd4 !important; color: #ffffff !important;
}

/* 4. تنسيق المحتوى */
p, .obj_article_summary .abstract, .cmp_breadcrumbs, .pkp_block .content {
    text-align: justify !important; text-justify: inter-word;
}

/* الجداول */
.page table {
    width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}
.page table thead tr { background-color: #004080; color: #ffffff; text-align: left; }
.page table th, .page table td { padding: 12px 15px; border-bottom: 1px solid #dddddd; }
.page table tbody tr:nth-of-type(even) { background-color: #f3f3f3; }

/* حقول الإدخال */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
    border: 1px solid #ced4da !important; border-radius: 4px !important; padding: 10px !important;
    transition: all 0.2s ease-in-out;
}
input:focus, textarea:focus, select:focus {
    border-color: #004080 !important; box-shadow: 0 0 0 0.2rem rgba(0, 64, 128, 0.15) !important; outline: none !important;
}

/* 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. زر تقديم بحث جانبي (التعديل المطلوب: تكبير + لون سماوي عند اللمس) */
.block_make_submission a {
    background-color: #004080 !important; 
    color: #ffffff !important; 
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 20px !important;  /* تكبير الحشوة */
    margin: 0 auto;
    font-size: 1.3em !important;    /* تكبير الخط */
    font-weight: 800 !important;    /* تعريض الخط */
    text-align: center;
    text-decoration: none !important;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    border: 2px solid #004080;
}
.block_make_submission a:hover {
    background-color: #00bcd4 !important; /* تحويل للسماوي */
    border-color: #00bcd4 !important;
    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;
}
.pkp_site_footer a:hover {
    color: #cccccc !important; text-decoration: underline !important;
}

/* 8. قوائم المقالات (تأثير الطفو الرمادي) */
.obj_article_summary {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    padding: 15px; border-radius: 8px; border: 1px solid transparent;
}
.obj_article_summary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    background-color: #f5f7fa !important; /* رمادي فاتح */
    border-color: #e2e6ea;
}
.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, .galleys_links, .galleys_links li {
    background: transparent !important; border: none !important; box-shadow: none !important;
    padding: 0 !important; margin: 0 !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: 1px solid #003366 !important; font-weight: 500 !important;
    transition: all 0.2s; border-radius: 50px !important; margin-top: 10px;
}
a.obj_galley_link.pdf:hover, .obj_galley_link.file:hover {
    background-color: #0059b3 !important; transform: translateY(-2px) !important;
}
/* زر القائمة (صغير) */
.obj_article_summary a.obj_galley_link.pdf,
.obj_article_summary .obj_galley_link.file {
    padding: 8px 25px !important; font-size: 0.9em !important;
    min-width: 100px !important; width: auto !important;
}
/* زر الصفحة الداخلية (كبير) */
.page_article a.obj_galley_link.pdf,
.page_article .obj_galley_link.file {
    padding: 15px 50px !important; font-size: 1.2em !important; font-weight: 700 !important;
    min-width: 250px !important; box-shadow: 0 5px 15px rgba(0, 64, 128, 0.2) !important;
}

/* 10. صفحة المقالة الداخلية (Advanced Article Styling) */
.page_article .page_title {
    color: #004080 !important; font-size: 1.8em !important; font-weight: 700 !important;
    text-align: center !important; margin-bottom: 20px !important;
}

/* أ) تحسين الكلمات المفتاحية */
.item.keywords .value { line-height: 2.5; }
.item.keywords .label { font-weight: bold; color: #004080; display: block; margin-bottom: 5px; }

/* ب) زر DOI */
.item.doi .value a {
    background-color: #e3f2fd; color: #004080 !important; padding: 5px 12px;
    border-radius: 20px; text-decoration: none; font-weight: 500;
    border: 1px solid #bbdefb; display: inline-block; transition: all 0.2s;
}
.item.doi .value a:hover { background-color: #004080; color: #fff !important; }

/* ج) صندوق الملخص */
.item.abstract {
    background-color: #ffffff; padding: 25px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; margin-bottom: 30px;
}
.item.abstract .label {
    font-size: 1.2em; color: #004080; margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; display: inline-block;
}

/* د) قائمة المصادر - تمت إزالة الخطوط العمودية */
.item.references .value p {
    margin-bottom: 15px !important; padding-left: 0 !important;
    border-left: none !important;
    font-size: 0.95em; color: #444;
}
.item.references .label {
    font-size: 1.2em; font-weight: bold; color: #004080; margin-top: 30px; margin-bottom: 15px; display: block;
}

/* هـ) البيانات الجانبية - تمت إزالة الخط الأزرق */
.entry_details .item {
    background-color: #f9f9f9; padding: 15px; border-radius: 6px;
    margin-bottom: 15px; 
    border: 1px solid #eee; border-left: none !important;
}
.entry_details .item .label {
    font-size: 0.85em; text-transform: uppercase; color: #666;
    letter-spacing: 1px; margin-bottom: 5px; display: block;
}
.entry_details .item .value { font-weight: 500; color: #333; }

/* و) مربع الاقتباس */
.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. إصلاحات الموبايل */
@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);
    }
    .page_article a.obj_galley_link.pdf,
    .page_article .obj_galley_link.file {
        width: 90% !important; display: block; margin: 10px auto !important;
    }
}