/* 
======================================================================
DERNA UNIVERSITY JOURNAL OF HUMANITIES (DUJHSS) - THEME
Theme: Derna Blue & Antique Gold (Classic Academic)
======================================================================
*/

/* 1. IMPORT FONTS (Serif Fonts for a "Book" feel) */
/* نستخدم خطوطاً "مذيلة" (Serif) للعناوين لأنها تعطي طابعاً أدبياً وتاريخياً */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Merriweather:wght@400;700&family=Roboto:wght@400;500&display=swap');

:root {
    /* --- HUMANITIES PALETTE --- */
    
    /* 1. Primary: Derna University Blue (Identity) */
    --primary-color: #2D76B6;       
    
    /* 2. Accent: Antique Gold / Bronze (Heritage & Arts) */
    /* This matches the University Logo's wreath but darker/richer */
    --accent-color: #B8860B;        
    
    /* 3. Darker shade for hover interaction */
    --dark-primary: #205a8d;        
    
    /* 4. Gradient for Menu: Blue to Deep Bronze (Sophisticated look) */
    --gradient-start: #2D76B6;
    --gradient-end: #8B6508; /* Dark Gold/Bronze transition */
    
    /* 5. Background: Ivory/Warm Paper (Better for reading long texts) */
    --bg-light: #FDFBF7;            
    --white: #ffffff;
    
    /* 6. Typography Colors */
    --text-color: #2c2c2c;          /* Soft Black */
    
    /* 7. Styling: Sharp edges fit books/history better than rounded */
    --border-radius: 4px;           
    --shadow-soft: 0 4px 15px rgba(184, 134, 11, 0.1); /* Gold tint shadow */
}

/* 
   TYPOGRAPHY OVERRIDE 
   Use "Amiri" (Arabic) and "Merriweather" (English) for Headings
   This mimics the look of high-end printed journals.
*/
h1, h2, h3, h4, h5, h6, .pkp_structure_head_site_name {
    font-family: 'Amiri', 'Merriweather', serif !important;
    letter-spacing: 0px; /* Serif fonts don't need wide spacing */
}

/* Keep body text readable with Sans-Serif */
body {
    font-family: 'Roboto', 'Amiri', serif; 
}
/* ---------------------------------------------------------
   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; }