@font-face {
    font-family: "Lora";
    src: url("../../default/fonts/lora-v16-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("../../default/fonts/lora-v16-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("../../default/fonts/lora-v16-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-italic.woff2") format("woff2");
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("../../default/fonts/open-sans-v18-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("../../default/fonts/open-sans-v18-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

.jema-theme {
    --jema-navy: #0b2d5b;
    --jema-gold: #d4af37;
    --jema-sky: #6ba3d6;
    --jema-light: #e8edf3;
    --jema-paper: #fff;
    --jema-ink: #172b42;
    --jema-muted: #4b6076;
    --jema-hover: #204e79;
    --jema-gutter: clamp(1rem, 3vw, 2.5rem);
    --jema-container: 1200px;
    --jema-radius: 4px;
    --jema-serif: "Lora", Georgia, serif;
    --jema-sans: "Open Sans", system-ui, sans-serif;
    background: var(--jema-paper);
    color: var(--jema-ink);
    font-family: var(--jema-sans);
    font-size: 1.142857rem;
    line-height: 1.65;
}

.jema-theme .pkp_structure_head {
    background: var(--jema-navy);
    border-bottom: 3px solid var(--jema-gold);
    color: var(--jema-paper);
}

.jema-theme .pkp_head_wrapper {
    box-sizing: border-box;
    max-width: var(--jema-container);
    width: 100%;
    margin-inline: auto;
    padding: 0 var(--jema-gutter);
}

.jema-theme .pkp_site_name_wrapper {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: auto;
    min-height: 64px;
    width: auto;
    margin: 0;
    padding: 0;
}

.jema-theme .pkp_site_name {
    position: static;
    width: auto;
    padding: 0;
    white-space: normal;
    overflow: visible;
}

.jema-theme .pkp_site_name .jema-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    gap: 0.65rem;
    padding: 0 0.4rem 0 0;
    color: var(--jema-paper);
    font: 700 1.7rem/1 var(--jema-serif);
    text-decoration: none;
}

.jema-brand img {
    display: block;
    width: 40px;
    height: 40px;
}

.jema-theme .pkp_site_nav_toggle {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}

.jema-theme .pkp_site_nav_menu {
    background: var(--jema-navy);
}

.jema-theme .pkp_navigation_user,
.jema-theme .pkp_navigation_primary_wrapper {
    width: 100%;
}

.jema-theme .pkp_site_nav_menu a {
    box-sizing: border-box;
    min-height: 44px;
    padding-block: 0.65rem;
    overflow-wrap: anywhere;
}

.jema-theme .pkp_site_nav_menu a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.jema-theme .jema-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.93rem;
}

.jema-theme .jema-languages li a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.45rem;
}

.jema-theme .jema-languages a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--jema-gold);
    text-underline-offset: 0.25em;
}

.jema-theme .pkp_structure_head :is(a, button):focus-visible,
.jema-theme .pkp_structure_footer_wrapper a:focus-visible {
    outline: 2px solid var(--jema-sky);
    outline-offset: 2px;
}

.jema-theme .pkp_site_nav_menu .dropdown-menu a:focus-visible {
    outline: 2px solid var(--jema-navy);
    outline-offset: -3px;
}

.jema-theme .pkp_structure_content {
    width: 100%;
    max-width: var(--jema-container);
    min-height: 48vh;
    box-sizing: border-box;
    padding: clamp(1.25rem, 4vw, 3.5rem) var(--jema-gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.5rem, 4vw, 3.5rem);
}

.jema-theme .pkp_structure_content .pkp_structure_main,
.jema-theme .pkp_structure_content .pkp_structure_sidebar {
    float: none;
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.jema-theme .pkp_structure_main::before,
.jema-theme .pkp_structure_main::after,
.jema-theme .pkp_structure_content::before,
.jema-theme .pkp_structure_content::after {
    content: none;
}

.jema-theme .pkp_structure_main .page {
    max-width: 82ch;
}

.jema-theme .pkp_structure_main :is(h1, h2, h3) {
    color: var(--jema-navy);
    font-family: var(--jema-serif);
    line-height: 1.25;
}

.jema-theme .pkp_structure_main .page h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.jema-theme .pkp_structure_main img {
    max-width: 100%;
    height: auto;
}

.jema-theme .pkp_structure_main :is(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--jema-navy);
    outline-offset: 3px;
}

.jema-theme .pkp_structure_main :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    border-color: var(--jema-muted);
    font-size: 1rem;
}

.jema-theme .pkp_structure_main :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--jema-navy);
}

.jema-theme .pkp_structure_main :is(.cmp_button, .cmp_form button, .cmp_form input[type="submit"], .obj_galley_link) {
    min-height: 44px;
    white-space: normal;
}

.jema-theme .pkp_structure_main :is(pre, .references) {
    overflow-wrap: anywhere;
}

.jema-theme .pkp_structure_main pre {
    white-space: pre-wrap;
}

.jema-theme .pkp_structure_sidebar .pkp_block {
    padding: 1rem;
    border-top: 2px solid var(--jema-navy);
    background: var(--jema-light);
    margin-bottom: 1rem;
}

.jema-theme .pkp_structure_footer_wrapper {
    background: var(--jema-navy);
    color: var(--jema-paper);
    border-top: 3px solid var(--jema-gold);
}

.jema-theme .pkp_structure_footer {
    box-sizing: border-box;
    max-width: var(--jema-container);
    width: 100%;
    padding: 1.5rem var(--jema-gutter);
}

.jema-theme .pkp_structure_footer a {
    color: var(--jema-paper);
}

.jema-theme .pkp_structure_footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 1.5rem;
    text-align: start;
}

.jema-theme .pkp_structure_footer > .pkp_footer_content {
    flex: 1 1 20rem;
    min-width: 0;
    padding: 0;
}

.jema-theme .pkp_structure_footer > .pkp_brand_footer {
    padding: 0;
    margin-inline-start: auto;
}

.jema-theme .pkp_brand_footer a {
    float: none;
    max-width: 160px;
}

.jema-theme .jema-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
}

.jema-footer-brand img {
    display: block;
    width: min(100%, 320px);
    height: auto;
}

.jema-footer-name {
    display: none;
    font: 700 1.7rem/1 var(--jema-serif);
}

@media (max-width: 767px) {
    .jema-theme .pkp_structure_footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .jema-theme .pkp_structure_footer > .pkp_footer_content {
        flex-basis: auto;
        width: 100%;
    }

    .jema-theme .pkp_structure_footer > .pkp_brand_footer {
        margin-inline-start: 0;
    }
}

@media (max-width: 359px) {
    .jema-footer-brand img {
        width: 48px;
        height: 48px;
    }

    .jema-footer-name {
        display: block;
    }
}

.jema-theme .pkp_brand_footer img {
    box-sizing: border-box;
    max-width: 160px;
    padding: 0.5rem;
    background: var(--jema-paper);
    border-radius: var(--jema-radius);
}

.jema-masthead {
    display: grid;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 3rem);
    padding: clamp(1.5rem, 5vw, 4rem) 0;
    border-top: 3px solid var(--jema-gold);
    border-bottom: 1px solid var(--jema-light);
    background: var(--jema-paper);
}

.jema-lockup {
    display: block;
    width: min(100%, 480px);
    height: auto;
}

.jema-intro {
    min-width: 0;
}

.jema-theme .pkp_structure_main .jema-journal-name {
    margin: 0;
    color: var(--jema-navy);
    font: 700 clamp(1.55rem, 3.3vw, 2.6rem)/1.17 var(--jema-serif);
}

.jema-theme .pkp_structure_main .jema-slogan {
    margin: 0.7rem 0 1.4rem;
    color: var(--jema-muted);
    font: italic 1.13rem/1.5 var(--jema-serif);
}

.jema-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

.jema-theme .jema-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--jema-navy);
    border-radius: var(--jema-radius);
    color: var(--jema-navy);
    background: var(--jema-paper);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.jema-theme .jema-action-primary {
    background: var(--jema-navy);
    color: var(--jema-paper);
}

.jema-theme .jema-action:hover {
    background: var(--jema-light);
    color: var(--jema-navy);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.jema-theme .jema-action-primary:hover {
    background: var(--jema-hover);
    color: var(--jema-paper);
}

.jema-empty,
.jema-values {
    margin-top: clamp(1.5rem, 4vw, 3rem);
    padding: 1.25rem clamp(1rem, 3vw, 2rem);
    background: var(--jema-light);
}

.jema-empty {
    border-inline-start: 3px solid var(--jema-navy);
}

.jema-theme .pkp_structure_main :is(.jema-empty, .jema-values) h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.jema-theme .pkp_structure_main .jema-empty p {
    margin: 0;
}

.jema-theme .jema-values ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.jema-values li {
    border-top: 1px solid var(--jema-sky);
    padding: 0.8rem 0;
    color: var(--jema-navy);
    font-weight: 700;
}

@media (width < 768px) {
    .jema-theme .obj_article_details .entry_details {
        margin-inline: 0;
    }
}

@media (min-width: 768px) {
    .jema-theme .obj_article_details > .row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 36%);
        margin-inline: 0;
    }

    .jema-theme .obj_article_details > .row::before,
    .jema-theme .obj_article_details > .row::after {
        content: none;
    }

    .jema-theme .obj_article_details :is(.main_entry, .entry_details) {
        float: none;
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .jema-theme .obj_article_details .main_entry {
        border-inline-end: 0;
    }

    .jema-theme .obj_article_details .entry_details {
        border-left: 0;
        border-inline-start: 1px solid var(--jema-light);
    }

    .jema-theme .obj_article_details .entry_details .item {
        margin-inline-end: 0;
    }
}

@media (max-width: 992px) {
    .jema-theme .pkp_site_nav_menu {
        display: none;
        position: static;
        width: auto;
        padding: 0 0 1rem;
    }

    .jema-theme .pkp_site_nav_toggle {
        display: block;
    }

    .jema-theme .pkp_site_nav_menu--isOpen {
        display: block;
    }

    .jema-theme .pkp_site_nav_menu :is(.pkp_nav_list, .pkp_navigation_search_wrapper) {
        float: none;
        max-width: none;
        text-align: start;
    }

    .jema-theme .pkp_site_nav_menu li {
        display: block;
    }

    .jema-theme .pkp_site_nav_menu li ul {
        position: static;
        width: auto;
        transform: none;
        background: transparent;
        box-shadow: none;
    }

    .jema-theme .pkp_site_nav_menu a {
        display: inline-flex;
        align-items: center;
        color: var(--jema-paper);
    }

    .jema-theme .pkp_navigation_user_wrapper {
        position: static;
        transform: none;
        padding: 0;
    }
}

@media (min-width: 640px) {
    .jema-actions {
        flex-flow: row wrap;
    }

    .jema-theme .jema-values ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
    }
}

@media (min-width: 993px) {
    .jema-theme .pkp_head_wrapper {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .jema-theme .pkp_site_name_wrapper {
        flex: none;
        min-height: 78px;
    }

    .jema-theme .pkp_site_nav_menu {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.7rem;
    }

    .jema-theme .pkp_navigation_primary_row {
        min-width: 0;
    }

    .jema-theme .pkp_navigation_primary_wrapper {
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }

    .jema-theme .pkp_navigation_primary {
        max-width: none;
    }

    .jema-theme .pkp_navigation_user_wrapper {
        position: static;
        width: auto;
        transform: none;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .jema-theme .pkp_site_nav_menu :is(.pkp_navigation_primary, .pkp_navigation_user) > li > a,
    .jema-theme .pkp_site_nav_menu .pkp_navigation_search_wrapper > a {
        margin: 0;
        padding-inline: 0.45rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .jema-theme .pkp_navigation_user > li > ul {
        left: auto;
        right: 0;
    }

    .jema-theme .pkp_navigation_user > li:hover > ul {
        top: 100%;
        left: auto;
        right: 0;
        transform: none;
    }

    .jema-masthead {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .jema-theme .pkp_structure_content.has_sidebar {
        grid-template-columns: minmax(0, 1fr) minmax(205px, 245px);
    }

    .jema-theme.pkp_page_index .pkp_structure_content.has_sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .jema-theme.pkp_page_index .pkp_structure_sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
        gap: 1rem;
    }

    .jema-theme .jema-values ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
