:root {
  --sg-navy: #071b33;
  --sg-blue: #0b4f8a;
  --sg-cyan: #12bfea;
  --sg-graphite: #253746;
  --sg-amber: #f2a93b;
  --sg-pale: #eaf8fc;
  --sg-white: #fff;
  --sg-radius: 12px;
  --sg-shadow: 0 14px 38px rgba(7, 27, 51, .12);
}

html { scroll-behavior: smooth; }
body {
  color: var(--sg-graphite);
  background: #f7fafc;
  font-family: "Noto Sans", "Source Sans 3", Arial, sans-serif;
  line-height: 1.65;
}

a { color: var(--sg-blue); text-underline-offset: .18em; }
a:hover { color: #06365f; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sg-amber);
  outline-offset: 3px;
}

.pkp_structure_head {
  background: var(--sg-white);
  border-top: 5px solid var(--sg-cyan);
  box-shadow: 0 2px 16px rgba(7, 27, 51, .08);
}
.pkp_site_name { padding-top: 18px; padding-bottom: 14px; }
.pkp_site_name .is_text {
  display: block;
  width: min(100%, 530px);
  min-height: 92px;
  color: transparent;
  font-size: 0;
  background: url("../assets/sapiens-global-logo-horizontal.svg") left center / contain no-repeat;
}
.pkp_site_name::after {
  content: "ISSN 2838-5527";
  display: block;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: .55rem .9rem;
  color: var(--sg-navy);
  background: var(--sg-pale);
  border-left: 4px solid var(--sg-cyan);
  border-radius: 6px;
  font-family: "Noto Sans", "Source Sans 3", Arial, sans-serif;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: .035em;
}
.pkp_navigation_primary_wrapper {
  background: var(--sg-navy);
}
.pkp_navigation_primary > li > a {
  color: var(--sg-white);
  font-weight: 650;
  letter-spacing: .01em;
}
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  color: var(--sg-navy);
  background: var(--sg-cyan);
}
.pkp_navigation_primary ul {
  border: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: var(--sg-shadow);
}

.pkp_structure_main {
  background: var(--sg-white);
  border-radius: var(--sg-radius);
  box-shadow: 0 6px 24px rgba(7, 27, 51, .06);
}
h1, h2, h3, h4 { color: var(--sg-navy); line-height: 1.25; }
h1 { letter-spacing: -.02em; }
h2 { margin-top: 1.75em; }

.sg-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  margin: 0 0 2rem;
  padding: clamp(2.2rem, 6vw, 5rem);
  color: var(--sg-white);
  background:
    linear-gradient(90deg, rgba(7,27,51,.98) 0%, rgba(7,27,51,.90) 42%, rgba(7,27,51,.24) 75%),
    url("../assets/sapiens-global-hero.png") center / cover no-repeat;
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
}
.sg-hero h1,
.sg-hero h2 { max-width: 720px; margin: 0 0 .6rem; color: var(--sg-white); font-size: clamp(2.2rem, 6vw, 4.4rem); }
.sg-hero p { max-width: 660px; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.sg-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.sg-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: .7rem 1.15rem;
  border: 2px solid var(--sg-cyan);
  border-radius: 999px;
  color: var(--sg-navy);
  background: var(--sg-cyan);
  font-weight: 750;
  text-decoration: none;
}
.sg-button:hover { color: var(--sg-white); background: transparent; }
.sg-button--secondary { color: var(--sg-white); background: transparent; border-color: var(--sg-white); }
.sg-button--secondary:hover { color: var(--sg-navy); background: var(--sg-white); }

.sg-lead { color: #17324a; font-size: 1.16rem; line-height: 1.7; }
.sg-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.sg-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.2rem;
  color: var(--sg-graphite);
  background: var(--sg-pale);
  border: 1px solid #c7eaf4;
  border-left: 5px solid var(--sg-cyan);
  border-radius: 10px;
  text-decoration: none;
}
.sg-card:hover { color: var(--sg-navy); border-color: var(--sg-blue); transform: translateY(-2px); }
.sg-card strong { color: var(--sg-navy); }
.sg-card span { font-size: .92rem; }
.sg-steps > li { margin-bottom: .75rem; }
.sg-notice {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: #fff7e9;
  border-left: 5px solid var(--sg-amber);
  border-radius: 8px;
}

.pkp_structure_footer_wrapper {
  color: #d9ebf2;
  background: var(--sg-navy);
}
.pkp_structure_footer_wrapper a { color: #73ddf5; }
.pkp_brand_footer { opacity: .8; }

@media (max-width: 768px) {
  .sg-hero { min-height: 360px; padding: 2rem 1.25rem; }
}

/* Responsive reflow for the mobile/tablet header used by the OJS default theme. */
@media (max-width: 991px) {
  .pkp_site_nav_toggle {
    width: 48px;
    height: 48px;
    color: var(--sg-white);
    background: var(--sg-navy);
    border-radius: 0 0 8px 0;
  }

  .pkp_site_nav_toggle:hover,
  .pkp_site_nav_toggle:focus {
    background: var(--sg-blue);
  }

  .pkp_site_name_wrapper {
    height: auto;
    min-height: 108px;
  }

  .pkp_site_name {
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
    margin: 0;
    padding: 10px 12px 8px 56px;
    box-sizing: border-box;
    overflow: visible;
    white-space: normal;
  }

  .pkp_site_name > a {
    display: block;
    padding: 0;
  }

  .pkp_site_name .is_text {
    width: min(100%, 530px);
    min-height: 58px;
    background-position: left center;
  }

  .pkp_site_name::after {
    position: static;
    display: inline-block;
    margin-top: 4px;
    padding: .25rem .5rem;
    transform: none;
    font-size: 11px;
    line-height: 1.2;
  }

  .pkp_navigation_primary_wrapper {
    background: transparent;
  }

  .pkp_structure_main,
  .pkp_structure_main p,
  .pkp_structure_main li,
  .pkp_structure_main a,
  .pkp_structure_main dd,
  .pkp_structure_main dt {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .pkp_structure_main img,
  .pkp_structure_main video,
  .pkp_structure_main iframe,
  .pkp_structure_main embed,
  .pkp_structure_main object {
    max-width: 100%;
  }

  .pkp_structure_main img,
  .pkp_issue_archive .obj_issue_summary img {
    height: auto;
  }

  .pkp_structure_main table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pkp_structure_main input,
  .pkp_structure_main select,
  .pkp_structure_main textarea,
  .pkp_structure_main button,
  .pkp_structure_main .pkp_button,
  .pkp_structure_main [class*="button"] {
    max-width: 100%;
    box-sizing: border-box;
  }

  .sg-button {
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .pkp_structure_main {
    border-radius: 8px;
  }

  .sg-hero {
    min-height: 0;
    padding: 1.6rem 1rem;
    background-position: 58% center;
  }

  .sg-hero h1,
  .sg-hero h2 {
    font-size: clamp(2rem, 10vw, 2.45rem);
  }

  .sg-actions,
  .sg-button {
    width: 100%;
  }
}

/* User account menu: visible and keyboard-accessible on the white header. */
@media (min-width: 992px) {
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .55rem .9rem;
    border: 1px solid #0c789a;
    border-radius: 999px;
    background: #eaf7fb;
    color: #08243e !important;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(8, 36, 62, .12);
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: .5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform .15s ease;
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:hover,
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:focus,
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:focus-visible {
    border-color: #0c789a;
    background: #0c789a;
    color: #fff !important;
    outline: 3px solid rgba(12, 120, 154, .28);
    outline-offset: 2px;
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"][aria-expanded="true"] {
    border-color: #08243e;
    background: #08243e;
    color: #fff !important;
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"][aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
}

.pkp_navigation_user .dropdown-menu {
  border: 1px solid #b8dce8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(8, 36, 62, .18);
}

.pkp_navigation_user .dropdown-menu a {
  color: #08243e !important;
  text-decoration: none;
}

.pkp_navigation_user .dropdown-menu a:hover,
.pkp_navigation_user .dropdown-menu a:focus,
.pkp_navigation_user .dropdown-menu a:focus-visible {
  background: #eaf7fb;
  color: #075f7d !important;
  outline: 2px solid #0c789a;
  outline-offset: -2px;
}

@media (max-width: 991px) {
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: .7rem .85rem;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: .5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
  }

  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:hover,
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:focus,
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"]:focus-visible,
  .pkp_navigation_user > li.profile > a[data-toggle="dropdown"][aria-expanded="true"] {
    background: #fff;
    color: #08243e !important;
    outline: 3px solid #55c2e6;
    outline-offset: 2px;
  }

  .pkp_navigation_user .dropdown-menu {
    width: 100%;
    margin-top: .35rem;
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .pkp_structure_head, .pkp_structure_sidebar, .sg-actions { display: none !important; }
  .pkp_structure_main { box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
