/* ==========================================================================
   Pakistan Journal of Clinical Research (PJCR) - Master Style Sheet
   ========================================================================== */

/* ---------- JUSTIFIED TEXT (EXCLUDING CUSTOM BLOCKS) ---------- */
p:not(.custom-block p, .alert p),
.article p:not(.custom-block p, .alert p),
.item p:not(.custom-block p, .alert p),
.section p:not(.custom-block p, .alert p),
main p:not(.custom-block p, .alert p),
.entry-content p:not(.custom-block p, .alert p),
.page-content p:not(.custom-block p, .alert p),
[class*="article"] p:not(.custom-block p, .alert p),
.abstract:not(.custom-block, .alert),
.article-abstract:not(.custom-block, .alert),
[class*="abstract"]:not(.custom-block, .alert),
.references:not(.custom-block, .alert),
.ref-list:not(.custom-block, .alert),
.bibliography:not(.custom-block, .alert),
.citation-list:not(.custom-block, .alert),
[class*="reference"]:not(.custom-block, .alert) {
    text-align: justify;
}

/* ---------- HOMEPAGE ARTICLE SUMMARY LAYOUT (UNIFORM BOXED) ---------- */
/* Creates a clean container enclosing Title, DOI, Authors, and Full Text button */
.obj_article_summary:not(.custom-block, .alert),
.article_summary:not(.custom-block, .alert),
.toc_article:not(.custom-block, .alert),
.item.article:not(.custom-block, .alert),
.articles .obj_article_summary:not(.custom-block, .alert) {
    background-color: rgba(238, 242, 246, 0.85) !important; /* Slightly sharper, richer semi-transparent slate tint */
    border: 1px solid #d1d5db !important; /* Slightly crispy border to complement the sharper background */
    padding: 18px 20px !important; /* Internal breathing room around the elements */
    margin-bottom: 2rem !important; /* Spacing between independent article boxes */
    border-radius: 6px !important; /* Smooth, rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important; /* Barely visible elegant depth shadow */
    box-sizing: border-box !important;
}

/* ---------- ARTICLE TITLE & OPEN ACCESS TEXT ---------- */
/* Injects "Full Open Access" text slightly above the top left side of the title */
.obj_article_summary .title:not(.custom-block, .alert)::before,
.article_summary .title:not(.custom-block, .alert)::before,
.toc_article .title:not(.custom-block, .alert)::before {
    content: "Full Open Access";
    display: block;
    color: #f3702b; /* Professional Open Access orange */
    font-size: 11px; 
    font-weight: normal; 
    letter-spacing: 0.8px;
    margin-bottom: 0.3rem;
}

.obj_article_summary .title:not(.custom-block, .alert),
.article_summary .title:not(.custom-block, .alert),
.toc_article .title:not(.custom-block, .alert) {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* ---------- DOI INSIDE THE BLOCK (No extra styling) ---------- */
.obj_article_summary .doi:not(.custom-block, .alert),
.article_summary .doi:not(.custom-block, .alert),
.toc_article .doi:not(.custom-block, .alert) {
    margin: 0.3rem 0;
}

/* ---------- AUTHOR INSIDE THE BLOCK (No extra styling) ---------- */
.obj_article_summary .authors:not(.custom-block, .alert),
.article_summary .authors:not(.custom-block, .alert),
.toc_article .authors:not(.custom-block, .alert) {
    margin: 0.3rem 0;
    font-style: normal;
}

/* ==========================================================================
   COMPACT HEADER NAVIGATION & DESIGN WITH LEFT-ALIGNED BRANDING
   ========================================================================== */

/* Keeps the primary header branding container safely left-aligned */
.pkp_site_name_wrapper {
    text-align: left !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* Configures the journal name container block elements */
.pkp_site_name {
    display: inline-block !important;
    text-align: left !important; /* Forces the text styling to left-align completely */
    position: relative !important;
}

/* Increases the journal title size by 10% explicitly targeting its link element */
.pkp_site_name a {
    font-size: 110% !important; /* Dynamically makes the branding font 10% larger */
}

/* Completely hides/deletes the "Open Access" tag underneath the journal title */
.pkp_site_name::after {
    content: none !important;
    display: none !important;
}

/* Target only the primary navigation menu bar directly below the journal title */
.pkp_navigation_primary_wrapper {
    min-height: auto !important; /* Removes the thick default height of the menu row */
    margin-top: 5px !important;  /* Tightens the gap between the title structure and menu layout */
    border-top: none !important; /* Clears any global horizontal lines across the screen */
    text-align: left !important; /* Ensures the wrapper level aligns child text elements left */
}

/* Keeps all primary navigation links completely left-aligned across all layouts */
.pkp_navigation_primary {
    justify-content: flex-start !important;
    display: flex !important;
    flex-wrap: wrap !important;
    padding-left: 0 !important; /* Clears default navigation offsets */
    margin-left: 0 !important;
    list-style: none !important;
}

/* Forces individual navigation list item wrappers to sit flush left */
.pkp_navigation_primary > li {
    margin-left: 0px !important;
    margin-right: 4px !important;
    float: left !important; /* Fail-safe for legacy float layouts */
    text-align: left !important;
}

.pkp_navigation_primary > li > a {
    font-size: 14px !important;        /* Standard OJS structural size */
    font-weight: normal !important;    /* Reverted to standard, non-bold font weight */
    padding: 10px 14px !important;     /* Standard breathing room padding on all sides */
    text-transform: none !important;   /* Normal layout text case */
    text-align: left !important;
    display: block !important;
}

/* ---------- RESPONSIVE MOBILE FIXES FOR THE BRANDING ELEMENT ---------- */
@media (max-width: 767px) {
    /* Ensures the primary structural parent block doesn't force line wraps */
    .pkp_structure_head {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    /* Forces the title container block to keep its generated text inline with its parent width boundaries */
    .pkp_site_name_wrapper {
        width: auto !important;
        max-width: 80% !important; /* Saves breathing room for the mobile toggle menu button */
        margin-bottom: 5px !important;
    }

    .pkp_site_name {
        display: inline-block !important;
    }

    /* Keeps user tabs left aligned on smaller responsive drawer interfaces */
    .pkp_navigation_primary {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .pkp_navigation_primary > li > a {
        padding: 12px 14px !important; /* Standard mobile friendly touch zones */
    }
}