﻿/* Shared PandaInvest header for every static page. */
:root {
  --nav-parchment: #F5F4ED;
  --nav-ivory: #faf9f5;
  --nav-warm-sand: #e8e6dc;
  --nav-border-cream: #f0eee6;
  --nav-border-warm: #e8e6dc;
  --nav-ring-warm: #d1cfc5;
  --nav-near-black: #141413;
  --nav-dark-surface: #30302e;
  --nav-charcoal-warm: #4d4c48;
  --nav-olive-gray: #5e5d59;
  --nav-stone-gray: #87867f;
  --nav-accent: #2f684b;
  --nav-accent-dark: #24523b;
  --nav-h: 62px;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

body > .nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, .93);
  border-bottom: 1px solid var(--nav-border-cream);
  box-shadow: 0 1px 0 rgba(209, 207, 197, .34);
  backdrop-filter: blur(18px) saturate(1.08);
}

body > .nav-wrap nav {
  width: min(100%, 1240px);
  max-width: 1240px;
  min-height: var(--nav-h);
  height: auto;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  position: relative;
}

body > .nav-wrap .nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--nav-near-black);
  font-family: var(--font-serif, 'Newsreader', Georgia, serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

body > .nav-wrap .nav-logo-mark {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(47, 104, 75, .35), 0 3px 10px rgba(20, 32, 25, .10);
  object-fit: cover;
}

body > .nav-wrap .nav-links {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  position: static;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* Pricing remains available by direct link; it is not a primary navigation tab. */
body > .nav-wrap .nav-links a[href="pricing.html"] {
  display: none;
}

body > .nav-wrap .nav-links::-webkit-scrollbar {
  display: none;
}

/* Keep every desktop destination reachable when the viewport is narrower than
   the full masthead: scroll the nav strip instead of allowing it to overlap. */
@media (min-width: 1121px) and (max-width: 1300px) {
  body > .nav-wrap nav { gap: 12px; padding-inline: 18px; }
  body > .nav-wrap .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  body > .nav-wrap .nav-links > a { flex: 0 0 auto; }
}

body > .nav-wrap .nav-links a,
body > .nav-wrap .nav-links > a,
body > .nav-wrap .nav-dropdown > a {
  position: relative;
  min-height: 38px;
  height: auto;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  color: var(--nav-olive-gray);
  font-family: var(--font-sans, 'Public Sans', Arial, sans-serif);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body > .nav-wrap .nav-links a:hover,
body > .nav-wrap .nav-links > a:hover,
body > .nav-wrap .nav-dropdown:hover > a,
body > .nav-wrap .nav-links a.active,
body > .nav-wrap .nav-links > a.active,
body > .nav-wrap .nav-dropdown.is-active > a,
body > .nav-wrap .nav-dropdown > a.active {
  color: var(--nav-near-black);
  background: rgba(232, 230, 220, .66);
  box-shadow: 0 0 0 1px var(--nav-ring-warm);
  border-bottom: 0;
  border-radius: 999px;
}

body > .nav-wrap .nav-links > a.active::after,
body > .nav-wrap .nav-dropdown.is-active > a::before,
body > .nav-wrap .nav-dropdown > a.active::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--nav-accent);
  opacity: .88;
}

body > .nav-wrap .nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: default;
}

body > .nav-wrap .nav-dropdown > a::after {
  content: '';
  width: 0;
  height: 0;
  margin-left: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .46;
  transform: translateY(1px);
}

body > .nav-wrap .nav-dropdown-panel {
  display: block;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 226px;
  padding: 6px;
  border: 1px solid var(--nav-border-warm);
  border-radius: 16px;
  background: rgba(250, 249, 245, .98);
  box-shadow: 0 0 0 1px rgba(209, 207, 197, .38), 0 18px 42px rgba(20, 20, 19, .10);
  overflow: hidden;
  z-index: 220;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top left;
  transition: opacity 150ms ease, visibility 150ms ease, transform 150ms ease;
}

body > .nav-wrap .nav-dropdown:hover .nav-dropdown-panel,
body > .nav-wrap .nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

body > .nav-wrap .nav-dropdown-panel a,
body > .nav-wrap .nav-dropdown-panel a.active {
  min-height: 40px;
  height: auto !important;
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  border: 0 !important;
  border-radius: 10px;
  color: var(--nav-olive-gray);
  background: transparent;
  box-shadow: none;
  font-size: .84rem;
  white-space: nowrap;
}

body > .nav-wrap .nav-dropdown-panel a:hover,
body > .nav-wrap .nav-dropdown-panel a.active {
  color: var(--nav-near-black);
  background: var(--nav-warm-sand);
}

body > .nav-wrap .nav-dropdown-panel a.active::after,
body > .nav-wrap .nav-dropdown-panel a + a {
  border-top: 0;
}

body > .nav-wrap .nav-actions {
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body > .nav-wrap .btn,
body > .nav-wrap .btn-sm,
body > .nav-wrap .btn-share {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-sans, 'Public Sans', Arial, sans-serif);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body > .nav-wrap .btn:hover,
body > .nav-wrap .btn-share:hover {
  transform: translateY(-1px);
}

body > .nav-wrap .btn-sm {
  padding: 8px 14px;
}

body > .nav-wrap .btn-primary {
  background: var(--nav-accent);
  color: #fff;
  border: 0;
  box-shadow: 0 0 0 1px rgba(47, 104, 75, .80);
}

body > .nav-wrap .btn-primary:hover {
  background: var(--nav-accent-dark);
  color: #fff;
}

body > .nav-wrap .btn-ghost,
body > .nav-wrap .btn-share {
  background: rgba(250, 249, 245, .72);
  border: 1px solid var(--nav-border-warm);
  color: var(--nav-charcoal-warm);
  box-shadow: 0 0 0 1px rgba(209, 207, 197, .22);
}

body > .nav-wrap .btn-ghost:hover,
body > .nav-wrap .btn-share:hover {
  background: var(--nav-warm-sand);
  border-color: var(--nav-ring-warm);
  color: var(--nav-near-black);
}

body > .nav-wrap .btn-share {
  margin-left: 0;
  padding: 7px 12px;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}

body > .nav-wrap .btn-share svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1120px) {
  body > .nav-wrap nav {
    grid-template-columns: auto 1fr auto;
    row-gap: 8px;
    padding: 10px 18px 11px;
  }

  body > .nav-wrap .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding: 2px 0 1px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  body > .nav-wrap .nav-dropdown {
    display: contents;
  }

  body > .nav-wrap .nav-dropdown > a::after {
    content: none;
  }

  body > .nav-wrap .nav-dropdown-panel {
    display: contents;
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  body > .nav-wrap .nav-dropdown-panel a,
  body > .nav-wrap .nav-dropdown-panel a.active {
    flex: 0 0 auto;
    min-height: 36px;
    width: auto;
    padding: 0 10px;
    border-radius: 999px;
    scroll-snap-align: start;
  }

  body > .nav-wrap .nav-dropdown-panel a:first-child {
    display: none;
  }

  body > .nav-wrap .nav-links a,
  body > .nav-wrap .nav-links > a,
  body > .nav-wrap .nav-dropdown > a {
    min-height: 36px;
    scroll-snap-align: start;
  }

  body > .nav-wrap .nav-actions {
    justify-self: end;
  }
}

@media (max-width: 760px) {
  body > .nav-wrap nav {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding-inline: 14px;
  }

  body > .nav-wrap .nav-logo {
    font-size: 1.08rem;
  }

  body > .nav-wrap .nav-logo-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  body > .nav-wrap .nav-actions {
    display: none;
  }

  body > .nav-wrap .btn-share {
    width: 38px;
    min-height: 38px;
    justify-self: end;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  body > .nav-wrap .btn-share svg {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body > .nav-wrap *,
  body > .nav-wrap *::before,
  body > .nav-wrap *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Shared Firebase account controls */
body > .nav-wrap .firebase-nav-account {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
body > .nav-wrap .firebase-nav-account .btn { white-space: nowrap; }
body > .nav-wrap .firebase-account { display: inline-flex; align-items: center; gap: 8px; }
body > .nav-wrap .firebase-account img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
body > .nav-wrap .firebase-sign-out { border: 0; background: transparent; color: inherit; font: 700 .76rem/1 inherit; cursor: pointer; }

@media (max-width: 1120px) {
  body.firebase-auth-enabled > .nav-wrap .nav-actions > :not(.firebase-nav-account) { display: none; }
}
@media (max-width: 760px) {
  body.firebase-auth-enabled > .nav-wrap .nav-actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }
  body.firebase-auth-enabled > .nav-wrap .firebase-sign-in { min-height: 36px; padding: 7px 11px; font-size: .76rem; }
  body.firebase-auth-enabled > .nav-wrap .firebase-sign-out { display: none; }
}
