/* Use a bold geometric sans for level-one and level-two page headings,
   close to the lettering in the Liminalia masthead. */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;800&display=swap");

.pkp_structure_main h1,
.pkp_structure_main h2,
.pkp_structure_main .page_title,
.pkp_structure_main .obj_issue_toc > .sections > .section > h3,
.pkp_structure_main .obj_issue_toc > .sections > .section > h4,
.pkp_page_index .current_issue > h2::after {
    font-family: "Montserrat", "Arial Black", Arial, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
    color: #000 !important;
}

/* Article headings (H4) use a lighter weight than section headings.
   Retain the theme's existing blue link colour. */
.pkp_structure_main .obj_issue_toc .obj_article_summary h4,
.pkp_structure_main .obj_issue_toc .obj_article_summary h4 a {
    font-family: "Montserrat", Arial, sans-serif !important;
    font-size: 1.375rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.015em;
}

/* Hide the duplicate journal title in the blue OJS header. */
.pkp_structure_head .pkp_site_name .is_text {
    display: none !important;
}

/* Keep the navigation white with black lettering, including Search.
   Override theme colours without affecting the issue cover or masthead image. */
.pkp_structure_head,
.pkp_structure_head .pkp_navigation_primary_row,
.pkp_structure_head .pkp_navigation_primary_container,
.pkp_structure_head .pkp_navigation_primary_wrapper,
.pkp_structure_head #navigationPrimary {
    background: #fff !important;
}

.pkp_structure_head #navigationPrimary > li > a,
.pkp_structure_head #navigationPrimary > li > a:hover,
.pkp_structure_head #navigationPrimary > li > a:focus,
.pkp_structure_head .pkp_navigation_search_wrapper a,
.pkp_structure_head .pkp_navigation_search_wrapper a:hover,
.pkp_structure_head .pkp_navigation_search_wrapper a:focus,
.pkp_structure_head .pkp_navigation_user_wrapper a {
    color: #000 !important;
}

/* Reduce the homepage journal image by 25% and keep it centred. */
.pkp_page_index .homepage_image img {
    display: block;
    width: 75%;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

/* Centre and evenly space the four main links on desktop.
   Search stays aligned with the right edge of the header. */
@media (min-width: 992px) {
    .pkp_structure_head .pkp_navigation_primary_wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 6fr) minmax(0, 1fr);
        align-items: center;
    }

    .pkp_structure_head #navigationPrimary {
        grid-column: 2;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .pkp_structure_head #navigationPrimary > li > a {
        margin-left: 0;
        margin-right: 0;
    }

    .pkp_structure_head .pkp_navigation_search_wrapper {
        grid-column: 3;
        justify-self: end;
        float: none;
    }
}

/* Hide the whole-issue PDF section, including the "Full Issue" heading.
   Individual articles and their PDF links stay visible. */
.obj_issue_toc > .galleys {
    display: none !important;
}

/* Reduce the gap between the issue's publication date and Articles
   on the journal homepage, without changing the article list. */
.pkp_page_index .current_issue .obj_issue_toc .heading .published {
    margin-bottom: 0 !important;
}

.pkp_page_index .current_issue .obj_issue_toc > .sections {
    margin-top: 0 !important;
}

.pkp_page_index .current_issue .obj_issue_toc > .sections > .section:first-child {
    margin-top: 0 !important;
}

/* Display "Upcoming Issue" in place of the homepage's "Current Issue" heading.
   This is a visual text replacement; the OJS translation is unchanged. */
.current_issue > h2 {
    font-size: 0 !important;
}

.current_issue > h2::after {
    content: "Upcoming Issue";
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
}

/* Replace "Published:" with "Publishing:" on the homepage issue summary. */
.current_issue .obj_issue_toc > .heading .published .label {
    font-size: 0 !important;
}

.current_issue .obj_issue_toc > .heading .published .label::after {
    content: "Publishing:";
    font-size: 1rem;
    font-weight: 700;
}

/* Keep each article's publication date directly below its author line.
   The issue-level .published margin otherwise adds an oversized gap. */
.obj_issue_toc .obj_article_summary .meta .published {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit;
}

/* Group the homepage issue heading, volume, and publishing date as tightly
   as the title, author, and date within each article summary. */
.pkp_page_index .current_issue > h2 {
    margin-bottom: 0.5rem !important;
}

.pkp_page_index .current_issue > .current_issue_title {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

.pkp_page_index .current_issue > .obj_issue_toc {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.pkp_page_index .current_issue > .obj_issue_toc > .heading {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.pkp_page_index .current_issue > .obj_issue_toc > .heading > .published {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

/* On the homepage, show the issue's publishing date beneath its text
   and before its cover image. The article list remains below the image. */
.pkp_page_index .current_issue .obj_issue_toc > .heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pkp_page_index .current_issue .obj_issue_toc > .heading > .published {
    order: 1;
}

.pkp_page_index .current_issue .obj_issue_toc > .heading > .cover {
    order: 2;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 0;
}

.pkp_page_index .current_issue .obj_issue_toc > .heading > .cover img {
    display: block;
    max-width: 100%;
    max-height: none;
    height: auto;
}

/* Use the issue description as a caption beneath the image for its credit.
   Enter the credit text in the OJS issue Description field. */
.pkp_page_index .current_issue .obj_issue_toc > .heading > .description {
    order: 3;
    align-self: stretch;
    margin: 0.4rem 0 0;
    padding: 0;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
    text-align: right;
}

.pkp_page_index .current_issue .obj_issue_toc > .heading > .description > * {
    margin: 0;
}

/* Bring adjacent issue sections (such as Works and Articles) closer together.
   Leave the spacing between individual articles unchanged. */
.obj_issue_toc > .sections > .section:not(:last-child) {
    margin-bottom: 0 !important;
    padding-bottom: 0.5rem !important;
}

.obj_issue_toc > .sections > .section + .section {
    margin-top: 0 !important;
}

.obj_issue_toc > .sections > .section:not(:last-child) .articles > li:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
