
/* =========================================================
   JAIMC OJS CUSTOM THEME — REFINED VERSION
   Journal of Allama Iqbal Medical College
   Best suited to OJS 3.x Default Theme
   ========================================================= */

:root {
  --jaimc-navy: #07164f;
  --jaimc-navy-soft: #102a63;
  --jaimc-blue: #205fa7;
  --jaimc-blue-light: #eaf2fb;
  --jaimc-bg: #f7f9fc;
  --jaimc-surface: #ffffff;
  --jaimc-text: #1f2937;
  --jaimc-muted: #667085;
  --jaimc-line: #e5eaf0;
  --jaimc-line-dark: #d8dee8;
  --jaimc-success: #157347;
  --jaimc-danger: #b42318;
  --jaimc-radius: 12px;
  --jaimc-radius-sm: 8px;
  --jaimc-shadow-sm: 0 2px 8px rgba(7,22,79,.05);
  --jaimc-shadow: 0 10px 30px rgba(7,22,79,.08);
  --jaimc-shadow-lg: 0 18px 44px rgba(7,22,79,.11);
}

/* ---------------- RESET / GLOBAL ---------------- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--jaimc-bg);
  color: var(--jaimc-text);
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  color: var(--jaimc-blue);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease, transform .18s ease;
}

a:hover,
a:focus {
  color: var(--jaimc-navy);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgba(32,95,167,.18);
}

/* ---------------- MAIN PAGE SHELL ---------------- */

.pkp_structure_page {
  background: var(--jaimc-bg);
}

.pkp_structure_content {
  max-width: 1240px;
  margin: 0 auto;
}

.pkp_structure_main {
  background: var(--jaimc-surface);
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  box-shadow: var(--jaimc-shadow-sm);
  padding: 34px 36px 46px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.pkp_structure_sidebar {
  padding-top: 30px;
}

/* ---------------- HEADER ---------------- */

.pkp_structure_head {
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--jaimc-line) !important;
  box-shadow: 0 3px 16px rgba(7,22,79,.045);
}

.pkp_head_wrapper {
  max-width: 1240px;
  margin: 0 auto;
}

/* logo area */
.pkp_site_name {
  padding-top: 20px;
  padding-bottom: 18px;
}

.pkp_site_name_wrapper {
  padding-left: 0;
  padding-right: 0;
}

.pkp_site_name .is_img img {
  width: 410px;
  max-width: 100%;
  max-height: none !important;
  display: block;
}

.pkp_site_name .is_text {
  color: var(--jaimc-navy);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ---------------- USER NAV ---------------- */

.pkp_navigation_user_wrapper {
  background: transparent !important;
}

.pkp_navigation_user {
  font-size: 13px;
}

.pkp_navigation_user > li > a {
  color: var(--jaimc-navy) !important;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 6px;
}

.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
  background: var(--jaimc-blue-light);
}

/* ---------------- PRIMARY NAV ---------------- */

.pkp_navigation_primary_row {
  background: linear-gradient(90deg, var(--jaimc-navy) 0%, var(--jaimc-navy-soft) 100%);
  border-top: 0;
  border-bottom: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(20px, calc((100vw - 1240px) / 2));
  padding-right: max(20px, calc((100vw - 1240px) / 2));
  min-height: 54px;
}

.pkp_navigation_primary {
  margin: 0;
}

.pkp_navigation_primary > li > a {
  position: relative;
  color: #fff !important;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
  text-transform: none;
  padding: 17px 15px 16px;
  border-bottom: 0;
}

.pkp_navigation_primary > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.pkp_navigation_primary > li > a:hover::after,
.pkp_navigation_primary > li > a:focus::after,
.pkp_navigation_primary > li > a[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  background: rgba(255,255,255,.055);
}

/* dropdown */
.pkp_navigation_primary ul {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-radius: 10px;
  box-shadow: var(--jaimc-shadow-lg);
  overflow: hidden;
  padding: 6px;
}

.pkp_navigation_primary ul a {
  color: var(--jaimc-text) !important;
  border-radius: 6px;
  padding: 10px 12px;
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
  background: var(--jaimc-blue-light);
  color: var(--jaimc-navy) !important;
}

/* search */
.pkp_search {
  color: #fff !important;
}

.pkp_search:hover,
.pkp_search:focus {
  color: #fff !important;
  opacity: .88;
}

/* ---------------- BREADCRUMBS ---------------- */

.cmp_breadcrumbs {
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--jaimc-muted);
}

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

.cmp_breadcrumbs a:hover {
  color: var(--jaimc-blue);
}

/* ---------------- TYPOGRAPHY ---------------- */

h1, h2, h3, h4, h5, h6,
.pkp_page_title {
  color: var(--jaimc-navy);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.25;
}

h1,
.pkp_page_title {
  font-weight: 800;
  letter-spacing: -.025em;
}

h2,
h3,
h4 {
  font-weight: 750;
}

.pkp_page_title {
  font-size: 34px;
  margin: 0 0 24px;
}

h2 {
  font-size: 25px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 1em;
}

/* ---------------- HOMEPAGE ---------------- */

.page_index_journal .homepage_image {
  margin-bottom: 26px;
}

.page_index_journal .homepage_image img {
  border-radius: var(--jaimc-radius);
  box-shadow: var(--jaimc-shadow-sm);
}

.page_index_journal .additional_content {
  background: linear-gradient(180deg, #fbfcff 0%, #f5f8fc 100%);
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  padding: 26px 28px;
  margin: 0 0 30px;
}

.current_issue {
  margin-top: 14px;
}

.current_issue h2 {
  margin-bottom: 18px;
}

.current_issue .current_issue_title {
  color: var(--jaimc-navy);
  font-size: 23px;
  font-weight: 800;
}

.current_issue .read_more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-weight: 650;
}

/* ---------------- ISSUE / ARCHIVE ---------------- */

.obj_issue_summary,
.obj_issue_toc {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  box-shadow: var(--jaimc-shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.obj_issue_summary {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.obj_issue_summary:hover {
  transform: translateY(-2px);
  box-shadow: var(--jaimc-shadow);
  border-color: #dbe3ed;
}

.obj_issue_summary .title,
.obj_issue_toc .heading .title {
  color: var(--jaimc-navy);
  font-weight: 800;
}

.obj_issue_summary .cover img,
.obj_issue_toc .cover img {
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(7,22,79,.12);
}

/* ---------------- ARTICLE LIST ---------------- */

.obj_article_summary {
  padding: 20px 0;
  border-bottom: 1px solid var(--jaimc-line);
}

.obj_article_summary:last-child {
  border-bottom: 0;
}

.obj_article_summary .title {
  margin-bottom: 6px;
}

.obj_article_summary .title a {
  color: var(--jaimc-navy);
  font-size: 18px;
  line-height: 1.42;
  font-weight: 750;
}

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

.obj_article_summary .authors {
  color: #3f4b59;
  font-size: 14px;
  margin-bottom: 5px;
}

.obj_article_summary .pages {
  color: var(--jaimc-muted);
  font-size: 13px;
}

/* issue sections */
.obj_issue_toc .section > h2,
.obj_issue_toc .section > h3 {
  background: var(--jaimc-blue-light);
  border-left: 4px solid var(--jaimc-navy);
  border-radius: 7px;
  padding: 10px 14px;
  margin: 28px 0 10px;
  font-size: 16px;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* ---------------- ARTICLE DETAILS ---------------- */

.obj_article_details .page_title {
  color: var(--jaimc-navy);
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -.025em;
  margin-bottom: 12px;
}

.obj_article_details .authors {
  color: #344054;
  font-size: 15px;
  margin-bottom: 14px;
}

.obj_article_details .author_bios,
.obj_article_details .abstract,
.obj_article_details .references,
.obj_article_details .keywords,
.obj_article_details .citation {
  margin-top: 30px;
}

.obj_article_details .abstract,
.obj_article_details .references,
.obj_article_details .citation {
  background: #fbfcfe;
  border: 1px solid var(--jaimc-line);
  border-radius: 10px;
  padding: 20px 22px;
}

.obj_article_details h2,
.obj_article_details h3 {
  font-size: 19px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--jaimc-line);
}

.obj_article_details .label {
  color: var(--jaimc-navy);
  font-weight: 700;
}

.obj_article_details .doi a,
.obj_article_details .item.doi a {
  font-weight: 650;
  word-break: break-word;
}

/* ---------------- BUTTONS / PDF ---------------- */

.obj_galley_link,
.cmp_button,
button,
input[type="submit"],
input[type="button"],
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--jaimc-navy);
  color: #fff !important;
  border: 1px solid var(--jaimc-navy);
  border-radius: 7px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  box-shadow: none;
  cursor: pointer;
  transition: all .18s ease;
}

.obj_galley_link:hover,
.cmp_button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover {
  background: var(--jaimc-blue);
  border-color: var(--jaimc-blue);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(32,95,167,.18);
}

.obj_galley_link {
  margin-right: 6px;
  margin-top: 6px;
}

/* ---------------- FORMS ---------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  background: #fff;
  color: var(--jaimc-text);
  border: 1px solid var(--jaimc-line-dark);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 15px;
  transition: border .18s ease, box-shadow .18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c8d1dd;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--jaimc-blue);
  box-shadow: 0 0 0 3px rgba(32,95,167,.11);
}

label {
  color: #273444;
  font-weight: 650;
}

/* ---------------- TABLES ---------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #fff;
}

th {
  background: #f2f5f9;
  color: var(--jaimc-navy);
  font-weight: 750;
}

th,
td {
  padding: 11px 12px;
  border: 1px solid var(--jaimc-line);
  text-align: left;
  vertical-align: top;
}

tr:nth-child(even) td {
  background: #fcfdff;
}

/* ---------------- SIDEBAR ---------------- */

.pkp_block {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--jaimc-shadow-sm);
}

.pkp_block .title {
  position: relative;
  color: var(--jaimc-navy);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 9px;
}

.pkp_block .title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 2px;
  background: var(--jaimc-blue);
  border-radius: 999px;
}

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

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

/* ---------------- ANNOUNCEMENTS ---------------- */

.obj_announcement_summary {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-left: 4px solid var(--jaimc-blue);
  border-radius: 9px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--jaimc-shadow-sm);
}

.obj_announcement_summary .title {
  color: var(--jaimc-navy);
  font-weight: 800;
}

/* ---------------- PAGINATION ---------------- */

.cmp_pagination .current {
  background: var(--jaimc-navy);
  color: #fff;
  border-radius: 6px;
}

.cmp_pagination a {
  border-radius: 6px;
}

/* ---------------- NOTICES ---------------- */

.cmp_notification,
.pkp_notification {
  border-radius: 8px;
}

.cmp_notification.notice,
.pkp_notification.notice {
  border-left: 4px solid var(--jaimc-blue);
}

/* ---------------- LOGIN / REGISTER ---------------- */

.page_login,
.page_register {
  max-width: 760px;
}

.page_login form,
.page_register form {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  padding: 28px;
  box-shadow: var(--jaimc-shadow);
}

/* ---------------- SEARCH ---------------- */

.page_search .search_results > li {
  border-bottom: 1px solid var(--jaimc-line);
  padding: 18px 0;
}

.page_search .search_results .title {
  color: var(--jaimc-navy);
  font-weight: 750;
}

/* ---------------- SUBMISSION WORKFLOW ---------------- */

.page_submission .section,
.page_submissions .section {
  background: #fff;
  border: 1px solid var(--jaimc-line);
  border-radius: var(--jaimc-radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--jaimc-shadow-sm);
}

.pkp_steps,
.cmp_steps {
  border-radius: 9px;
  overflow: hidden;
}

.pkp_steps .current,
.cmp_steps .current {
  color: var(--jaimc-navy);
  font-weight: 800;
}

/* ---------------- FOOTER ---------------- */

.pkp_structure_footer_wrapper {
  background: linear-gradient(135deg, #061343 0%, #0b2258 100%);
  color: rgba(255,255,255,.88);
  margin-top: 54px;
  border-top: 4px solid rgba(255,255,255,.04);
}

.pkp_structure_footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 26px;
}

.pkp_structure_footer a {
  color: #fff !important;
}

.pkp_structure_footer a:hover {
  opacity: .82;
}

.pkp_brand_footer {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 22px;
  padding-top: 18px;
  opacity: .86;
}

/* Custom footer */
.jaimc-footer {
  color: rgba(255,255,255,.9);
  line-height: 1.72;
}

.jaimc-footer h3,
.jaimc-footer h4 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 10px;
}

.jaimc-footer hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.16);
  margin: 20px 0;
}

/* ---------------- FOCUS / ACCESSIBILITY ---------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(32,95,167,.28);
  outline-offset: 2px;
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 1100px) {
  .pkp_structure_main {
    padding: 30px 28px 40px;
  }

  .pkp_site_name .is_img img {
    width: 360px;
  }
}

@media (max-width: 991px) {
  .pkp_structure_main,
  .pkp_structure_sidebar {
    margin-left: 16px;
    margin-right: 16px;
  }

  .pkp_site_name .is_img img {
    width: 320px;
  }

  .pkp_navigation_primary_row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .obj_article_details .page_title {
    font-size: 29px;
  }

  .pkp_page_title {
    font-size: 30px;
  }
}

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

  .pkp_structure_main {
    padding: 22px 18px 30px;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
  }

  .pkp_structure_sidebar {
    margin-left: 0;
    margin-right: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  .pkp_site_name {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .pkp_site_name .is_img img {
    width: 275px;
  }

  .pkp_navigation_primary > li > a {
    padding: 12px 14px;
  }

  .pkp_page_title,
  .obj_article_details .page_title {
    font-size: 25px;
  }

  .obj_issue_summary,
  .obj_issue_toc {
    padding: 16px;
  }

  .page_index_journal .additional_content {
    padding: 18px;
  }

  .obj_article_details .abstract,
  .obj_article_details .references,
  .obj_article_details .citation {
    padding: 16px;
  }

  .pkp_structure_footer {
    padding: 30px 18px 22px;
  }
}

/* ---------------- PRINT ---------------- */

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

  body,
  .pkp_structure_page,
  .pkp_structure_main {
    color: #000;
    background: #fff;
  }

  .pkp_structure_main {
    width: 100%;
    max-width: 100%;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  a {
    color: #000;
  }
}


/* =========================================================
   JAIMC V4 — CORRECT SIDEBAR + COMPACT CENTERED HEADER
   ========================================================= */

/* Compact header */
.pkp_site_name {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  text-align: center !important;
}

.pkp_site_name_wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.pkp_site_name .is_img {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.pkp_site_name .is_img img {
  width: 350px !important;
  max-width: 78vw !important;
  max-height: 82px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.pkp_head_wrapper {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Slightly tighter navigation */
.pkp_navigation_primary_row {
  min-height: 48px !important;
}

.pkp_navigation_primary > li > a {
  padding-top: 14px !important;
  padding-bottom: 13px !important;
}

/* ---------------------------------------------------------
   CORRECT RIGHT SIDEBAR
   Only reduce sidebar column width.
   Do NOT shrink its text or internal spacing.
   --------------------------------------------------------- */
@media (min-width: 992px) {

  .pkp_structure_content {
    max-width: 1240px !important;
  }

  /* Main content gets more width */
  .pkp_structure_main {
    width: calc(100% - 285px) !important;
    max-width: calc(100% - 285px) !important;
    padding-right: 36px !important;
  }

  /* Right sidebar only */
  .pkp_structure_sidebar {
    width: 250px !important;
    max-width: 250px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Restore comfortable card spacing */
  .pkp_structure_sidebar .pkp_block {
    padding: 18px !important;
    margin-bottom: 18px !important;
  }

  .pkp_structure_sidebar .pkp_block .title {
    font-size: 16px !important;
    line-height: 1.35 !important;
    margin-bottom: 12px !important;
  }

  .pkp_structure_sidebar .pkp_block,
  .pkp_structure_sidebar .pkp_block p,
  .pkp_structure_sidebar .pkp_block li,
  .pkp_structure_sidebar .pkp_block a {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .pkp_site_name .is_img img {
    width: 300px !important;
    max-height: 74px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .pkp_site_name {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .pkp_site_name .is_img img {
    width: 250px !important;
    max-width: 86vw !important;
    max-height: 64px !important;
  }
}
