/* ============================================================
   IJGGSD OJS WEBSITE THEME
   International Journal of Global Goals and Sustainable Development
   Royal Blue / Emerald Green / SDG Academic Theme

   Royal Blue   : #174EA6
   Deep Blue    : #103B7E
   Emerald     : #247A59
   Light Green : #EFF8F3
   White       : #FFFFFF
   Text        : #374151
   ============================================================ */

/* ============================================================
   1. GENERAL PAGE
   ============================================================ */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

body {
  color: #374151 !important;
}

.pkp_structure_page {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  background: #ffffff !important;
}

/* General links */
a {
  color: #174EA6;
}

a:hover,
a:focus {
  color: #247A59;
}

/* ============================================================
   2. HEADER BACKGROUND
   ============================================================ */
.pkp_structure_head {
  position: relative !important;
  background: #174EA6 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Subtle 17-SDG-color accent below header */
.pkp_structure_head::after {
  content: "";
  display: block;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg,
    #E5243B 0% 5.88%, #DDA63A 5.88% 11.76%,
    #4C9F38 11.76% 17.64%, #C5192D 17.64% 23.52%,
    #FF3A21 23.52% 29.4%, #26BDE2 29.4% 35.28%,
    #FCC30B 35.28% 41.16%, #A21942 41.16% 47.04%,
    #FD6925 47.04% 52.92%, #DD1367 52.92% 58.8%,
    #FD9D24 58.8% 64.68%, #BF8B2E 64.68% 70.56%,
    #3F7E44 70.56% 76.44%, #0A97D9 76.44% 82.32%,
    #56C02B 82.32% 88.2%, #00689D 88.2% 94.08%,
    #19486A 94.08% 100%);
}

/* Remove default width limits */
.pkp_head_wrapper,
.pkp_site_name_wrapper,
.pkp_site_name,
.pkp_site_name .is_img {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Make uploaded IJGGSD header image full width */
.pkp_site_name .is_img img,
.pkp_site_name img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ============================================================
   3. REGISTER / LOGIN
   ============================================================ */
.pkp_navigation_user_wrapper {
  position: absolute !important;
  top: 14px !important;
  right: 18px !important;
  z-index: 20 !important;
}

.pkp_navigation_user > li > a {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
  color: #247A59 !important;
  text-decoration: none !important;
}

/* ============================================================
   4. PRIMARY NAVIGATION
   ============================================================ */
.pkp_navigation_primary_wrapper {
  margin: 0 !important;
  background: #ffffff !important;
  border-top: 0 !important;
  border-bottom: 2px solid #247A59 !important;
  box-shadow: 0 2px 7px rgba(23,78,166,.06) !important;
}

.pkp_navigation_primary > li > a {
  color: #174EA6 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  color: #247A59 !important;
  background: #eff8f3 !important;
  text-decoration: none !important;
}

/* Current / active navigation item */
.pkp_navigation_primary > li.current > a,
.pkp_navigation_primary > li.active > a {
  color: #247A59 !important;
  border-bottom: 3px solid #247A59 !important;
}

/* Dropdown navigation */
.pkp_navigation_primary ul {
  background: #ffffff !important;
  border-top: 3px solid #247A59 !important;
  box-shadow: 0 5px 15px rgba(23,78,166,.12) !important;
}

.pkp_navigation_primary ul a {
  color: #174EA6 !important;
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
  color: #247A59 !important;
  background: #eff8f3 !important;
}

/* ============================================================
   5. PAGE HEADINGS / CONTENT ACCENTS
   ============================================================ */
.pkp_page_index .current_issue h2,
.page h1,
.page h2,
.page h3,
.obj_issue_toc .heading,
.obj_issue_summary .title,
.obj_article_details .page_title {
  color: #174EA6;
}

.pkp_page_index .current_issue h2,
.obj_issue_toc .heading {
  border-bottom-color: #247A59 !important;
}

/* Sidebar headings */
.pkp_structure_sidebar .title,
.pkp_structure_sidebar h2,
.pkp_structure_sidebar h3 {
  color: #174EA6 !important;
  border-bottom-color: #247A59 !important;
}

.pkp_structure_sidebar a {
  color: #174EA6 !important;
}

.pkp_structure_sidebar a:hover,
.pkp_structure_sidebar a:focus {
  color: #247A59 !important;
}

/* ============================================================
   6. ARTICLE LIST / ARTICLE TITLES
   ============================================================ */
.obj_article_summary .title a,
.obj_article_summary .title,
.obj_article_summary h3 a {
  color: #174EA6 !important;
  font-weight: 700 !important;
}

.obj_article_summary .title a:hover,
.obj_article_summary .title a:focus,
.obj_article_summary h3 a:hover,
.obj_article_summary h3 a:focus {
  color: #247A59 !important;
}

/* ============================================================
   7. PDF / GALLEY BUTTON FIX
   Ensures â€œPDFâ€ remains clearly visible
   ============================================================ */
.obj_article_summary .galleys_links .obj_galley_link,
.obj_article_details .galleys_links .obj_galley_link,
.cmp_article_list .galleys_links .obj_galley_link,
.obj_galley_link,
a.obj_galley_link,
a.obj_galley_link.pdf {
  display: inline-block !important;
  background: #174EA6 !important;
  color: #ffffff !important;
  border: 1px solid #174EA6 !important;
  border-bottom: 3px solid #247A59 !important;
  border-radius: 4px !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.obj_article_summary .galleys_links .obj_galley_link:hover,
.obj_article_summary .galleys_links .obj_galley_link:focus,
.obj_article_details .galleys_links .obj_galley_link:hover,
.obj_article_details .galleys_links .obj_galley_link:focus,
.cmp_article_list .galleys_links .obj_galley_link:hover,
.cmp_article_list .galleys_links .obj_galley_link:focus,
.obj_galley_link:hover,
.obj_galley_link:focus,
a.obj_galley_link:hover,
a.obj_galley_link:focus,
a.obj_galley_link.pdf:hover,
a.obj_galley_link.pdf:focus {
  background: #247A59 !important;
  color: #ffffff !important;
  border-color: #247A59 !important;
  border-bottom-color: #247A59 !important;
  text-decoration: none !important;
}

/* Force nested text/icons inside PDF button to white */
.obj_galley_link *,
.obj_galley_link.pdf *,
a.obj_galley_link *,
a.obj_galley_link.pdf * {
  color: #ffffff !important;
  fill: #ffffff !important;
  opacity: 1 !important;
}

/* ============================================================
   8. BUTTONS
   ============================================================ */
.cmp_button,
.pkp_structure_main input[type="submit"],
.pkp_structure_sidebar .block_make_submission a,
.block_make_submission a {
  background: #174EA6 !important;
  color: #ffffff !important;
  border: 1px solid #174EA6 !important;
  border-bottom: 3px solid #247A59 !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.cmp_button:hover,
.cmp_button:focus,
.pkp_structure_main input[type="submit"]:hover,
.pkp_structure_main input[type="submit"]:focus,
.pkp_structure_sidebar .block_make_submission a:hover,
.pkp_structure_sidebar .block_make_submission a:focus,
.block_make_submission a:hover,
.block_make_submission a:focus {
  background: #247A59 !important;
  color: #ffffff !important;
  border-color: #247A59 !important;
  border-bottom-color: #247A59 !important;
}

/* ============================================================
   9. CUSTOM IJGGSD FOOTER
   ============================================================ */
.pkp_structure_footer_wrapper {
  display: block !important;
  margin: 36px 0 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  border: 0 !important;
}

.pkp_structure_footer {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

/* Hide the standalone OJS/PKP platform credit beneath the custom footer.
   Does not affect the user-authored IJGGSD journal footer. */
.pkp_brand_footer,
.pkp_structure_footer .pkp_brand_footer,
.pkp_structure_footer_wrapper .pkp_brand_footer {
  display: none !important;
}

/* Avoid residual bottom spacing after the platform credit is hidden. */
.pkp_structure_footer_wrapper,
.pkp_structure_footer,
.pkp_structure_page {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.pkp_structure_footer h3 {
  color: #174EA6;
}

.pkp_structure_footer p {
  color: #475569;
}

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

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

/* ============================================================
   10. FORMS
   ============================================================ */
input:focus,
textarea:focus,
select:focus {
  border-color: #174EA6 !important;
  box-shadow: 0 0 0 2px rgba(23,78,166,.10) !important;
  outline: none !important;
}

/* ============================================================
   11. TABLET
   ============================================================ */
@media (max-width: 991px) {
  .pkp_navigation_user_wrapper {
    top: 10px !important;
    right: 12px !important;
  }
}

/* ============================================================
   12. MOBILE
   ============================================================ */
@media (max-width: 767px) {

  .pkp_site_name .is_img img,
  .pkp_site_name img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .pkp_navigation_user_wrapper {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    padding: 7px 12px !important;
    background: #174EA6 !important;
  }

  .pkp_navigation_primary_wrapper {
    border-bottom: 3px solid #247A59 !important;
  }

  /* Keep PDF button compact and readable on mobile */
  .obj_article_summary .galleys_links .obj_galley_link,
  .obj_article_details .galleys_links .obj_galley_link,
  .cmp_article_list .galleys_links .obj_galley_link,
  .obj_galley_link,
  a.obj_galley_link {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}
/* ============================================================
   13. ACCESSIBILITY AND READABILITY
   ============================================================ */
.pkp_structure_main a:focus-visible,
.pkp_navigation_primary a:focus-visible,
.pkp_navigation_user a:focus-visible,
.obj_galley_link:focus-visible {
  outline: 3px solid #247A59 !important;
  outline-offset: 3px !important;
}

/* Keep dropdown navigation layered above page content. */
.pkp_navigation_primary_wrapper { position: relative; z-index: 10; }

/* Respect visitors' reduced motion preference. */
@media (prefers-reduced-motion: reduce) {
  .pkp_structure_page *,
  .pkp_structure_page *::before,
  .pkp_structure_page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
