/* Journal of Advanced Microbiology — blue-accent stylesheet
   Apply only in JAM: Settings > Website > Appearance > Advanced. */

:root {
  --jam-blue: #063b70;
  --jam-blue-2: #0b5d9d;
  --jam-teal: #38b9ad;
  --jam-ink: #1f2933;
  --jam-muted: #5d6773;
  --jam-line: #dbe4ec;
  --jam-soft: #f5f9fc;
}

body,
.pkp_structure_page {
  color: var(--jam-ink);
  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}

body { background: #f4f8fb; }

.pkp_structure_page {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(6, 59, 112, .08);
}

.pkp_structure_head,
.pkp_structure_head .pkp_head_wrapper {
  background: #fff;
}

.pkp_structure_head {
  border-bottom: 3px solid var(--jam-blue);
  box-shadow: 0 2px 10px rgba(6, 59, 112, .06);
}

/* Use JAM's portrait cover as the journal logo. OJS wraps this image in a
   link to the journal home page, so the cover acts as a compact Home link. */
.pkp_site_name_wrapper {
  display: block !important;
  width: 62px;
  margin: 10px 0 8px !important;
}

.pkp_site_name,
.pkp_site_name > a,
.pkp_site_name .is_img {
  display: block;
  margin: 0 !important;
}

.pkp_site_name .is_img img {
  display: block;
  width: 62px !important;
  height: 82px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--jam-line);
  border-radius: 4px;
  box-shadow: 0 2px 7px rgba(6, 59, 112, .14);
}

.pkp_navigation_primary_row {
  border-top: 1px solid var(--jam-line);
  background: #fff;
}

.pkp_navigation_primary > li > a,
.pkp_navigation_user > li > a {
  color: #33404c;
  font-size: .92rem;
  font-weight: 600;
  transition: color .16s ease, background-color .16s ease;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
  color: var(--jam-blue-2);
}

.pkp_navigation_primary .dropdown-menu {
  border: 1px solid var(--jam-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(6, 59, 112, .14);
}

.pkp_navigation_primary li:hover > ul {
  display: block;
}

.pkp_structure_content {
  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto !important;
  padding: 34px 30px 56px;
}

.pkp_structure_main {
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page_index_journal,
.pkp_page_issue .page {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.homepage_about,
.current_issue {
  margin: 0 0 34px;
  padding: 32px;
  border: 1px solid var(--jam-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 51, 75, .05);
}

.homepage_about {
  border-left: 5px solid var(--jam-blue);
}

.homepage_about h2,
.current_issue > h2,
.pkp_page_issue .page > h1 {
  margin: 0 0 18px;
  color: var(--jam-blue);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}

.homepage_about p,
.homepage_about li {
  color: #4b5865;
  line-height: 1.7;
}

.homepage_about a,
.pkp_page_issue .page a {
  color: var(--jam-blue-2);
  font-weight: 700;
}

.current_issue {
  background: var(--jam-soft);
}

.current_issue_title {
  margin: -4px 0 24px;
  color: #445363;
  font-size: 1.05rem;
  font-weight: 700;
}

.obj_issue_toc .heading {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--jam-line);
}

.obj_issue_toc .heading .cover {
  margin: 0;
}

.obj_issue_toc .heading .cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 10px 24px rgba(6, 59, 112, .16);
}

.obj_issue_toc .heading .description,
.obj_issue_toc .heading .published {
  grid-column: 2;
}

.obj_issue_toc .heading .description {
  color: #4f5c68;
  line-height: 1.7;
}

.obj_issue_toc .heading .published {
  color: var(--jam-muted);
  font-size: .9rem;
}

.obj_issue_toc .sections {
  margin-top: 28px;
}

.obj_issue_toc .section {
  margin-bottom: 30px;
}

.obj_issue_toc .section > h3,
.obj_issue_toc .section > h2 {
  margin: 0 0 14px;
  color: var(--jam-blue);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cmp_article_list.articles {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp_article_list.articles > li {
  margin-bottom: 12px;
}

.obj_article_summary {
  padding: 20px 22px;
  border: 1px solid var(--jam-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(22, 51, 75, .035);
  transition: transform .16s ease, box-shadow .16s ease;
}

.obj_article_summary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(6, 59, 112, .09);
}

.obj_article_summary .title {
  margin: 0 0 9px;
  font-size: 1.12rem;
  line-height: 1.38;
}

.obj_article_summary .title a {
  color: var(--jam-ink);
  font-weight: 700;
  text-decoration: none;
}

.obj_article_summary .title a:hover {
  color: var(--jam-blue-2);
}

.obj_article_summary .meta {
  color: var(--jam-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.obj_article_summary .galleys_links {
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.obj_galley_link {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--jam-blue);
  border-radius: 999px;
  color: var(--jam-blue) !important;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}

.obj_galley_link:hover {
  background: var(--jam-blue);
  color: #fff !important;
}

.pkp_structure_sidebar .pkp_block {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--jam-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 51, 75, .05);
}

/* Keep journal blocks in a clear right sidebar on every JAM page that
   contains blocks: home, issues, archives, articles, search, and About. */
@media (min-width: 960px) {
  .pkp_structure_content.has_sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 28px;
    align-items: start;
  }

  .pkp_structure_content.has_sidebar .pkp_structure_main {
    grid-column: 1;
    grid-row: 1;
    float: none !important;
    width: auto !important;
  }

  .pkp_structure_content.has_sidebar .pkp_structure_sidebar {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

.pkp_structure_sidebar .title {
  margin: 0 0 12px;
  color: var(--jam-blue);
  font-size: 1rem;
}

.pkp_structure_sidebar a {
  color: var(--jam-blue-2);
  font-weight: 600;
}

.block_make_submission_link {
  display: block;
  padding: 11px 14px;
  border-radius: 6px;
  background: var(--jam-blue);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.pkp_page_issue .page {
  max-width: 980px;
}

.pkp_footer {
  border-top: 4px solid var(--jam-blue);
}

/* Make standalone pages feel as considered as the homepage. */
.pkp_page_article .article-details .title,
.pkp_page_search .page_title,
.pkp_page_about .page_title {
  color: var(--jam-blue);
  letter-spacing: -.018em;
}

.cmp_button {
  border-radius: 6px;
  font-weight: 700;
}

@media (min-width: 960px) {
  .pkp_page_article .pkp_structure_content,
  .pkp_page_issue .pkp_structure_content,
  .pkp_page_search .pkp_structure_content,
  .pkp_page_about .pkp_structure_content {
    padding-top: 30px;
  }
}

@media (max-width: 680px) {
  .pkp_site_name_wrapper { width: 52px; margin: 8px 0 6px !important; }
  .pkp_site_name .is_img img { width: 52px !important; height: 68px !important; }
  .pkp_structure_content {
    padding: 28px 16px 46px;
  }
  .homepage_about,
  .current_issue {
    padding: 22px;
  }
  .obj_issue_toc .heading {
    grid-template-columns: 1fr;
  }
  .obj_issue_toc .heading .cover {
    width: min(220px, 100%);
  }
  .obj_issue_toc .heading .description,
  .obj_issue_toc .heading .published {
    grid-column: 1;
  }
}

/* Compact pass: OJS Default Theme uses more generous spacing than needed for
   a scholarly journal. These selectors intentionally override it. */
.pkp_page_index .pkp_head_wrapper,
.pkp_page_issue .pkp_head_wrapper {
  padding: 0 !important;
}

.pkp_page_index .pkp_structure_content,
.pkp_page_issue .pkp_structure_content {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 26px 24px 40px !important;
}

.pkp_page_index .pkp_structure_main,
.pkp_page_issue .pkp_structure_main {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove unused Default Theme layout helpers that create visible guide lines
   in some OJS installations. */
.pkp_structure_content::before,
.pkp_structure_content::after,
.pkp_structure_main::before,
.pkp_structure_main::after {
  display: none !important;
  content: none !important;
}

.pkp_page_index .homepage_about,
.pkp_page_index .current_issue {
  margin-bottom: 20px;
  padding: 22px 24px;
}

.pkp_page_index .homepage_about h2,
.pkp_page_index .current_issue > h2,
.pkp_page_issue .page > h1 {
  margin-bottom: 12px;
  font-size: 1.7rem;
}

.pkp_page_index .obj_issue_toc .heading,
.pkp_page_issue .obj_issue_toc .heading {
  gap: 18px;
  padding-bottom: 14px;
}

.pkp_page_index .obj_issue_toc .sections,
.pkp_page_issue .obj_issue_toc .sections {
  margin-top: 18px;
}

.pkp_page_index .obj_issue_toc .section,
.pkp_page_issue .obj_issue_toc .section {
  margin-bottom: 18px;
}

/* Some issues do not have a cover or description. Do not reserve an empty
   cover column for those records. */
.obj_issue_toc .heading:not(:has(.cover)) {
  display: block;
  padding-bottom: 10px;
}

.obj_issue_toc .heading:not(:has(.cover)) .description,
.obj_issue_toc .heading:not(:has(.cover)) .published {
  grid-column: auto;
}

@media (max-width: 680px) {
  .pkp_page_index .pkp_structure_content,
  .pkp_page_issue .pkp_structure_content { padding: 20px 16px 32px !important; }
  .pkp_page_index .homepage_about,
  .pkp_page_index .current_issue { padding: 18px; }
}

/* OJS adds 30px padding and negative margins around every article section.
   Remove that inherited spacing so adjacent sections stay compact. */
.pkp_page_index .obj_issue_toc .sections > .section,
.pkp_page_issue .obj_issue_toc .sections > .section {
  margin: 0 !important;
  padding: 0 !important;
}

.pkp_page_index .obj_issue_toc .sections > .section + .section,
.pkp_page_issue .obj_issue_toc .sections > .section + .section {
  margin-top: 22px !important;
  padding-top: 0 !important;
}

.pkp_page_index .obj_issue_toc .sections > .section > h3,
.pkp_page_issue .obj_issue_toc .sections > .section > h3 {
  margin: 0 0 10px !important;
}

/* Put issue artwork in the first grid column. OJS otherwise places it in
   the description column, creating a narrow, stacked introduction. */
.obj_issue_toc .heading .cover {
  grid-column: 1 !important;
  grid-row: 1 / span 3 !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.obj_issue_toc .heading .cover img {
  width: 100% !important;
  height: auto !important;
}

.obj_issue_toc .heading .description,
.obj_issue_toc .heading .published {
  grid-column: 2 !important;
  width: auto !important;
  margin-left: 0 !important;
}

.obj_issue_toc .heading .description {
  grid-row: 1;
}

.obj_issue_toc .heading .published {
  grid-row: 2;
  margin-top: 16px !important;
}

@media (max-width: 680px) {
  .obj_issue_toc .heading .cover {
    max-width: 360px;
    margin-bottom: 18px !important;
  }
}
