/**
 * HMS Publications theme
 *
 * Brand reference: hms.gr
 * Cream:  #F4EADC
 * Teal:   #0D4744
 * Ink:    #092D2C
 * Orange: #F5A626
 */

:root {
    --hms-cream: #f4eadc;
    --hms-cream-soft: #fffaf5;
    --hms-cream-deep: #f6ede1;
    --hms-teal: #0d4744;
    --hms-teal-dark: #092d2c;
    --hms-orange: #f5a626;
    --hms-border: #dfd0bd;
    --hms-white: #ffffff;
    --hms-muted: #5d6867;
    --hms-shadow: 0 12px 32px rgba(9, 45, 44, 0.08);
    --hms-radius: 4px;
    --hms-content-width: 1180px;
}

html {
    background: var(--hms-cream-soft);
    color: var(--hms-teal-dark);
    font-size: 16px;
}

body {
    background: var(--hms-cream-soft);
    color: var(--hms-teal-dark);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: var(--hms-teal);
    text-decoration-color: rgba(13, 71, 68, 0.35);
    text-underline-offset: 0.16em;
}

a:hover,
a:focus {
    color: #8a5600;
    text-decoration-color: var(--hms-orange);
}

:focus-visible {
    outline: 3px solid var(--hms-orange);
    outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--hms-teal-dark);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.24;
}

.pkp_structure_page {
    background: var(--hms-cream-soft);
}

/* Header and institutional navigation */
.pkp_structure_head {
    background: var(--hms-cream);
    border: 0;
    box-shadow: 0 2px 12px rgba(9, 45, 44, 0.1);
}

.pkp_structure_head::after {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--hms-teal);
    content: "";
}

.pkp_structure_head .pkp_head_wrapper {
    width: auto;
    max-width: var(--hms-content-width);
    margin-right: auto;
    margin-left: auto;
    padding-top: 0 !important;
    padding-right: 30px;
    padding-left: 30px;
}

.pkp_site_name {
    padding-top: 13px;
    padding-bottom: 9px;
}

.pkp_structure_head .pkp_site_name > a {
    color: var(--hms-teal);
    font-size: clamp(1.35rem, 2.4vw, 2.05rem);
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1.15;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase;
}

.pkp_site_name .is_img {
    display: inline-flex;
    align-items: center;
}

.pkp_site_name .hms_site_identity {
    gap: 1.25rem;
    text-decoration: none;
}

.pkp_site_name .hms_journal_title {
    color: var(--hms-teal-dark);
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.015em;
    line-height: 1.15;
    text-transform: uppercase;
    white-space: normal;
}

.pkp_site_name .is_img img {
    width: auto;
    max-width: min(720px, 78vw);
    max-height: 88px;
}

.pkp_navigation_primary_row {
    background: transparent;
    border: 0;
}

.pkp_navigation_primary {
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

.pkp_navigation_primary > li > a {
    margin: 0 0.15rem;
    padding: 0.9rem 0.85rem 0.72rem;
    border-bottom: 3px solid transparent;
    color: var(--hms-teal-dark);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_navigation_primary > li > a[aria-current="page"] {
    border-bottom-color: var(--hms-orange);
    color: var(--hms-teal);
}

.pkp_navigation_primary ul {
    background: var(--hms-white);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius);
    box-shadow: var(--hms-shadow);
}

.pkp_navigation_primary ul a {
    color: var(--hms-teal-dark);
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
    background: var(--hms-cream-deep);
    color: var(--hms-teal);
}

.pkp_navigation_user > li > a {
    color: var(--hms-teal-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
    color: #8a5600;
}

.pkp_navigation_search_wrapper a {
    color: var(--hms-teal);
}

.pkp_navigation_search_wrapper a:hover,
.pkp_navigation_search_wrapper a:focus {
    color: #8a5600;
}

/* Main content */
.pkp_structure_content {
    width: auto;
    max-width: var(--hms-content-width);
    margin-right: auto;
    margin-left: auto;
    background: var(--hms-cream-soft);
}

.pkp_structure_main {
    padding-top: clamp(2rem, 4vw, 4rem);
    padding-bottom: clamp(3rem, 6vw, 6rem);
}

.pkp_structure_main::before {
    border-color: var(--hms-border);
}

.page h1,
.page_site h1,
.page_site h2,
.page_index_site h1,
.page_index_site h2,
.page_index_journal .current_issue_title,
.obj_issue_toc .heading {
    position: relative;
    padding-bottom: 0.55rem;
}

.page h1::after,
.page_site h1::after,
.page_site h2::after,
.page_index_site h1::after,
.page_index_site h2::after,
.page_index_journal .current_issue_title::after,
.obj_issue_toc .heading::after {
    display: block;
    width: 62px;
    height: 4px;
    margin-top: 0.65rem;
    background: var(--hms-orange);
    content: "";
}

.page_site .journals > h2,
.page_site > h2,
.page_index_site .journals > h2,
.page_index_site > h2 {
    margin-top: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

/* The upstream theme visually hides this heading. The publications portal
 * benefits from an explicit section title, especially on the site index. */
.pkp_page_index .journals > h2 {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto;
    height: auto;
    margin: 0 0 1.4rem;
    padding: 0 0 0.55rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Journal cards on the multi-journal index */
.page_site .journals > ul,
.page_site .journals > ul > li,
.page_index_site .journals > ul,
.page_index_site .journals > ul > li {
    border: 0;
}

.page_site .journals > ul > li,
.page_index_site .journals > ul > li {
    margin: 1.4rem 0;
    padding: clamp(1.4rem, 3vw, 2.15rem);
    background: var(--hms-white);
    border: 1px solid var(--hms-border);
    border-left: 6px solid var(--hms-teal);
    border-radius: var(--hms-radius);
    box-shadow: var(--hms-shadow);
}

.page_site .journals .thumb,
.page_index_site .journals .thumb {
    border: 1px solid var(--hms-border);
    background: var(--hms-white);
}

.page_site .journals h3 a,
.page_index_site .journals h3 a {
    color: var(--hms-teal-dark);
    font-size: 1.35rem;
    text-decoration: none;
}

.page_site .journals h3 a:hover,
.page_site .journals h3 a:focus,
.page_index_site .journals h3 a:hover,
.page_index_site .journals h3 a:focus {
    color: #8a5600;
}

.pkp_page_index .journals > ul > li {
    margin: 1.4rem 0;
    padding: clamp(1.4rem, 3vw, 2.15rem);
    border: 1px solid var(--hms-border);
    border-left: 6px solid var(--hms-teal);
}

.page_index_site .journals .links a {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    background: var(--hms-cream-deep);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius);
    color: var(--hms-teal-dark);
    font-weight: 700;
    text-decoration: none;
}

.page_index_site .journals .links a:hover,
.page_index_site .journals .links a:focus {
    background: var(--hms-orange);
    border-color: var(--hms-orange);
}

/* Issues, articles, announcements and reusable content objects */
.obj_issue_summary,
.obj_article_summary,
.obj_announcement_summary,
.cmp_announcements > li,
.obj_issue_toc {
    border-color: var(--hms-border);
}

.obj_issue_summary,
.obj_announcement_summary {
    padding: 1.35rem;
    background: var(--hms-white);
    border: 1px solid var(--hms-border);
    border-radius: var(--hms-radius);
}

.obj_article_summary .title a,
.obj_issue_summary .title a,
.obj_announcement_summary .title a {
    color: var(--hms-teal-dark);
    text-decoration: none;
}

.obj_article_summary .title a:hover,
.obj_article_summary .title a:focus,
.obj_issue_summary .title a:hover,
.obj_issue_summary .title a:focus,
.obj_announcement_summary .title a:hover,
.obj_announcement_summary .title a:focus {
    color: #8a5600;
}

.obj_article_details .page_title,
.obj_article_details .main_entry .label,
.obj_issue_toc .section h2,
.obj_issue_toc .section h3 {
    color: var(--hms-teal-dark);
}

.obj_article_details .item .label,
.obj_article_summary .meta,
.obj_issue_summary .description,
.obj_announcement_summary .date,
.cmp_breadcrumbs {
    color: var(--hms-muted);
}

.cmp_breadcrumbs a {
    color: var(--hms-teal);
}

/* Buttons, galley links and form controls */
.cmp_button,
.cmp_form .buttons button,
.pkp_button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.obj_galley_link {
    background: var(--hms-teal);
    border: 2px solid var(--hms-teal);
    border-radius: var(--hms-radius);
    color: var(--hms-white);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cmp_button:hover,
.cmp_button:focus,
.cmp_form .buttons button:hover,
.cmp_form .buttons button:focus,
.pkp_button:hover,
.pkp_button:focus,
button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.obj_galley_link:hover,
.obj_galley_link:focus {
    background: var(--hms-orange);
    border-color: var(--hms-orange);
    color: var(--hms-teal-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
select,
textarea {
    background: var(--hms-white);
    border: 1px solid #b9aaa0;
    border-radius: var(--hms-radius);
    color: var(--hms-teal-dark);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: var(--hms-orange);
    box-shadow: 0 0 0 3px rgba(245, 166, 38, 0.22);
}

/* Sidebar */
.pkp_structure_sidebar {
    border-color: var(--hms-border);
}

.pkp_structure_sidebar .title {
    color: var(--hms-teal-dark);
    font-weight: 700;
}

.pkp_structure_sidebar .block_make_submission a {
    display: block;
    background: var(--hms-orange);
    border: 2px solid var(--hms-orange);
    border-radius: var(--hms-radius);
    color: var(--hms-teal-dark);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.pkp_structure_sidebar .block_make_submission a:hover,
.pkp_structure_sidebar .block_make_submission a:focus {
    background: var(--hms-teal);
    border-color: var(--hms-teal);
    color: var(--hms-white);
}

/* Tables */
table {
    background: var(--hms-white);
    border-color: var(--hms-border);
}

th {
    background: var(--hms-cream-deep);
    color: var(--hms-teal-dark);
}

td,
th {
    border-color: var(--hms-border);
}

/* Footer */
.pkp_structure_footer_wrapper {
    background: var(--hms-cream);
    border-top: 4px solid var(--hms-teal);
    color: var(--hms-teal-dark);
}

.pkp_structure_footer {
    width: auto;
    max-width: var(--hms-content-width);
    margin-right: auto;
    margin-left: auto;
    padding: 1.15rem 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    text-align: left;
}

/* The Default Theme clearfix becomes an empty grid row and adds extra height. */
.pkp_structure_footer::before,
.pkp_structure_footer::after {
    display: none;
}

.pkp_footer_content {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    color: var(--hms-teal-dark);
    font-size: 0.9rem;
    line-height: 1.45;
}

.pkp_footer_content p {
    margin: 0;
}

.pkp_footer_content h1,
.pkp_footer_content h2,
.pkp_footer_content h3,
.pkp_footer_content h4 {
    color: var(--hms-teal-dark);
}

.pkp_footer_content strong {
    color: var(--hms-teal);
    font-size: 1rem;
}

.pkp_footer_content a {
    color: var(--hms-teal);
}

.pkp_footer_content a:hover,
.pkp_footer_content a:focus {
    color: var(--hms-orange);
}

.pkp_brand_footer {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    padding: 0;
    opacity: 0.68;
}

.pkp_brand_footer a {
    float: none;
    display: block;
    width: 76px;
    max-width: 76px;
}

.pkp_brand_footer img {
    display: block;
    width: 76px;
    height: auto;
    filter: grayscale(1) brightness(0.48) sepia(0.45) hue-rotate(125deg) saturate(1.4);
}

/* Mobile navigation */
.pkp_site_nav_toggle {
    color: var(--hms-teal);
}

.pkp_site_nav_menu {
    background: var(--hms-cream);
}

@media (max-width: 991px) {
    .pkp_structure_head .pkp_head_wrapper {
        min-height: 56px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .pkp_site_name {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .pkp_site_nav_toggle {
        top: 6px;
    }

    .pkp_site_name .is_img img {
        max-width: calc(100vw - 110px);
        max-height: 40px;
    }

    .pkp_site_name .hms_site_identity {
        gap: 0.7rem;
    }

    .pkp_site_name .hms_journal_title {
        max-width: calc(100vw - 170px);
        font-size: 1rem;
        line-height: 1.15;
    }

    .pkp_navigation_primary > li > a {
        margin: 0;
        padding: 0.9rem 1.25rem;
        border-right: 0;
        border-bottom: 1px solid var(--hms-border);
    }

    .pkp_navigation_user {
        border-color: var(--hms-border);
    }

    .pkp_structure_main {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 575px) {
    html {
        font-size: 15px;
    }

    .pkp_structure_head::after {
        height: 4px;
    }

    .pkp_site_name > a {
        font-size: 1.18rem;
        letter-spacing: 0;
    }

    .page_site .journals > ul > li,
    .page_index_site .journals > ul > li {
        padding: 1.1rem;
        border-left-width: 4px;
    }

    .pkp_structure_footer {
        padding: 0.85rem 20px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem;
    }

    .pkp_brand_footer {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .pkp_brand_footer a,
    .pkp_brand_footer img {
        width: 56px;
        max-width: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

