/**
 * Shared Navigation Menu Styles for Local Legacy Vault
 * GLOBAL: One system for all pages. No page-level overrides.
 * Single background = exact logo background. Header uses horizontal wordmark PNG; nav height 152px desktop. Nav height: 152px desktop, 76px mobile.
 * Header + mobile drawer: flat only. Page body CTAs are not styled here (see llv-gold-cta.css).
 */

/* Single source of truth: exact logo background. Used by nav, mobile menu, footer, every state. Solid only, no gradients/transparency. */
:root {
  --llv-header-footer-bg: #000000;
  --nav-bg: var(--llv-header-footer-bg); /* alias; use either */
  --gold: #C6B08A;
  --gold-light: #B79F74;
  --llv-nav-height-desktop: 140px;
  --llv-nav-height-mobile: 76px;
  --llv-nav-logo-height: 96px;
  --llv-nav-logo-container-height: 108px;
}

/* LLV: stable scroll + single body offset (fixed nav) */
html {
  scroll-behavior: auto !important;
  scroll-padding-top: var(--llv-nav-height-desktop);
}

body {
  padding-top: var(--llv-nav-height-desktop) !important;
  overflow-anchor: none;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: var(--llv-nav-height-mobile);
  }
  body {
    padding-top: var(--llv-nav-height-mobile) !important;
  }
}

/* NUCLEAR: No gradient anywhere in nav (overrides ANY page/theme CSS) */
nav a,
nav button,
.nav-links a,
.menu-toggle,
.mobile-menu a {
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}
/* Nav text links and mobile links: flat transparent */
.nav-links a,
.mobile-menu a:not(.nav-cta) {
  background: none !important;
}
/* Nav CTAs get flat color in rules below; here we only kill gradient */
nav a.nav-cta,
.nav-cta,
.mobile-menu a.nav-cta {
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Main content CTAs: llv-gold-cta.css. Nav/mobile flat: rules above + .nav-cta below. */

/* Shared container system - used by header and hero for perfect alignment */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Navigation: one shared bar. Exact logo background; no transparency, blur, or overlay. */
nav.nav-global {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  background: var(--llv-header-footer-bg) !important;
  background-color: var(--llv-header-footer-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  min-height: var(--llv-nav-height-desktop);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 16px 0;
  opacity: 1 !important;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  min-height: var(--llv-nav-height-desktop);
  background: transparent !important;
  width: 100%;
  /* Use shared container system for alignment with hero */
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 0;
  flex-shrink: 0;
  gap: 0;
  text-decoration: none;
  padding-left: 0;
  max-height: var(--llv-nav-logo-container-height);
}

/* Logo only; no title text. Same structure as footer. */
.nav-logo-brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-icon {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: none;
}

.logo-icon:has(.llv-logo) {
  width: auto;
  height: var(--llv-nav-logo-container-height);
  max-height: var(--llv-nav-logo-container-height);
}

/* No twist, rotation, or scale on logo in any state. */
.logo .logo-icon,
.logo:hover .logo-icon,
.logo:focus .logo-icon,
.logo:active .logo-icon {
  transform: none !important;
}

.llv-logo {
  display: block !important;
  height: var(--llv-nav-logo-height) !important;
  width: auto;
  max-width: none;
  max-height: var(--llv-nav-logo-height);
  object-fit: contain;
  pointer-events: none;
  border: none !important;
  background: transparent !important;
  background-color: transparent;
  visibility: visible !important;
  /* Brand mark: exclude from page-level `img { border: 2px solid gold }` decorative rules */
  outline: none;
}

nav .logo .logo-icon > img.llv-logo {
  width: auto !important;
  height: var(--llv-nav-logo-height) !important;
  max-height: var(--llv-nav-logo-height);
  object-fit: contain;
  display: block !important;
  position: relative;
  z-index: 2;
}
.logo-icon object.llv-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block !important;
  position: relative;
  z-index: 2;
}

/* Inline logo SVG should fill the icon container */
.logo-icon .logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hide any non-logo SVG in the header logo slot */
nav .logo .logo-icon svg:not(.logo-svg) {
  display: none !important;
}

/* Logo is the brand; no title text next to it. */
.logo-text {
  display: none !important;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold-light);
  fill: none;
  position: relative;
  z-index: 1;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: #C7CDD6;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  position: relative;
  white-space: nowrap;
  background: none !important;
  background-image: none !important;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C6B08A;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: #FFFFFF;
}

.nav-links a.active {
  color: #C6B08A;
  font-weight: 600;
}

/* Get Started / nav CTA — visual test: #C6B08A / #1f2a3a */
nav a.nav-cta,
a.nav-cta,
.nav-cta {
  padding: 8px 18px;
  background: #C6B08A !important;
  background-image: none !important;
  color: #1f2a3a !important;
  border: none !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease;
  white-space: nowrap;
  box-shadow: none !important;
  filter: none !important;
}

.nav-cta::before,
.nav-cta::after {
  display: none !important;
  background: none !important;
  background-image: none !important;
}

nav a.nav-cta:hover,
a.nav-cta:hover,
.nav-cta:hover {
  background: #B79F74 !important;
  background-image: none !important;
  color: #1f2a3a !important;
  box-shadow: none !important;
}

/* Mobile Menu Toggle Button — flat, no gradient */
nav button.menu-toggle,
button.menu-toggle,
.menu-toggle {
  display: none;
  background: transparent !important;
  background-image: none !important;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  z-index: 1001;
  position: relative;
  box-shadow: none !important;
  filter: none !important;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* Mobile dropdown: same background as nav; top matches nav height (152px). */
.mobile-menu {
  display: none;
  position: fixed;
  top: 152px;
  left: 0;
  right: 0;
  background: var(--llv-header-footer-bg) !important;
  background-color: var(--llv-header-footer-bg) !important;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 1rem 0;
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu.active {
  max-height: 500px;
  opacity: 1;
}

.mobile-menu a {
  display: block;
  padding: 1rem 2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s ease, background 0.2s ease;
  background: transparent !important;
  background-image: none !important;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--gold);
  background: rgba(198, 176, 138, 0.1);
}

.mobile-menu a.nav-cta,
.mobile-menu .nav-cta {
  background: #C6B08A !important;
  background-image: none !important;
  color: #1f2a3a !important;
  margin: 1rem 2rem;
  border-radius: 6px;
  text-align: center;
  border: none;
  padding: 8px 18px;
  font-size: 0.9rem;
  box-shadow: none !important;
  filter: none !important;
}
.mobile-menu a.nav-cta:hover,
.mobile-menu .nav-cta:hover {
  background: #B79F74 !important;
  background-image: none !important;
  color: #1f2a3a !important;
}

.footer-brand .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Logo wrappers: same bg as nav/footer so logo blends. No hardcoded colors. */
.logo-container,
.site-logo,
.brand-mark,
.logo-icon,
.nav-logo-brand,
.footer-brand {
  background-color: var(--llv-header-footer-bg) !important;
}


footer,
.footer {
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

/* Responsive: same nav/menu system; logo and bar scale together. */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block !important;
    min-width: 44px;
    min-height: 44px;
    visibility: visible !important;
  }
  .mobile-menu {
    display: block;
    top: 152px;
  }
}

/* Mobile phones: text-only branding (no logo), compact bar, better spacing. */
@media (max-width: 640px) {
  nav.nav-global {
    height: 76px;
    padding: 0 1rem;
  }
  .nav-container {
    min-height: 76px;
  }
  .mobile-menu {
    top: 76px;
  }
  /* Hide logo image on mobile; show "Local Legacy Vault" text only. Prevent any leak into content. */
  .logo {
    overflow: hidden;
  }
  .logo .nav-logo-brand,
  .logo .logo-icon,
  .logo .llv-logo,
  .logo img {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  .logo::before {
    content: 'Local Legacy Vault';
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }
  .logo {
    padding: 0;
    overflow: hidden;
  }
  .llv-logo {
    height: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
  }
  .logo-icon:has(.llv-logo) {
    height: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
  }
  .logo-icon {
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
  }
  /* Slightly more horizontal padding so content is not flush to edges. */
  main,
  .main-content {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  /* Breathing room between sections on mobile. */
  section {
    margin-bottom: 1.5rem;
  }
  section:last-child {
    margin-bottom: 0;
  }
}

/* Vault Recovery File — site link gold; not a hyperlink */
.llv-term-link-color {
  color: #c6b08a;
  text-decoration: none;
  font-weight: inherit;
}
