/* 
   OJS 3.5 SCIENTIFIC EXCELLENCE THEME
   Primary: #50635c | Secondary: #b8b5af
   Designed for: Academic Authority & Clean UI
*/


:root {
    --brand-primary: #50635c;
    --brand-secondary: #b8b5af;
    --brand-dark: #3a4843;
    --glass-effect: rgba(255, 255, 255, 0.03);
    --pure-white: #FFFFFF;
    --text-main: #2F3634;
}

/* 1. الهيدر المتميز (The Grand Header) */
header.pkp_structure_head {
    background: var(--brand-primary) !important;
    border-bottom: 6px solid var(--brand-secondary) !important;
    position: relative;
    padding: 0 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
}

/* زخرفة خلفية خفية للهيدر لإعطائه طابعاً رسمياً */
header.pkp_structure_head::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23ffffff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}



/* اسم المجلة بتصميم "الترويسة الملكية" */
.pkp_site_name_wrapper {
    padding: 45px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pkp_site_name a {
    font-weight: 700 !important;
    font-size: 2.2rem !important;
    letter-spacing: 1px;
    color: var(--pure-white) !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* 2. شريط القوائم (The Nav Bar) */
.pkp_navigation_primary_wrapper {
/*    background: var(--brand-dark) !important; /* لون أغمق قليلاً للتركيز */
    padding: 5px 0;
}

.pkp_navigation_primary {
    display: flex !important;
    justify-content: center !important;
    gap: 10px;
}

.pkp_navigation_primary > li > a {
    color: var(--pure-white) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    padding: 12px 25px !important;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pkp_navigation_primary > li > a:hover {
    background: var(--brand-secondary) !important;
    color: var(--brand-dark) !important;
    transform: translateY(-2px);
}

/* 3. الفوتر المؤسسي (The Institutional Footer) */
.pkp_structure_footer {
 /*   background: #1a211f !important; */
 /*   color: var(--pure-white) !important; */
    background: var(--brand-primary);
    padding: 60px 0 40px !important;
    border-top: 6px solid var(--brand-primary) !important;
    position: relative;
    width: 100%;
  /*  clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%); /* قص عصري علوي */
}

.pkp_footer_content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: right;
}

.pkp_structure_footer .pkp_brand_footer {
    grid-column: 1 / -1;
 /*   border-top: 1px solid rgba(184, 181, 175, 0.2); */
    padding-top: 30px;
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--brand-secondary);
}

/* 4. المقالات (The Research Cards) */
.obj_article_summary {
    background: var(--pure-white) !important;
    border: 1px solid #dee2e1 !important;
    border-right: 6px solid var(--brand-primary) !important; /* لمسة الهوية */
    border-radius: 8px !important;
    padding: 35px !important;
    margin: 15px !important;
    transition: all 0.3s ease;
}
.obj_article_summary:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 25px rgba(80, 99, 92, 0.1) !important;
}
.obj_article_summary .title a {
    color: var(--brand-primary) !important;
    font-size: 1.4rem !important;
    line-height: 1.4;
}

/* 5. الأزرار العلمية (Action Buttons) */
.btn, .pkp_button, .galleys a {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark)) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 30px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.btn:hover {
    background: var(--brand-secondary) !important;
    color: var(--brand-dark) !important;
}
/* --- إصلاح شامل لـ pkp_navigation_primary_row وتوحيد الهيدر --- */

/* 1. إجبار الصف الرئيسي على التمدد الكامل */
.pkp_navigation_primary_row {
    background-color: var(--brand-primary) !important;
    display: block !important; /* إلغاء الفليكس المسبب للمشاكل */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. تنظيف الحاوية الداخلية لمنع الفراغات الجانبية */
.pkp_navigation_primary_row .pkp_head_wrapper {
    max-width: 100% !important; /* جعل القائمة تمتد لعرض الشاشة */
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important; /* توسيط محتوى القائمة */
    background: var(--brand-dark) !important; /* تمييز شريط القوائم بلون أغمق */
}

/* 3. تنسيق القائمة بداخل الصف لضمان الاستقامة */
.pkp_navigation_primary {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}
.pkp_navigation_user_wrapper {
   padding: 5px;
   margin: 8px;
   font-size: medium;
   
}

/* 4. إزالة أي فواصل أو هوامش افتراضية في عناصر القائمة */
.pkp_navigation_primary > li {
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_navigation_primary > li > a {
    color: var(--pure-white) !important;
    line-height: 50px !important; /* توحيد الارتفاع */
    padding: 0 25px !important;
    display: block !important;
    transition: 0.3s;
}

/* 5. معالجة منطقة البحث (إذا كانت بداخل نفس الصف) */
.pkp_navigation_primary_row .pkp_search {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* 6. توحيد الخلفية الكلية للهيدر لمنع ظهور أي بكسل أبيض */
header.pkp_structure_head {
    background-color: var(--brand-primary) !important;
    display: flex !important;
    flex-direction: column !important; /* ترتيب: شعار ثم قائمة */
}
/* --- 2. تخصيص الفوتر واستبدال الشعار بالنص --- */
.pkp_structure_footer {
   /* background: #111514 !important; */
    color: var(--brand-secondary) !important;
    padding: 60px 0 40px !important;
    border-top: 6px solid var(--brand-primary) !important;
    text-align: center !important;
}

/* إخفاء صورة الشعار الأصلية في الفوتر */
.pkp_brand_footer img {
    display: none !important;
}

/* إضافة النص المطلوب بدلاً من الشعار */
.pkp_brand_footer::after {
    content: "المجلة تعمل بنظام OJS/PKP";
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-secondary);
    letter-spacing: 1px;
    padding-top: 10px;
}
/* --- 1. الهيدر بالنقش الموحد --- */
header.pkp_structure_head {
    background-color: var(--brand-primary) !important;
    background-image: var(--pattern-svg) !important; /* إضافة النقش */
    border-bottom: 6px solid var(--brand-secondary) !important;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.pkp_navigation_primary_row .pkp_head_wrapper {
    background: var(--brand-dark) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pkp_site_name a {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 2rem !important;
}

/* --- 2. الفوتر بالنقش الموحد --- */
.pkp_structure_footer_wrapper {
    background-color: var(--footer-bg) !important;
    background-image: var(--pattern-svg) !important;
    color: var(--brand-secondary) !important;
 /*   padding: 70px 0 40px !important; */
    border-top: 8px solid var(--brand-primary) !important;
    text-align: center !important;
    position: relative;
    margin-top: 60px;
}

/* الفاصل الجمالي للفوتر */
.pkp_structure_footer_wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--brand-secondary);
    opacity: 0.3;
}
/* استهداف زر OpenID المخصص */
/* 1. إخفاء زر تسجيل الدخول التقليدي (نظام المجلة) تماماً */
#openid-provider-legacyRegister {
    display: none !important;
}

/* 2. إخفاء جميع الصور (الأيقونات) داخل قائمة الدخول */
#openid-provider-list img {
    display: none !important;
}

/* 3. تنسيق زر الدخول الموحد (SSO) */
#openid-provider-custom div {
    /* استخدام المتغير اللوني للمجلة */
    background-color: #50635c !important; 
    border: none !important;
    border-radius: 8px !important; /* حواف متناسقة مع OJS */
    padding: 15px 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: filter 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    min-height: 50px !important;
    cursor: pointer !important;
}

/* 4. إضافة وتنسيق النص داخل الزر */
#openid-provider-custom span::after {
    content: "تسجيل الدخول الموحد" !important;
    color: #ffffff !important; /* نص أبيض لضمان التباين */
    font-weight: bold !important;
    font-size: 16px !important;
}

/* 5. تأثير عند تمرير الماوس (تغميق اللون قليلاً) */
#openid-provider-custom div:hover {
    filter: brightness(90%) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 6. تنظيف القائمة لضمان التوسط */
#openid-provider-list {
    list-style: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}


/* تنسيق زر تحميل الـ PDF */
.obj_galley_link.pdf {
    background-color: #50635c !important; /* اللون الرئيسي الجديد */
    color: #ffffff !important; /* نص أبيض صريح للتباين */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 20px !important;
    border-radius: 8px !important; /* نفس انحناء الأزرار الأخرى */
    text-decoration: none !important;
    font-family: "Almarai", sans-serif !important; /* تطبيق خط المراعي */
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    min-width: 120px !important;
}

/* تنسيق الأيقونة داخل الزر */
.obj_galley_link.pdf::before {
    margin-left: 8px !important; /* مسافة للأيقونة في الواجهة العربية */
    font-size: 16px !important;
    color: #ffffff !important;
}

/* تحسين مظهر النص الداخلي */
.obj_galley_link.pdf .label {
    color: #ffffff !important;
}

/* تأثير تمرير الماوس */
.obj_galley_link.pdf:hover {
    background-color: #3d4d47 !important; /* درجة أغمق قليلاً عند التمرير */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
}

/* تنسيق الحاوية والرابط الأساسي */
.block_make_submission .make_submission_link {
    background-color: #50635c !important; /* اللون الرئيسي الجديد */
    color: #ffffff !important; /* نص أبيض صريح للوضوح */
    display: block !important;
    text-align: center !important;
    padding: 15px 20px !important;
    border-radius: 8px !important; /* متوافق مع تعديل radius في LESS */
    font-family: "Almarai", sans-serif !important; /* تطبيق خط المراعي */
    font-weight: 700 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin: 10px 0 !important;
}

/* تأثير تمرير الماوس */
.block_make_submission .make_submission_link:hover {
    background-color: #3d4d47 !important; /* درجة أغمق (bg-base) عند التمرير */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

/* في حال وجود أيقونة داخل الزر */
.block_make_submission .make_submission_link::before {
    color: #ffffff !important;
    margin-left: 8px !important;
}
