/* PJAPS journal polish - layout, sidebar, footer, spacing */

:root {
  --pjaps-teal: #026773;
  --pjaps-teal-dark: #01545d;
  --pjaps-teal-soft: #e8f4f5;
  --pjaps-gold: #c9a227;
  --pjaps-ink: #1a2b2e;
  --pjaps-muted: #5a6b6e;
  --pjaps-line: #d7e3e5;
  --pjaps-surface: #f4f8f8;
  --pjaps-max: 1200px;
  --pjaps-gap: 2rem;
  --pjaps-radius: 4px;
}

html,
body {
  background: #fff !important;
  color: var(--pjaps-ink);
}

/* Full-bleed shell; content column is constrained */
.pkp_structure_page {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  box-shadow: none !important;
  background: #fff !important;
}

/* Shared content rail - same width for head / content / footer */
.pkp_structure_head .pkp_head_wrapper,
.pkp_structure_content,
.pkp_structure_footer {
  width: 100% !important;
  max-width: var(--pjaps-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  box-sizing: border-box !important;
}

/* ---------- Header / logo ---------- */
.pkp_site_name_wrapper {
  height: auto !important;
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 0.75rem 0 !important;
}

.pkp_site_name {
  padding: 0 !important;
}

.pkp_site_name .is_img img {
  display: block;
  max-width: 100%;
  height: auto !important;
  max-height: 88px;
  width: auto;
  object-fit: contain;
}

.pkp_navigation_primary_row {
  padding-left: 0 !important;
  padding-right: 0 !important;
  color: var(--pjaps-ink);
  border-bottom: 1px solid var(--pjaps-line);
}

.pkp_navigation_primary > li > a {
  letter-spacing: 0.04em;
  font-weight: 600;
}

@media (max-width: 1023px) {
  .pkp_site_name_wrapper {
    justify-content: center;
    min-height: 64px;
  }
  .pkp_site_name .is_img img {
    max-height: 56px;
  }
}

@media (max-width: 479px) {
  .pkp_site_name_wrapper {
    padding-left: 2.75rem !important;
  }
  .pkp_site_name .is_img img {
    max-height: 44px;
  }
}

/* ---------- Main + sidebar grid (fixes wrap under main) ---------- */
.pkp_structure_content {
  padding-top: 2rem !important;
  padding-bottom: 3rem !important;
}

.pkp_structure_content.has_sidebar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  column-gap: var(--pjaps-gap) !important;
  align-items: start;
}

.pkp_structure_content.has_sidebar .pkp_structure_main,
.pkp_structure_content.has_sidebar .pkp_structure_sidebar {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  position: relative !important;
}

.pkp_structure_content.has_sidebar .pkp_structure_main {
  padding: 0 0 2.5rem !important;
  margin: 0 !important;
}

.pkp_structure_content.has_sidebar .pkp_structure_main:before,
.pkp_structure_content.has_sidebar .pkp_structure_main:after {
  display: none !important;
}

.pkp_structure_sidebar {
  padding-top: 0.25rem;
}

.pkp_structure_sidebar:before {
  display: none !important;
}

@media (max-width: 991px) {
  .pkp_structure_content.has_sidebar {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 2rem;
  }

  .pkp_structure_content.has_sidebar .pkp_structure_main,
  .pkp_structure_content.has_sidebar .pkp_structure_sidebar {
    grid-column: 1 / -1 !important;
  }
}

/* Homepage image: sit cleanly in the main column */
.homepage_image {
  margin: 0 0 1.75rem !important;
  border-radius: var(--pjaps-radius);
  overflow: hidden;
}

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

/* Current issue / article list breathing room */
.current_issue,
#homepageAbout,
.additional_content {
  margin-bottom: 2rem;
}

.obj_article_summary {
  padding: 1.25rem 0 !important;
  border-bottom: 1px solid var(--pjaps-line);
}

.obj_article_summary .title {
  font-size: 1.15rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.obj_article_summary .meta {
  color: var(--pjaps-muted);
  margin-bottom: 0.65rem;
}

.pkp_structure_main > h1,
.pkp_structure_main .page h1,
.pkp_structure_main h2 {
  color: var(--pjaps-ink);
  letter-spacing: -0.01em;
}

.obj_article_details .abstract,
.pkp_structure_main p,
.pkp_structure_main ul {
  text-align: left;
  line-height: 1.7;
  color: var(--pjaps-ink);
}

/* ---------- Sidebar blocks ---------- */
.pkp_structure_sidebar .pkp_block {
  background: var(--pjaps-surface);
  border: 1px solid var(--pjaps-line);
  border-radius: var(--pjaps-radius);
  padding: 1.1rem 1.15rem 1.2rem;
  margin: 0 0 1rem !important;
  box-shadow: none;
}

.pkp_structure_sidebar .pkp_block:last-child {
  margin-bottom: 0 !important;
}

.pkp_structure_sidebar .pkp_block .title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pjaps-teal) !important;
  margin: 0 0 0.75rem !important;
  padding: 0 0 0.55rem !important;
  border-bottom: 2px solid var(--pjaps-teal);
  background: transparent !important;
}

.pkp_structure_sidebar .pkp_block .content,
.pkp_structure_sidebar .pkp_block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pkp_structure_sidebar .pkp_block a {
  color: var(--pjaps-ink);
  text-decoration: none;
  line-height: 1.45;
}

.pkp_structure_sidebar .pkp_block a:hover,
.pkp_structure_sidebar .pkp_block a:focus {
  color: var(--pjaps-teal);
  text-decoration: underline;
}

.pkp_structure_sidebar .pkp_block li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(2, 103, 115, 0.1);
}

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

.block_make_submission a {
  display: block;
  text-align: center;
  background: var(--pjaps-teal) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem !important;
  border-radius: var(--pjaps-radius);
  text-decoration: none !important;
}

.block_make_submission a:hover,
.block_make_submission a:focus {
  background: var(--pjaps-teal-dark) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Keyword cloud: quieter chips */
.block_keyword_cloud .keyword_cloud a,
.pkp_block.block_keyword_cloud a {
  display: inline-block;
  margin: 0.2rem 0.25rem 0.2rem 0;
  padding: 0.2rem 0.5rem;
  background: #fff;
  border: 1px solid var(--pjaps-line);
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--pjaps-muted) !important;
  text-decoration: none !important;
}

.block_keyword_cloud .keyword_cloud a:hover {
  border-color: var(--pjaps-teal);
  color: var(--pjaps-teal) !important;
}

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper {
  background: var(--pjaps-teal) !important;
  border-top: none !important;
  border-bottom: none !important;
  color: rgba(255, 255, 255, 0.92) !important;
  margin-top: 0 !important;
  padding: 2.5rem 0 1.5rem !important;
}

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

.pkp_structure_footer a {
  color: #fff !important;
  text-decoration: none;
}

.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus {
  text-decoration: underline;
  color: #ffe9a8 !important;
}

.pkp_structure_footer h3,
.pkp_footer_content h3,
.pkp_structure_footer .title {
  color: #fff !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.85rem !important;
  font-weight: 700;
}

.pkp_structure_footer p,
.pkp_structure_footer li {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  font-size: 0.95rem;
}

.pkp_structure_footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pkp_structure_footer li {
  margin: 0 0 0.45rem;
}

.pkp_brand_footer {
  display: none !important;
}

/* ---------- Contact / journal info table ---------- */
.journal-box {
  border: 1px solid var(--pjaps-line);
  border-radius: var(--pjaps-radius);
  max-width: 100%;
  overflow: hidden;
  background: #fff;
}

.journal-title {
  background: var(--pjaps-teal);
  color: #fff;
  padding: 0.85rem 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.journal-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--pjaps-line);
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.journal-table td:first-child {
  width: 34%;
  font-weight: 700;
  background: var(--pjaps-surface);
  color: var(--pjaps-ink);
}

.journal-table a {
  color: var(--pjaps-teal);
  word-break: break-all;
}

/* ---------- Downloads page cards ---------- */
.download-section {
  font-family: inherit;
}

.download-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pjaps-ink);
}

.download-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.download-card {
  background: var(--pjaps-teal-soft);
  padding: 2rem 1.25rem 1.5rem;
  width: 260px;
  text-align: center;
  border-radius: var(--pjaps-radius);
  border: 1px solid var(--pjaps-line);
  position: relative;
}

.download-icon {
  background: var(--pjaps-teal);
  color: white;
  width: 72px;
  height: 54px;
  margin: -2.75rem auto 1rem auto;
  border-radius: var(--pjaps-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.download-card h4 {
  margin: 0.75rem 0;
  font-size: 1.05rem;
  color: var(--pjaps-ink);
}

.download-btn {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.65rem 1.35rem;
  background: var(--pjaps-gold);
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 700;
  border-radius: 3px;
}

.download-btn:hover {
  background: #b89627;
}

@media (max-width: 768px) {
  .download-grid {
    justify-content: center;
  }
}

/* ---------- Galley buttons ---------- */
.galleys_links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.galleys_links li {
  margin: 0;
  padding: 0;
}

a.obj_galley_link,
span.obj_galley_link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--pjaps-teal) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 3px !important;
  padding: 0.55rem 0.9rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  text-decoration: none !important;
  line-height: 1.2;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
}

a.obj_galley_link:hover,
a.obj_galley_link:focus {
  background: var(--pjaps-teal-dark) !important;
  color: #fff !important;
}

a.obj_galley_link.pdf:before,
span.obj_galley_link.pdf:before {
  content: "\f1c1";
  font-family: FontAwesome;
  margin-right: 0.2rem;
}

a.obj_galley_link.html:before,
span.obj_galley_link.html:before {
  content: "\f1c9";
  font-family: FontAwesome;
  margin-right: 0.2rem;
}

a.obj_galley_link.file:before,
span.obj_galley_link.file:before {
  content: "\f0f6";
  font-family: FontAwesome;
  margin-right: 0.2rem;
}

span.obj_galley_link.html.unavailable {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
  user-select: none;
}


/* Fix: theme clearfix pseudos must not become grid items */
.pkp_structure_content.has_sidebar:before,
.pkp_structure_content.has_sidebar:after {
  content: none !important;
  display: none !important;
}

.pkp_structure_content.has_sidebar .pkp_structure_main {
  grid-column: 1 / 2 !important;
  min-width: 0;
}

.pkp_structure_content.has_sidebar .pkp_structure_sidebar {
  grid-column: 2 / 3 !important;
  min-width: 0;
}
