/* ==========================================================================
   PARJ Africa site masthead — directory theme only (body.parj-site)
   Does NOT affect journal geometric themes.
   ========================================================================== */

body.parj-site {
  --parj-navy: #0b1c33;
  --parj-navy-2: #132a4a;
  --parj-ink: #0f1b2d;
  --parj-gold: #e8a23a;
  --parj-gold-2: #f0b85a;
  --parj-coral: #e23b4a;
  --parj-cream: #f7f3ea;
  --parj-muted: #6b7a8f;
  --parj-line: rgba(255, 255, 255, 0.12);
  --parj-max: 1280px;
  --parj-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --parj-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

/* Hide legacy header chrome if any residual classes remain */
body.parj-site .parj-wwf-header {
  display: none !important;
}

/* ---------- Mast shell ---------- */
body.parj-site .parj-mast {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--parj-navy);
  color: #fff;
  box-shadow: 0 12px 40px rgba(8, 18, 34, 0.28);
  font-family: var(--parj-sans);
}

body.parj-site .parj-mast a {
  text-decoration: none;
  color: inherit;
}

body.parj-site .parj-mast *,
body.parj-site .parj-mast *::before,
body.parj-site .parj-mast *::after {
  box-sizing: border-box;
}

/* ---------- Utility strip ---------- */
body.parj-site .parj-mast__utility {
  background: #071321;
  border-bottom: 1px solid var(--parj-line);
  font-size: 0.82rem;
}

body.parj-site .parj-mast__utility-inner {
  max-width: var(--parj-max);
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.parj-site .parj-mast__utility-left,
body.parj-site .parj-mast__utility-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

body.parj-site .parj-mast__utility a {
  color: #c7d4e8;
  font-weight: 600;
}

body.parj-site .parj-mast__utility a:hover {
  color: #fff;
}

body.parj-site .parj-mast__utility-strong {
  color: var(--parj-gold-2) !important;
}

body.parj-site .parj-mast__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 162, 58, 0.14);
  color: var(--parj-gold-2);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Main bulky bar ---------- */
body.parj-site .parj-mast__main {
  background:
    radial-gradient(ellipse 40% 120% at 100% 0%, rgba(232, 162, 58, 0.12), transparent 55%),
    linear-gradient(110deg, #0b1c33 0%, #132a4a 55%, #163255 100%);
  border-bottom: 1px solid var(--parj-line);
}

body.parj-site .parj-mast__main-inner {
  max-width: var(--parj-max);
  margin: 0 auto;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 92px;
}

/* Brand */
body.parj-site .parj-mast__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 0 1 auto;
}

body.parj-site .parj-mast__brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 64px;
  padding: 0.35rem;
}

body.parj-site .parj-mast__brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body.parj-site .parj-mast__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

body.parj-site .parj-mast__brand-text strong {
  font-family: var(--parj-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

body.parj-site .parj-mast__brand-text span {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9eb0cb;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Nav */
body.parj-site .parj-mast__nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

body.parj-site .parj-mast__item {
  position: relative;
}

body.parj-site .parj-mast__link,
body.parj-site .parj-mast__link--btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border: 0;
  background: transparent;
  color: #d7e2f3;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border-radius: 10px;
  white-space: nowrap;
}

body.parj-site .parj-mast__link:hover,
body.parj-site .parj-mast__link:focus,
body.parj-site .parj-mast__item:hover > .parj-mast__link,
body.parj-site .parj-mast__item:focus-within > .parj-mast__link {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

body.parj-site .parj-mast__chev {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
}

/* Dropdowns */
body.parj-site .parj-mast__drop {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 240px;
  padding: 0.85rem;
  border-radius: 16px;
  background: #fff;
  color: var(--parj-ink);
  box-shadow: 0 22px 50px rgba(8, 18, 34, 0.28);
  border: 1px solid rgba(15, 27, 45, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 50;
}

body.parj-site .parj-mast__drop--sm {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body.parj-site .parj-mast__item:hover > .parj-mast__drop,
body.parj-site .parj-mast__item:focus-within > .parj-mast__drop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.parj-site .parj-mast__drop a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: #1a2b42 !important;
  font-weight: 600;
  font-size: 0.92rem;
}

body.parj-site .parj-mast__drop a:hover {
  background: #f3f6fb;
  color: #0b1c33 !important;
}

body.parj-site .parj-mast__drop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 0.75rem;
  min-width: min(720px, 78vw);
}

body.parj-site .parj-mast__drop-label {
  margin: 0 0 0.35rem;
  padding: 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parj-muted);
}

body.parj-site .parj-mast__drop-cta {
  background: linear-gradient(160deg, #0f2440, #18345a);
  color: #fff;
  border-radius: 14px;
  padding: 1rem;
}

body.parj-site .parj-mast__drop-cta strong {
  display: block;
  font-family: var(--parj-serif);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

body.parj-site .parj-mast__drop-cta p {
  margin: 0 0 0.85rem;
  color: #b8c7dd;
  font-size: 0.88rem;
  line-height: 1.45;
}

body.parj-site .parj-mast__mini-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem !important;
  border-radius: 999px !important;
  background: var(--parj-gold) !important;
  color: #132033 !important;
  font-weight: 800 !important;
}

/* Actions */
body.parj-site .parj-mast__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

body.parj-site .parj-mast__search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  min-width: 210px;
}

body.parj-site .parj-mast__search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
}

body.parj-site .parj-mast__search input::placeholder {
  color: #9eb0cb;
}

body.parj-site .parj-mast__search input:focus {
  outline: none;
}

body.parj-site .parj-mast__search button {
  border: 0;
  background: transparent;
  color: #e8f0ff;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

body.parj-site .parj-mast__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

body.parj-site .parj-mast__btn:hover {
  transform: translateY(-1px);
}

body.parj-site .parj-mast__btn--ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: transparent;
}

body.parj-site .parj-mast__btn--solid {
  background: linear-gradient(135deg, #ff4a5c, #e23b4a);
  color: #fff;
  box-shadow: 0 10px 24px rgba(226, 59, 74, 0.28);
}

/* Burger */
body.parj-site .parj-mast__toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

body.parj-site .parj-mast__burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  margin-left: auto;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

body.parj-site .parj-mast__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Home ribbon */
body.parj-site .parj-mast__ribbon {
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid var(--parj-line);
}

body.parj-site .parj-mast__ribbon-inner {
  max-width: var(--parj-max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  align-items: center;
  justify-content: center;
}

body.parj-site .parj-mast__ribbon a {
  color: #c9d6ea;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.25rem 0;
}

body.parj-site .parj-mast__ribbon a strong {
  color: var(--parj-gold-2);
  font-weight: 800;
  margin-right: 0.25rem;
}

body.parj-site .parj-mast__ribbon a:hover {
  color: #fff;
}

/* Home gets slightly taller brand presence */
body.parj-site.parj-site--home .parj-mast__main-inner {
  min-height: 104px;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

body.parj-site.parj-site--home .parj-mast__brand-mark {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  body.parj-site .parj-mast__search {
    min-width: 160px;
  }

  body.parj-site .parj-mast__btn--ghost {
    display: none;
  }

  body.parj-site .parj-mast__brand-text span {
    display: none;
  }
}

@media (max-width: 980px) {
  body.parj-site .parj-mast__utility-left .parj-mast__pill {
    display: none;
  }

  body.parj-site .parj-mast__burger {
    display: inline-flex;
  }

  body.parj-site .parj-mast__main-inner {
    flex-wrap: wrap;
    min-height: 76px;
    gap: 0.75rem;
  }

  body.parj-site .parj-mast__nav,
  body.parj-site .parj-mast__actions {
    display: none;
    width: 100%;
  }

  body.parj-site .parj-mast__toggle:checked ~ .parj-mast__nav,
  body.parj-site .parj-mast__toggle:checked ~ .parj-mast__actions {
    display: flex;
  }

  body.parj-site .parj-mast__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding-bottom: 0.35rem;
  }

  body.parj-site .parj-mast__item {
    width: 100%;
  }

  body.parj-site .parj-mast__link,
  body.parj-site .parj-mast__link--btn {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.04);
  }

  /* Mobile: expand dropdowns inline */
  body.parj-site .parj-mast__drop {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.04);
    border: 0;
    min-width: 0;
    padding: 0.25rem 0.35rem 0.55rem 0.85rem;
    display: none;
  }

  body.parj-site .parj-mast__item:focus-within > .parj-mast__drop,
  body.parj-site .parj-mast__item:hover > .parj-mast__drop {
    display: block;
  }

  body.parj-site .parj-mast__drop-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  body.parj-site .parj-mast__drop a {
    color: #e7eefb !important;
  }

  body.parj-site .parj-mast__drop a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
  }

  body.parj-site .parj-mast__drop-label {
    color: #9eb0cb;
  }

  body.parj-site .parj-mast__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-bottom: 0.75rem;
  }

  body.parj-site .parj-mast__search {
    width: 100%;
    min-width: 0;
  }

  body.parj-site .parj-mast__search input {
    font-size: 16px;
  }

  body.parj-site .parj-mast__btn {
    width: 100%;
  }

  body.parj-site .parj-mast__toggle:checked ~ .parj-mast__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.parj-site .parj-mast__toggle:checked ~ .parj-mast__burger span:nth-child(2) {
    opacity: 0;
  }
  body.parj-site .parj-mast__toggle:checked ~ .parj-mast__burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body.parj-site .parj-mast__burger span {
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  body.parj-site .parj-mast__ribbon-inner {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.7rem;
  }

  body.parj-site .parj-mast__ribbon a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  body.parj-site .parj-mast__utility-right a:not(.parj-mast__utility-strong) {
    display: none;
  }

  body.parj-site .parj-mast__brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 12px;
  }

  body.parj-site .parj-mast__brand-text strong {
    font-size: 1.1rem;
  }

  body.parj-site.parj-site--home .parj-mast__main-inner {
    min-height: 72px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}
