/*--------------------------------------------------------------
# Header customization (local override)
# Loaded after the external theme CSS so these rules win.
# Scope: header only (#header / .header / .navmenu), nothing else.
--------------------------------------------------------------*/

/* Sticky + glass/crystal background, stays visible on scroll.
   The blur/background lives on ::before (not on .header itself) so that
   .header does NOT become a containing block for its fixed-position
   descendants (the mobile nav overlay) - backdrop-filter/transform on an
   ancestor would otherwise break position:fixed children on mobile. */
.header {
  position: sticky !important;
  top: 0 !important;
  z-index: 997 !important;
  background-color: transparent !important;
  padding: 10px 0 !important;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.scrolled .header::before {
  background-color: rgba(255, 255, 255, 0.85);
}

/* Logo + site name */
.header .logo {
  text-decoration: none;
  gap: 12px;
}

.header .logo img {
  max-height: 70px !important;
  width: auto;
  margin-right: 0 !important;
}

.header .logo .sitename {
  font-size: 26px;
  margin: 0;
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  transition: color 0.3s;
}

.header .logo:hover .sitename {
  color: #9c7c4d !important;
  text-decoration: none;
}

/* Nav links hover - no underline, accent color #9c7c4d */
.navmenu a,
.navmenu a:focus {
  text-decoration: none;
}

.navmenu a:hover,
.navmenu li:hover > a,
.navmenu .active,
.navmenu .active:focus {
  color: #9c7c4d !important;
  text-decoration: none !important;
}

/* Dropdown items hover */
.navmenu .dropdown ul a:hover,
.navmenu .dropdown ul .active:hover,
.navmenu .dropdown ul li:hover > a {
  color: #9c7c4d !important;
  text-decoration: none !important;
}

/* Consistent icon + text alignment for every dropdown item, regardless
   of whether an item happens to have an icon or not */
.navmenu .dropdown ul a {
  justify-content: flex-start !important;
  gap: 10px;
}

.navmenu .dropdown ul a i,
.navmenu .dropdown ul a img {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  margin-left: 0 !important;
}

.navmenu .dropdown ul a .text {
  flex: 1;
}

/* Right-align the user/admin dropdown so it isn't clipped
   off the right edge of the viewport on laptop-sized screens */
@media (min-width: 1200px) {
  .navmenu .user-dropdown {
    position: relative;
  }

  .navmenu .user-dropdown > ul {
    left: auto !important;
    right: 0 !important;
  }
}

/* Mobile / tablet nav overlay must stay anchored to the real viewport,
   not to .header (which is now position:sticky). Only the top-level
   menu (direct child of .navmenu) needs this - NOT nested dropdown
   submenus, which must keep their normal in-flow position:static so
   they render as a submenu instead of a second full-screen overlay. */
@media (max-width: 1199px) {
  .navmenu > ul {
    position: fixed !important;
  }

  .navmenu .dropdown ul {
    position: static !important;
  }
}
