/**
 * Modern Journal Theme for OJS 3.x
 * Clean academic layout with accessible contrast and responsive behavior.
 */

:root {
    --mj-primary: #123B66;
    --mj-accent: #0B8F87;
    --mj-radius: 14px;
    --mj-bg: #F4F7FA;
    --mj-surface: #FFFFFF;
    --mj-text: #172033;
    --mj-muted: #667085;
    --mj-border: #E4EAF0;
    --mj-soft: #EDF4F8;
    --mj-shadow: 0 14px 40px rgba(16, 42, 67, 0.08);
    --mj-shadow-small: 0 5px 18px rgba(16, 42, 67, 0.07);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--mj-bg);
    color: var(--mj-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body a {
    color: var(--mj-primary);
    text-decoration-thickness: .08em;
    text-underline-offset: .16em;
}

body a:hover,
body a:focus {
    color: var(--mj-accent);
}

/* Header */
.pkp_structure_head {
    background: var(--mj-surface);
    border-bottom: 1px solid var(--mj-border);
    box-shadow: 0 6px 24px rgba(16, 42, 67, .05);
}

.pkp_head_wrapper {
    max-width: 1180px;
}

.pkp_site_name {
    padding-top: 22px;
    padding-bottom: 18px;
}

.pkp_site_name .is_text,
.pkp_site_name > a {
    color: var(--mj-primary);
    font-size: clamp(1.2rem, 2.1vw, 2rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.pkp_site_name .is_img img {
    max-height: 78px;
    width: auto;
}

.pkp_navigation_primary_wrapper {
    background: linear-gradient(105deg, var(--mj-primary), #0E5474);
    border-radius: var(--mj-radius) var(--mj-radius) 0 0;
    padding: 0 12px;
}

.pkp_navigation_primary > li > a,
.pkp_navigation_primary > li > a:focus {
    color: #fff;
    font-weight: 700;
    letter-spacing: .01em;
    padding-top: 16px;
    padding-bottom: 16px;
}

.pkp_navigation_primary > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

.pkp_navigation_primary ul {
    background: var(--mj-surface);
    border: 1px solid var(--mj-border);
    border-radius: 0 0 12px 12px;
    box-shadow: var(--mj-shadow);
    overflow: hidden;
}

.pkp_navigation_primary ul a {
    color: var(--mj-text);
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
    color: var(--mj-primary);
    background: var(--mj-soft);
}

.pkp_navigation_user > li > a,
.pkp_navigation_user > li > a:focus {
    color: var(--mj-text);
    font-weight: 600;
}

/* Search */
.pkp_search_desktop .search_prompt {
    color: var(--mj-primary);
    font-weight: 700;
}

.pkp_search_desktop.is_open .search_prompt,
.pkp_search_desktop .search_prompt:hover,
.pkp_search_desktop .search_prompt:focus {
    color: var(--mj-accent);
}

/* Main layout */
.pkp_structure_page {
    background: transparent;
    box-shadow: none;
}

.pkp_structure_content {
    max-width: 1180px;
    padding-top: 34px;
    padding-bottom: 42px;
}

.pkp_structure_main {
    background: var(--mj-surface);
    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius);
    box-shadow: var(--mj-shadow);
    padding: clamp(22px, 3.5vw, 46px);
}

.pkp_structure_main:before,
.pkp_structure_main:after {
    display: none;
}

.pkp_structure_sidebar {
    padding-top: 0;
}

.pkp_block {
    background: var(--mj-surface);
    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius);
    box-shadow: var(--mj-shadow-small);
    margin-bottom: 20px;
    padding: 20px;
}

.pkp_block .title,
.pkp_block h2,
.pkp_block h3 {
    color: var(--mj-primary);
    font-weight: 800;
    letter-spacing: -.015em;
}

/* Breadcrumbs and page titles */
.cmp_breadcrumbs {
    margin-bottom: 22px;
}

.cmp_breadcrumbs ol li,
.cmp_breadcrumbs a {
    color: var(--mj-muted);
    font-size: .9rem;
}

.page h1,
.page h2,
.page h3,
.obj_issue_toc .heading,
.obj_article_details .page_title {
    color: var(--mj-text);
    letter-spacing: -.025em;
}

.page h1,
.obj_article_details .page_title {
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 850;
    line-height: 1.16;
}

/* Homepage / announcements */
.page_index_journal .homepage_image {
    border-radius: var(--mj-radius);
    box-shadow: var(--mj-shadow-small);
    overflow: hidden;
}

.page_index_journal .additional_content,
.page_index_journal .current_issue {
    margin-top: 34px;
}

.cmp_announcements > .obj_announcement_summary,
.obj_announcement_summary {
    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius);
    margin-bottom: 16px;
    padding: 20px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.obj_announcement_summary:hover {
    border-color: rgba(11, 143, 135, .35);
    box-shadow: var(--mj-shadow-small);
    transform: translateY(-2px);
}

/* Issue TOC and article cards */
.obj_issue_toc .heading {
    border-bottom: 1px solid var(--mj-border);
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.obj_issue_toc .sections:not(:first-child) {
    margin-top: 28px;
}

.obj_issue_toc .section > h2,
.obj_issue_toc .section h2 {
    color: var(--mj-primary);
    font-size: 1.18rem;
    font-weight: 800;
    text-transform: none;
}

.obj_article_summary {
    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius);
    margin-bottom: 16px;
    padding: 20px 22px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.obj_article_summary:hover {
    border-color: rgba(18, 59, 102, .28);
    box-shadow: var(--mj-shadow-small);
    transform: translateY(-2px);
}

.obj_article_summary .title,
.obj_article_summary .title a {
    color: var(--mj-text);
    font-size: 1.07rem;
    font-weight: 800;
    line-height: 1.45;
}

.obj_article_summary .title a:hover,
.obj_article_summary .title a:focus {
    color: var(--mj-primary);
}

.obj_article_summary .authors,
.obj_article_summary .pages,
.obj_article_summary .meta {
    color: var(--mj-muted);
}

.obj_issue_summary .cover,
.obj_issue_toc .cover {
    border-radius: 12px;
    box-shadow: var(--mj-shadow-small);
    overflow: hidden;
}

/* Article detail */
.obj_article_details .main_entry {
    padding-right: clamp(0px, 2vw, 22px);
}

.obj_article_details .authors,
.obj_article_details .published,
.obj_article_details .item.doi,
.obj_article_details .item.keywords {
    color: var(--mj-muted);
}

.obj_article_details .abstract {
    background: #F8FAFC;
    border: 1px solid var(--mj-border);
    border-left: 4px solid var(--mj-accent);
    border-radius: 0 var(--mj-radius) var(--mj-radius) 0;
    padding: 22px 24px;
}

.obj_article_details .abstract h2,
.obj_article_details .item h2,
.obj_article_details .entry_details h2 {
    color: var(--mj-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.obj_article_details .entry_details {
    background: #FAFBFC;
    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius);
    padding: 20px;
}

.obj_article_details .entry_details .item {
    border-bottom-color: var(--mj-border);
}

/* Buttons and galleys */
.cmp_button,
.cmp_form .buttons button,
.page_lost_password .buttons button,
.page_search .submit button,
.obj_galley_link {
    border-radius: 10px;
    font-weight: 750;
    letter-spacing: .01em;
}

.obj_galley_link,
.obj_galley_link:visited {
    background: var(--mj-primary);
    border: 1px solid var(--mj-primary);
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
}

.obj_galley_link:hover,
.obj_galley_link:focus {
    background: var(--mj-accent);
    border-color: var(--mj-accent);
    color: #fff;
}

/* Forms */
.cmp_form input[type="text"],
.cmp_form input[type="email"],
.cmp_form input[type="password"],
.cmp_form input[type="url"],
.cmp_form input[type="number"],
.cmp_form textarea,
.cmp_form select,
.page_search input[type="text"] {
    background: #fff;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    color: var(--mj-text);
    min-height: 44px;
    padding: 9px 12px;
}

.cmp_form input:focus,
.cmp_form textarea:focus,
.cmp_form select:focus,
.page_search input[type="text"]:focus {
    border-color: var(--mj-accent);
    box-shadow: 0 0 0 3px rgba(11, 143, 135, .14);
    outline: 0;
}

/* Tables */
.page table {
    border: 1px solid var(--mj-border);
    border-radius: 10px;
    border-spacing: 0;
    overflow: hidden;
}

.page table th {
    background: var(--mj-soft);
    color: var(--mj-primary);
    font-weight: 800;
}

.page table th,
.page table td {
    border-bottom-color: var(--mj-border);
    padding: 12px 14px;
}

/* Footer */
.pkp_structure_footer_wrapper {
    background: linear-gradient(115deg, #0B2948, var(--mj-primary));
    border-top: 0;
    color: rgba(255, 255, 255, .86);
}

.pkp_structure_footer {
    max-width: 1180px;
    padding-top: 34px;
    padding-bottom: 34px;
}

.pkp_structure_footer a {
    color: #fff;
}

.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus {
    color: #BCE7E3;
}

.pkp_brand_footer {
    opacity: .88;
}

/* Accessibility */
:focus-visible {
    outline: 3px solid rgba(11, 143, 135, .55);
    outline-offset: 3px;
}

.skip_to_content a:focus {
    background: var(--mj-primary);
    color: #fff;
}

/* Tablet/mobile */
@media (max-width: 991px) {
    .pkp_structure_content {
        padding: 22px 14px 32px;
    }

    .pkp_structure_main {
        border-radius: 12px;
        padding: 24px 20px;
    }

    .pkp_navigation_primary_wrapper {
        border-radius: 0;
    }
}

@media (max-width: 767px) {
    .pkp_site_name {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .pkp_structure_main {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 22px 18px;
    }

    .obj_article_summary {
        padding: 17px;
    }

    .obj_article_details .abstract,
    .obj_article_details .entry_details {
        padding: 18px;
    }

    .pkp_block {
        border-radius: 12px;
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
