/* ======================================================
   GHALIB JOURNAL - BOOTSTRAP 3 THEME (FINAL FIX)
   اصلاح لوگو + باکس مقالات
   ====================================================== */

/* ---------- 1. IMPORT FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');
@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.0.0-beta3/css/all.min.css');

/* ---------- 2. ROOT VARIABLES ---------- */
:root {
    --navy: #0A2540;
    --navy-dark: #051c2c;
    --gold: #D4AF37;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px -8px rgba(0,0,0,0.12);
    --radius-lg: 20px;
}

/* ---------- 3. BASE & FONTS ---------- */
html, body {
    font-size: 16px !important;
}
body {
    background: #f8fafc !important;
    font-family: 'Vazirmatn', 'Inter', sans-serif !important;
}
body:lang(en) {
    font-family: 'Inter', 'Vazirmatn', sans-serif !important;
}
.abstract, p {
    text-align: justify !important;
}

/* ========== اصلاح 1: لوگو (کوچک‌تر) ========== */
/* همه کلاس‌های احتمالی لوگو */
.navbar-brand img,
.logo img,
.pkp_site_name img,
.site-logo img,
.brand img,
header img[alt*="Logo"],
header img[alt*="لوگو"],
.navbar-header img {
    max-width: 70px !important;
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
}

/* ========== اصلاح 2: باکس مقالات (قوی و جامع) ========== */
/* انتخاب تمام المان‌های محتمل برای مقالات */
.obj_article_summary,
.article-summary,
.item.article,
.article-listing,
.articles-list > div,
.summary,
.article-wrapper {
    background: var(--white) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid var(--gray-200) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* هاور باکس */
.obj_article_summary:hover,
.article-summary:hover,
.item.article:hover,
.article-listing > div:hover {
    transform: translateY(-5px) !important;
    border-color: var(--gold) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* خط طلایی بالای باکس */
.obj_article_summary::before,
.article-summary::before,
.item.article::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, var(--gold), #e8c86a, var(--gold)) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.3s ease !important;
}
.obj_article_summary:hover::before,
.article-summary:hover::before,
.item.article:hover::before {
    transform: scaleX(1) !important;
}

/* عنوان مقاله */
.obj_article_summary .title,
.article-summary .title,
.item.article .title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}
.obj_article_summary .title a,
.article-summary .title a {
    color: var(--navy) !important;
    text-decoration: none !important;
}
.obj_article_summary .title a:hover,
.article-summary .title a:hover {
    color: var(--gold) !important;
}

/* نویسندگان */
.obj_article_summary .authors,
.article-summary .authors {
    font-size: 0.85rem !important;
    color: var(--gray-600) !important;
    margin: 0.5rem 0 !important;
}

/* چکیده */
.obj_article_summary .abstract,
.article-summary .abstract {
    font-size: 0.85rem !important;
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--gray-200) !important;
}

/* ========== اصلاح 3: فوتر (بدون فاصله) ========== */
footer, .pkp_structure_footer {
    margin-top: 0 !important;
    padding: 1rem 0 0.5rem !important;
}
.footer-container {
    gap: 1rem !important;
}
.copyright {
    margin-top: 0.5rem !important;
}

/* ---------- 4. ORCID ---------- */
a[href*="orcid.org"], a[href*="orcid"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: var(--gray-100) !important;
    padding: 2px 8px !important;
    border-radius: 40px !important;
    font-size: 0.7rem !important;
    text-decoration: none !important;
    color: var(--gray-600) !important;
}
a[href*="orcid.org"]::before {
    content: "\f1d2" !important;
    font-family: 'Font Awesome 6 Free' !important;
    color: #A6CE39 !important;
}

/* ---------- 5. HEADER (حفظ آبی تیره) ---------- */
.navbar-default {
    background: var(--navy) !important;
    border-bottom: 3px solid var(--gold) !important;
}
.navbar-default .navbar-nav > li > a {
    color: white !important;
}
.navbar-default .navbar-nav > li > a:hover {
    color: var(--gold) !important;
}
.dropdown-menu {
    background: var(--navy) !important;
}
.dropdown-menu > li > a {
    color: white !important;
}
.dropdown-menu > li > a:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
}