/*
PRIME CREST PUBLISHERS — OJS MASTER THEME
AJLG build v1 — adapted from IJBII master v4
OJS 3.4 / Default Theme
------------------------------------------------------------
Purpose:
- compact, professional masthead
- large readable journal banner
- consistent Prime Crest navigation
- cleaner content/sidebar proportions
- reusable base for other Prime Crest journals
*/

:root {
  --pc-navy: #123f60;
  --pc-navy-deep: #0b2f4a;
  --pc-teal: #b88a3b;
  --pc-text: #1f2937;
  --pc-muted: #64748b;
  --pc-border: #d9e3ea;
  --pc-soft: #f7fafc;
  --pc-white: #ffffff;
}

/* ---------- GLOBAL ---------- */
html { scroll-behavior: smooth; }

body {
  background: var(--pc-white);
  color: var(--pc-text);
  line-height: 1.6;
}

.pkp_structure_page {
  background: var(--pc-white) !important;
}

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

/* OJS header shell */
.pkp_structure_head {
  background: var(--pc-white) !important;
  border: 0 !important;
}

/* Small logged-in/user strip */
.pkp_navigation_user_wrapper {
  background: var(--pc-navy) !important;
  min-height: 30px;
}

/* Remove the huge empty masthead area */
.pkp_site_name_wrapper {
  background: var(--pc-white) !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Allow banner to use almost the full desktop width */
.pkp_site_name {
  max-width: 1600px !important;
  width: calc(100% - 32px) !important;
  padding: 0 !important;
  margin: 0 auto !important;
  line-height: 0 !important;
}

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

/* Banner crop: wide, clean, no giant vertical header */
.pkp_site_name .is_img img,
.pkp_site_name img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: clamp(220px, 17vw, 300px) !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: cover !important;
  object-position: center 46% !important;
}

/* Text fallback */
.pkp_site_name .is_text {
  color: var(--pc-navy) !important;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 28px 20px;
  text-align: center;
}

/* ---------- PRIMARY NAVIGATION ---------- */
.pkp_navigation_primary_wrapper {
  background: var(--pc-navy-deep) !important;
  border: 0 !important;
  box-shadow: 0 2px 8px rgba(2, 24, 43, .12);
}

.pkp_navigation_primary {
  max-width: 1500px !important;
  margin: 0 auto !important;
  padding-left: 8px;
}

.pkp_navigation_primary > li > a {
  color: #fff !important;
  font-size: .94rem;
  font-weight: 650;
  padding: 14px 16px !important;
  white-space: nowrap;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
}

.pkp_navigation_primary ul {
  background: #fff !important;
  border: 1px solid var(--pc-border) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .14) !important;
  min-width: 245px;
}

.pkp_navigation_primary ul a {
  color: var(--pc-text) !important;
  padding: 10px 16px !important;
  line-height: 1.35;
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
  background: #f1f7fa !important;
  color: var(--pc-navy) !important;
}

.pkp_navigation_search_wrapper {
  background: transparent !important;
}

.pkp_navigation_search_wrapper a {
  color: #fff !important;
  font-weight: 650;
}

/* ---------- PAGE WIDTH ---------- */
.pkp_structure_content {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding-top: 28px !important;
}

.pkp_structure_main {
  padding-top: 0 !important;
  padding-bottom: 48px !important;
}

.pkp_structure_sidebar {
  padding-top: 0 !important;
}

/* ---------- JOURNAL COVER ---------- */
.pkp_page_index .homepage_image {
  margin: 0 auto 26px !important;
  text-align: center !important;
}

.pkp_page_index .homepage_image img {
  width: auto !important;
  max-width: 330px !important;
  max-height: 555px !important;
  object-fit: contain !important;
  border: 0 !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
}

/* ---------- CONTENT TYPOGRAPHY ---------- */
.pkp_page_index h2,
.pkp_page_index h3,
.page h2,
.page h3 {
  color: var(--pc-navy) !important;
  line-height: 1.25;
}

.pkp_page_index h2 {
  font-size: 1.45rem;
  margin: 30px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5edf2;
}

.pkp_page_index p {
  color: #334155;
}

/* ---------- ADDITIONAL CONTENT ---------- */
.pkp_page_index .additional_content {
  margin-top: 24px !important;
}

.ijbii-home-content {
  margin-top: 10px;
}

.ijbii-home-content > h2:first-child {
  margin-top: 0;
}

/* Journal information table */
.ijbii-journal-info,
.journal-info-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 14px 0 30px !important;
  background: #fff;
}

.ijbii-journal-info td,
.ijbii-journal-info th,
.journal-info-table td,
.journal-info-table th {
  border: 1px solid var(--pc-border) !important;
  padding: 10px 13px !important;
  vertical-align: top;
}

.ijbii-journal-info tr:nth-child(even),
.journal-info-table tr:nth-child(even) {
  background: #f8fafc;
}

.ijbii-journal-info td:first-child,
.journal-info-table td:first-child {
  width: 30%;
  color: var(--pc-navy);
  font-weight: 700;
}

/* ---------- SIDEBAR / JOURNAL MENU ---------- */
.pkp_structure_sidebar .pkp_block {
  background: #fff !important;
  border: 1px solid var(--pc-border) !important;
  border-radius: 7px !important;
  box-shadow: 0 5px 18px rgba(15,23,42,.05);
  margin-bottom: 20px !important;
  padding: 18px !important;
}

.pkp_structure_sidebar .pkp_block .title {
  color: var(--pc-navy) !important;
  font-size: 1.05rem !important;
  font-weight: 750 !important;
  text-transform: uppercase;
  letter-spacing: .02em;
  border-bottom: 2px solid #e5edf2;
  margin: 0 0 10px !important;
  padding: 0 0 10px !important;
}

.pkp_structure_sidebar .pkp_block ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pkp_structure_sidebar .pkp_block li {
  border-bottom: 1px solid #edf2f5;
  margin: 0 !important;
}

.pkp_structure_sidebar .pkp_block li:last-child {
  border-bottom: 0;
}

.pkp_structure_sidebar .pkp_block li a {
  color: #235a78 !important;
  display: block;
  padding: 9px 2px !important;
  line-height: 1.3;
}

.pkp_structure_sidebar .pkp_block li a:hover {
  color: var(--pc-teal) !important;
}

/* ---------- CURRENT ISSUE ---------- */
.obj_issue_toc .heading {
  margin-bottom: 22px !important;
}

.obj_issue_toc .section {
  margin-top: 28px !important;
}

.obj_issue_toc .articles > li {
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 0 !important;
}

.obj_article_summary .title a {
  color: var(--pc-navy) !important;
  font-weight: 700;
}

.obj_article_summary .authors {
  color: #475569 !important;
  margin-top: 5px;
}

.obj_galley_link {
  border-color: var(--pc-navy) !important;
  color: var(--pc-navy) !important;
  border-radius: 4px;
  font-weight: 650;
}

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

/* ---------- FOOTER ---------- */
.pkp_structure_footer {
  background: #f7f9fb !important;
  border-top: 1px solid var(--pc-border) !important;
}

.pkp_footer_content {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 25px 20px !important;
  color: #475569;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .pkp_site_name {
    width: 100% !important;
  }

  .pkp_site_name .is_img img,
  .pkp_site_name img {
    height: clamp(190px, 22vw, 260px) !important;
  }

  .pkp_navigation_primary > li > a {
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: .88rem;
  }
}

@media (max-width: 767px) {
  .pkp_site_name .is_img img,
  .pkp_site_name img {
    height: 150px !important;
    object-position: center center !important;
  }

  .pkp_structure_content {
    padding-top: 18px !important;
  }

  .pkp_page_index .homepage_image img {
    max-width: 250px !important;
    max-height: 430px !important;
  }

  .ijbii-journal-info td:first-child,
  .journal-info-table td:first-child {
    width: 38%;
  }
}


/* =========================================================
   IJBII HOMEPAGE HERO + INFORMATION PANEL — v3
   ========================================================= */

/* Float the native OJS homepage cover to create a true hero layout */
.pkp_page_index .homepage_image {
    float: left !important;
    width: 34% !important;
    max-width: 350px !important;
    margin: 10px 38px 26px 0 !important;
    text-align: left !important;
}

.pkp_page_index .homepage_image img {
    width: 100% !important;
    max-width: 350px !important;
    max-height: none !important;
    height: auto !important;
    box-shadow: 0 12px 30px rgba(15,23,42,.12) !important;
}

/* Main welcome area flows beside the cover */
.ijbii-home {
    margin-top: 0;
}

.ijbii-hero-copy {
    min-height: 490px;
    padding: 10px 0 24px;
}

.ijbii-eyebrow {
    color: #0b5e7a;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.ijbii-hero-copy h1 {
    color: #123f60 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1.08;
    margin: 0 0 18px;
    border: 0 !important;
    padding: 0 !important;
}

.ijbii-hero-copy p {
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 22px;
}

.ijbii-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 22px 0 24px;
}

.ijbii-btn {
    display: inline-block;
    min-width: 190px;
    padding: 12px 22px;
    border-radius: 7px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: .2s ease;
}

.ijbii-btn-primary {
    background: #b88a3b;
    border: 1px solid #b88a3b;
    color: #fff !important;
}

.ijbii-btn-primary:hover {
    background: #066984;
    border-color: #066984;
}

.ijbii-btn-secondary {
    background: #fff;
    border: 1px solid #b88a3b;
    color: #b88a3b !important;
}

.ijbii-btn-secondary:hover {
    background: #f0f9fc;
}

.ijbii-focus-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.ijbii-focus-card {
    background: #fff;
    border: 1px solid #d9e3ea;
    border-radius: 7px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(15,23,42,.035);
}

.ijbii-focus-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #eef8fb;
    color: #b88a3b;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .02em;
}

.ijbii-focus-card strong {
    display: block;
    color: #123f60;
    font-size: .88rem;
    line-height: 1.25;
}

/* End float before journal information */
.ijbii-clear {
    clear: both;
}

/* Journal information card */
.ijbii-info-panel {
    clear: both;
    border: 1px solid #d9e3ea;
    border-radius: 8px;
    overflow: hidden;
    margin: 18px 0 32px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
}

.ijbii-info-heading {
    background: linear-gradient(90deg, #b88a3b, #123f60);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 750;
    padding: 12px 16px;
}

.ijbii-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ijbii-info-column {
    min-width: 0;
}

.ijbii-info-row {
    display: grid;
    grid-template-columns: 145px 1fr;
    border-bottom: 1px solid #e6edf2;
}

.ijbii-info-column:first-child {
    border-right: 1px solid #e6edf2;
}

.ijbii-info-row:last-child {
    border-bottom: 0;
}

.ijbii-info-label,
.ijbii-info-value {
    padding: 9px 12px;
    line-height: 1.35;
}

.ijbii-info-label {
    background: #f8fafc;
    color: #123f60;
    font-weight: 700;
}

.ijbii-info-value {
    color: #334155;
}

/* Keep the sidebar aligned with the top of the hero */
.pkp_page_index .pkp_structure_sidebar {
    padding-top: 0 !important;
}

/* Hide legacy plain-text table styling if old class remains */
.ijbii-journal-info {
    margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 1050px) {
    .pkp_page_index .homepage_image {
        width: 32% !important;
        margin-right: 28px !important;
    }

    .ijbii-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ijbii-hero-copy {
        min-height: 450px;
    }
}

@media (max-width: 767px) {
    .pkp_page_index .homepage_image {
        float: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 24px !important;
        text-align: center !important;
    }

    .pkp_page_index .homepage_image img {
        max-width: 270px !important;
        margin: 0 auto !important;
    }

    .ijbii-hero-copy {
        min-height: 0;
        padding-top: 0;
    }

    .ijbii-hero-copy h1 {
        font-size: 2rem;
    }

    .ijbii-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ijbii-btn {
        width: 100%;
        min-width: 0;
    }

    .ijbii-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ijbii-info-grid {
        grid-template-columns: 1fr;
    }

    .ijbii-info-column:first-child {
        border-right: 0;
        border-bottom: 1px solid #e6edf2;
    }

    .ijbii-info-row {
        grid-template-columns: 120px 1fr;
    }
}


/* =========================================================
   PRIME CREST SIDEBAR BRAND CARDS — v4
   ========================================================= */

/* Open Access card */
#customblock-open-access,
[id*="customblock-open-access"] {
    position: relative;
    background: linear-gradient(135deg, #f7fcfd 0%, #ffffff 100%) !important;
    border: 1px solid #cfe5ec !important;
    border-left: 4px solid #b88a3b !important;
    padding: 18px 18px 16px 62px !important;
}

#customblock-open-access::before,
[id*="customblock-open-access"]::before {
    content: "OA";
    position: absolute;
    left: 16px;
    top: 20px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #b88a3b;
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
}

#customblock-open-access .title,
[id*="customblock-open-access"] .title {
    color: #123f60 !important;
    border-bottom: 0 !important;
    margin-bottom: 6px !important;
    padding-bottom: 0 !important;
    text-transform: none !important;
    font-size: 1.05rem !important;
}

#customblock-open-access p,
[id*="customblock-open-access"] p {
    margin: 0 0 8px !important;
    color: #475569 !important;
    line-height: 1.5;
}

#customblock-open-access a,
[id*="customblock-open-access"] a {
    color: #b88a3b !important;
    font-weight: 700;
    text-decoration: none !important;
}

/* Published by card */
#customblock-published-by,
[id*="customblock-published-by"] {
    background: linear-gradient(135deg, #082f4a 0%, #123f60 55%, #184f72 100%) !important;
    border: 0 !important;
    color: #fff !important;
    padding: 18px !important;
}

#customblock-published-by .title,
[id*="customblock-published-by"] .title {
    color: #f4ead5 !important;
    border-bottom: 1px solid rgba(255,255,255,.18) !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    text-transform: none !important;
    font-size: .92rem !important;
    letter-spacing: .02em;
}

#customblock-published-by p,
[id*="customblock-published-by"] p,
#customblock-published-by strong,
[id*="customblock-published-by"] strong {
    color: #fff !important;
}

#customblock-published-by strong,
[id*="customblock-published-by"] strong {
    display: block;
    font-size: 1.15rem;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

#customblock-published-by p,
[id*="customblock-published-by"] p {
    margin: 0 !important;
    line-height: 1.5;
    opacity: .94;
}

/* Slightly tighter spacing between custom sidebar cards */
.pkp_structure_sidebar .block_custom {
    margin-bottom: 16px !important;
}

/* Final homepage alignment refinements */
.pkp_page_index .pkp_structure_main {
    padding-right: 30px !important;
}

.pkp_page_index .pkp_structure_sidebar {
    padding-left: 18px !important;
}

/* Keep banner framing crisp */
.pkp_site_name .is_img img,
.pkp_site_name img {
    object-position: center 50% !important;
}

/* Current issue heading treatment */
.pkp_page_index .current_issue > h2,
.obj_issue_toc > .heading h2 {
    color: #ffffff !important;
    background: linear-gradient(90deg, #b88a3b, #123f60);
    padding: 12px 16px !important;
    margin: 0 0 18px !important;
    border: 0 !important;
    border-radius: 7px 7px 0 0;
}

/* Mobile reset */
@media (max-width: 767px) {
    .pkp_page_index .pkp_structure_main {
        padding-right: 0 !important;
    }

    .pkp_page_index .pkp_structure_sidebar {
        padding-left: 0 !important;
    }
}


/* =========================================================
   AJLG — JOURNAL-SPECIFIC BRAND OVERRIDES
   ========================================================= */
:root {
  --ajlg-gold: #b88a3b;
  --ajlg-gold-soft: #d7b66f;
  --ajlg-ivory: #fbf8f1;
}

/* Show the complete wide AJLG masthead without cropping. */
.pkp_site_name .is_img img,
.pkp_site_name img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Gold rule links masthead to the legal/governance identity. */
.pkp_navigation_primary_wrapper {
  border-top: 2px solid var(--ajlg-gold) !important;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_navigation_primary > li > a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--ajlg-gold) !important;
}

.pkp_page_index h2 {
  border-bottom-color: #eadfc9 !important;
}

.pkp_structure_sidebar .pkp_block {
  border-top: 3px solid var(--ajlg-gold) !important;
}

.pkp_structure_sidebar .pkp_block .title {
  border-bottom-color: #eadfc9 !important;
}

.obj_galley_link:hover,
.obj_galley_link:focus {
  border-color: var(--ajlg-gold) !important;
}

@media (max-width: 767px) {
  .pkp_site_name .is_img img,
  .pkp_site_name img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}
