@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ==========================================================================
   JERAS Custom Theme UI/UX Adjustments (V2 Fixes)
   ========================================================================== */

/* --- 1. Global Typography & Colors --- */
body, .pkp_structure_page {
    font-family: 'Tajawal', sans-serif !important;
    color: #58595B; /* Dark Charcoal for body text */
    background-color: #FFFFFF; /* White background */
}

/* --- 2. Primary Layout & Navigation --- */
/* The top header containing the logo */
.pkp_structure_head {
    background-color: #58595B !important; /* Dark Charcoal */
}

/* The primary navigation bar (was blue, now Crimson Red) */
.pkp_navigation_primary_row, 
.pkp_navigation_primary_wrapper {
    background-color: #A91D33 !important; /* Crimson Red */
}

.pkp_navigation_primary > li > a {
    color: #FFFFFF !important;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pkp_navigation_primary > li:hover > a, 
.pkp_navigation_primary > li:focus > a, 
.pkp_navigation_primary > li[aria-expanded="true"] > a {
    background-color: #8c1628 !important; /* Darker Crimson */
    color: #FFFFFF !important;
}

/* --- Dropdown Menus Fixes --- */
.pkp_navigation_primary ul {
    background-color: #FFFFFF !important; /* White dropdown background */
    border: 1px solid #D1D2D4 !important; /* Silver border */
    border-radius: 0 0 6px 6px !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important; /* Drop shadow for visibility */
    padding: 0 !important;
}

.pkp_navigation_primary ul li a {
    color: #58595B !important; /* Dark text for dropdown items */
    padding: 10px 20px !important;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease !important;
}

.pkp_navigation_primary ul li:last-child a {
    border-bottom: none;
}

.pkp_navigation_primary ul li a:hover, 
.pkp_navigation_primary ul li a:focus {
    background-color: #f8f9fa !important; /* Light gray hover */
    color: #A91D33 !important; /* Crimson Red text on hover */
    border-left-color: #A91D33 !important; /* Override OJS blue */
    border-right-color: #A91D33 !important; /* Override OJS blue */
}

/* --- 3. Buttons & Interactive Elements --- */
a, .pkp_block a {
    color: #A91D33;
    transition: color 0.3s ease;
}

a:hover, .pkp_block a:hover {
    color: #58595B;
    text-decoration: none;
}

button, .cmp_button, .pkp_button {
    background-color: #A91D33 !important; /* Crimson Red */
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6px !important; /* Soft corners */
    padding: 10px 20px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(169, 29, 51, 0.2) !important;
}

button:hover, .cmp_button:hover, .pkp_button:hover {
    background-color: #8c1628 !important; /* Darker Crimson Red */
    box-shadow: 0 4px 8px rgba(169, 29, 51, 0.3) !important;
    transform: translateY(-1px);
}

/* --- 4. Article Cards & Containers --- */
.obj_article_summary, .obj_issue_summary {
    background-color: #FFFFFF;
    border: 1px solid #D1D2D4 !important; /* Light Silver border */
    border-radius: 6px !important; /* Soft corners */
    padding: 25px !important; /* Increased Whitespace */
    margin-bottom: 25px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important; /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.obj_article_summary:hover, .obj_issue_summary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important; /* Enhanced shadow on hover */
    border-color: #A91D33 !important;
}

.obj_article_summary .title a, .obj_issue_summary .title a {
    color: #58595B !important;
    font-weight: 700;
    transition: color 0.3s ease;
}

.obj_article_summary .title a:hover, .obj_issue_summary .title a:hover {
    color: #A91D33 !important; /* Crimson red title hover */
}

/* Authors and Metadata */
.obj_article_summary .authors, .obj_issue_summary .series {
    color: #58595B;
    opacity: 0.8;
}

/* Galley Links (PDF / HTML buttons) */
.obj_galley_link {
    background-color: #F8F9FA !important;
    color: #58595B !important;
    border: 1px solid #D1D2D4 !important;
    border-radius: 6px !important;
    padding: 6px 15px !important;
    transition: all 0.3s ease !important;
    font-weight: 500;
}

.obj_galley_link:hover {
    background-color: #A91D33 !important;
    color: #FFFFFF !important;
    border-color: #A91D33 !important;
}

/* --- 5. Sections, Sidebar & Borders --- */
.pkp_structure_sidebar .pkp_block {
    background-color: #FDFDFD;
    border: none !important; /* Remove borders */
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.pkp_structure_sidebar .pkp_block .title {
    color: #A91D33 !important;
    font-weight: 700;
    border-bottom: 2px solid #D1D2D4 !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* User navigation menu fixing at the very top (Login/Register) */
.pkp_navigation_user li a {
    color: #D1D2D4 !important;
}
.pkp_navigation_user li a:hover {
    color: #FFFFFF !important;
}

/* --- 6. Footer --- */
.pkp_structure_footer {
    background-color: #58595B !important; /* Dark Charcoal */
    color: #D1D2D4 !important; /* Light Silver text */
    padding: 40px 0 !important;
    margin-top: 50px;
    border-top: 4px solid #A91D33; /* Crimson Red top border highlight */
}

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

.pkp_structure_footer a:hover {
    color: #A91D33 !important;
}

/* --- 7. Success Messages & Secondary Accents --- */
.pkp_form_success, .pkp_notification_success {
    background-color: #e8f5e9 !important;
    border-right: 4px solid #1F8240 !important; /* Forest Green */
    color: #1F8240 !important;
    border-radius: 6px;
    padding: 15px;
}

.pkp_form_success .fa, .pkp_notification_success .fa {
    color: #1F8240 !important;
}

/* Forest Green icons for custom journal features block */
.journal-features-block span {
    color: #1F8240 !important;
}

/* --- 8. Top Utility Bar & Language Switcher with Flags --- */
.jeras_top_utility_bar {
    background-color: #2b2b2b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.jeras_top_utility_inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[dir="rtl"] .jeras_top_utility_inner {
    flex-direction: row-reverse;
}

.jeras_language_switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang_switch_item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang_switch_item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF !important;
}

.lang_switch_item.active {
    background: #A91D33;
    border-color: #A91D33;
    color: #FFFFFF !important;
    font-weight: 700;
}

.flag_icon {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang_label {
    font-size: 12px;
    color: #D1D2D4;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
}

.lang_switch_item.active .lang_label,
.lang_switch_item:hover .lang_label {
    color: #FFFFFF;
}

/* --- 9. Top Utility Bar User Navigation (Register/Login) --- */
.jeras_user_nav {
    display: inline-flex;
}

.jeras_user_menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.jeras_user_menu > li {
    display: inline-block !important;
    margin: 0 !important;
}

.jeras_user_menu > li > a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 12px !important;
    color: #D1D2D4 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    line-height: normal !important;
}

.jeras_user_menu > li > a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Align primary header elements and logo correctly below the utility bar */
@media (min-width: 992px) {
    .pkp_head_wrapper {
        padding-top: 15px !important; /* Tighten up header vertical padding */
    }
}

/* --- 10. Dedicated Contact Us Page Styling --- */
.jeras_contact_container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .jeras_contact_container {
        grid-template-columns: 1.2fr 1.8fr;
    }
}

.jeras_contact_info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact_card {
    background: #FFFFFF;
    border: 1px solid #D1D2D4;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact_card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.contact_card.editor_card {
    border-top: 4px solid #A91D33;
}

.contact_card.journal_card {
    border-top: 4px solid #1F8240;
}

.contact_card.address_card {
    border-top: 4px solid #007ab2;
}

.card_header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #F1F2F2;
    padding-bottom: 10px;
}

.card_header .icon {
    font-size: 20px;
}

.contact_card.editor_card .card_header .icon {
    color: #A91D33;
}

.contact_card.journal_card .card_header .icon {
    color: #1F8240;
}

.contact_card.address_card .card_header .icon {
    color: #007ab2;
}

.card_header h3 {
    font-size: 16px;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    color: #333333;
}

.contact_detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.contact_detail .icon_sub {
    color: #58595B;
    width: 20px;
    text-align: center;
}

.contact_detail a {
    color: #007ab2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.contact_detail a:hover {
    text-decoration: underline;
}

.whatsapp_btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: #FFFFFF !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

.whatsapp_btn:hover {
    background-color: #128C7E;
}

.address_text strong {
    color: #333333;
}

/* --- 11. Custom Multi-Column Footer Styling --- */
.pkp_structure_footer_wrapper {
    background-color: #111111 !important; /* Premium deep charcoal black background */
    border-top: 4px solid #A91D33 !important; /* Thick red accent line at the top */
    padding: 50px 0 25px 0 !important;
    color: #E2E8F0 !important; /* High legibility light grey/white text */
}

.pkp_structure_footer {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    background: transparent !important; /* Completely remove the double-tone grey box */
    border: none !important;
    box-shadow: none !important;
}

.jeras_footer_columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.jeras_footer_columns {
    text-align: left;
}

[dir="rtl"] .jeras_footer_columns {
    text-align: right;
}

@media (min-width: 576px) {
    .jeras_footer_columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .jeras_footer_columns {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

.jeras_footer_col h4 {
    color: #FFFFFF !important; /* Crisp white titles */
    font-size: 15px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 22px;
    font-family: 'Tajawal', sans-serif;
    border-bottom: 2px solid #A91D33;
    display: inline-block;
    padding-bottom: 8px;
}

.jeras_footer_col p {
    font-size: 13.5px;
    line-height: 1.7;
    margin: 0 0 12px 0;
    color: #CBD5E1 !important; /* Premium readable slate grey text */
}

.jeras_footer_col .issn {
    color: #FFFFFF !important;
    font-size: 13.5px;
    font-weight: 600;
}

.jeras_footer_col ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.jeras_footer_col ul li {
    margin-bottom: 12px;
}

.jeras_footer_col ul li a {
    color: #94A3B8 !important; /* Modern readable link grey */
    text-decoration: none !important;
    font-size: 13.5px;
    transition: all 0.2s ease;
    display: inline-block;
}

.jeras_footer_col ul li a:hover {
    color: #FFFFFF !important; /* Pure white link on hover */
    transform: translateX(4px);
}

[dir="rtl"] .jeras_footer_col ul li a:hover {
    transform: translateX(-4px);
}

.jeras_footer_col.contact_col p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    margin-bottom: 12px;
}

.jeras_footer_col.contact_col p span {
    color: #FF3E55 !important; /* Bright crimson accent color for icons to pop */
    width: 15px;
    text-align: center;
}

.footer_contact_btn {
    display: inline-block !important;
    background: #A91D33;
    color: #FFFFFF !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px !important;
    text-decoration: none !important;
    font-weight: 600;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease;
}

.footer_contact_btn:hover {
    background: #7a1424;
}

/* Footer Bottom Bar */
.jeras_footer_bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 25px;
}

@media (min-width: 768px) {
    .jeras_footer_bottom {
        flex-direction: row;
    }
}

.footer_copyright {
    font-size: 12px;
    color: #64748B !important; /* Slate grey copyright text for clean readability */
    font-family: 'Tajawal', sans-serif;
}

.pkp_brand_footer {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.pkp_brand_footer img {
    max-height: 32px;
    width: auto;
    filter: grayscale(1) brightness(0.6);
    transition: all 0.2s ease;
}

.pkp_brand_footer img:hover {
    filter: none;
    opacity: 0.9;
}

/* --- 12. Responsive Grid for Article Table of Contents on Desktops --- */
@media (min-width: 992px) {
    ul.cmp_article_list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    ul.cmp_article_list > li {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
    }
    .obj_article_summary {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        height: 100% !important;
    }
    .obj_article_summary .galleys_links {
        margin-top: auto !important;
        padding-top: 15px !important;
    }
}

/* --- 13. Homepage Latest Issues Grid (3 Columns, 2 Rows) --- */
.issues_grid_container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .issues_grid_container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .issues_grid_container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto; /* Two rows of 3 columns */
    }
}

.issue_card {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}
.issue_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(169, 29, 51, 0.08);
}
.cover_link {
    width: 100%;
    display: block;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 3/4; /* Consistent cover ratio */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.cover_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.issue_card:hover .cover_img {
    transform: scale(1.03);
}
.no_cover_placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}
.issue_title {
    font-size: 15px;
    font-weight: 800;
    margin: 5px 0 0 0;
    line-height: 1.4;
    font-family: 'Tajawal', sans-serif;
}
.issue_title a {
    color: #334155 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}
.issue_card:hover .issue_title a {
    color: #A91D33 !important;
}
.btn_all_issues {
    display: inline-block !important;
    margin-top: 20px;
}

/* --- 14. Issue Archive Page Grid Layout --- */
ul.issues_archive {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
@media (min-width: 768px) {
    ul.issues_archive {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (min-width: 992px) {
    ul.issues_archive {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

ul.issues_archive > li {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
}

ul.issues_archive .obj_issue_summary {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100% !important;
    height: 100%;
    border: none !important; /* Ensure no borders */
}

ul.issues_archive .obj_issue_summary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(169, 29, 51, 0.08);
}

ul.issues_archive .obj_issue_summary .cover {
    width: 100%;
    display: block;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

ul.issues_archive .obj_issue_summary .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

ul.issues_archive .obj_issue_summary:hover .cover img {
    transform: scale(1.03);
}

ul.issues_archive .obj_issue_summary h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 5px 0 0 0;
    line-height: 1.4;
    font-family: 'Tajawal', sans-serif;
}

ul.issues_archive .obj_issue_summary h2 a.title {
    color: #334155 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

ul.issues_archive .obj_issue_summary:hover h2 a.title {
    color: #A91D33 !important;
}

ul.issues_archive .obj_issue_summary .series {
    font-size: 13px;
    color: #64748B;
    margin-top: 5px;
}




