/* ==========================================================================
   NACS Show 2026 - Navigation
   Desktop + Mobile navigation per Figma design system
   ========================================================================== */

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
.ns-header {
    position: relative;
    z-index: 100;
    width: 100%;
}

.ns-header *,
.ns-header *::before,
.ns-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   TOP UTILITY BAR (Desktop only)
   -------------------------------------------------------------------------- */
.ns-topbar {
    background-color: var(--nacs-color-blue);
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--nacs-margin-desktop);
}

.ns-topbar__inner {
    display: flex;
    align-items: center;
    gap: var(--nacs-spacing-xxl);
}

.ns-topbar__links {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
}

.ns-topbar__links a {
    font-family: var(--nacs-font-gotham);
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: var(--nacs-color-white);
    text-decoration: none;
    letter-spacing: 0;
    transition: opacity 0.2s ease;
}

.ns-topbar__links a:hover {
    opacity: 0.8;
}

.ns-topbar__divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.ns-topbar__login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 40px;
    border-radius: 360px;
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: var(--nacs-color-white);
    transition: opacity 0.2s ease;
}

.ns-topbar__user-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ns-topbar__user-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.ns-topbar__user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background-color: var(--nacs-color-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 250;
    padding: 16px 0;
}

.ns-topbar__user-wrapper:hover .ns-topbar__user-dropdown,
.ns-topbar__user-wrapper:focus-within .ns-topbar__user-dropdown {
    display: block;
}

.ns-topbar__user-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ns-topbar__user-links li a,
.ns-topbar__user-links li button {
    display: block;
    width: 100%;
    padding: 10px 24px;
    font-family: var(--nacs-font-gotham);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--nacs-color-navy);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ns-topbar__user-links li a:hover,
.ns-topbar__user-links li button:hover {
    color: var(--nacs-color-cyan);
}

.ns-topbar__logout-form {
    margin: 0;
}

.ns-topbar__login:hover {
    opacity: 0.85;
}

.ns-topbar__login svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.ns-topbar__login span {
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--nacs-color-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   MAIN NAVIGATION BAR
   -------------------------------------------------------------------------- */
.ns-navbar {
    background-color: var(--nacs-color-white);
    border-bottom: 1px solid #F1F1F1;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    position: relative;
}

.ns-navbar__inner {
    display: flex;
    align-items: center;
    gap: var(--nacs-padding-32);
    /*max-width: 1280px;*/
    max-width: 1400px; /*BSM: to accomdate larger logo*/
    margin: 0 auto;
    padding: var(--nacs-padding-24) var(--nacs-margin-desktop);
}

/* Logo */
.ns-navbar__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

    .ns-navbar__logo img {
        width: auto;
        /*height: 64px;*/
        max-height: 64px; /* BSM: Adjusted to ensure it scales down on smaller screens while maintaining aspect ratio*/
        display: block;
    }

/* --------------------------------------------------------------------------
   DESKTOP TABS
   -------------------------------------------------------------------------- */
.ns-navbar__tabs {
    display: flex;
    flex: 1;
    align-items: center;
}

.ns-navbar__tab-wrapper {
    flex: 1;
    position: relative;
}

.ns-navbar__tab {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding-top: 10px;
   /* padding-left: 24px;
    padding-right: 24px;*/
    padding-left:18px;
    padding-right:18px;
    background: none;
    border: none;
    border-bottom: 2px solid var(--nacs-color-cyan);
    cursor: pointer;
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--nacs-color-grey-dark);
    opacity: 0.5;
    white-space: nowrap;
    transition: opacity 0.2s ease, border-bottom-width 0.15s ease, color 0.2s ease;
}

.ns-navbar__tab:hover,
.ns-navbar__tab--active {
    opacity: 1;
    color: var(--nacs-color-blue);
    border-bottom-width: 8px;
}

/* --------------------------------------------------------------------------
   DESKTOP ACTIONS (search + register)
   -------------------------------------------------------------------------- */
.ns-navbar__actions {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-shrink: 0;
}

.ns-navbar__search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ns-navbar__search-btn svg {
    width: 24px;
    height: 24px;
    color: var(--nacs-color-blue);
}

.ns-navbar__register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    padding: 0 24px;
    background-color: var(--nacs-color-yellow);
    border-radius: 360px;
    text-decoration: none;
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--nacs-color-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.ns-navbar__register:hover {
    filter: brightness(1.05);
}

.ns-navbar__register svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Mobile hamburger toggle - hidden on desktop */
.ns-navbar__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ns-navbar__toggle svg {
    width: 24px;
    height: 24px;
}

/* --------------------------------------------------------------------------
   DESKTOP DROPDOWN
   -------------------------------------------------------------------------- */
.ns-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 294px;
    background-color: var(--nacs-color-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 200;
    overflow: hidden;
}

.ns-dropdown--visible {
    display: block;
}

.ns-dropdown__inner {
    padding: 32px;
}

.ns-dropdown__desc {
    font-family: var(--nacs-font-gotham);
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--nacs-color-navy);
    margin-bottom: 0;
}

.ns-dropdown__divider {
    border: none;
    border-top: 1px solid var(--nacs-color-cyan);
    margin: 32px 0 0;
}

.ns-dropdown__links {
    list-style: none;
    padding: 0;
    margin: 38px 0 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ns-dropdown__links li a {
    font-family: var(--nacs-font-gotham);
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--nacs-color-navy);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ns-dropdown__links li a:hover {
    color: var(--nacs-color-cyan);
}

/* --------------------------------------------------------------------------
   DESKTOP SEARCH BAR (shown when search icon clicked)
   -------------------------------------------------------------------------- */
.ns-desktop-search {
    display: none;
    background-color: var(--nacs-color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 56px 80px;
}

.ns-desktop-search--visible {
    display: block;
}

.ns-desktop-search__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.ns-desktop-search__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.ns-desktop-search__input-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.ns-desktop-search__input-group svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--nacs-color-grey-dark);
}

.ns-desktop-search__divider {
    width: 1px;
    height: 46px;
    background-color: var(--nacs-color-cyan);
    flex-shrink: 0;
}

.ns-desktop-search__input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 32px;
    line-height: 40px;
    color: var(--nacs-color-cyan);
    background: transparent;
    text-transform: capitalize;
}

.ns-desktop-search__input-group input::placeholder {
    color: var(--nacs-color-cyan);
    text-transform: capitalize;
}

.ns-desktop-search__actions {
    display: flex;
    align-items: center;
}

.ns-desktop-search__submit {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--nacs-color-cyan);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.ns-desktop-search__submit:hover {
    filter: brightness(1.1);
}

.ns-desktop-search__submit svg {
    width: 24px;
    height: 24px;
    color: var(--nacs-color-white);
}

.ns-desktop-search__close {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.ns-desktop-search__close svg {
    width: 27px;
    height: 27px;
    color: var(--nacs-color-cyan);
}

.ns-desktop-search__line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--nacs-color-cyan) 0%, transparent 100%);
}

/* Hide desktop search on mobile */
@media screen and (max-width: 959px) {
    .ns-desktop-search {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   MOBILE SEARCH BAR (shown below nav on mobile default view)
   -------------------------------------------------------------------------- */
.ns-mobile-search {
    display: none;
    background-color: var(--nacs-color-white);
    padding: 40px 20px;
}

.ns-mobile-search__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ns-mobile-search__input {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.ns-mobile-search__input svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--nacs-color-grey-dark);
}

.ns-mobile-search__divider {
    width: 1px;
    height: 46px;
    background-color: var(--nacs-color-cyan);
    flex-shrink: 0;
}

.ns-mobile-search__input input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 24px;
    line-height: 32px;
    color: var(--nacs-color-cyan);
    background: transparent;
}

.ns-mobile-search__input input::placeholder {
    color: var(--nacs-color-cyan);
    text-transform: capitalize;
}

.ns-mobile-search__submit {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: none;
    border: 2px solid var(--nacs-color-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ns-mobile-search__submit svg {
    width: 12px;
    height: 12px;
    color: var(--nacs-color-cyan);
}

.ns-mobile-search__line {
    height: 1px;
    background: linear-gradient(90deg, var(--nacs-color-cyan) 0%, transparent 100%);
    margin-top: 15px;
}

/* --------------------------------------------------------------------------
   MOBILE MENU OVERLAY
   -------------------------------------------------------------------------- */
.ns-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--nacs-color-white);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
}

.ns-mobile-menu--open {
    display: flex;
}

/* Mobile Menu Header */
.ns-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    background-color: var(--nacs-color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.ns-mobile-menu__header-logo img {
    width: auto;
    height: 40px;
    max-width: 100%;
    display: block;
}

.ns-mobile-menu__header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ns-mobile-menu__header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ns-mobile-menu__header-search svg {
    width: 24px;
    height: 24px;
    color: var(--nacs-color-navy);
}

.ns-mobile-menu__header-close svg {
    width: 32px;
    height: 32px;
    color: var(--nacs-color-navy);
}

/* Mobile Menu Body */
.ns-mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Mobile Auth Buttons */
.ns-mobile-menu__auth {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 20px 24px;
    border-bottom: 1px solid var(--nacs-color-cyan);
}

.ns-mobile-menu__login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border: 2px solid var(--nacs-color-yellow);
    border-radius: 360px;
    background: none;
    text-decoration: none;
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: var(--nacs-color-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ns-mobile-menu__login-btn svg {
    width: 24px;
    height: 24px;
}

.ns-mobile-menu__register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    background-color: var(--nacs-color-yellow);
    border-radius: 360px;
    border: none;
    text-decoration: none;
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: var(--nacs-color-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ns-mobile-menu__register-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu Panels Container */
.ns-mobile-menu__panels {
    position: relative;
    min-height: 300px;
}

/* Main Panel (top-level items) */
.ns-mobile-menu__main {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease;
}

.ns-mobile-menu__main--hidden {
    transform: translateX(-100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.ns-mobile-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    height: 48px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.ns-mobile-menu__item-title {
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    color: var(--nacs-color-navy);
}

.ns-mobile-menu__item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--nacs-color-cyan);
}

/* Sub Panel (sub-level items for selected category) */
.ns-mobile-menu__sub {
    padding: 40px 20px;
    display: none;
    flex-direction: column;
    gap: 40px;
    transition: transform 0.3s ease;
}

.ns-mobile-menu__sub--visible {
    display: flex;
}

.ns-mobile-menu__back {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    height: 48px;
    cursor: pointer;
    border: none;
    background: none;
}

.ns-mobile-menu__back svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--nacs-color-cyan);
}

.ns-mobile-menu__back-title {
    font-family: var(--nacs-font-gotham);
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    color: var(--nacs-color-navy);
}

.ns-mobile-menu__sub-desc {
    font-family: var(--nacs-font-gotham);
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    color: var(--nacs-color-navy);
    padding-bottom: 32px;
    border-bottom: 1px solid var(--nacs-color-cyan);
}

.ns-mobile-menu__sub-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ns-mobile-menu__sub-links li a {
    font-family: var(--nacs-font-gotham);
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    color: var(--nacs-color-navy);
    text-decoration: none;
}

.ns-mobile-menu__sub-links li a:hover {
    color: var(--nacs-color-cyan);
}

/* Mobile Bottom Utility Bar */
.ns-mobile-menu__bottombar {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 12px 20px;
    background-color: var(--nacs-color-cyan);
    flex-shrink: 0;
    overflow-x: auto;
}

.ns-mobile-menu__bottombar a {
    font-family: var(--nacs-font-gotham);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--nacs-color-white);
    text-decoration: none;
    white-space: nowrap;
}

.ns-mobile-menu__bottombar-divider {
    width: 1px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   RESPONSIVE - MOBILE (< 960px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 959px) {
    /* Hide desktop-only elements */
    .ns-topbar {
        display: none;
    }

    .ns-navbar__tabs {
        display: none;
    }

    .ns-navbar__actions {
        display: none;
    }

    /* Show mobile toggle */
    .ns-navbar__toggle {
        display: flex;
    }

    /* Adjust navbar for mobile */
    .ns-navbar__inner {
        padding: 24px 20px;
        gap: 0;
        justify-content: space-between;
        max-width: none;
    }

    .ns-navbar__logo img {
        width: auto;
        height: auto;
        max-width: 60vw;
    }

    /* Show mobile search bar */
    .ns-mobile-search {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - LARGE DESKTOP (> 1440px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1441px) {
    .ns-topbar {
        padding: 0 calc((100% - 1280px) / 2);
    }

    .ns-navbar__inner {
        padding-left: 0;
        padding-right: 0;
    }
}

/* --------------------------------------------------------------------------
   RESPONSIVE - TABLET ADJUSTMENTS (960px - 1200px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 960px) and (max-width: 1200px) {
    .ns-navbar__inner {
        padding: 20px 40px;
        gap: 20px;
    }

    .ns-navbar__logo img {
        width: 220px;
        height: auto;
    }

    .ns-navbar__tab {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 14px;
    }

    .ns-navbar__actions {
        gap: 20px;
    }

    .ns-navbar__register {
        height: 48px;
        padding: 0 20px;
        font-size: 14px;
    }
}
