/* ==========================================================================
   OJS 3.3 - Expert Bootstrap Custom Theme & Professional Styling
   ========================================================================== */

/* --- 1. Fonts & Imports --- */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #333333;
    background-color: #f4f6f9;
    line-height: 1.8;
}

/* RTL / Persian Language Support */
html[lang="fa"] body, body:lang(fa), body[dir="rtl"] {
    font-family: 'Vazirmatn', sans-serif !important;
    direction: rtl;
    text-align: right;
}

html[lang="en"] body, body:lang(en), body[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Academic Justification */
p, .abstract, .article_abstract, .item .value, .section_abstract {
    text-align: justify !important;
}

a {
    color: #0275d8;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #025aa5;
    text-decoration: underline;
}

/* --- 2. BOOTSTRAP-STYLE NAVBAR HEADER --- */
.pkp_structure_head {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pkp_head_wrapper .pkp_navigation_user_wrapper {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    padding: 6px 0;
}

.pkp_site_name {
    padding: 15px 0;
}

.pkp_site_name a {
    font-size: 24px;
    font-weight: 700;
    color: #212529 !important;
}

/* Simulated Bootstrap Dark Navbar (.navbar-inverse) */
.pkp_navigation, 
.pkp_navigation_primary_row,
nav.pkp_navigation_primary {
    background-color: #222222 !important;
    border-color: #080808 !important;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 0 15px;
}

.pkp_navigation ul, 
.pkp_navigation_primary_row ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.pkp_navigation ul li a,
.pkp_navigation_primary_row ul li a {
    color: #9d9d9d !important;
    font-weight: 500;
    padding: 15px 18px;
    display: block;
    transition: color 0.2s, background-color 0.2s;
}

.pkp_navigation ul li a:hover,
.pkp_navigation_primary_row ul li a:hover,
.pkp_navigation ul li.current > a {
    color: #ffffff !important;
    background-color: #080808 !important;
    text-decoration: none;
}

body[dir="rtl"] .pkp_navigation ul, 
body[dir="rtl"] .pkp_navigation_primary_row ul {
    flex-direction: row-reverse;
}

/* --- 3. Homepage Layout & Cover --- */
.cmp_homepage_image {
    margin-bottom: 30px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cmp_homepage_image img {
    width: 100%;
    height: auto;
}

.current_issue {
    background: #ffffff;
    padding: 30px;
    border-radius: 6px;
    border: 1px solid #d3d3d3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    margin-bottom: 35px;
}

.current_issue .heading {
    border-bottom: 2px solid #222222;
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: #222222;
    font-size: 22px;
    font-weight: 700;
}

.current_issue_cover img {
    max-width: 180px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body[dir="rtl"] .current_issue_cover {
    float: right;
    margin-left: 25px;
    margin-bottom: 15px;
}

body[dir="ltr"] .current_issue_cover {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
}

/* --- 4. Sidebar Panels --- */
.pkp_structure_sidebar {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #d3d3d3;
    border-radius: 6px;
    margin-bottom: 30px;
}

.pkp_block {
    margin-bottom: 25px;
}

.pkp_block .title {
    font-size: 14px;
    font-weight: 700;
    color: #222222;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pkp_block ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pkp_block ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #e5e5e5;
}

/* --- 5. BOOTSTRAP CARDS FOR ARTICLES & ORCID --- */
.obj_article_summary,
.section .obj_article_summary,
.current_issue .obj_article_summary,
.issues_iterator .obj_article_summary,
.search_results .obj_article_summary {
    background: #ffffff !important;
    border: 1px solid #d3d3d3 !important;
    border-radius: 6px !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    display: block !important;
    position: relative !important;
    transition: all 0.2s ease-in-out !important;
}

.obj_article_summary:hover {
    border-color: #0275d8 !important;
    box-shadow: 0 4px 12px rgba(2, 117, 216, 0.1) !important;
    transform: translateY(-2px);
}

.obj_article_summary .title a {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0275d8 !important;
    line-height: 1.4 !important;
}

.obj_article_summary .meta {
    color: #6c757d !important;
    font-size: 14px !important;
    margin-top: 8px !important;
}

.obj_article_summary .authors {
    font-weight: 600 !important;
    color: #333333 !important;
}

/* Precise ORCID Icon Placement */
.obj_article_summary .authors .orcid,
.author_name .orcid,
.authors span.orcid,
a.orcidIcon, 
.orcid-icon, 
span.orcid,
.pkp_author_orcid {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    margin-inline-start: 6px !important;
    margin-inline-end: 6px !important;
}

a.orcidIcon img, 
.orcid-icon img, 
.orcid img,
.pkp_author_orcid img,
span.orcid img {
    width: 15px !important;
    height: 15px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    opacity: 0.95 !important;
}

/* --- 6. Galley / Download Buttons --- */
.cmp_galley_link {
    display: inline-block !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.cmp_galley_link.pdf {
    background-color: #d9534f !important;
    color: #ffffff !important;
    border: 1px solid #d43f3a !important;
}

.cmp_galley_link.pdf:hover {
    background-color: #c9302c !important;
    text-decoration: none !important;
}

body[dir="rtl"] .cmp_galley_link { margin-left: 6px; }
body[dir="ltr"] .cmp_galley_link { margin-right: 6px; }

/* --- 7. BOOTSTRAP DARK FOOTER --- */
.pkp_structure_footer {
    background-color: #222222 !important;
    color: #9d9d9d !important;
    padding: 50px 0 20px 0;
    margin-top: 60px;
    border-top: 4px solid #0275d8;
}

.pkp_structure_footer a {
    color: #ffffff !important;
}

.pkp_structure_footer a:hover {
    color: #d8d8d8 !important;
    text-decoration: underline;
}

.pkp_brand_footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 15px;
    border-top: 1px solid #333333;
    font-size: 13px;
    color: #777777;
}