/* ======================================================
   GHALIB JOURNAL - MONUSCRIPT CHILD DEFAULT STYLESHEET
   کاملاً سازگار با تم Monuscript | بهینه برای OJS 3
   ====================================================== */

/* ---------- 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;
    --navy-light: #1a3a5c;
    --gold: #D4AF37;
    --gold-dark: #b8960c;
    --gold-light: #e8c86a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --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: 12px;
    --radius-lg: 20px;
}

/* ---------- 3. BASE FONT (بزرگ و خوانا) ---------- */
html, body {
    font-size: 16px !important;
}
@media (min-width: 1200px) {
    html, body { font-size: 17px !important; }
}
@media (max-width: 768px) {
    html, body { font-size: 15px !important; }
}

body {
    background: var(--gray-50) !important;
    color: var(--gray-900) !important;
    line-height: 1.65 !important;
}

/* ---------- 4. PERSIAN FONT (Vazirmatn) ---------- */
body:lang(fa), body:lang(prs), body.fa-mode,
body:lang(fa) *:not(i):not(.fa):not(.fas):not(.fab),
body:lang(prs) *:not(i):not(.fa):not(.fas):not(.fab) {
    font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
}

/* English Font */
body:lang(en), body.en-mode,
body:lang(en) *:not(i):not(.fa):not(.fas):not(.fab),
body.en-mode *:not(i):not(.fa):not(.fas):not(.fab) {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    direction: ltr !important;
    text-align: left !important;
}

/* Font Awesome */
i, .fa, .fas, .far, .fal, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free' !important;
    direction: ltr !important;
}

/* Justify Text */
.abstract, .obj_article_summary .abstract, p {
    text-align: justify !important;
}

/* ---------- 5. TYPOGRAPHY ---------- */
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.625rem; }
p { font-size: 1rem; line-height: 1.7; margin-bottom: 1rem; }

/* ---------- 6. HEADER (Monuscript Style) ---------- */
.pkp_site_name_wrapper {
    background: var(--navy) !important;
    border-bottom: 3px solid var(--gold) !important;
    padding: 0.75rem 0 !important;
    margin-bottom: 2rem !important;
}
.pkp_site_name a {
    display: none !important;
}
.pkp_site_name:after {
    content: "فصلنامه علمی پژوهشی غالب" !important;
    display: block;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}
body:lang(en) .pkp_site_name:after {
    content: "Ghalib Journal of Legal Studies" !important;
}

/* ---------- 7. NAVIGATION (Horizontal Menu) ---------- */
.pkp_navigation_primary {
    background: var(--navy) !important;
    border: none !important;
}
.pkp_navigation_primary nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}
.pkp_navigation_primary ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.pkp_navigation_primary li a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0.6rem 1.2rem !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    border-radius: 40px !important;
    transition: 0.2s !important;
}
.pkp_navigation_primary li a i {
    color: var(--gold) !important;
}
.pkp_navigation_primary li a:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
}

/* ---------- 8. DROPDOWNS (RTL/LTR Aware) ---------- */
.pkp_navigation_primary li.has-dropdown {
    position: relative !important;
}
.pkp_navigation_primary ul.submenu {
    position: absolute !important;
    top: 100% !important;
    background: var(--navy) !important;
    min-width: 220px !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: 0.2s !important;
    border: 1px solid var(--gold) !important;
    padding: 0.5rem 0 !important;
    z-index: 100 !important;
}
body:lang(fa) .pkp_navigation_primary ul.submenu {
    right: 0 !important;
    left: auto !important;
}
body:lang(en) .pkp_navigation_primary ul.submenu {
    left: 0 !important;
    right: auto !important;
}
.pkp_navigation_primary li:hover > ul.submenu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}
.pkp_navigation_primary ul.submenu li a {
    display: block !important;
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
    color: white !important;
}
.pkp_navigation_primary ul.submenu li a:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
}
.has-dropdown > a::after {
    content: "\f107" !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-size: 0.7rem !important;
    margin-right: 6px !important;
}

/* ---------- 9. ARTICLE BOXES (با HOVER حرفه‌ای) ---------- */
.obj_article_summary {
    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 {
    transform: translateY(-5px) !important;
    border-color: var(--gold) !important;
    box-shadow: var(--shadow-lg) !important;
}
.obj_article_summary::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold)) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.3s ease !important;
}
.obj_article_summary:hover::before {
    transform: scaleX(1) !important;
}
.obj_article_summary .title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}
.obj_article_summary .title a {
    color: var(--navy) !important;
    text-decoration: none !important;
}
.obj_article_summary .title a:hover {
    color: var(--gold) !important;
}
.obj_article_summary .authors {
    font-size: 0.85rem !important;
    margin: 0.5rem 0 !important;
    color: var(--gray-600) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.obj_article_summary .abstract {
    font-size: 0.85rem !important;
    line-height: 1.65 !important;
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--gray-200) !important;
}

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

/* ---------- 11. SIDEBAR (Gold Line + Hover Boxes) ---------- */
.pkp_structure_sidebar {
    position: relative !important;
}
body:lang(fa) .pkp_structure_sidebar {
    padding-right: 1rem !important;
}
body:lang(fa) .pkp_structure_sidebar::before {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    height: 100% !important;
    width: 3px !important;
    background: linear-gradient(180deg, var(--gold), var(--gray-300), var(--gold)) !important;
    border-radius: 3px !important;
}
body:lang(en) .pkp_structure_sidebar {
    padding-left: 1rem !important;
    padding-right: 0 !important;
}
body:lang(en) .pkp_structure_sidebar::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    height: 100% !important;
    width: 3px !important;
    background: linear-gradient(180deg, var(--gold), var(--gray-300), var(--gold)) !important;
    border-radius: 3px !important;
}
.pkp_block {
    background: var(--white) !important;
    border-radius: var(--radius) !important;
    padding: 1.25rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid var(--gray-200) !important;
    transition: all 0.2s !important;
}
.pkp_block:hover {
    transform: translateY(-2px) !important;
    border-color: var(--gold) !important;
    box-shadow: var(--shadow-md) !important;
}
.pkp_block .title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    border-bottom: 2px solid var(--gold) !important;
    display: inline-block !important;
    padding-bottom: 0.25rem !important;
    margin-bottom: 1rem !important;
}

/* ---------- 12. FOOTER ---------- */
footer, .pkp_structure_footer {
    background: var(--navy-dark) !important;
    color: var(--gray-300) !important;
    margin-top: 2rem !important;
    padding: 2rem 0 1rem !important;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-col {
    flex: 1;
    min-width: 180px;
}
.footer-col h4 {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid rgba(212,175,55,0.3);
    display: inline-block;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: var(--gray-300);
    font-size: 0.75rem;
    text-decoration: none;
}
.footer-col a:hover {
    color: var(--gold);
}
.copyright {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.65rem;
    border-top: 1px solid rgba(212,175,55,0.15);
    margin-top: 1.5rem;
}

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 768px) {
    .pkp_navigation_primary ul {
        flex-direction: column !important;
        width: 100% !important;
    }
    .pkp_navigation_primary li a {
        display: block !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
    .pkp_navigation_primary ul.submenu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: var(--navy-light) !important;
        margin: 0.25rem 0 !important;
    }
    body:lang(fa) .pkp_structure_sidebar::before,
    body:lang(en) .pkp_structure_sidebar::before {
        width: 100% !important;
        height: 2px !important;
        background: linear-gradient(90deg, var(--gold), var(--gray-300), var(--gold)) !important;
    }
    body:lang(fa) .pkp_structure_sidebar,
    body:lang(en) .pkp_structure_sidebar {
        padding: 1rem 0 0 0 !important;
    }
    .footer-container {
        flex-direction: column !important;
        text-align: center !important;
    }
}

/* ---------- 14. BUTTONS ---------- */
.btn, button, input[type="submit"] {
    background: var(--navy);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    border: none;
    transition: 0.2s;
    cursor: pointer;
}
.btn:hover, button:hover, input[type="submit"]:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
}