/* ================================================
   Shadcn-style navbar — built on UIkit components
   ================================================ */

/* Container */
#uk-navbar-wrap {
    background: transparent;
    border: none;
    padding: 0;
}

/* ── Desktop nav items ── */
.nav-wrap .uk-navbar-nav > li > a {
    height: auto;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #71717a;
    border-radius: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
    display: inline-flex;
    align-items: center;
}

.nav-wrap .uk-navbar-nav > li > a:hover,
.nav-wrap .uk-navbar-nav > li.uk-open > a {
    background-color: #f4f4f5;
    color: #09090b;
}

/* ── Dropdown panel (shadcn popover style) ── */
/* display:none in LOCAL css prevents the FOUC on desktop: before UIkit CDN CSS arrives, dropdown
   divs would otherwise render as static block elements full of list content, making the header tall.
   visibility:hidden is layered on top for the brief window when UIkit sets display:block to measure
   dimensions during init — hidden elements are still measurable so UIkit can position correctly. */
.nav-wrap .uk-navbar-dropdown {
    display: none;
    visibility: hidden;
    pointer-events: none;
    background-color: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    padding: 0.25rem;
    min-width: 10rem;
    margin-top: 4px;
}

/* Cover both patterns UIkit uses: uk-open on parent <li>, or uk-open on the dropdown itself.
   Both selectors have higher specificity (0-3-0 / 0-3-1) than the hidden rule (0-2-0). */
.nav-wrap li.uk-open > .uk-navbar-dropdown,
.nav-wrap .uk-navbar-dropdown.uk-open {
    display: block;
    visibility: visible;
    pointer-events: auto;
}

/* ── Dropdown items ── */
.nav-wrap .uk-navbar-dropdown-nav > li > a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #09090b;
    padding: 0.375rem 0.625rem;
    border-radius: 0;
    transition: background-color 0.1s ease;
    line-height: 1.4;
    display: block;
}

.nav-wrap .uk-navbar-dropdown-nav > li > a:hover {
    background-color: #f4f4f5;
    color: #09090b;
}

.nav-wrap .uk-navbar-dropdown-nav > li:not(:last-child) {
    margin-bottom: 1px;
}

/* ── Ensure header sits above Revolution Slider ── */
/* translateZ(0) in style.css makes position:fixed children relative to .header-wrap instead of the viewport,
   trapping UIkit's offcanvas inside the navbar height. Clear it so the offcanvas covers the full screen. */
.header-wrap {
    position: relative;
    z-index: 9999;
    transform: none !important;
    -webkit-transform: none !important;
}

.nav-mobile-toggle {
    position: relative;
    z-index: 9999;
}

/* ── Vertically center logo and nav columns ── */
.header-wrap .row {
    display: flex;
    align-items: center;
}

/* ── Nav-wrap row layout: navbar + search on same line ── */
.header-wrap .nav-wrap {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    padding-top: 0;
    padding-bottom: 0;
}

.header-wrap .nav-wrap #uk-navbar-wrap {
    flex: 1;
    min-width: 0;
}


/* Pre-hide offcanvas before UIkit JS adds .uk-offcanvas class and sets display:none.
   Without this, the div renders as a block with full nav list content, making the
   flex row in .nav-wrap briefly as tall as the entire menu. UIkit overrides this
   via inline style or .uk-offcanvas.uk-open when the menu actually opens. */
[uk-offcanvas] { display: none; }

/* ── Mobile toggle button ── */
.nav-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid #e4e4e7;
    border-radius: 0;
    padding: 5px 10px;
    cursor: pointer;
    color: #3b3d42;
    font-size: 1rem;
    line-height: 1;
    margin-left: auto;
}

/* ── Mobile offcanvas drawer ── */
.uk-offcanvas-bar {
    background-color: #ffffff !important;
    color: #09090b !important;
    padding: 1.5rem 1.25rem !important;
    width: 270px !important;
}

.uk-offcanvas-close {
    color: #3b3d42 !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
}

#mobile-nav .uk-nav-default > li > a {
    color: #09090b;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.25rem;
    border-radius: 0;
    transition: background-color 0.1s ease, padding-left 0.1s ease;
}

#mobile-nav .uk-nav-default > li > a:hover {
    background-color: #f4f4f5;
    padding-left: 0.5rem;
}

#mobile-nav .uk-nav-sub {
    padding-left: 0.75rem;
    border-left: 2px solid #f4f4f5;
    margin-left: 0.25rem;
}

#mobile-nav .uk-nav-sub > li > a {
    color: #71717a;
    font-size: 0.8125rem;
    padding: 0.375rem 0.25rem;
}

#mobile-nav .uk-nav-sub > li > a:hover {
    color: #09090b;
}

#mobile-nav .uk-nav-parent-icon {
    color: #71717a;
    margin-left: auto;
}

/* ── Responsive breakpoint (UIkit @m = 960px) ── */
@media (max-width: 959px) {
    .nav-mobile-toggle {
        display: inline-block;
    }
    .header-wrap .nav-wrap #uk-navbar-wrap {
        display: none !important;
        flex: none;
    }
}
