/* AIJS | TUIJLL-based public theme for OJS 3.4

   Upload through Website > Appearance > Advanced > Journal Style Sheet.

   Replace prior custom navbar styles to avoid conflicts.

   Colors: emerald #123c37, gold #c8a45d.

*/

:root {
  --tj-navy: #123c37;

  --tj-deep: #102d2a;

  --tj-slate: #20564e;

  --tj-gold: #c8a45d;

  --tj-text: #263d39;

  --tj-muted: #647875;

  --tj-border: #dce7e2;

  --tj-soft: #f4f8f6;

  --tj-white: #fff;

  --tj-radius: 12px;

  --tj-shadow: 0 8px 28px rgba(18, 60, 55, 0.08);
}

/* Foundation - public frontend only */

body.pkp_page_index,
body.pkp_page_about,
body.pkp_page_issue,
body.pkp_page_article,
body.pkp_page_search,
body.pkp_page_user,
body.pkp_page_information,
body.pkp_page_announcement,
body.pkp_page_catalog,
body.pkp_page_submissions,
body.pkp_page_contact {
  background: #f2f7f4;

  color: var(--tj-text);
}

.pkp_structure_page {
  background: #fff;

  box-shadow: 0 8px 36px rgba(18, 60, 55, 0.08);
}

.pkp_structure_content {
  background: #fff;
}

.pkp_structure_main {
  min-width: 0;
}

.pkp_structure_main p,
.pkp_structure_main li {
  line-height: 1.85;
}

.pkp_structure_main img,
.pkp_block img {
  max-width: 100%;

  height: auto;
}

.pkp_structure_main a:not(.cmp_button):not(.obj_galley_link):not(.read_more),
.pkp_block a {
  color: #156c5c;

  text-underline-offset: 3px;
}

.pkp_structure_main a:hover,
.pkp_block a:hover {
  color: #94702f;
}

.pkp_structure_main h1,
.pkp_structure_main h2,
.pkp_structure_main h3,
.pkp_structure_main h4 {
  color: var(--tj-navy);

  line-height: 1.4;
}

.pkp_structure_main h1 {
  font-weight: 750;

  letter-spacing: -0.025em;
}

.pkp_structure_main :focus-visible,
.pkp_navigation_primary_wrapper :focus-visible,
.pkp_site_nav_toggle:focus-visible {
  outline: 2px solid var(--tj-gold);

  outline-offset: 3px;
}

/* Header / masthead */

.pkp_structure_head {
  background: var(--tj-deep);

  border-bottom: 0;
}

.pkp_site_name_wrapper {
  background: linear-gradient(115deg, #123c37, #172e4d);
}

.pkp_site_name {
  padding-top: 15px;

  padding-bottom: 15px;
}

.pkp_site_name .is_img img {
  max-height: 120px;

  width: auto;

  object-fit: contain;
}

.pkp_site_name .is_text,
.pkp_site_name .is_text a {
  color: #fff;

  font-weight: 700;

  line-height: 1.35;

  text-decoration: none;
}

/* Nav base - don't alter OJS visibility / toggle JS */

.pkp_navigation_primary_wrapper {
  background: var(--tj-navy);

  border-radius: 10px;

  box-shadow: 0 10px 25px rgba(18, 60, 55, 0.13);

  position: relative;

  z-index: 30;
}

.pkp_site_nav_menu {
  background: var(--tj-navy);
}

#navigationPrimary,
#navigationUser {
  list-style: none;
}

#navigationPrimary > li > a {
  color: #fff;

  font-weight: 650;

  text-decoration: none;

  border-radius: 6px;

  transition:
    background 0.2s,
    color 0.2s;
}

#navigationPrimary > li > a:hover,
#navigationPrimary > li > a:focus {
  color: var(--tj-gold);

  background: var(--tj-slate);
}

#navigationPrimary ul {
  background: #fff;

  border: 1px solid var(--tj-border);

  border-top: 3px solid var(--tj-gold);

  border-radius: 0 0 9px 9px;

  box-shadow: 0 14px 32px rgba(18, 60, 55, 0.14);

  padding: 6px;
}

#navigationPrimary ul li a {
  display: block;

  color: var(--tj-navy);

  font-size: 13px;

  line-height: 1.5;

  padding: 10px 13px;

  border-radius: 5px;

  text-decoration: none;

  white-space: normal;
}

#navigationPrimary ul li a:hover,
#navigationPrimary ul li a:focus {
  background: #f8f3e7;

  color: var(--tj-navy);
}

#navigationUser > li > a,
.pkp_navigation_search_wrapper a {
  color: #fff;

  text-decoration: none;
}

#navigationUser > li > a:hover,
.pkp_navigation_search_wrapper a:hover {
  color: var(--tj-gold);
}

/* Breadcrumbs */

.cmp_breadcrumbs {
  font-size: 13px;

  color: var(--tj-muted);

  padding-top: 12px;

  padding-bottom: 12px;
}

.cmp_breadcrumbs a {
  color: #156c5c;

  text-decoration: none;
}

/* Section headings and cards */

.page_index_journal .homepage_image img {
  border-radius: var(--tj-radius);

  box-shadow: var(--tj-shadow);
}

.page_index_journal .additional_content {
  margin-top: 24px;
}

.page_index_journal .current_issue,
.page_index_journal .announcements {
  margin-top: 30px;
}

.page_index_journal .current_issue > .current_issue_title,
.page_index_journal .announcements h2,
.obj_issue_toc > .heading,
.pkp_structure_main > .page h1 {
  color: var(--tj-navy);
}

.obj_issue_summary,
.obj_announcement_summary,
.obj_article_summary {
  border-color: var(--tj-border);
}

.obj_issue_summary .cover img,
.obj_issue_toc .cover img {
  border-radius: 8px;

  box-shadow: 0 6px 20px rgba(18, 60, 55, 0.12);
}

.obj_article_summary .title a,
.obj_issue_summary .title a,
.obj_announcement_summary h3 a {
  color: var(--tj-navy);

  font-weight: 700;

  text-decoration: none;
}

.obj_article_summary .title a:hover,
.obj_issue_summary .title a:hover {
  color: #94702f;
}

.obj_article_summary .authors,
.obj_article_summary .pages,
.obj_article_summary .published {
  color: var(--tj-muted);
}

.obj_article_summary .galleys {
  margin-top: 12px;
}

/* Article landing */

.obj_article_details .page_title,
.obj_article_details h1 {
  color: var(--tj-navy);

  line-height: 1.4;
}

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

.obj_article_details .abstract {
  line-height: 1.9;
}

.obj_article_details .item {
  border-color: var(--tj-border);
}

.obj_galley_link {
  display: inline-block;

  background: #fff;

  color: var(--tj-navy) !important;

  border: 1px solid #cbdcd5;

  border-radius: 7px;

  padding: 8px 14px;

  font-weight: 700;

  text-decoration: none;

  transition:
    background 0.2s,
    border-color 0.2s;
}

.obj_galley_link:hover {
  background: #fbf5e8;

  border-color: var(--tj-gold);

  color: var(--tj-navy) !important;
}

/* Sidebar */

.pkp_structure_sidebar {
  color: var(--tj-text);
}

.pkp_block {
  margin-bottom: 22px;
}

.pkp_block .title {
  color: var(--tj-navy);

  font-weight: 750;

  font-size: 17px;

  border-bottom: 2px solid var(--tj-gold);

  padding-bottom: 10px;

  margin-bottom: 13px;
}

.pkp_block .content {
  font-size: 14px;

  line-height: 1.75;
}

.pkp_block ul {
  padding-left: 18px;
}

.pkp_block li {
  margin-bottom: 7px;
}

/* Forms & search */

.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 input[type="number"],
.pkp_structure_main select,
.pkp_structure_main textarea {
  max-width: 100%;

  border: 1px solid #cbdcd5;

  border-radius: 7px;

  background: #fff;

  color: var(--tj-text);

  padding: 10px 12px;

  box-sizing: border-box;
}

.pkp_structure_main input:focus,
.pkp_structure_main select:focus,
.pkp_structure_main textarea:focus {
  border-color: #b18e4f;

  outline: 2px solid rgba(217, 181, 111, 0.22);

  outline-offset: 1px;
}

.pkp_structure_main button,
.pkp_structure_main .cmp_button,
.pkp_structure_main .pkp_button,
.pkp_structure_main input[type="submit"] {
  border-radius: 7px;

  transition:
    background 0.2s,
    box-shadow 0.2s;
}

.pkp_structure_main .cmp_button,
.pkp_structure_main .pkp_button,
.pkp_structure_main input[type="submit"] {
  background: var(--tj-navy);

  border: 1px solid var(--tj-navy);

  color: #fff;

  text-decoration: none;

  padding: 10px 17px;

  font-weight: 650;
}

.pkp_structure_main .cmp_button:hover,
.pkp_structure_main .pkp_button:hover,
.pkp_structure_main input[type="submit"]:hover {
  background: var(--tj-slate);

  color: #fff;
}

/* Tables */

.pkp_structure_main table {
  max-width: 100%;

  border-collapse: collapse;
}

.pkp_structure_main th {
  background: #eaf3ee;

  color: var(--tj-navy);

  font-weight: 700;
}

.pkp_structure_main th,
.pkp_structure_main td {
  border-bottom: 1px solid var(--tj-border);

  padding: 11px 12px;

  text-align: left;
}

/* Pagination */

.cmp_pagination a {
  border-radius: 5px;

  text-decoration: none;
}

/* Footer */

.pkp_structure_footer {
  background: var(--tj-deep);

  border-top: 4px solid var(--tj-gold);

  color: #d7e9e1;
}

.pkp_structure_footer .pkp_footer_content {
  color: #d7e9e1;

  line-height: 1.85;
}

.pkp_structure_footer a {
  color: #e5cb8f;

  text-decoration: none;
}

.pkp_structure_footer a:hover {
  text-decoration: underline;

  color: #fff;
}

.pkp_structure_footer .pkp_brand_footer {
  background: transparent;
}

/* Small devices: preserve OJS native open/closed menu mechanics */

@media (max-width: 991px) {
  .pkp_structure_page {
    box-shadow: none;
  }

  .pkp_site_name {
    padding: 10px 12px;
  }

  .pkp_site_name .is_img img {
    max-height: 75px;
  }

  .pkp_navigation_primary_wrapper {
    border-radius: 0;

    box-shadow: none;
  }

  .pkp_site_nav_menu {
    /* OJS controls its own mobile-menu scrolling and visibility. */
  }

  #navigationPrimary {
    margin: 0;

    padding: 8px 14px;

    box-sizing: border-box;
  }

  #navigationPrimary > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  #navigationPrimary > li > a {
    display: block;

    padding: 12px 13px;

    font-size: 14px;

    line-height: 1.5;
  }

  #navigationPrimary > li > ul {
    position: static;

    width: auto;

    min-width: 0;

    max-width: none;

    margin: 0 0 9px 10px;

    padding: 5px;

    box-shadow: none;

    border: 0;

    border-radius: 7px;
  }

  #navigationPrimary ul li a {
    padding: 10px 12px;

    font-size: 13px;
  }

  #navigationUser {
    padding: 7px 14px;
  }

  .pkp_navigation_search_wrapper {
    margin: 7px 14px;
  }

  .pkp_structure_main {
    min-width: 0;
  }

  .pkp_structure_main h1 {
    font-size: 26px;
  }

  .pkp_structure_main h2 {
    font-size: 21px;
  }

  .pkp_structure_main table {
    display: block;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
  }

  .pkp_structure_main .obj_article_details {
    overflow-wrap: anywhere;
  }

  .pkp_block {
    margin-bottom: 18px;
  }
}

/* Desktop: style the native OJS menu without changing its layout mechanics. */

@media (min-width: 992px) {
  .pkp_navigation_primary_wrapper {
    min-height: 56px;

    padding: 0 12px;

    box-sizing: border-box;
  }

  #navigationPrimary > li > a {
    padding: 15px 10px;

    font-size: 13px;

    line-height: 1.5;

    white-space: nowrap;
  }

  #navigationPrimary > li > ul {
    min-width: 215px;

    max-width: 320px;
  }

  .pkp_navigation_search_wrapper > a {
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  #navigationPrimary a,
  .obj_galley_link,
  .pkp_structure_main button,
  .pkp_structure_main .cmp_button {
    transition: none !important;
  }
}

/* =============================================================

   AIJS adjustments — adapted from supplied TUIJLL design

   Publisher: Afghan International Islamic University

   Journal: Afghan International Journal of Science

   E-ISSN: 3134-5859

   ============================================================= */

/* Preserve OJS's live header image and journal title: no generated text

   overlays, no forced absolute positioning and no custom menu toggling. */

.pkp_structure_head {
  background: #102d2a;

  border-top: 4px solid #c8a45d;
}

.pkp_site_name_wrapper {
  background: linear-gradient(115deg, #102d2a 0%, #20564e 100%);
}

.pkp_site_name .is_img img {
  max-height: 130px;

  max-width: 100%;

  object-fit: contain;
}

.pkp_navigation_primary_wrapper {
  border-bottom: 3px solid #c8a45d;
}

.pkp_site_nav_menu,
.pkp_navigation_primary_wrapper {
  overflow: visible;
}

#navigationPrimary > li {
  position: relative;
}

#navigationPrimary > li > a:hover,
#navigationPrimary > li > a:focus-visible {
  color: #f0d89e;
}

/* Place the dropdown above page contents; do not override OJS display state. */

@media (min-width: 992px) {
  #navigationPrimary > li > ul {
    z-index: 100;
  }

  #navigationUser > li > ul {
    z-index: 100;
    background: #fff;
    border-top: 3px solid #c8a45d;
  }

  #navigationUser > li > ul a {
    color: #123c37;
  }

  #navigationUser > li > ul a:hover {
    background: #f5f8f6;
  }
}

/* AIJS article cards: current issue, archives and issue table of contents. */

.obj_issue_toc .sections .section > ul,
.obj_issue_toc .sections .section > .articles,
.page_index_journal .current_issue .obj_issue_toc .articles {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  align-items: stretch;

  gap: 18px;

  padding: 0;

  margin: 18px 0 26px;

  list-style: none;
}

.obj_issue_toc .sections .section > ul > li,
.obj_issue_toc .sections .section > .articles > li,
.page_index_journal .current_issue .obj_issue_toc .articles > li {
  display: block;

  min-width: 0;

  margin: 0;

  padding: 0;

  border: 0;
}

.obj_article_summary {
  box-sizing: border-box;

  height: 100%;

  padding: 22px 22px 20px;

  background: #fff;

  border: 1px solid #dce7e2;

  border-top: 3px solid #c8a45d;

  border-radius: 12px;

  box-shadow: 0 5px 22px rgba(18, 60, 55, 0.055);

  overflow-wrap: anywhere;

  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.obj_article_summary:hover {
  transform: translateY(-3px);

  border-color: #bdcfc7;

  box-shadow: 0 14px 32px rgba(18, 60, 55, 0.12);
}

.obj_article_summary .title {
  font-family: Georgia, "Times New Roman", serif;

  font-size: 19px;

  font-weight: 700;

  line-height: 1.45;

  margin: 0 0 12px;
}

.obj_article_summary .title a {
  color: #123c37;
  text-decoration: none;
}

.obj_article_summary .title a:hover {
  color: #177567;
}

.obj_article_summary .authors {
  color: #596e67;

  font-size: 13px;

  line-height: 1.7;

  margin-bottom: 10px;
}

.obj_article_summary .pages,
.obj_article_summary .published {
  color: #627875;
  font-size: 12px;
}

.obj_article_summary .galleys {
  margin-top: 17px;
}

.obj_article_summary .obj_galley_link {
  background: #123c37;

  border-color: #123c37;

  color: #fff !important;

  padding: 8px 17px;

  border-radius: 7px;

  font-size: 12px;
}

.obj_article_summary .obj_galley_link:hover {
  background: #20564e;

  color: #fff !important;
}

.obj_article_summary .doi {
  margin-top: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Issue summary and announcements */

.obj_issue_summary,
.obj_announcement_summary {
  border: 1px solid #dce7e2;

  border-radius: 12px;

  padding: 18px;

  background: #fff;

  box-shadow: 0 4px 17px rgba(18, 60, 55, 0.05);
}

.page_index_journal .homepage_image img {
  width: 100%;
  height: auto;
}

.pkp_structure_main .current_issue > h2,
.pkp_structure_main .announcements > h2,
.obj_issue_toc .section > h2 {
  padding-bottom: 12px;

  border-bottom: 1px solid #dce7e2;
}

/* Comfortable tables for editorial and policy pages */

.pkp_structure_main table {
  width: 100%;
}

.pkp_structure_main table img {
  max-width: 110px;
  height: auto;
}

/* Responsive: let OJS itself determine how and when the menu opens. */

@media (max-width: 991px) {
  .pkp_structure_head .pkp_site_name_wrapper,
  .pkp_structure_head .pkp_site_name {
    /* No forced absolute positions, heights or artificial journal titles */

    max-width: 100%;
  }

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

  .pkp_site_nav_menu {
    overflow: visible;
  }

  .obj_issue_toc .sections .section > ul,
  .obj_issue_toc .sections .section > .articles,
  .page_index_journal .current_issue .obj_issue_toc .articles {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .obj_article_summary {
    padding: 18px;
  }

  .obj_article_summary .title {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .obj_article_summary {
    transition: none;
  }

  .obj_article_summary:hover {
    transform: none;
  }
}

/* ==============================================

   AIJS — Announcement and Article Layout Fix

   OJS 3.4 Default Theme

   ============================================== */

/* 1. Full-width announcements */

.page_index_journal .announcements,
.page_index_journal .cmp_announcements,
.page_index_journal .announcements .obj_announcement_summary,
.page_announcements .obj_announcement_summary,
.obj_announcement_summary {
  width: 100% !important;

  max-width: 100% !important;

  box-sizing: border-box;
}

/* Make the announcement card fill its column */

.obj_announcement_summary {
  display: block !important;

  float: none !important;

  margin: 0 0 20px !important;

  padding: 25px 30px !important;

  border: 1px solid #dce7e2;

  border-radius: 12px;

  background: #fff;
}

/* 2. One research article per row */

.obj_issue_toc .sections,
.obj_issue_toc .section,
.obj_issue_toc .articles,
.page_issue .articles {
  display: block !important;

  grid-template-columns: none !important;

  columns: auto !important;
}

/* OJS article list item containers */

.obj_issue_toc .articles > li,
.obj_issue_toc .articles > .obj_article_summary,
.obj_issue_toc .section > .obj_article_summary,
.obj_issue_toc .obj_article_summary {
  width: 100% !important;

  max-width: 100% !important;

  flex: none !important;

  float: none !important;

  box-sizing: border-box !important;
}

/* Full-width article cards */

.obj_issue_toc .obj_article_summary {
  display: block !important;

  margin: 0 0 20px !important;

  padding: 25px 28px !important;

  border: 1px solid #dce7e2;

  border-top: 3px solid #c8a45d;

  border-radius: 12px;

  background: #fff;

  box-shadow: 0 5px 18px rgba(18, 60, 55, 0.05);
}

/* Improve article title */

.obj_issue_toc .obj_article_summary .title {
  font-size: 21px;

  line-height: 1.45;

  margin-bottom: 12px;
}

/* More compact layout on mobile */

@media (max-width: 767px) {
  .obj_announcement_summary,
  .obj_issue_toc .obj_article_summary {
    padding: 18px !important;
  }

  .obj_issue_toc .obj_article_summary .title {
    font-size: 18px;
  }
}

/* AIJS OJS 3.4 — mobile masthead and homepage banner repair.
   Add at the end of existing custom stylesheet. */
@media (max-width: 991px) {
  /* Replace OJS's compact 40px masthead with room for the journal logo. */
  .pkp_structure_head .pkp_head_wrapper {
    position: relative !important;
    min-height: 94px !important;
    height: auto !important;
    padding: 0 !important;
  }
  .pkp_structure_head .pkp_site_name_wrapper {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 94px !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: linear-gradient(115deg, #102d2a, #20564e) !important;
  }
  .pkp_structure_head .pkp_site_name {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 94px !important;
    padding: 12px 12px 12px 66px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
  }
  .pkp_structure_head .pkp_site_name .is_img,
  .pkp_structure_head .pkp_site_name .is_text {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .pkp_structure_head .pkp_site_name .is_img img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 75px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
  .pkp_structure_head .pkp_site_name .is_text,
  .pkp_structure_head .pkp_site_name .is_text a {
    color: #fff !important;
    font-size: clamp(15px, 3.5vw, 21px) !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
  /* Keep OJS native menu button and its click functionality. */
  .pkp_structure_head .pkp_site_nav_toggle {
    position: absolute !important;
    top: 25px !important;
    left: 10px !important;
    right: auto !important;
    margin: 0 !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 110 !important;
    border-radius: 8px !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
  }
  .pkp_structure_head .pkp_site_nav_menu {
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 105 !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    background: #123c37 !important;
    /* Deliberately do not set display, visibility or transform:
       those states are controlled by OJS mobile navigation. */
  }
  #navigationPrimary,
  #navigationUser {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #navigationPrimary > li > a,
  #navigationUser > li > a {
    color: #fff !important;
  }
  /* Allow the supplied wide hero image to scale instead of clipping. */
  .page_index_journal .homepage_image,
  .page_index_journal .homepage_image img {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page_index_journal .homepage_image {
    height: auto !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    margin: 12px 0 20px !important;
  }
  .page_index_journal .homepage_image img {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 12px !important;
  }
  .pkp_structure_main,
  .page_index_journal {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
@media (max-width: 420px) {
  .pkp_structure_head .pkp_site_name {
    padding-right: 8px !important;
    padding-left: 60px !important;
  }
  .pkp_structure_head .pkp_site_name .is_img img {
    max-height: 65px !important;
  }
}
