/* =============================================
   HARECROFT CONSULTANTS — NAVIGATION STYLES
   Mobile-first. Drawer on mobile, dropdowns on desktop.
   ============================================= */

/* ── NAV WRAPPER ── */
.site-nav {
    background: var(--navy);
    border-bottom: 4px solid var(--orange);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.22);
    position: sticky;
    top: 0;
    z-index: 500;
}

/* WordPress admin bar offsets */
/* Below 600px the admin bar is position:absolute (scrolls with page) — no offset needed.
   600px–782px: admin bar is fixed at 46px height.
   783px+:      admin bar is fixed at 32px height.
   Breakpoint changed to 600px in WordPress 6.4. */
.admin-bar .site-nav {
    top: 0;
}

@media screen and (min-width: 600px) {
    .admin-bar .site-nav {
        top: 46px;
    }
}

@media screen and (min-width: 783px) {
    .admin-bar .site-nav {
        top: 32px;
    }
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 16px;
}

/* ── LOGO ── */
.site-nav__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.site-nav__logo-badge {
    background: var(--white);
    border-radius: 10px;
    padding: 4px 7px;
    height: 52px;
    width: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    overflow: hidden;
}

.site-nav__logo-badge img {
    height: 52px;
    width: auto;
    object-fit: contain;
    object-position: center top;
    margin-top: 1px;
}

.site-nav__logo-text {
    line-height: 1.25;
}

.site-nav__logo-name {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    display: block;
    letter-spacing: -0.2px;
}

.site-nav__logo-tag {
    font-family: var(--font-body);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* ── DESKTOP LINKS — hidden on mobile ── */
.site-nav__desktop {
    display: none;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

/* Kill any rogue list markers from WP nav output */
.site-nav__desktop li,
.site-nav__desktop ul,
.nav-dropdown li,
.nav-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding: 9px 13px;
    border-radius: 6px;
    transition: all var(--tr);
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.nav-link.current-menu-item {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link--cta {
    background: var(--orange) !important;
    color: var(--white) !important;
    border-radius: 40px !important;
    margin-left: 6px;
    padding: 9px 20px !important;
    font-weight: 600 !important;
}

.nav-link--cta:hover {
    background: var(--orange-dk) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(242, 140, 56, 0.35) !important;
}

/* Dropdown chevron */
.nav-link__chevron {
    width: 14px;
    height: 14px;
    transition: transform var(--tr);
    flex-shrink: 0;
}

.nav-item:hover .nav-link__chevron,
.nav-item.open .nav-link__chevron {
    transform: rotate(180deg);
}

/* Dropdown menu */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--light);
    border-top: 3px solid var(--orange);
    padding: 6px 0;
    z-index: 600;
}

.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown {
    display: block;
    animation: dropdownIn 0.18s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown a {
    display: block;
    padding: 10px 18px;
    font-family: var(--font-head);
    font-size: 13px;
    color: var(--body-col);
    transition: all var(--tr);
    text-decoration: none;
}

.nav-dropdown a:hover {
    background: var(--off-white);
    color: var(--navy);
    padding-left: 22px;
}

.nav-dropdown a[aria-current="page"] {
    color: var(--orange);
    font-weight: 600;
}

/* ── HAMBURGER BUTTON — mobile only ── */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--tr);
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Open state — animate to X */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE DRAWER ── */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--navy-deep);
    z-index: 9000;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--orange);
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.nav-drawer__brand {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.nav-drawer__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--white);
    transition: background var(--tr);
}

.nav-drawer__close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.nav-drawer__links {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--tr);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
}

.drawer-link:hover,
.drawer-link[aria-current="page"] {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    padding-left: 24px;
}

.drawer-link[aria-current="page"] {
    color: var(--orange);
    border-left: 3px solid var(--orange);
    padding-left: 17px;
}

.drawer-link__chevron {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform var(--tr);
    flex-shrink: 0;
}

.drawer-link.sub-open .drawer-link__chevron {
    transform: rotate(180deg);
}

/* Drawer sub-menu (accordion) */
.drawer-sub {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.drawer-sub.open {
    display: block;
}

.drawer-sub a {
    display: block;
    padding: 12px 20px 12px 36px;
    font-family: var(--font-head);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all var(--tr);
    text-decoration: none;
}

.drawer-sub a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.nav-drawer__footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.nav-drawer__cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    border-radius: 40px;
    text-decoration: none;
    transition: background var(--tr);
    border: none;
    cursor: pointer;
}

.nav-drawer__cta:hover {
    background: var(--orange-dk);
}

/* ── DRAWER OVERLAY ── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 8999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
}

.nav-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── RESPONSIVE BREAKPOINTS ── */
@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .site-nav__desktop {
        display: flex;
    }

    .site-nav__inner {
        height: 74px;
    }
}

@media (min-width: 1024px) {
    .site-nav__inner {
        height: 78px;
    }

    .site-nav__logo-name {
        font-size: 16px;
    }
}
