/* ==========================================================================
   African Open Research — custom stylesheet for OJS 3.5 (Default theme)

   Upload via: Settings → Website → Appearance → Custom Stylesheet
   Applies at site level and per journal. Upload separately in each context
   where you want it.

   Palette
     #0E1F46  deep indigo   primary — header, nav, headings
                            sampled from the logo background so the
                            uploaded PNG blends into the header band
     #0A1734  indigo dark   nav bar, hover states
     #B5651D  copper        accent — links, buttons, rules
     #8F4E16  copper dark   hover states
     #F7F6F3  warm white    page background
     #FFFFFF  white         content panels
     #1A1A1A  near black    body text
     #5A6072  slate         secondary text
     #DDD9D2  bone          borders

   Verified against the compiled OJS 3.5.0.5 stylesheet on
   africanopenresearch.org — every selector below exists in the theme.
   ========================================================================== */

:root {
  --aor-primary: #0E1F46;
  --aor-primary-dark: #0A1734;
  --aor-accent: #B5651D;
  --aor-accent-dark: #8F4E16;
  --aor-surface: #F7F6F3;
  --aor-panel: #FFFFFF;
  --aor-text: #1A1A1A;
  --aor-muted: #5A6072;
  --aor-border: #DDD9D2;
  --aor-serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --aor-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
              "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   1. Foundations
   -------------------------------------------------------------------------- */

body {
  background: var(--aor-surface);
  color: var(--aor-text);
  font-family: var(--aor-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--aor-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--aor-accent-dark);
  text-decoration: underline;
}

/* Visible focus ring. Required for WCAG and checked during DOAJ review. */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--aor-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--aor-serif);
  color: var(--aor-primary);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 0.6em; }
h2 { font-size: 1.5rem; margin-bottom: 0.5em; }
h3 { font-size: 1.2rem; margin-bottom: 0.5em; }

/* --------------------------------------------------------------------------
   2. Header
   -------------------------------------------------------------------------- */

.pkp_structure_head {
  background: var(--aor-primary);
  border-bottom: 3px solid var(--aor-accent);
}

.pkp_head_wrapper {
  padding-top: 1.25rem;
  padding-bottom: 0;
}

.pkp_site_name_wrapper {
  padding: 0.5rem 0 1rem;
}

.pkp_site_name,
.pkp_site_name a,
.pkp_site_name .is_img img {
  color: #FFFFFF;
}

.pkp_site_name .is_text {
  font-family: var(--aor-serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.pkp_site_name .is_text:hover {
  color: #FFFFFF;
  text-decoration: none;
}

/* Constrain an uploaded logo so a large file cannot blow out the header.
   max-width matters for wide lockups — a 6:1 logo at 72px tall is ~440px
   wide, which would overflow a narrow phone without this. */
.pkp_site_name .is_img img {
  max-height: 84px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* MOBILE HEADER — read this before changing any value below.

   The default theme sets, under 768px:
     .pkp_site_name_wrapper { height: 2.857rem }   fixed, 40px
     .pkp_site_name         { position: absolute } escapes normal flow
     .pkp_site_name .is_img img { max-height: 2.143rem }   30px
     .pkp_site_name > a     { padding: .714rem 0 }  10px top and bottom

   Because the wrapper's height is FIXED and the logo is ABSOLUTE, enlarging
   the image alone makes it hang below the header band — the wrapper will
   never grow to contain it, and overflow:hidden cannot help because the
   overflow is happening past a height the theme has hard-coded.

   So: raise the wrapper height first, then size the image to fit inside it.
     wrapper 72px = 6px margin + 60px image + 6px margin, anchor padding zeroed
   At 4.78:1 a 60px-tall logo is ~287px wide, which fits the space left of
   the hamburger on a 360px screen.

   BREAKPOINT: 991px, not 767px. The theme keeps this absolute-positioned
   header all the way up to 991px and only switches to the desktop layout at
   min-width:992px. A 767px query leaves tablets and small laptop windows
   using the broken layout. */
@media (max-width: 991px) {
  .pkp_site_name_wrapper {
    height: 72px;
  }

  .pkp_site_name > a {
    padding-top: 0;
    padding-bottom: 0;
  }

  .pkp_site_name .is_img {
    margin-top: 6px;
    margin-bottom: 6px;
  }

  .pkp_site_name .is_img img {
    max-height: 60px;
    max-width: 100%;
    width: auto;
    height: auto;
  }
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */

.pkp_navigation_primary_wrapper {
  background: var(--aor-primary-dark);
  margin: 0 -1rem;
  padding: 0 1rem;
}

.pkp_navigation_primary > li > a,
.pkp_nav_list > li > a {
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--aor-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_nav_list > li > a:hover,
.pkp_nav_list > li > a:focus {
  background: var(--aor-accent);
  color: #FFFFFF;
  text-decoration: none;
}

/* Dropdown submenus */
.pkp_navigation_primary li ul {
  background: var(--aor-primary-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pkp_navigation_primary li ul a {
  color: rgba(255, 255, 255, 0.88);
  text-transform: none;
  letter-spacing: 0;
}

/* Register / Login */
.pkp_navigation_user > li > a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pkp_navigation_user > li > a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.pkp_site_nav_toggle {
  background: var(--aor-primary-dark);
  color: #FFFFFF;
}

.pkp_navigation_search_wrapper a {
  color: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   4. Content area
   -------------------------------------------------------------------------- */

.pkp_structure_content {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.pkp_structure_main {
  background: var(--aor-panel);
  border: 1px solid var(--aor-border);
  border-radius: 3px;
  padding: 2rem 2.25rem;
}

.cmp_breadcrumbs {
  font-size: 0.85rem;
  color: var(--aor-muted);
  margin-bottom: 1.5rem;
}

.cmp_breadcrumbs a {
  color: var(--aor-muted);
}

.cmp_breadcrumbs a:hover {
  color: var(--aor-accent);
}

/* Page title with a copper rule beneath */
.pkp_structure_main > h1:first-child,
.page_index_journal h1,
.pkp_page_index h1 {
  border-bottom: 2px solid var(--aor-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   5. Sidebar
   -------------------------------------------------------------------------- */

.pkp_structure_sidebar {
  padding-left: 2rem;
}

.pkp_block {
  background: var(--aor-panel);
  border: 1px solid var(--aor-border);
  border-top: 3px solid var(--aor-primary);
  border-radius: 3px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.pkp_block .title {
  font-family: var(--aor-serif);
  font-size: 1rem;
  color: var(--aor-primary);
  margin-bottom: 0.75rem;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   6. Article listings and issue tables of contents
   -------------------------------------------------------------------------- */

.cmp_article_list > li {
  border-bottom: 1px solid var(--aor-border);
  padding: 1.35rem 0;
}

.cmp_article_list > li:last-child {
  border-bottom: none;
}

.obj_article_summary > .title {
  font-family: var(--aor-serif);
  font-size: 1.15rem;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.obj_article_summary > .title a {
  color: var(--aor-primary);
}

.obj_article_summary > .title a:hover {
  color: var(--aor-accent);
  text-decoration: none;
}

.obj_article_summary .meta,
.obj_article_summary .authors {
  color: var(--aor-muted);
  font-size: 0.9rem;
}

.obj_issue_toc .section > h2 {
  font-size: 1.05rem;
  color: var(--aor-primary);
  border-bottom: 1px solid var(--aor-border);
  padding-bottom: 0.4rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   7. Article landing page
   -------------------------------------------------------------------------- */

.obj_article_details .page_title {
  font-family: var(--aor-serif);
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--aor-primary);
}

.obj_article_details .authors .name {
  font-weight: 600;
  color: var(--aor-text);
}

.obj_article_details .authors .affiliation,
.obj_article_details .authors .orcid {
  color: var(--aor-muted);
  font-size: 0.9rem;
}

.obj_article_details .abstract {
  font-size: 1.02rem;
  line-height: 1.75;
}

.obj_article_details .abstract h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--aor-border);
  padding-bottom: 0.4rem;
}

/* PDF / full-text download buttons */
.obj_galley_link {
  background: var(--aor-accent);
  border-color: var(--aor-accent);
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.obj_galley_link:hover,
.obj_galley_link:focus {
  background: var(--aor-accent-dark);
  border-color: var(--aor-accent-dark);
  color: #FFFFFF;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Buttons and forms
   -------------------------------------------------------------------------- */

.pkp_button,
.cmp_button {
  background: var(--aor-primary);
  border: 1px solid var(--aor-primary);
  color: #FFFFFF;
  font-family: var(--aor-sans);
  font-weight: 600;
  border-radius: 3px;
  padding: 0.6rem 1.4rem;
}

.pkp_button:hover,
.cmp_button:hover,
.pkp_button:focus,
.cmp_button:focus {
  background: var(--aor-primary-dark);
  border-color: var(--aor-primary-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.pkp_button_primary {
  background: var(--aor-accent);
  border-color: var(--aor-accent);
}

.pkp_button_primary:hover,
.pkp_button_primary:focus {
  background: var(--aor-accent-dark);
  border-color: var(--aor-accent-dark);
}

.cmp_button_wire {
  background: transparent;
  border: 1px solid var(--aor-accent);
  color: var(--aor-accent);
}

.cmp_button_wire:hover,
.cmp_button_wire:focus {
  background: var(--aor-accent);
  color: #FFFFFF;
}

.cmp_form .label {
  font-weight: 600;
  color: var(--aor-primary);
}

.cmp_form input[type="text"],
.cmp_form input[type="email"],
.cmp_form input[type="password"],
.cmp_form input[type="url"],
.cmp_form select,
.cmp_form textarea {
  border: 1px solid var(--aor-border);
  border-radius: 3px;
  padding: 0.55rem 0.7rem;
  font-family: var(--aor-sans);
  font-size: 0.95rem;
}

.cmp_form input:focus,
.cmp_form select:focus,
.cmp_form textarea:focus {
  border-color: var(--aor-accent);
}

.cmp_form .required {
  color: #A32B2B;
}

.pkp_form_error,
.pkp_form_error_list {
  color: #A32B2B;
}

/* --------------------------------------------------------------------------
   9. Announcements and pagination
   -------------------------------------------------------------------------- */

.cmp_announcements > li {
  border-left: 3px solid var(--aor-accent);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.cmp_pagination {
  margin-top: 2rem;
  color: var(--aor-muted);
  font-size: 0.9rem;
}

.cmp_pagination a {
  color: var(--aor-accent);
}

/* --------------------------------------------------------------------------
   10. Site-level journal index
   -------------------------------------------------------------------------- */

.pkp_page_index .journals > li {
  background: var(--aor-panel);
  border: 1px solid var(--aor-border);
  border-left: 4px solid var(--aor-accent);
  border-radius: 3px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.pkp_page_index .journals .title a {
  font-family: var(--aor-serif);
  font-size: 1.25rem;
  color: var(--aor-primary);
}

.pkp_page_index .journals .title a:hover {
  color: var(--aor-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   10b. Site index prose

   The site-level "About the Site" editor allows only bold, italic and links —
   no headings, no lists, no source view. So the content arrives as plain
   paragraphs and has to be styled structurally rather than by class.

   First paragraph becomes the lead. Bold lead-ins inside later paragraphs
   are picked up and coloured so they read as pseudo-headings.
   -------------------------------------------------------------------------- */

.pkp_page_index p {
  max-width: 42em;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.pkp_page_index p:first-of-type {
  font-family: var(--aor-serif);
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--aor-primary);
  max-width: 20em;
  border-bottom: 2px solid var(--aor-accent);
  padding-bottom: 1.1rem;
  margin-bottom: 1.75rem;
}

.pkp_page_index p:first-of-type strong {
  font-weight: 600;
}

/* Bold lead-ins at the start of a paragraph */
.pkp_page_index p > strong:first-child {
  color: var(--aor-primary);
  font-family: var(--aor-serif);
  font-size: 1.05em;
}

/* "There are no journals available" and similar system messages */
.pkp_page_index .pkp_structure_main > p:last-of-type {
  color: var(--aor-muted);
  font-style: italic;
  border-top: 1px solid var(--aor-border);
  padding-top: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 767px) {
  .pkp_page_index p:first-of-type {
    font-size: 1.25rem;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.pkp_structure_footer_wrapper {
  background: var(--aor-primary);
  border-top: 3px solid var(--aor-accent);
  margin-top: 3rem;
}

.pkp_structure_footer,
.pkp_footer_content {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.pkp_footer_content a {
  color: #FFFFFF;
  text-decoration: underline;
}

.pkp_footer_content a:hover {
  color: var(--aor-accent);
}

/* The "Platform & workflow by OJS/PKP" mark. Keep it — attribution is a
   condition of the licence — but stop it dominating the page. */
.pkp_brand_footer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.75;
}

.pkp_brand_footer img {
  max-height: 44px;
  width: auto;
}

.pkp_brand_footer:hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   12. Accessibility helpers
   -------------------------------------------------------------------------- */

.cmp_skip_to_content a {
  background: var(--aor-accent);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .pkp_structure_sidebar {
    padding-left: 0;
    padding-top: 2rem;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .pkp_structure_main {
    padding: 1.25rem;
  }

  .pkp_site_name .is_text {
    font-size: 1.35rem;
  }

  .pkp_navigation_primary_wrapper {
    margin: 0;
    padding: 0;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

/* --------------------------------------------------------------------------
   14. Print — matters more than it looks. Readers print articles, and a
   default OJS print output wastes ink on navigation chrome.
   -------------------------------------------------------------------------- */

@media print {
  .pkp_structure_head,
  .pkp_structure_sidebar,
  .pkp_structure_footer_wrapper,
  .pkp_navigation_primary_wrapper,
  .cmp_breadcrumbs,
  .obj_galley_link {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    font-size: 11pt;
  }

  .pkp_structure_main {
    border: none;
    padding: 0;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }

  .aor-hero,
  .aor-cta-row,
  .aor-callout {
    display: none !important;
  }
}

/* ==========================================================================
   15. Homepage components

   These style the HTML blocks pasted into:
     Site    → Administration → Site Settings → Site Setup → About the site
     Journal → Settings → Website → Appearance → Setup → Additional Content

   All classes are prefixed aor- so they cannot collide with theme classes.
   ========================================================================== */

/* --- Hero band ----------------------------------------------------------- */

.aor-hero {
  background: var(--aor-primary);
  color: #FFFFFF;
  padding: 2.75rem 2.25rem;
  border-radius: 3px;
  border-left: 5px solid var(--aor-accent);
  margin-bottom: 2.5rem;
}

.aor-hero h2 {
  color: #FFFFFF;
  font-family: var(--aor-serif);
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.aor-hero .aor-kicker {
  display: block;
  font-family: var(--aor-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aor-accent);
  margin-bottom: 0.9rem;
}

.aor-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 46em;
  margin: 0 0 1rem;
}

.aor-hero p:last-child {
  margin-bottom: 0;
}

/* --- Call-to-action buttons ---------------------------------------------- */

.aor-cta-row {
  margin-top: 1.75rem;
}

.aor-cta {
  display: inline-block;
  background: var(--aor-accent);
  color: #FFFFFF;
  font-family: var(--aor-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.6rem;
  border-radius: 3px;
  margin: 0 0.6rem 0.6rem 0;
  border: 2px solid var(--aor-accent);
}

.aor-cta:hover,
.aor-cta:focus {
  background: var(--aor-accent-dark);
  border-color: var(--aor-accent-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.aor-cta-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #FFFFFF;
}

.aor-cta-ghost:hover,
.aor-cta-ghost:focus {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--aor-primary);
}

/* --- Promise tiles ------------------------------------------------------- */

.aor-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.aor-tiles li {
  flex: 1 1 calc(25% - 1rem);
  min-width: 190px;
  background: var(--aor-surface);
  border: 1px solid var(--aor-border);
  border-top: 3px solid var(--aor-accent);
  border-radius: 3px;
  padding: 1.25rem;
}

.aor-tiles strong {
  display: block;
  font-family: var(--aor-serif);
  font-size: 1.05rem;
  color: var(--aor-primary);
  margin-bottom: 0.35rem;
}

.aor-tiles span {
  display: block;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--aor-muted);
}

/* --- Callout box --------------------------------------------------------- */

.aor-callout {
  background: var(--aor-surface);
  border: 1px solid var(--aor-border);
  border-left: 4px solid var(--aor-accent);
  border-radius: 3px;
  padding: 1.5rem 1.75rem;
  margin: 0 0 2.5rem;
}

.aor-callout h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.aor-callout p:last-child {
  margin-bottom: 0;
}

/* --- Section heading with copper rule ------------------------------------ */

.aor-section-title {
  font-family: var(--aor-serif);
  font-size: 1.35rem;
  color: var(--aor-primary);
  border-bottom: 2px solid var(--aor-accent);
  padding-bottom: 0.5rem;
  margin: 2.5rem 0 1.25rem;
}

/* --- Two and three column text ------------------------------------------- */

.aor-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.aor-cols > div {
  flex: 1 1 260px;
}

.aor-cols h4 {
  font-family: var(--aor-serif);
  font-size: 1.05rem;
  color: var(--aor-primary);
  margin: 0 0 0.5rem;
}

.aor-cols ul {
  margin: 0;
  padding-left: 1.1rem;
}

.aor-cols li {
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

/* --- Numbered steps ------------------------------------------------------ */

.aor-steps {
  counter-reset: aor-step;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.aor-steps li {
  counter-increment: aor-step;
  position: relative;
  padding-left: 3.25rem;
  margin-bottom: 1.25rem;
  min-height: 2.25rem;
}

.aor-steps li::before {
  content: counter(aor-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  line-height: 2.25rem;
  text-align: center;
  background: var(--aor-primary);
  color: #FFFFFF;
  font-family: var(--aor-serif);
  font-size: 1.05rem;
  border-radius: 50%;
}

.aor-steps strong {
  display: block;
  color: var(--aor-primary);
  margin-bottom: 0.15rem;
}

/* --- Fine print ---------------------------------------------------------- */

.aor-fineprint {
  font-size: 0.88rem;
  color: var(--aor-muted);
  border-top: 1px solid var(--aor-border);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 767px) {
  .aor-hero {
    padding: 1.75rem 1.25rem;
  }

  .aor-hero h2 {
    font-size: 1.45rem;
  }

  .aor-hero p {
    font-size: 1rem;
  }

  .aor-cta {
    display: block;
    text-align: center;
    margin-right: 0;
  }

  .aor-tiles li {
    flex: 1 1 100%;
  }

  .aor-cols {
    gap: 1.25rem;
  }
}
