/* Nav lock — loads last to override page-specific header/nav/.brand styles.
   Ensures nav looks identical on every page. Single source of truth.
   All sidebar properties use !important so page-specific inline styles cannot interfere. */

/* === DEFAULT (top-bar / narrow viewport) === */

.phyllux-nav,
header.phyllux-nav {
  position: sticky !important;
  top: 0 !important;
  background: rgba(8, 10, 7, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(125, 138, 117, 0.25) !important;
  z-index: 100 !important;
}

.phyllux-nav nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  padding: 0.75rem 1.25rem !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.phyllux-brand,
a.phyllux-brand {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  color: #f5f1e8 !important;
  text-decoration: none !important;
  letter-spacing: 0.02em !important;
}

.phyllux-brand:hover {
  opacity: 0.9 !important;
}

/* === DESKTOP SIDEBAR (≥900px) === */

@media (min-width: 900px) {
  body.phyllux-has-sidebar {
    padding-left: 18rem !important;
  }

  body.phyllux-has-sidebar .phyllux-nav,
  body.phyllux-has-sidebar header.phyllux-nav {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 16rem !important;
    min-height: 100vh !important;
    border-bottom: none !important;
    border-right: 1px solid rgba(125, 138, 117, 0.25) !important;
    overflow-y: auto !important;
  }

  body.phyllux-has-sidebar .phyllux-nav nav {
    max-width: none !important;
    margin: 0 !important;
    min-height: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    padding: 1.25rem 1rem !important;
  }

  body.phyllux-has-sidebar .phyllux-brand,
  body.phyllux-has-sidebar a.phyllux-brand {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.25rem !important;
    color: #f5f1e8 !important;
  }

  body.phyllux-has-sidebar .phyllux-menu {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.phyllux-has-sidebar .phyllux-menu summary {
    display: none !important;
  }

  body.phyllux-has-sidebar .phyllux-links {
    position: static !important;
    display: block !important;
    margin-top: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.phyllux-has-sidebar .phyllux-nav-group {
    border-bottom: 1px solid rgba(125, 138, 117, 0.12) !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  body.phyllux-has-sidebar .phyllux-nav-group:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }

  body.phyllux-has-sidebar .phyllux-nav-label {
    padding: 4px 0.95rem 4px !important;
  }

  body.phyllux-has-sidebar .phyllux-links a {
    display: block !important;
    margin-bottom: 0.15rem !important;
    padding: 0.65rem 0.95rem !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #9aa890 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
  }

  body.phyllux-has-sidebar .phyllux-links a:hover,
  body.phyllux-has-sidebar .phyllux-links a.phyllux-current {
    border-color: rgba(212, 168, 75, 0.25) !important;
    background: rgba(212, 168, 75, 0.12) !important;
    color: #d4a84b !important;
  }

  body.phyllux-has-sidebar .phyllux-nav a[aria-current="page"],
  body.phyllux-has-sidebar .phyllux-nav a.phyllux-current {
    border-left: 3px solid #d4a84b !important;
    padding-left: calc(0.95rem - 3px) !important;
    margin-left: 0 !important;
    color: #d4a84b !important;
    font-weight: 600 !important;
  }
}
