/*!
 * MAJOS — Modern Academic / 1.0 / October 2026
 * Target: MAJOS OJS 3.3.0.13, Default Manuscript theme as observed.
 * Upload as Journal stylesheet. Keep the existing theme and banner.
 * Frontend only. No imports, tracking, external fonts, or required JS.
 * !important is limited to legacy site CSS, inline sidebar styles,
 * header background, and accessibility/print overrides.
 */

/* 01. Original identity: gold, teal, cream, and warm orange. */
:root {
  --majos-gold: #f7bc4a;
  --majos-gold-light: #fff4d9;
  --majos-teal: #4b7d92;
  --majos-teal-dark: #30566a;
  --majos-blue: #1e6292;
  --majos-orange: #ed8426;
  --majos-ink: #22333d;
  --majos-muted: #586970;
  --majos-bg: #f6f5f0;
  --majos-paper: #ffffff;
  --majos-line: #e5e8e5;
  --majos-radius: 16px;
  --majos-shadow: 0 8px 28px rgba(34, 51, 61, .055);
  --majos-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
html { background: var(--majos-bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--majos-bg); color: var(--majos-ink); font-family: var(--majos-font); font-size: 15px; line-height: 1.75; }
.pkp_structure_page, .pkp_structure_page *, .pkp_structure_page *::before, .pkp_structure_page *::after { box-sizing: border-box; }
.pkp_structure_page {
  max-width: 1302px; margin: 24px auto !important; padding-bottom: 0 !important;
  background: var(--majos-paper); border: 1px solid var(--majos-line);
  border-radius: 20px; box-shadow: 0 18px 64px rgba(34, 51, 61, .075);
}
.pkp_structure_page a { color: var(--majos-teal-dark); text-underline-offset: 3px; }
.pkp_structure_page a:hover { color: var(--majos-blue); }
.pkp_structure_page a, .pkp_structure_page button, .pkp_structure_page input, .pkp_structure_page select, .pkp_structure_page textarea {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pkp_structure_page :focus-visible { outline: 3px solid var(--majos-teal-dark) !important; outline-offset: 3px; }
.pkp_structure_page img { max-width: 100%; height: auto; }
.pkp_structure_page iframe { max-width: 100%; }
.pkp_structure_main { overflow-wrap: anywhere; }

/* 02. Original banner at its natural ratio; utility links get their own row. */
#headerNavigationContainer.pkp_structure_head {
  background: var(--majos-gold-light) !important; border: 0;
  border-radius: 20px 20px 0 0;
}
.has_site_logo .pkp_head_wrapper, .pkp_head_wrapper { width: 100%; padding: 0; }
.pkp_site_name_wrapper { width: 100%; height: auto; margin: 0; padding: 0 !important; }
.pkp_site_name { position: relative; left: auto; right: auto; width: 100%; margin: 0; padding: 0 !important; overflow: visible; white-space: normal; }
.pkp_site_name > a.is_img { display: block; margin: 0; padding: 0; }
.pkp_site_name .is_img img {
  display: block; width: 100%; height: auto; max-height: none !important;
  margin: 0; border-radius: 19px 19px 0 0;
}
.pkp_site_name > a:not(.is_img) { display: block; padding: 30px 24px; font-size: clamp(24px, 4vw, 40px); font-weight: 750; }
.pkp_site_nav_menu { background: var(--majos-paper); border-top: 1px solid rgba(75, 125, 146, .12); }
.pkp_navigation_primary_row { background: var(--majos-paper); padding: 0 24px; border-bottom: 1px solid var(--majos-line); }
.pkp_navigation_primary_wrapper { width: 100%; min-height: 62px; padding: 0; }
.pkp_navigation_primary > li > a {
  padding: 18px 14px; margin: 0; border-bottom: 3px solid transparent;
  color: var(--majos-ink); font-family: var(--majos-font); font-size: 13px;
  font-weight: 700; line-height: 23px; letter-spacing: .035em; text-decoration: none;
}
.pkp_navigation_primary > li:first-child > a, .pkp_navigation_primary > li:last-child > a { margin: 0; }
.pkp_navigation_primary > li > a:hover, .pkp_navigation_primary > li > a:focus,
.pkp_navigation_primary > li > a[aria-expanded="true"] {
  color: var(--majos-teal-dark); background: var(--majos-gold-light); border-bottom-color: var(--majos-gold);
}
.pkp_navigation_primary ul, .pkp_navigation_user ul {
  background: var(--majos-paper); border: 1px solid var(--majos-line);
  border-radius: 10px; box-shadow: 0 14px 36px rgba(34, 51, 61, .13); padding: 8px;
}
.pkp_navigation_primary ul a, .pkp_navigation_user ul a {
  color: var(--majos-ink); padding: 10px 14px; border-radius: 6px;
  font-family: var(--majos-font); font-size: 13px; line-height: 1.5;
}
.pkp_navigation_primary ul a:hover, .pkp_navigation_primary ul a:focus,
.pkp_navigation_user ul a:hover, .pkp_navigation_user ul a:focus {
  background: var(--majos-gold-light); color: var(--majos-teal-dark);
}
.pkp_head_wrapper .pkp_search { color: var(--majos-teal-dark); font-family: var(--majos-font); font-size: 13px; }
.pkp_head_wrapper .pkp_search:hover, .pkp_head_wrapper .pkp_search:focus { background: var(--majos-gold-light); color: var(--majos-teal-dark); }
.pkp_navigation_user_wrapper {
  position: static; top: auto; right: auto; left: auto; transform: none;
  width: 100%; padding: 6px 24px !important; background: #fffbf2;
  border-bottom: 1px solid #eee8da; text-align: right;
}
.pkp_navigation_user_wrapper .pkp_navigation_user { width: auto; margin: 0; padding: 0; }
.pkp_navigation_user > li > a, .pkp_navigation_user_wrapper a {
  color: var(--majos-teal-dark); font-family: var(--majos-font); font-size: 12px;
  font-weight: 650; line-height: 1.5; padding: 7px 12px; border: 0;
}
.pkp_navigation_user > li:last-child > a { margin-right: 0; }
.pkp_navigation_user > li > a:hover, .pkp_navigation_user > li > a:focus { background: var(--majos-gold-light); color: var(--majos-ink); }

/* 03. Fluid content grid. OJS uses 992px for desktop navigation. */
.pkp_structure_content {
  width: 100%; padding: 32px 28px 48px; margin: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
  align-items: start; background: linear-gradient(180deg, #fcfbf7, #ffffff 420px);
}
.pkp_structure_content::before, .pkp_structure_content::after,
.pkp_structure_main::before, .pkp_structure_main::after, .pkp_structure_sidebar::before { display: none; }
.pkp_structure_main, .pkp_structure_sidebar {
  float: none; width: auto; min-width: 0; margin: 0; padding: 0; border: 0;
}
.pkp_structure_main:first-child:last-child { width: 100%; max-width: 1000px; margin: 0 auto; }
.pkp_structure_main h1, .pkp_structure_main h2, .pkp_structure_main h3, .pkp_structure_main h4,
.pkp_block .title { font-family: var(--majos-font); color: var(--majos-ink); }
.pkp_structure_main h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.3; letter-spacing: -.025em; }
.pkp_structure_main h2 { font-size: 23px; line-height: 1.4; letter-spacing: -.02em; }
.pkp_structure_main h3 { font-size: 18px; line-height: 1.5; }
.pkp_structure_main p { line-height: 1.85; margin: 0 0 16px; }
.pkp_structure_main p:last-child { margin-bottom: 0; }
.cmp_breadcrumbs { padding: 0 0 22px; font-family: var(--majos-font); font-size: 12px; }
.cmp_breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp_breadcrumbs li { float: none; }

/* 04. Homepage editorial panels. The existing homepage image is retained. */
.page_index_journal .homepage_image { margin: 0 0 24px; padding: 0; background: transparent; }
.page_index_journal .homepage_image img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #fffaf0; border: 1px solid #eee5d0; border-radius: var(--majos-radius); }
.page_index_journal .homepage_about,
.page_index_journal .current_issue,
.page_index_journal .additional_content,
.page_index_journal .cmp_announcements {
  margin: 0 0 24px; padding: 26px; background: var(--majos-paper);
  border: 1px solid var(--majos-line); border-radius: var(--majos-radius);
  box-shadow: var(--majos-shadow);
}
.page_index_journal .homepage_about { border-top: 4px solid var(--majos-gold); }
.page_index_journal .homepage_about > h2, .page_index_journal .current_issue > h2 {
  position: static; width: auto; height: auto; clip: auto; clip-path: none;
  display: block; overflow: visible; margin: 0 0 20px; padding: 0 0 14px; border: 0;
  border-bottom: 1px solid var(--majos-line); color: var(--majos-teal-dark);
  font-size: 22px; font-weight: 750; letter-spacing: -.02em; text-transform: none;
}
.page_index_journal .current_issue_title { margin: 0 0 20px; font-family: var(--majos-font); font-size: 19px; font-weight: 700; line-height: 1.5; }
.obj_issue_toc .heading { margin: 0 0 22px; padding: 22px; border: 1px solid #eee5d0; border-radius: 12px; background: #fffaf0; }
.obj_issue_toc .heading::after { content: ""; display: table; clear: both; }
.obj_issue_toc .heading .cover { max-width: 145px; margin: 0 24px 12px 0; }
.obj_issue_toc .heading .cover img { border-radius: 6px; box-shadow: 0 8px 20px rgba(34, 51, 61, .12); }
.obj_issue_toc .heading .description, .obj_issue_toc .heading .published { margin-left: 0; }
.obj_issue_toc .published { font-size: 12px; color: var(--majos-muted); }
.obj_issue_toc .published .label { color: var(--majos-teal-dark); font-weight: 700; }
.obj_issue_toc .section { margin: 24px 0 0; padding: 0; border: 0; }
.obj_issue_toc .section > h3 { margin: 0 0 16px; padding: 0; background: transparent; color: var(--majos-teal-dark); }

/* 05. Article cards, PDF links, archives, announcements. */
.obj_issue_toc .articles > li, .cmp_article_list > li { margin: 0 0 14px; padding: 0; }
.obj_article_summary {
  margin: 0; padding: 22px; background: var(--majos-paper); border: 1px solid var(--majos-line);
  border-left: 4px solid var(--majos-gold); border-radius: 11px; box-shadow: 0 3px 12px rgba(34, 51, 61, .025);
}
.obj_article_summary:hover { border-color: #c5d4d7; border-left-color: var(--majos-orange); box-shadow: var(--majos-shadow); }
.obj_article_summary > .title { margin: 0 0 10px; padding: 0; border: 0; font-family: var(--majos-font); font-size: 17px; font-weight: 700; line-height: 1.55; }
.obj_article_summary > .title a { color: var(--majos-teal-dark); text-decoration: none; }
.obj_article_summary > .title a:hover { color: var(--majos-blue); text-decoration: underline; }
.obj_article_summary .meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 0; color: var(--majos-muted); font-size: 13px; }
.obj_article_summary .authors { padding: 0; }
.obj_article_summary .pages { position: static; line-height: inherit; color: var(--majos-muted); white-space: nowrap; }
.obj_article_summary .galleys_links { margin-top: 16px; }
.obj_galley_link, .cmp_button, .cmp_manuscript_button, .block_make_submission a {
  display: inline-block; max-width: 100%; padding: 9px 18px; min-height: 40px;
  border: 1px solid transparent; border-radius: 7px; background: var(--majos-gold);
  color: var(--majos-ink) !important; font-family: var(--majos-font); font-size: 12px;
  line-height: 1.6; font-weight: 750; letter-spacing: .03em; text-align: center;
  text-decoration: none; box-shadow: none; white-space: normal;
}
.obj_galley_link:hover, .obj_galley_link:focus, .cmp_button:hover, .cmp_manuscript_button:hover, .block_make_submission a:hover {
  background: #efad2d; color: var(--majos-ink); border-color: #d89b24;
}
.page_index_journal .current_issue > .read_more { display: inline-block; margin-top: 10px; padding: 10px 0; color: var(--majos-teal-dark); font-family: var(--majos-font); font-size: 12px; font-weight: 750; }
.page_issue_archive .issues_archive > li, .obj_announcement_summary { margin-bottom: 20px; padding: 24px; border: 1px solid var(--majos-line); border-radius: 12px; background: var(--majos-paper); }
.page_issue_archive .obj_issue_summary .title { font-family: var(--majos-font); color: var(--majos-teal-dark); }

/* 06. Sidebar. Target actual MAJOS custom blocks, not all site tables.
 * Inline table widths, backgrounds, and text colors need explicit overrides.
 */
.pkp_structure_sidebar { display: grid; gap: 18px; }
.pkp_structure_sidebar .pkp_block {
  margin: 0; padding: 20px; background: var(--majos-paper); border: 1px solid var(--majos-line);
  border-radius: 13px; box-shadow: var(--majos-shadow); font-family: var(--majos-font); font-size: 13px;
}
.pkp_structure_sidebar .pkp_block > .title:not(.pkp_screen_reader) {
  display: block; margin: 0 0 15px; padding: 0 0 12px; border-bottom: 2px solid var(--majos-gold);
  color: var(--majos-teal-dark); font-size: 13px; font-weight: 750; line-height: 1.5; letter-spacing: .07em;
}
.pkp_structure_sidebar .pkp_block .content { overflow-wrap: anywhere; }
.pkp_structure_sidebar .pkp_block .content::after { content: ""; display: table; clear: both; }
.pkp_structure_sidebar .pkp_block .content p { margin: 0 0 12px; }
.pkp_structure_sidebar .pkp_block .content p:last-child { margin-bottom: 0; }
.pkp_structure_sidebar [id^="customblock-"] .content > table {
  float: none !important; width: 100% !important; height: auto !important; margin: 0;
  border: 0; border-collapse: separate; border-spacing: 0 6px;
}
.pkp_structure_sidebar [id^="customblock-"] .content > table td {
  width: auto !important; height: auto !important; padding: 0; border: 0 !important;
  border-radius: 7px; background: var(--majos-gold-light) !important; text-align: left !important;
}
.pkp_structure_sidebar [id^="customblock-"] .content > table td h4,
.pkp_structure_sidebar [id^="customblock-"] .content > table td p { margin: 0; font-size: 12px; line-height: 1.5; }
.pkp_structure_sidebar [id^="customblock-"] .content > table td a {
  display: block; padding: 12px 13px; border-radius: 7px; color: var(--majos-teal-dark) !important;
  font-family: var(--majos-font); font-size: 12px; font-weight: 650; line-height: 1.5; text-decoration: none;
}
.pkp_structure_sidebar [id^="customblock-"] .content > table td a span { color: inherit !important; }
.pkp_structure_sidebar [id^="customblock-"] .content > table td a:hover,
.pkp_structure_sidebar [id^="customblock-"] .content > table td a:focus { background: var(--majos-gold); color: var(--majos-ink) !important; }
/* Keep visible, non-linked menu rows; CSS cannot supply missing destinations. */
#customblock-menu .content > table td > h4 { padding: 12px 13px; color: var(--majos-teal-dark); }
#customblock-menu .content > table td > h4:has(a) { padding: 0; }
/* Existing table title rows: retain their blue identity. */
#customblock-menu .content > table > tbody > tr:first-child > td,
#customblock-information .content > table > tbody > tr:first-child > td,
#customblock-tools .content > table > tbody > tr:first-child > td,
#customblock-template .content > table > tbody > tr:first-child > td {
  padding: 11px 12px; background: var(--majos-blue) !important; color: #fff; text-align: center !important;
}
#customblock-menu .content > table > tbody > tr:first-child > td h4 { padding: 0; }
#customblock-menu .content > table > tbody > tr:first-child > td span,
#customblock-information .content > table > tbody > tr:first-child > td span,
#customblock-tools .content > table > tbody > tr:first-child > td span,
#customblock-template .content > table > tbody > tr:first-child > td span { color: #fff !important; font-size: 12px; letter-spacing: .03em; }
#customblock-make-a-submissions { border-top: 4px solid var(--majos-gold); }
#customblock-make-a-submissions .content > table td { background: var(--majos-gold) !important; }
#customblock-make-a-submissions .content > table td a { padding: 15px 10px; color: var(--majos-ink) !important; text-align: center; font-weight: 750; }
#customblock-template img { display: block; margin: 12px auto 0; border-radius: 6px; }
#customblock-tools .content > p { text-align: center; }
#customblock-tools .content > p img { max-width: 150px; max-height: 48px; object-fit: contain; }
.block_web_feed .content ul { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.block_web_feed .content li { margin: 0; }

/* 07. Reading, submission, and search pages. */
.obj_article_details .page_title { margin: 0 0 24px; color: var(--majos-teal-dark); font-size: clamp(24px, 3vw, 32px); line-height: 1.4; }
.obj_article_details .subtitle { color: var(--majos-muted); }
.obj_article_details .abstract { text-align: left; }
.obj_article_details .abstract h2, .obj_article_details .references h2 { color: var(--majos-teal-dark); }
.obj_article_details .item { margin-bottom: 24px; }
.obj_article_details .entry_details { background: #fcfbf7; border-color: var(--majos-line); }
.obj_article_details .entry_details .item { border-color: var(--majos-line); }
.obj_article_details .references { overflow-wrap: anywhere; }
.pkp_structure_main input[type="text"], .pkp_structure_main input[type="email"],
.pkp_structure_main input[type="password"], .pkp_structure_main input[type="search"],
.pkp_structure_main input[type="url"], .pkp_structure_main select, .pkp_structure_main textarea {
  max-width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #c4cfd0;
  border-radius: 7px; background: var(--majos-paper); color: var(--majos-ink); font-family: var(--majos-font);
}
.pkp_structure_main input:focus, .pkp_structure_main select:focus, .pkp_structure_main textarea:focus { border-color: var(--majos-teal); box-shadow: 0 0 0 3px rgba(75, 125, 146, .1); }
.cmp_form .fields { border-color: var(--majos-line); border-radius: 12px; }
.cmp_notification { border-radius: 10px; border-color: var(--majos-gold); background: var(--majos-gold-light); }
.cmp_pagination { margin-top: 24px; color: var(--majos-muted); font-size: 13px; }
.pkp_structure_main .description table { display: block; max-width: 100%; overflow-x: auto; }

/* 08. Footer, including the existing license and map. */
.pkp_structure_footer_wrapper {
  margin-top: 0; background: #f2f5f4; border-top: 1px solid var(--majos-line);
  border-bottom: 6px solid var(--majos-gold); border-radius: 0 0 20px 20px;
}
.pkp_structure_footer { width: 100%; padding: 28px; }
.pkp_footer_content { float: none; width: 100%; padding: 0; color: var(--majos-muted); font-family: var(--majos-font); font-size: 13px; line-height: 1.8; }
.pkp_footer_content p { margin: 0 0 12px; }
.pkp_footer_content strong { color: var(--majos-teal-dark); }
.pkp_footer_content iframe { width: min(100%, 600px); border-radius: 10px; }
.pkp_brand_footer { float: none; width: auto; padding: 20px 0 0; }

/* 09. Responsive. Keep OJS's own mobile toggle and dropdown behavior. */
@media (min-width: 992px) {
  .pkp_structure_content.has_sidebar { grid-template-columns: minmax(0, 1fr) 280px; }
  .pkp_navigation_primary { padding-right: 100px; }
  .pkp_site_nav_menu { display: block; position: static; padding: 0; }
}
@media (max-width: 991px) {
  .pkp_structure_page { margin: 0 auto !important; border: 0; border-radius: 0; }
  #headerNavigationContainer.pkp_structure_head, .pkp_site_name .is_img img { border-radius: 0; }
  .pkp_site_name_wrapper { padding-top: 48px !important; }
  .pkp_site_nav_toggle { top: 4px; left: 12px; width: 40px; height: 40px; border-radius: 7px; background: var(--majos-gold); box-shadow: none; }
  .pkp_site_nav_menu { padding: 12px; border-bottom: 1px solid var(--majos-line); box-shadow: 0 14px 30px rgba(34, 51, 61, .12); }
  .pkp_navigation_primary_row { padding: 0; border-bottom: 0; }
  .pkp_navigation_primary_wrapper { min-height: 0; }
  .pkp_navigation_primary > li > a { display: block; padding: 12px; border-bottom-width: 1px; border-radius: 6px; }
  .pkp_navigation_primary ul, .pkp_navigation_user ul { box-shadow: none; }
  .pkp_navigation_user_wrapper { margin-top: 10px; padding: 8px !important; border-radius: 7px; }
  .pkp_navigation_user { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .pkp_structure_sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pkp_structure_footer_wrapper { border-radius: 0; }
}
@media (max-width: 600px) {
  .pkp_structure_content { padding: 20px 14px 32px; gap: 22px; }
  .page_index_journal .homepage_about, .page_index_journal .current_issue,
  .page_index_journal .additional_content, .page_index_journal .cmp_announcements { padding: 20px 16px; border-radius: 12px; }
  .page_index_journal .homepage_about > h2, .page_index_journal .current_issue > h2 { font-size: 20px; }
  .page_index_journal .current_issue_title { font-size: 17px; }
  .obj_issue_toc .heading { padding: 16px; }
  .obj_issue_toc .heading .cover { float: none; display: block; max-width: 125px; margin: 0 auto 18px; }
  .obj_article_summary { padding: 18px 15px; }
  .obj_article_summary > .title { font-size: 16px; }
  .pkp_structure_sidebar { grid-template-columns: minmax(0, 1fr); }
  .pkp_structure_footer { padding: 24px 18px; }
  .obj_article_details .main_entry, .obj_article_details .entry_details { float: none; width: 100%; margin: 0; padding: 18px 0; }
  .obj_article_details .entry_details { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pkp_structure_page *, .pkp_structure_page *::before, .pkp_structure_page *::after { animation: none !important; transition: none !important; }
}
@media print {
  html, body, .pkp_structure_page { background: #fff !important; box-shadow: none; }
  .pkp_structure_page { max-width: none; margin: 0 !important; border: 0; }
  .pkp_site_nav_menu, .pkp_site_nav_toggle, .pkp_structure_sidebar { display: none !important; }
  .pkp_structure_content.has_sidebar { display: block; padding: 0; }
  .obj_article_summary, .page_index_journal .homepage_about, .page_index_journal .current_issue { box-shadow: none; }
  .obj_article_summary { break-inside: avoid; }
  .pkp_structure_page a { color: #22333d; }
}
