:root {
    --sjt-primary: #405568;
    --sjt-primary-rgb: 64, 85, 104;
    --sjt-primary-deep: #273947;
    --sjt-primary-soft: #eaf0f4;
    --sjt-accent: #8aa2b5;
    --sjt-accent-warm: #c8aa68;
    --sjt-ink: #1d2933;
    --sjt-muted: #667682;
    --sjt-line: #dce4e9;
    --sjt-surface: #ffffff;
    --sjt-bg: #f4f7f9;
    --sjt-radius: 16px;
    --sjt-shadow: 0 14px 38px rgba(31, 50, 64, .08);
}

html { scroll-behavior: smooth; }

body.sjt-theme {
    margin: 0;
    color: var(--sjt-ink);
    background: var(--sjt-bg);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.sjt-theme .pkp_structure_page {
    max-width: none;
    min-height: 100vh;
    background: transparent;
}

/* Header */
body.sjt-theme .pkp_structure_head {
    position: relative;
    z-index: 100;
    border: 0;
    border-bottom: 3px solid var(--sjt-accent-warm);
    background:
        radial-gradient(circle at 85% -20%, rgba(255,255,255,.12), transparent 34%),
        linear-gradient(135deg, var(--sjt-primary-deep), var(--sjt-primary));
    box-shadow: 0 10px 30px rgba(31, 50, 64, .18);
}

body.sjt-theme .pkp_structure_head.sjt-header-ready > :not(.sjt-header-shell) {
    display: none !important;
}

body.sjt-theme .sjt-header-shell {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 28px 13px;
    box-sizing: border-box;
}

body.sjt-theme .sjt-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 72px;
}

body.sjt-theme .sjt-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
    color: #fff !important;
    text-decoration: none !important;
}

body.sjt-theme .sjt-header-logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    max-width: 88px;
    max-height: 64px;
    object-fit: contain;
}

body.sjt-theme .sjt-header-title {
    overflow: hidden;
    color: #fff !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 2.35vw, 2.55rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .01em;
    text-overflow: ellipsis;
    text-shadow: 0 2px 14px rgba(0,0,0,.14);
}

body.sjt-theme .sjt-header-actions {
    position: static;
    flex: 0 0 auto;
}

body.sjt-theme .sjt-language-switcher {
    display: flex;
    align-items: center;
    gap: 7px;
}

body.sjt-theme .sjt-language-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 9px;
    color: rgba(255,255,255,.88) !important;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none !important;
}

body.sjt-theme .sjt-language-link svg {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.20);
}

body.sjt-theme .sjt-language-link.is-active,
body.sjt-theme .sjt-language-link:hover,
body.sjt-theme .sjt-language-link:focus {
    border-color: var(--sjt-accent-warm);
    background: rgba(255,255,255,.12);
    color: #fff !important;
}

body.sjt-theme .sjt-hide-language-block {
    display: none !important;
}

/* Stable navigation */
body.sjt-theme .sjt-navigation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,.14);
}

body.sjt-theme .sjt-navigation-left {
    min-width: 0;
}

body.sjt-theme .sjt-navigation-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

body.sjt-theme .sjt-primary-menu,
body.sjt-theme .sjt-user-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.sjt-theme .sjt-primary-menu > li,
body.sjt-theme .sjt-user-menu > li {
    position: relative;
    margin: 0;
    list-style: none;
}

body.sjt-theme .sjt-primary-menu a,
body.sjt-theme .sjt-user-menu a,
body.sjt-theme .sjt-header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 0 11px;
    border-radius: 9px;
    color: rgba(255,255,255,.94) !important;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

body.sjt-theme .sjt-user-menu a {
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
}

body.sjt-theme .sjt-header-search {
    gap: 5px;
}

body.sjt-theme .sjt-primary-menu a:hover,
body.sjt-theme .sjt-primary-menu a:focus,
body.sjt-theme .sjt-user-menu a:hover,
body.sjt-theme .sjt-user-menu a:focus,
body.sjt-theme .sjt-header-search:hover,
body.sjt-theme .sjt-header-search:focus {
    background: rgba(255,255,255,.15);
    color: #fff !important;
}

body.sjt-theme .sjt-primary-menu ul,
body.sjt-theme .sjt-user-menu ul {
    position: absolute;
    z-index: 150;
    top: calc(100% - 1px);
    left: 0;
    display: none;
    min-width: 245px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: var(--sjt-primary-deep);
    box-shadow: 0 20px 46px rgba(10,20,28,.30);
}

body.sjt-theme .sjt-user-menu ul {
    right: 0;
    left: auto;
}

body.sjt-theme .sjt-primary-menu li:hover > ul,
body.sjt-theme .sjt-primary-menu li:focus-within > ul,
body.sjt-theme .sjt-user-menu li:hover > ul,
body.sjt-theme .sjt-user-menu li:focus-within > ul {
    display: block;
}

body.sjt-theme .sjt-primary-menu ul a,
body.sjt-theme .sjt-user-menu ul a {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    text-align: left;
    min-height: 0;
    padding: 8px 12px;
}

/* Main layout */
body.sjt-theme .pkp_structure_content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 30px;
    align-items: start;
    width: 100% !important;
    max-width: 1380px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 34px 28px 68px !important;
    box-sizing: border-box;
}

body.sjt-theme .pkp_structure_main {
    position: static !important;
    float: none !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
}

body.sjt-theme .pkp_structure_sidebar {
    position: static !important;
    float: none !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 22px !important;
    border: 1px solid var(--sjt-line);
    border-radius: var(--sjt-radius);
    background: #fff;
    box-shadow: var(--sjt-shadow);
    box-sizing: border-box;
}

body.sjt-theme .pkp_structure_content:not(:has(.pkp_structure_sidebar)),
body.sjt-theme.sjt-no-sidebar .pkp_structure_content {
    grid-template-columns: minmax(0, 1fr);
}

body.sjt-theme .pkp_block {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sjt-line);
}

body.sjt-theme .pkp_block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

body.sjt-theme .pkp_block .title {
    color: var(--sjt-primary-deep);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.sjt-theme a {
    color: var(--sjt-primary);
}

body.sjt-theme a:hover {
    color: var(--sjt-primary-deep);
}

body.sjt-theme .page_index_journal .current_issue,
body.sjt-theme .obj_issue_summary,
body.sjt-theme .obj_article_summary,
body.sjt-theme .page_issue,
body.sjt-theme .page_article,
body.sjt-theme .page_about,
body.sjt-theme .page_search,
body.sjt-theme .page_submissions,
body.sjt-theme .page_register,
body.sjt-theme .page_login,
body.sjt-theme .page_user_profile,
body.sjt-theme .cmp_announcements,
body.sjt-theme .homepage_about,
body.sjt-theme .additional_content {
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--sjt-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--sjt-shadow);
}

body.sjt-theme .page_index_journal > * + * {
    margin-top: 26px;
}

body.sjt-theme .obj_article_summary {
    margin-bottom: 16px;
    transition: transform .18s ease, box-shadow .18s ease;
}

body.sjt-theme .obj_article_summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(31,50,64,.11);
}

body.sjt-theme .obj_article_summary .title a,
body.sjt-theme .current_issue_title,
body.sjt-theme .page_title,
body.sjt-theme h1,
body.sjt-theme h2 {
    color: var(--sjt-primary-deep);
}

body.sjt-theme .obj_issue_summary .cover img,
body.sjt-theme .page_issue .cover img,
body.sjt-theme .current_issue .cover img {
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(31,50,64,.18);
}

/* Universal homepage */
body.sjt-theme.sjt-journal-home .pkp_structure_content {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

body.sjt-theme .sjt-home-profile {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 2px;
}

body.sjt-theme .sjt-home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(210px,290px);
    align-items: center;
    gap: clamp(28px,5vw,70px);
    min-height: 390px;
    padding: clamp(38px,5.5vw,76px);
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 18%, rgba(255,255,255,.20), transparent 24%),
        radial-gradient(circle at 10% 118%, rgba(var(--sjt-primary-rgb),.18), transparent 30%),
        linear-gradient(135deg, var(--sjt-primary-deep) 0%, var(--sjt-primary) 62%, var(--sjt-accent) 100%);
    box-shadow: 0 26px 62px rgba(31,50,64,.22);
}

body.sjt-theme .sjt-home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(10,21,30,.17), transparent 58%);
}

body.sjt-theme .sjt-home-hero__copy,
body.sjt-theme .sjt-home-hero__mark {
    position: relative;
    z-index: 1;
}

body.sjt-theme .sjt-home-hero__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255,255,255,.84);
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

body.sjt-theme .sjt-home-hero__kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--sjt-accent-warm);
}

body.sjt-theme .sjt-home-hero__title {
    max-width: 900px;
    margin: 0 0 18px;
    color: #fff !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem,5.8vw,5.5rem);
    line-height: .98;
    letter-spacing: -.035em;
    text-shadow: 0 3px 20px rgba(10,20,30,.20);
}

/* Банерна назва: переклад (велике) + офіційна романізована (дрібне) */
body.sjt-theme .sjt-home-hero__title-main {
    display: block;
}
/* Довгі розгорнуті назви — трохи менший кегль, щоб не переповнювали банер */
body.sjt-theme .sjt-home-hero__title--long .sjt-home-hero__title-main {
    font-size: clamp(2rem, 3.6vw, 3.3rem);
    line-height: 1.05;
}
body.sjt-theme .sjt-home-hero__title-official {
    display: block;
    margin-top: .5em;
    font-family: Inter, "Noto Sans", Arial, sans-serif;
    font-size: clamp(.85rem, 1.15vw, 1.05rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
    color: rgba(255,255,255,.78);
    text-shadow: none;
}

body.sjt-theme .sjt-home-hero__description {
    max-width: 820px;
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: clamp(1rem,1.3vw,1.22rem);
    line-height: 1.7;
}

body.sjt-theme .sjt-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

body.sjt-theme .sjt-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body.sjt-theme .sjt-home-button:hover {
    transform: translateY(-2px);
}

body.sjt-theme .sjt-home-button--primary {
    background: var(--sjt-accent-warm);
    color: #18222c !important;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

body.sjt-theme .sjt-home-button--light {
    background: #fff;
    color: var(--sjt-primary-deep) !important;
}

body.sjt-theme .sjt-home-button--outline {
    border-color: rgba(255,255,255,.48);
    color: #fff !important;
    background: rgba(255,255,255,.05);
}

body.sjt-theme .sjt-home-hero__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 260px;
    height: 260px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 28px;
    background: rgba(255,255,255,.09);
    box-shadow: inset 0 0 0 14px rgba(255,255,255,.025);
    backdrop-filter: blur(4px);
}

body.sjt-theme .sjt-home-hero__mark::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px dashed rgba(255,255,255,.36);
    border-radius: 22px;
}

body.sjt-theme .sjt-home-hero__initials {
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.7rem,8vw,7.2rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.08em;
}

body.sjt-theme .sjt-home-hero__logo-image {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 78%;
    max-height: 78%;
    width: auto;
    height: auto;
    object-fit: contain;
}

body.sjt-theme .sjt-home-quick-menu {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 1px;
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--sjt-line);
    border-radius: 17px;
    background: var(--sjt-line);
    box-shadow: var(--sjt-shadow);
}

body.sjt-theme .sjt-home-quick-menu__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 12px 14px;
    background: #fff;
    color: var(--sjt-primary-deep) !important;
    font-size: .9rem;
    font-weight: 780;
    text-align: center;
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease;
}

body.sjt-theme .sjt-home-quick-menu__item:hover,
body.sjt-theme .sjt-home-quick-menu__item:focus {
    background: var(--sjt-primary-soft);
    color: var(--sjt-primary-deep) !important;
}

/* Forms and controls */
body.sjt-theme .cmp_button,
body.sjt-theme .pkp_button,
body.sjt-theme button,
body.sjt-theme input[type="submit"] {
    border-radius: 10px;
}

body.sjt-theme .cmp_button,
body.sjt-theme .pkp_button,
body.sjt-theme input[type="submit"] {
    border-color: var(--sjt-primary);
    background: var(--sjt-primary);
    color: #fff;
}

body.sjt-theme input,
body.sjt-theme select,
body.sjt-theme textarea {
    border-color: var(--sjt-line);
    border-radius: 10px;
}

body.sjt-theme input:focus,
body.sjt-theme select:focus,
body.sjt-theme textarea:focus,
body.sjt-theme a:focus-visible,
body.sjt-theme button:focus-visible {
    outline: 3px solid rgba(var(--sjt-primary-rgb), .28);
    outline-offset: 2px;
}

/* Footer */
body.sjt-theme .pkp_structure_footer_wrapper,
body.sjt-theme .pkp_structure_footer {
    min-height: 0 !important;
    border-top: 4px solid var(--sjt-accent-warm);
    background: var(--sjt-primary-deep);
    color: rgba(255,255,255,.82);
}

body.sjt-theme .pkp_footer_content {
    max-width: 1380px;
    min-height: 0 !important;
    margin: 0 auto;
    padding: 30px 28px;
    font-size: .92rem;
    line-height: 1.55;
}

body.sjt-theme .pkp_footer_content,
body.sjt-theme .pkp_footer_content p,
body.sjt-theme .pkp_footer_content li {
    color: rgba(255,255,255,.82);
}

body.sjt-theme .pkp_footer_content a {
    color: #fff;
}

body.sjt-theme .pkp_brand_footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1380px;
    min-height: 0 !important;
    margin: 0 auto;
    padding: 12px 28px 24px;
    opacity: .82;
}

body.sjt-theme .pkp_brand_footer img,
body.sjt-theme .pkp_brand_footer svg {
    width: auto !important;
    height: auto !important;
    max-width: 110px !important;
    max-height: 44px !important;
    filter: grayscale(1) brightness(0) invert(1);
}

/* Scroll to top */
body.sjt-theme .pkp_back_to_top,
body.sjt-theme #backToTop,
body.sjt-theme #scrollTop,
body.sjt-theme .scroll-top,
body.sjt-theme .scrollToTop {
    display: none !important;
}

body.sjt-theme .sjt-scroll-top {
    position: fixed;
    z-index: 1000;
    right: 18px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--sjt-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    cursor: pointer;
}

body.sjt-theme .sjt-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.sjt-theme .sjt-scroll-top svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 2px rgba(255,255,255,.9));
}

@media (max-width: 1100px) {
    body.sjt-theme .sjt-navigation-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    body.sjt-theme .sjt-navigation-right {
        width: 100%;
        justify-content: flex-start;
    }

    body.sjt-theme .pkp_structure_content {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    body.sjt-theme .sjt-home-hero {
        grid-template-columns: minmax(0,1fr) 210px;
    }

    body.sjt-theme .sjt-home-hero__mark {
        width: 210px;
        height: 210px;
    }

    body.sjt-theme .sjt-home-quick-menu {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 820px) {
    body.sjt-theme .sjt-header-shell {
        padding: 14px 18px 12px;
    }

    body.sjt-theme .sjt-header-top {
        align-items: flex-start;
    }

    body.sjt-theme .sjt-header-title {
        font-size: clamp(1.35rem, 5vw, 2rem);
    }

    body.sjt-theme .pkp_structure_content {
        grid-template-columns: minmax(0,1fr);
        padding: 26px 18px 58px !important;
    }

    body.sjt-theme .pkp_structure_sidebar {
        width: 100% !important;
    }

    body.sjt-theme .sjt-home-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 34px 24px;
        border-radius: 20px;
    }

    body.sjt-theme .sjt-home-hero__title {
        font-size: clamp(2.35rem, 12vw, 3.8rem);
    }

    body.sjt-theme .sjt-home-hero__mark {
        display: none;
    }

    body.sjt-theme .sjt-home-quick-menu {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 620px) {
    body.sjt-theme .sjt-header-top {
        flex-direction: column;
        gap: 12px;
    }

    body.sjt-theme .sjt-header-actions {
        width: 100%;
    }

    body.sjt-theme .sjt-navigation-right {
        align-items: stretch;
        flex-direction: column;
    }

    body.sjt-theme .sjt-primary-menu,
    body.sjt-theme .sjt-user-menu {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.sjt-theme .sjt-primary-menu a,
    body.sjt-theme .sjt-user-menu a,
    body.sjt-theme .sjt-header-search {
        width: 100%;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    body.sjt-theme .sjt-primary-menu ul,
    body.sjt-theme .sjt-user-menu ul {
        position: static;
        display: block;
        box-shadow: none;
    }

    body.sjt-theme .sjt-home-hero__actions {
        display: grid;
    }

    body.sjt-theme .sjt-home-button {
        width: 100%;
        box-sizing: border-box;
    }

    body.sjt-theme .sjt-home-quick-menu {
        grid-template-columns: 1fr;
    }

    body.sjt-theme .sjt-language-link span {
        display: inline;
    }
}

/* ============================================================
   PDF.js Viewer — вбудований переглядач гранки.
   Плагін вставляє <div id="pdfCanvasContainer">, але без
   заданої висоти контейнер згортається в нуль і PDF не видно.
   Задаємо висоту/ширину — переглядач з'являється.
   ============================================================ */
body.sjt-theme #pdfCanvasContainer,
#pdfCanvasContainer {
    display: block;
    width: 100%;
    height: 88vh;
    min-height: 620px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sjt-line);
    border-radius: var(--sjt-radius);
    overflow: hidden;
    background: var(--sjt-surface);
    box-shadow: var(--sjt-shadow);
    box-sizing: border-box;
}

#pdfCanvasContainer iframe,
#pdfCanvasContainer embed,
#pdfCanvasContainer object,
#pdfCanvasContainer canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Обгортка сторінки гранки — на повну ширину */
body.sjt-theme .galley_view,
body.sjt-theme .page-article .galley_view {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Верхня смуга гранки (Повернутися / Завантажити PDF) */
body.sjt-theme .header_view {
    max-width: 1380px;
    margin: 0 auto;
    padding: 14px 28px;
}


/* ============================================================
   Графік статистики завантажень — компактний розмір.
   Стандартний блок задовгий для сторінки; обмежуємо
   висоту й ширину, щоб виглядав акуратно.
   ============================================================ */
body.sjt-theme .item.downloads_chart {
    max-width: 520px;
    margin: 24px 0;
}

body.sjt-theme .item.downloads_chart .label,
body.sjt-theme .item.downloads_chart h2 {
    color: var(--sjt-primary-deep);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

body.sjt-theme .item.downloads_chart .value {
    max-width: 100%;
}

body.sjt-theme canvas.usageStatsGraph {
    max-height: 200px !important;
    width: 100% !important;
}


/* ============================================================
   Hero-профіль журналу — ховаємо на внутрішніх сторінках.
   Перелічуємо ВСІ можливі класи внутрішніх сторінок OJS явно,
   щоб hero гарантовано зникав на статті/випуску/архіві/about,
   незалежно від того, який саме клас має body.
   ============================================================ */
.pkp_page_article .sjt-home-profile,
.pkp_op_view .sjt-home-profile,
.pkp_op_article .sjt-home-profile,
.pkp_page_issue .sjt-home-profile,
.pkp_op_issue .sjt-home-profile,
.pkp_page_issues .sjt-home-profile,
.pkp_page_about .sjt-home-profile,
.pkp_op_about .sjt-home-profile,
.pkp_op_view_issue .sjt-home-profile,
.pkp_op_archive .sjt-home-profile,
.pkp_page_search .sjt-home-profile,
.pkp_page_catalog .sjt-home-profile {
    display: none !important;
}


/* ============================================================
   Нативний банер логотипу журналу від батьківської теми
   Health Sciences. Розмітка:
     header#headerNavigationContainer.pkp_structure_head
       └ .pkp_head_wrapper
           └ .pkp_site_name_wrapper
               ├ button.pkp_site_nav_toggle   (Open Menu)
               └ .pkp_site_name
                   └ a.is_img > img (pageHeaderLogoImage — монограма)
   На внутрішніх сторінках (стаття/гранка/випуск/архів/пошук/про)
   це зображення розтягується на весь екран і "протікає" на
   контент. Тому саме ЗОБРАЖЕННЯ-лого обмежуємо до компактної
   висоти, лишаючи шапку, кнопку меню й навігацію недоторканими.
   На головній журналу (.pkp_op_index) лого лишається великим.
   ============================================================ */
body.sjt-theme.pkp_op_view .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_article .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_issue .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_issues .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_search .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_about .pkp_site_name a.is_img img,
body.sjt-theme.pkp_page_catalog .pkp_site_name a.is_img img {
    max-height: 64px !important;
    width: auto !important;
    max-width: 220px !important;
    height: auto !important;
    object-fit: contain;
}

/* Обгортка лого на внутрішніх сторінках не повинна тягтися на всю
   висоту екрана — притискаємо до звичайної висоти шапки. */
body.sjt-theme.pkp_op_view .pkp_site_name,
body.sjt-theme.pkp_page_article .pkp_site_name,
body.sjt-theme.pkp_page_issue .pkp_site_name,
body.sjt-theme.pkp_page_issues .pkp_site_name,
body.sjt-theme.pkp_page_search .pkp_site_name,
body.sjt-theme.pkp_page_about .pkp_site_name,
body.sjt-theme.pkp_page_catalog .pkp_site_name {
    min-height: 0 !important;
    height: auto !important;
}


/* ============================================================
   Правий блок метаданих статті (.entry_details) — компактна
   картка, як в усталеній темі, у палітрі Сковороди.
   Структура (OJS ядро):
     .obj_article_details > .row > .main_entry + .entry_details
   .entry_details містить .item.cover_image / galleys / published /
   issue / copyright (ліцензія) / citation.
   Тема Сковорода власних стилів для цих .item не мала, тому блок
   розтягувався. Тут задаємо ширину колонки, рамку, щільні відступи
   й обмежуємо обкладинку. Блок лишається ПРАВОРУЧ від тексту.
   ============================================================ */

/* Двоколонкова розкладка статті (.row уже є в розмітці). */
body.sjt-theme .obj_article_details .row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

/* Основний текст — гнучка широка колонка ліворуч. */
body.sjt-theme .obj_article_details .row .main_entry {
    flex: 1 1 420px;
    min-width: 0;
}

/* Права колонка метаданих — фіксована ширина, картка. */
body.sjt-theme .obj_article_details .row .entry_details {
    flex: 0 0 300px;
    max-width: 300px;
    border: 1px solid var(--sjt-line);
    border-radius: var(--sjt-radius);
    padding: 20px;
    background: var(--sjt-surface);
    box-shadow: var(--sjt-shadow);
    font-size: 0.92rem;
}

/* Кожен пункт — щільний ритм із тонким роздільником. */
body.sjt-theme .entry_details .item {
    margin: 0 0 16px 0;
    padding: 0 0 16px 0;
    border-bottom: 1px solid var(--sjt-line);
}
body.sjt-theme .entry_details .item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Заголовки пунктів (Опубліковано, Номер, Розділ, Ліцензія...). */
body.sjt-theme .entry_details .item .label,
body.sjt-theme .entry_details .item h2:not(.pkp_screen_reader) {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 5px 0;
    color: var(--sjt-primary-deep);
}
body.sjt-theme .entry_details .item .value,
body.sjt-theme .entry_details .item .sub_item {
    margin: 0;
    color: var(--sjt-ink);
}

/* Обкладинка випуску — обмежений розмір, по центру. */
body.sjt-theme .entry_details .item.cover_image img {
    display: block;
    max-width: 160px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--sjt-line);
    border-radius: 6px;
}

/* "Завантаження" (PDF) — кнопки на всю ширину колонки. */
body.sjt-theme .entry_details .item.galleys .value.galleys_links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
body.sjt-theme .entry_details .item.galleys .obj_galley_link {
    display: block;
    text-align: center;
}

/* Іконка ліцензії CC — акуратний розмір. */
body.sjt-theme .entry_details .item.copyright img {
    max-width: 88px;
    height: auto;
}

/* Мобільний: метадані під текстом, на всю ширину. */
@media (max-width: 767px) {
    body.sjt-theme .obj_article_details .row {
        display: block;
    }
    body.sjt-theme .obj_article_details .row .entry_details {
        flex: none;
        max-width: 100%;
        margin-top: 24px;
    }
}
