/* =========================================================
   WLUPR SHARED HEADER
   Whole Life Universal Publications & Recordings
   Bootstrap 5.3
   ========================================================= */

/* =========================================================
   PINEGROW / STANDALONE PREVIEW FALLBACK
   ---------------------------------------------------------
   The live website also loads Bootstrap 5.3. These scoped
   rules reproduce the essential Bootstrap header layout when
   /includes/header.html is opened directly in Pinegrow, where
   Bootstrap utility classes may not otherwise be available.
   They are deliberately scoped to .wlupr-header so they do not
   change the rest of the website.
   ========================================================= */

.wlupr-header,
.wlupr-header *,
.wlupr-header *::before,
.wlupr-header *::after {
  box-sizing: border-box;
}

.wlupr-header .container {
  width: 100%;
  max-width: 1320px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.wlupr-header .d-flex {
  display: flex !important;
}

.wlupr-header .flex-wrap {
  flex-wrap: wrap !important;
}

.wlupr-header .align-items-center {
  align-items: center !important;
}

.wlupr-header .justify-content-between {
  justify-content: space-between !important;
}

.wlupr-header .gap-2 {
  gap: 0.5rem !important;
}

.wlupr-header .gap-3 {
  gap: 1rem !important;
}

.wlupr-header .py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.wlupr-header .mt-3 {
  margin-top: 1rem !important;
}

.wlupr-header .navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.wlupr-header .navbar > .container {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.wlupr-header .navbar-brand {
  display: inline-block;
}

.wlupr-header .navbar-nav {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.wlupr-header .nav-item {
  position: relative;
}

.wlupr-header .nav-link {
  display: block;
  text-decoration: none;
}

.wlupr-header .ms-auto {
  margin-left: auto !important;
}

.wlupr-header .btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}

.wlupr-header .navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.wlupr-header .navbar-toggler-icon {
  position: relative;
  display: inline-block;
  width: 1.5em;
  height: 1.2em;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.wlupr-header .navbar-toggler-icon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.wlupr-header .navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

.wlupr-header .dropdown-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  margin: 0;
  list-style: none;
  background: #fff;
}

/* Bootstrap adds .show when a dropdown is opened.
   This explicit rule is required because the Pinegrow fallback above
   otherwise keeps the submenu hidden on real touch devices. */

.wlupr-header .dropdown-menu.show {
  display: block;
}

.wlupr-header .dropdown-item {
  width: 100%;
  text-decoration: none;
}

.wlupr-header .dropdown-divider {
  height: 0;
  margin: 0.35rem 0;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--wlupr-line);
}

@media (min-width: 1200px) {
  .wlupr-header .container {
    max-width: 1140px;
  }

  .wlupr-header .navbar-expand-xl {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .wlupr-header .navbar-expand-xl .navbar-toggler {
    display: none;
  }

  .wlupr-header .navbar-expand-xl .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }

  .wlupr-header .navbar-expand-xl .navbar-nav {
    flex-direction: row;
  }

  .wlupr-header .align-items-xl-center {
    align-items: center !important;
  }

  .wlupr-header .ms-xl-3 {
    margin-left: 1rem !important;
  }

  .wlupr-header .mt-xl-0 {
    margin-top: 0 !important;
  }

  .wlupr-header .py-xl-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* IMPORTANT:
   Do not force .navbar-collapse to display:none here.
   Bootstrap's own .collapse/.show classes must control the mobile menu,
   otherwise the hamburger button cannot open it on phones/tablets. */

@media (min-width: 1400px) {
  .wlupr-header .container {
    max-width: 1320px;
  }
}


:root {
  --wlupr-ink: #17212b;
  --wlupr-muted: #61707d;
  --wlupr-paper: #ffffff;
  --wlupr-soft: #f4f6f5;
  --wlupr-line: #dde3e1;
  --wlupr-accent: #315f50;
  --wlupr-accent-dark: #24483d;
  --wlupr-utility: #18251f;
}

.wlupr-header {
  position: relative;
  z-index: 1030;
  width: 100%;
  background: var(--wlupr-paper);
  color: var(--wlupr-ink);
  border-bottom: 1px solid var(--wlupr-line);
}

/* Utility bar */

.wlupr-utility-bar {
  background: var(--wlupr-utility);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.35;
}

.wlupr-utility-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.18s ease;
}

.wlupr-utility-link:hover,
.wlupr-utility-link:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Main navbar */

.wlupr-navbar {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(23, 33, 43, 0.04);
}

.wlupr-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-right: 1.25rem;
  text-decoration: none;
  white-space: normal;
}

.wlupr-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.55rem;
  min-height: 3.15rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--wlupr-accent);
  color: var(--wlupr-accent);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.wlupr-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.wlupr-brand-name {
  color: var(--wlupr-ink);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.015em;
}

.wlupr-brand-subname {
  margin-top: 0.22rem;
  color: var(--wlupr-muted);
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.wlupr-nav-list {
  gap: 0.08rem;
}

.wlupr-navbar .nav-link {
  position: relative;
  padding: 0.85rem 0.65rem !important;
  color: var(--wlupr-ink);
  font-size: 0.87rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.wlupr-navbar .nav-link:hover,
.wlupr-navbar .nav-link:focus,
.wlupr-navbar .nav-link.show {
  color: var(--wlupr-accent);
}

.wlupr-navbar .nav-link::after {
  transition: transform 0.18s ease;
}

/* Dropdowns */

.wlupr-dropdown {
  min-width: 19rem;
  padding: 0.55rem;
  border: 1px solid var(--wlupr-line);
  border-radius: 0.3rem;
  box-shadow: 0 16px 40px rgba(23, 33, 43, 0.12);
}

.wlupr-dropdown .dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  padding: 0.64rem 0.72rem;
  border-radius: 0.2rem;
  white-space: normal;
}

.wlupr-dropdown .dropdown-item:hover,
.wlupr-dropdown .dropdown-item:focus {
  background: var(--wlupr-soft);
  color: var(--wlupr-ink);
}

.wlupr-menu-title {
  color: var(--wlupr-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.wlupr-menu-desc {
  color: var(--wlupr-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.dropdown-divider {
  border-color: var(--wlupr-line);
}

/* Explore Publications CTA */

.wlupr-publications-btn {
  padding: 0.72rem 1rem;
  background: var(--wlupr-accent);
  border: 1px solid var(--wlupr-accent);
  border-radius: 0.2rem;
  color: #fff;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.wlupr-publications-btn:hover,
.wlupr-publications-btn:focus {
  background: var(--wlupr-accent-dark);
  border-color: var(--wlupr-accent-dark);
  color: #fff;
}

/* Navbar toggler */

.wlupr-navbar-toggler {
  border-color: var(--wlupr-line);
  border-radius: 0.2rem;
  padding: 0.45rem 0.55rem;
}

.wlupr-navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(49, 95, 80, 0.14);
}

/* Current page hook: add .active to the appropriate .nav-link */

.wlupr-navbar .nav-link.active {
  color: var(--wlupr-accent);
}

/* Desktop dropdown behaviour */

@media (min-width: 1200px) {
  .wlupr-navbar .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }

  .wlupr-navbar .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.48rem;
    height: 2px;
    background: var(--wlupr-accent);
  }
}

/* Utility-link labels: desktop wording remains unchanged.
   Shorter alternatives are shown only on smartphones. */

.wlupr-utility-label-mobile {
  display: none;
}

/* Tablet and mobile */

@media (max-width: 1199.98px) {
  .wlupr-navbar .navbar-collapse {
    margin-top: 0.85rem;
    padding: 0.8rem 0 0.35rem;
    border-top: 1px solid var(--wlupr-line);
  }

  .wlupr-navbar .nav-link {
    padding: 0.68rem 0 !important;
  }

  .wlupr-dropdown {
    min-width: 0;
    margin: 0 0 0.6rem;
    padding: 0.35rem;
    border: 0;
    border-left: 2px solid var(--wlupr-line);
    border-radius: 0;
    box-shadow: none;
  }

  .wlupr-publications-btn {
    display: inline-block;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  /* Smartphone utility bar:
     hide the public email address and use shorter Whole Life link labels. */
  .wlupr-utility-contact {
    display: none !important;
  }

  .wlupr-utility-label-desktop {
    display: none;
  }

  .wlupr-utility-label-mobile {
    display: inline;
  }

  .wlupr-utility-bar .container {
    justify-content: center !important;
    text-align: center;
  }

  .wlupr-utility-contact,
  .wlupr-utility-links {
    justify-content: center;
    width: 100%;
  }

  .wlupr-utility-links {
    gap: 0.7rem 1rem !important;
  }

  .wlupr-brand {
    max-width: calc(100% - 4rem);
    gap: 0.58rem;
  }

  .wlupr-brand-mark {
    min-width: 4rem;
    min-height: 2.85rem;
    font-size: 0.9rem;
  }

  .wlupr-brand-name {
    font-size: 0.9rem;
  }

  .wlupr-brand-subname {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .wlupr-brand-subname {
    display: none;
  }

  .wlupr-brand-name {
    line-height: 1.18;
  }
}

/* Accessibility */

.wlupr-header a:focus-visible,
.wlupr-header button:focus-visible {
  outline: 3px solid rgba(49, 95, 80, 0.35);
  outline-offset: 3px;
}

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