/* 
======================================================================
DERNA UNIVERSITY JOURNAL OF MEDICAL SCIENCES (DUJMS)
FINAL MASTER STYLESHEET (V 5.0)
Features: Gradient Menu, Compact Footer, Premium UI, Responsive
======================================================================
*/

/* ---------------------------------------------------------
   1. FONTS & VARIABLES
--------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #2D76B6;       /* Derna Blue */
    --accent-color: #17A2B8;        /* Medical Teal */
    --dark-primary: #1a4f7a;        /* Darker Blue */
    --gradient-start: #2D76B6;
    --gradient-end: #205a8d;
    
    /* Structure */
    --text-color: #333333;
    --bg-light: #F0F4F8;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
}

/* ---------------------------------------------------------
   2. GLOBAL TYPOGRAPHY & ANIMATION
--------------------------------------------------------- */
body {
    font-family: 'Roboto', 'Cairo', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.7;
    margin: 0;
    animation: fadeIn 0.8s ease-in-out; /* Smooth Load Effect */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, h4, h5, h6, .pkp_structure_head_site_name {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

/* Stylish Underline for Titles */
h2, h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
h2::after, h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    bottom: 0;
    left: 0; 
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* ---------------------------------------------------------
   3. HEADER & NAVIGATION (Gradient Blue)
--------------------------------------------------------- */
/* Main Header Container */
.pkp_structure_head {
    background-color: var(--primary-color) !important;
    border: none !important;
}

/* Site Title */
.pkp_site_name a {
    color: var(--white) !important;
    text-transform: uppercase;
    font-weight: 700;
}

/* Navigation Wrapper (The Gradient Bar) */
.pkp_navigation_primary_wrapper {
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end)) !important;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 5px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 0 15px;
}

/* Menu Links */
@media (min-width: 992px) {
    .pkp_navigation_primary > li > a {
        color: #ffffff !important;
        font-weight: 600;
        font-size: 0.95rem;
        padding: 15px 18px;
        transition: all 0.3s ease;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    .pkp_navigation_primary > li > a:hover,
    .pkp_navigation_primary > li:focus > a {
        background-color: rgba(255,255,255,0.1);
        color: var(--accent-color) !important;
    }
    
    /* Dropdown Menu */
    .pkp_navigation_primary > li > ul {
        background-color: var(--gradient-end) !important;
        border-top: 3px solid var(--accent-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    
    .pkp_navigation_primary > li > ul > li > a {
        color: #fff !important;
        padding: 10px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .pkp_navigation_primary > li > ul > li > a:hover {
        background-color: rgba(0,0,0,0.2);
        color: var(--accent-color) !important;
    }
}

.pkp_navigation_user > li > a { color: #ffffff !important; }

/* ---------------------------------------------------------
   4. BUTTONS & ACTIONS
--------------------------------------------------------- */
/* Primary Buttons */
.pkp_button_primary, button.submit {
    background-color: var(--accent-color) !important;
    border: 1px solid var(--accent-color) !important;
    color: var(--white) !important;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.pkp_button_primary:hover {
    background-color: var(--white) !important;
    color: var(--accent-color) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Pulsing Submit Button */
.pkp_block_make_submission a {
    display: block; text-align: center;
    background-color: var(--accent-color);
    color: #fff !important;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    animation: pulse-shadow 2s infinite;
}
@keyframes pulse-shadow {
    0% { box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(23, 162, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(23, 162, 184, 0); }
}

/* ---------------------------------------------------------
   5. HOMEPAGE LAYOUT (Cover + Text)
--------------------------------------------------------- */
@media (min-width: 768px) {
    .pkp_page_index .homepage_image {
        float: left; width: 30%; margin-right: 30px; margin-bottom: 20px; text-align: center;
    }
    .pkp_page_index .homepage_about {
        float: left; width: 65%; text-align: justify;
    }
    .pkp_page_index .homepage_image img {
        width: 100%; max-width: 250px; height: auto;
        border: 1px solid #ddd; border-radius: 4px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1), 5px 5px 15px rgba(0,0,0,0.05); 
        transition: transform 0.3s ease;
    }
    .pkp_page_index .homepage_image img:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 16px rgba(45, 118, 182, 0.2);
    }
    .pkp_page_index .pkp_page_content::after { content: ""; display: table; clear: both; }
}

/* ---------------------------------------------------------
   6. ARTICLE CARDS (Listing)
--------------------------------------------------------- */
.obj_article_summary {
    background: var(--white);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e1e4e8;
    border-left: 5px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease;
}
.obj_article_summary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}
.obj_article_summary .title a {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

/* Open Access Badge */
.obj_article_summary .title a::before {
    content: "🔓"; font-size: 0.8em; margin-right: 8px; opacity: 0.8;
}
.obj_article_summary::before {
    content: "OPEN ACCESS"; display: inline-block;
    background-color: #e8f5e9; color: #2e7d32;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}

/* Premium PDF Button */
.obj_article_summary .galleys .pdf {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 5px 15px;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.obj_article_summary .galleys .pdf::before { content: "↓ "; margin-right: 5px; }
.obj_article_summary .galleys .pdf:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(45, 118, 182, 0.3);
}

/* ---------------------------------------------------------
   7. ARTICLE DETAILS PAGE (Premium Look)
--------------------------------------------------------- */
/* Highlight Abstract */
.obj_article_details .item.abstract {
    background-color: #f9fbfd;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    margin: 20px 0;
    font-size: 1.05rem;
    line-height: 1.8;
}
.obj_article_details .item.abstract .label {
    display: block; font-size: 1.2rem; color: var(--primary-color);
    margin-bottom: 15px; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px;
}


/* Author List */
.obj_article_details .authors .author {
    margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #eee;
}
.obj_article_details .authors .name { font-size: 1.1rem; font-weight: 700; color: #333; display: block; }
.obj_article_details .authors .affiliation {
    font-size: 0.9rem; color: #666; font-style: italic; margin-top: 4px; display: block;
}
.obj_article_details .authors .affiliation::before { content: "🏛 "; opacity: 0.6; }

/* Date Badge */
.obj_article_details .date-published {
    display: inline-block; background-color: var(--primary-color);
    color: #fff; padding: 5px 12px; border-radius: 50px;
    font-size: 0.85rem; font-weight: 600; margin-bottom: 15px;
}
.obj_article_details .date-published::before { content: "📅 Published: "; font-weight: normal; opacity: 0.9; }

/* ---------------------------------------------------------
   8. SIDEBAR BLOCKS (Floating Cards)
--------------------------------------------------------- */
.pkp_block {
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}
.pkp_block:hover { transform: translateY(-5px); }
.pkp_block .title {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-primary));
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}
.pkp_block .content { padding: 20px; }

/* Search Input */
.pkp_block_search input[type="text"] {
    width: 100%; padding: 10px 15px; border: 1px solid #ddd;
    border-radius: 50px; background-color: #f9f9f9; transition: all 0.3s ease;
}
.pkp_block_search input[type="text"]:focus {
    background-color: #fff; border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.2); outline: none;
}

/* ---------------------------------------------------------
   9. BREADCRUMBS
--------------------------------------------------------- */
.pkp_structure_breadcrumb {
    background-color: #fff; padding: 10px 15px; border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 20px;
    border: 1px solid #eee; font-size: 0.9rem;
}
.pkp_structure_breadcrumb li a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.pkp_structure_breadcrumb li.separator { font-family: monospace; color: #999; margin: 0 5px; }

/* ---------------------------------------------------------
   10. FOOTER (Ultra Compact & Full Width)
--------------------------------------------------------- */
.pkp_structure_footer_wrapper {
    background-color: #f4f6f8 !important;
    border-top: 3px solid var(--accent-color) !important;
    padding: 0 !important; margin: 0 !important; width: 100% !important;
}

.pkp_structure_footer {
    padding: 15px 0 !important; margin: 0 !important; width: 100% !important;
    height: auto !important; min-height: 0 !important;
    display: flex !important; flex-direction: column;
    align-items: center; justify-content: center;
}

.pkp_structure_footer_content, .pkp_structure_footer p, .pkp_structure_footer h4 {
    margin: 0 !important; padding: 0 !important;
    line-height: 1.3 !important; color: #555 !important; font-size: 0.85rem !important;
}

.pkp_brand_footer {
    margin: 8px 0 0 0 !important; padding: 0 !important;
    display: block !important; float: none !important;
    text-align: center !important; width: 100% !important;
}
.pkp_brand_footer a img { height: 18px !important; width: auto !important; opacity: 0.6; }

/* ---------------------------------------------------------
   11. MOBILE RESPONSIVENESS
--------------------------------------------------------- */
@media (max-width: 991px) {
    .pkp_navigation_primary, .pkp_navigation_user { background-color: #1f2a36; padding: 15px; }
    .pkp_navigation_primary > li > a { color: #fff !important; border-bottom: 1px solid #333; padding: 12px 0; display: block; }
}

@media (max-width: 767px) {
    .pkp_page_index .homepage_image { float: none; width: 100%; margin: 0 auto 20px auto; text-align: center; }
    .pkp_page_index .homepage_about { float: none; width: 100%; }
    .pkp_page_index .homepage_image img { max-width: 200px; }
    .pkp_button_primary { width: 100%; display: block; text-align: center; margin-bottom: 10px; }
}
/* ---------------------------------------------------------
   DOWNLOADS BLOCK V2 (With SVG Icons)
--------------------------------------------------------- */

.downloads-sidebar-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.downloads-header {
    background-color: var(--primary-color);
    padding: 12px 15px;
    color: #fff;
    text-align: center;
    border-bottom: 3px solid var(--accent-color);
    font-weight: bold;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.3s ease;
    background: #fff;
}

.download-item:hover {
    background-color: #fcfcfc;
    border-inline-start: 4px solid var(--accent-color);
}

/* --- ICON STYLING (NEW) --- */
.dl-icon {
    width: 40px; 
    height: 40px; 
    display: flex; /* لضمان توسيط الأيقونة */
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 8px; /* حواف ناعمة للأيقونة */
    margin-inline-end: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dl-icon svg {
    width: 22px; /* حجم الرمز داخل المربع */
    height: 22px;
}

/* ألوان مميزة لكل نوع ملف */
.word-icon { 
    background: linear-gradient(135deg, #2b579a, #1e3c6b); /* تدرج أزرق للوورد */
}
.pdf-icon { 
    background: linear-gradient(135deg, #b30b00, #7a0800); /* تدرج أحمر للـ PDF */
}

/* النصوص */
.dl-text { flex-grow: 1; }
.dl-text .title-main { display: block; font-weight: 700; color: var(--text-color); font-size: 0.9rem; }
.dl-text .file-info { display: block; font-size: 0.75rem; color: #999; margin-top: 3px; }

/* السهم */
.dl-arrow { color: #ddd; font-size: 1rem; transition: transform 0.3s; }
.download-item:hover .dl-arrow { 
    color: var(--accent-color); 
    transform: translateY(3px); /* حركة بسيطة للأسفل عند المرور */
}

/* --- LANGUAGE SWITCHING LOGIC --- */
.show-en, .show-ar { display: none; }
html[lang^="en"] .show-en { display: block; }
html[lang^="en"] .show-ar { display: none; }
html[lang^="ar"] .show-ar { display: block; font-family: 'Cairo', sans-serif; }
html[lang^="ar"] .show-en { display: none; }
html[lang^="ar"] .dl-text { text-align: right; }
html[lang^="ar"] .downloads-header { font-family: 'Cairo', sans-serif; }