
/* 
=========================================================
DERNA UNIVERSITY OJS CUSTOM STYLESHEET
Designed for: Applied Sciences Journals
=========================================================
*/

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

/* 
=========================================================
2. COLOR VARIABLES (THEME SETTINGS)
=========================================================
*/
:root {
    /* 
       INSTRUCTIONS: 
       Uncomment the section below for the specific journal you are styling.
       Keep the other section commented out.
    */

    /* --- OPTION B: APPLIED SCIENCES JOURNAL (DUJAS) --- */
    
    --primary-color: #1B4F72;       /* Navy Blue (Engineering) */
    --accent-color: #E6AF2E;        /* Derna Gold */
    --dark-primary: #10334a;        /* Darker shade for hover */
    --text-color: #2c3e50;
    --bg-light: #fdfdfd;
    --border-radius: 4px;           /* Sharper edges for engineering */
    
}

/* ---------------------------------------------------------
   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; }
}
/* 
=========================================================
11. HOMEPAGE LAYOUT (Journal Summary + Cover)
* This forces the Homepage Image and Description to sit side-by-side
=========================================================
*/

/* Only apply this on the Homepage (pkp_page_index) for larger screens */
@media (min-width: 768px) {
    
    /* 1. Target the Homepage Image Container */
    .pkp_page_index .homepage_image {
        float: left; /* Make it sit on the left (or change to right for Arabic if preferred) */
        width: 30%;  /* Takes 30% of the screen width */
        margin-right: 30px; /* Space between image and text */
        margin-bottom: 20px;
        text-align: center;
    }

    /* 2. Target the Description Text Container */
    .pkp_page_index .homepage_about {
        float: left;
        width: 65%; /* Takes the remaining space */
        text-align: justify; /* Professional justification for text */
    }
    
    /* 3. Style the Image itself to look like a Book/Journal Cover */
    .pkp_page_index .homepage_image img {
        width: 100%;
        max-width: 250px; /* Maximum realistic size */
        height: auto;
        border: 1px solid #ddd;
        border-radius: 4px; /* Matches theme radius */
        /* This shadow gives the "3D Book" effect */
        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;
    }

    /* Hover effect on the cover */
    .pkp_page_index .homepage_image img:hover {
        transform: scale(1.02); /* Slight zoom */
        box-shadow: 0 8px 16px rgba(45, 118, 182, 0.2); /* Glow with brand color */
    }

    /* 4. Clear floats after the content to prevent layout breaking */
    .pkp_page_index .pkp_page_content::after {
        content: "";
        display: table;
        clear: both;
    }
}

/* 
   EXTRA: Mobile Adjustments 
   On phones, stack them back (Image on top, text below)
*/
@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: 180px; /* Smaller image on mobile */
    }
}

/* ---------------------------------------------------------
   DUJAS SIDEBAR: THE ENGINEERING LOOK
   Style: Geometric, Sharp, Tech-focused
--------------------------------------------------------- */

/* 1. The Container (Technical Card) */
.dujas-tech-block {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0; /* حواف حادة هندسية */
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 4px 0 rgba(27, 79, 114, 0.1); /* ظل صلب */
}

/* 2. The Header (Dark Navy + Gold Line) */
.dujas-tech-block h4 {
    background-color: var(--primary-color); /* Navy Blue */
    color: #fff;
    padding: 12px 15px;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 5px solid var(--accent-color); /* Gold accent */
}

/* 3. The Content Area */
.dujas-tech-block .content {
    padding: 20px;
}

/* 4. Tech Tags (For Topics) */
.tech-tag {
    display: inline-block;
    background: #f1f4f8;
    color: var(--primary-color);
    padding: 5px 10px;
    margin: 3px;
    font-size: 0.8rem;
    border: 1px solid #d1d9e6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.tech-tag:hover {
    background: var(--primary-color);
    color: var(--accent-color);
    border-color: var(--primary-color);
}

/* 5. Metrics Grid (For Statistics) */
.metrics-grid {
    display: flex;
    justify-content: space-between;
    text-align: center;
}
.metric-item {
    width: 48%;
    background: #fafafa;
    padding: 10px 5px;
    border: 1px dashed #ccc;
}
.metric-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color); /* Gold Numbers */
}
.metric-label {
    font-size: 0.75rem;
    color: #555;
    text-transform: uppercase;
}
body {
    /* 
       نستخدم صورة نمطية (Pattern) خفيفة جداً. 
       يمكنك تحميل صورة "blueprint grid" أو "circuit pattern" شفافة.
    */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)), /* طبقة بيضاء شبه شفافة لتخفيف الصورة */
        url('https://www.transparenttextures.com/patterns/graphy.png'); /* رابط لنمط شبكة هندسية */
    background-attachment: fixed;
}

/* ---------------------------------------------------------
   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; }

/* --- 8. SMOOTH PAGE LOAD ANIMATION --- */
body {
    animation: fadeIn 0.8s ease-in-out;
}

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