/* ==========================================================
   JNNAf – Journal of Neurology and Neurosciences in Africa
   Custom stylesheet for the OJS 3.3 / 3.4 Default theme
   Upload in: Settings > Website > Appearance > Setup >
              Journal style sheet
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  --jn-teal: #245363;      /* logo mark */
  --jn-teal-dark: #1B4250; /* hero background */
  --jn-blue: #1E4F91;      /* logo text, links */
  --jn-ink: #14232B;       /* text, footer */
  --jn-cream: #F5F4EE;     /* page background */
  --jn-line: #DEDDD3;      /* borders */
  --jn-soft: #E7EFF0;      /* light teal chips */
  --jn-muted: #4A5559;
}

/* ---------- Base ---------- */
body,
.pkp_structure_page {
  background: var(--jn-cream);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--jn-ink);
}
.pkp_structure_content { background: transparent; padding-top: 48px; }

h1, h2, h3,
.page_title,
.obj_article_details .page_title,
.obj_article_summary .title,
.pkp_block .title,
.current_issue .current_issue_title {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--jn-ink);
}

a { color: var(--jn-blue); }
a:hover, a:focus { color: #143A6E; }

/* ---------- Header ---------- */
.pkp_structure_head {
  background: #FFFFFF;
  border-bottom: 1px solid var(--jn-line);
}
.pkp_head_wrapper { padding-top: 0; }

/* Logo */
.pkp_site_name_wrapper { padding: 18px 0; }
.pkp_site_name { padding: 0; }
.pkp_site_name .is_img img {
  max-height: 84px;
  width: auto;
}

/* Top bar: Register / Login / language */
.pkp_navigation_user_wrapper {
  background: var(--jn-teal);
  top: 0;
}
.pkp_navigation_user_wrapper a,
.pkp_navigation_user > li > a {
  color: #FFFFFF !important;
  font-size: 14px;
}
.pkp_navigation_user .dropdown-menu a { color: var(--jn-ink) !important; }

/* Main menu */
.pkp_navigation_primary_row {
  background: #FFFFFF;
  border-top: 1px solid #ECEBE3;
}
.pkp_navigation_primary > li > a {
  color: var(--jn-ink);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 16px;
  margin: 0;
  border-bottom: 3px solid transparent;
}
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_navigation_primary > li.current > a {
  color: var(--jn-teal);
  border-bottom-color: var(--jn-teal);
  background: transparent;
}
.pkp_navigation_primary .dropdown-menu {
  border: 1px solid var(--jn-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 35, 43, 0.12);
}

/* Search */
.pkp_navigation_search_wrapper a,
.pkp_head_wrapper .pkp_search .search_prompt {
  color: var(--jn-teal);
  font-weight: 600;
}

/* Mobile menu button */
.pkp_site_nav_toggle { background: var(--jn-teal); color: #FFFFFF; }

/* ---------- Homepage hero (from "Additional Homepage Content") ---------- */
.jn-hero {
  background: var(--jn-teal-dark);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 56px 48px;
  margin-bottom: 48px;
}
.jn-hero .jn-eyebrow {
  margin: 0 0 14px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A9CBD1;
  font-weight: 600;
}
.jn-hero h2 {
  margin: 0 0 18px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 42px;
  line-height: 1.15;
  color: #FFFFFF;
}
.jn-hero p {
  font-size: 19px;
  line-height: 1.6;
  color: #DCE8EA;
  max-width: 640px;
}
.jn-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.jn-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none !important;
  box-sizing: border-box;
}
.jn-btn-primary { background: #FFFFFF; color: var(--jn-teal-dark) !important; }
.jn-btn-outline { border: 2px solid #FFFFFF; color: #FFFFFF !important; }
.jn-btn-primary:hover { background: #E7EFF0; }
.jn-btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

.jn-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.jn-fact { background: #24525F; border-radius: 10px; padding: 20px; }
.jn-fact strong {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.jn-fact span { font-size: 15px; color: #DCE8EA; }

/* Scope tiles */
.jn-scope h2 { font-size: 28px; margin: 0 0 18px; }
.jn-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.jn-scope-grid span {
  display: block;
  background: #FFFFFF;
  border: 1px solid var(--jn-line);
  border-radius: 8px;
  padding: 18px;
  font-weight: 600;
}

/* ---------- Current issue / table of contents ---------- */
.current_issue > h2,
.page_issue_archive .page_title,
.obj_issue_toc .sections h2 {
  font-size: 30px;
  border-bottom: 2px solid var(--jn-ink);
  padding-bottom: 12px;
}
.obj_issue_toc .section > h2 {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jn-teal);
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 32px;
}
.obj_issue_toc .section:before,
.obj_issue_toc .section:first-child:before { display: none; }

.obj_article_summary {
  padding: 22px 0;
  border-bottom: 1px solid var(--jn-line);
}
.obj_article_summary .title {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
}
.obj_article_summary .title a { color: var(--jn-ink); }
.obj_article_summary .title a:hover { color: var(--jn-blue); }
.obj_article_summary .meta .authors { color: var(--jn-muted); font-size: 16px; }

/* PDF / HTML buttons */
.obj_galley_link {
  border: 0;
  border-radius: 5px;
  background: var(--jn-soft);
  color: var(--jn-teal-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 0 14px;
  line-height: 36px;
}
.obj_galley_link:hover,
.obj_galley_link:focus {
  background: var(--jn-teal);
  color: #FFFFFF;
}

/* Generic buttons */
.cmp_button,
.pkp_button,
.cmp_form .buttons button,
.page_search .submit button {
  background: var(--jn-teal);
  border: 1px solid var(--jn-teal);
  color: #FFFFFF;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: none;
}
.cmp_button:hover,
.pkp_button:hover,
.cmp_form .buttons button:hover {
  background: var(--jn-teal-dark);
  border-color: var(--jn-teal-dark);
  color: #FFFFFF;
}

/* ---------- Article page ---------- */
.obj_article_details .page_title { font-size: 36px; line-height: 1.2; }
.obj_article_details .main_entry .item {
  border-bottom: 1px solid #ECEBE3;
}
.obj_article_details .item .label,
.obj_article_details .entry_details .item .label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jn-teal);
}
.obj_article_details .abstract p { font-size: 17px; line-height: 1.7; }
.obj_article_details .entry_details {
  background: #FFFFFF;
  border: 1px solid var(--jn-line);
  border-radius: 12px;
}

/* ---------- Sidebar blocks ---------- */
.pkp_structure_sidebar .pkp_block {
  background: #FFFFFF;
  border: 1px solid var(--jn-line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
}
.pkp_block .title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 12px;
}
.pkp_block ul { margin: 0; }
.pkp_block li { padding: 5px 0; }

/* Submit block (custom block, see jnnaf-blocs-html.html) */
.jn-submit-block {
  background: var(--jn-teal);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 24px;
  margin: -22px;
}
.jn-submit-block h3 { color: #FFFFFF; font-size: 21px; margin: 0 0 8px; }
.jn-submit-block p { color: #DCE8EA; font-size: 16px; line-height: 1.55; }
.jn-submit-block .jn-btn { width: 100%; justify-content: center; background: #FFFFFF; color: var(--jn-teal-dark) !important; }
.jn-submit-block .jn-link { display: block; text-align: center; margin-top: 12px; color: #FFFFFF !important; font-size: 15px; }

/* Announcements on the homepage */
.cmp_announcements { background: #FFFFFF; border: 1px solid var(--jn-line); border-radius: 10px; padding: 24px; }
.cmp_announcements h2 { font-size: 22px; }

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper {
  background: var(--jn-ink);
  color: #C7D1D4;
  border-top: 0;
}
.pkp_structure_footer { padding: 40px 0 24px; }
.pkp_footer_content { color: #C7D1D4; font-size: 15px; line-height: 1.6; }
.pkp_footer_content a { color: #FFFFFF; }
.pkp_footer_content h3, .pkp_footer_content strong { color: #FFFFFF; }
.pkp_brand_footer { opacity: 0.5; }
.pkp_brand_footer img { filter: brightness(0) invert(1); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .jn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jn-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .jn-hero { padding: 32px 22px; }
  .jn-hero h2 { font-size: 30px; }
  .jn-scope-grid { grid-template-columns: minmax(0, 1fr); }
  .pkp_site_name .is_img img { max-height: 60px; }
  .pkp_navigation_primary_row { background: #FFFFFF; }
}

/* ==========================================================
   Corrections v2 (after first test on jnneuroscience.org)
   ========================================================== */

/* Journal name in text (when no logo is uploaded): dark instead of white */
.pkp_site_name .is_text,
.pkp_site_name a.is_text {
  color: var(--jn-ink) !important;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
}

/* Top bar (user menu) across the full width of the screen */
.pkp_navigation_user_wrapper {
  box-shadow: 0 0 0 100vmax var(--jn-teal);
  clip-path: inset(0 -100vmax);
}

/* Built-in "Make a submission" sidebar block */
.block_make_submission { text-align: center; }
.block_make_submission_link,
.pkp_block .block_make_submission_link {
  display: block;
  background: var(--jn-teal) !important;
  border: 0 !important;
  border-radius: 6px;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 16px;
  padding: 13px 18px;
  text-decoration: none;
  box-shadow: none;
}
.block_make_submission_link:hover,
.block_make_submission_link:focus {
  background: var(--jn-teal-dark) !important;
}

/* Remove the vertical grey lines around the main column */
.pkp_structure_main:before,
.pkp_structure_main:after { display: none !important; }
.pkp_structure_content { border: 0; }

/* OJS / PKP footer mark: a little more readable */
.pkp_brand_footer { opacity: 0.75; }

/* v3: align the logo with the menu */
.pkp_site_name_wrapper,
.pkp_site_name { padding-left: 0 !important; margin-left: 0 !important; }
.pkp_site_name .is_img { margin-left: 0; }
.pkp_site_name .is_img img { max-height: 90px; }

/* v4: scope tiles as a list (kept intact by the OJS editor) */
ul.jn-scope-grid { list-style: none; padding: 0; margin: 0 0 48px; }
ul.jn-scope-grid li {
  background: #FFFFFF;
  border: 1px solid var(--jn-line);
  border-radius: 8px;
  padding: 18px;
  font-weight: 600;
  margin: 0;
}
/* v4: fact figures fit on one line */
.jn-fact strong { font-size: 22px; line-height: 1.2; }

/* v5: keep each fact figure on one line */
.jn-facts { gap: 12px; }
.jn-fact { padding: 18px 16px; }
.jn-fact strong { white-space: nowrap; font-size: 20px; }
@media (max-width: 1199px) { .jn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v6: remove the grey line and extra padding around the homepage content */
.page_index_journal .additional_content {
  border-top: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* v7: small, discreet OJS/PKP credit at the bottom of the footer */
.pkp_structure_footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.pkp_footer_content { flex: 1 1 480px; padding-bottom: 0; }
.pkp_brand_footer {
  flex: 0 0 auto;
  padding: 0;
  opacity: 0.6;
}
.pkp_brand_footer:hover { opacity: 0.9; }
.pkp_brand_footer img { width: 90px; height: auto; }

/* ==========================================================
   v8: header like the mockup (desktop only)
   - tagline on the left of the top bar
   - search shown as a search box at the right of the logo
   ========================================================== */
@media (min-width: 992px) {
  .pkp_head_wrapper { position: relative; padding-top: 36px; }
  .pkp_site_nav_menu,
  .pkp_navigation_primary_row,
  .pkp_navigation_primary_wrapper { position: static !important; }

  /* Top bar */
  .pkp_navigation_user_wrapper {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    height: 36px;
    display: flex;
    align-items: center;
  }
  .pkp_navigation_user > li > a { line-height: 36px; padding-top: 0; padding-bottom: 0; }

  /* Tagline in the top bar (edit the text here) */
  .pkp_head_wrapper::before {
    content: "Open access, peer-reviewed journal";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    line-height: 36px;
    font-size: 14px;
    color: #E8F0F1;
  }

  /* Search box at the right of the logo */
  .pkp_navigation_search_wrapper {
    position: absolute !important;
    top: 78px;
    right: 0;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .pkp_navigation_search_wrapper a.pkp_search_desktop {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 340px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 0 0 14px !important;
    border: 1px solid #C9C8BC !important;
    border-radius: 6px;
    background: #FAFAF6;
    color: #5C676B !important;
    font-size: 0 !important;   /* hides the word "Search" */
    font-weight: 400;
    text-decoration: none;
    overflow: hidden;
  }
  .pkp_navigation_search_wrapper a.pkp_search_desktop::before {
    content: "Search articles, authors\2026";
    font-size: 15px;
    order: 0;
  }
  .pkp_navigation_search_wrapper a.pkp_search_desktop .fa-search {
    order: 1;
    width: 44px;
    height: 44px;
    margin: -1px -1px -1px 0;
    border-radius: 0 6px 6px 0;
    background: var(--jn-teal);
    color: #FFFFFF;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pkp_navigation_search_wrapper a.pkp_search_desktop:hover { border-color: var(--jn-teal) !important; }
}

/* v9: push Register / Login fully to the right of the top bar */
@media (min-width: 992px) {
  .pkp_navigation_user_wrapper {
    left: auto !important;
    width: auto !important;
    justify-content: flex-end;
  }
  #navigationUser { width: auto !important; display: flex; gap: 8px; }
}

/* v10: cancel the theme's horizontal shift of the top bar links */
@media (min-width: 992px) {
  .pkp_navigation_user_wrapper { transform: none !important; padding-right: 0 !important; }
}

/* v11: keep the homepage banner ABOVE the current issue.
   (OJS prints "Additional Content" after the current issue by default) */
.page_index_journal { display: flex; flex-direction: column; }
.page_index_journal > .additional_content { order: -1; }
