/* ============================================================
   NAV — sidebar nav bar, accordion sections + items
   ============================================================ */

/* ----------------------------------------------------------
   NAV BAR (tablet/mobile only)
   ---------------------------------------------------------- */

.nav-bar__logo-clip {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.nav-bar__logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.nav-bar__menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  height: 100%;
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-white);
  white-space: nowrap;
}

/* CSS-drawn + icon */
.nav-bar__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-bar__icon::before,
.nav-bar__icon::after {
  content: '';
  position: absolute;
  background: var(--color-white);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.nav-bar__icon::before { width: 10px; height: 1px; }
.nav-bar__icon::after  { width: 1px;  height: 10px; }

/* When drawer is open: + → − */
body.menu-open .nav-bar__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ----------------------------------------------------------
   SIDEBAR NAV
   ---------------------------------------------------------- */

.sidebar-nav {
  padding: 0 16px;
}

.sidebar-nav__inner {
  display: flex;
  flex-direction: column;
  padding-bottom: 6px;
}

/* ----------------------------------------------------------
   ACCORDION SECTION
   ---------------------------------------------------------- */

.nav-section {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-nav-border);
}

.nav-section__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  width: 100%;
  text-align: left;
  color: var(--color-nav-active);
}

.nav-section__label {
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: var(--text-nav-section);
  line-height: 1;
  letter-spacing: -0.6px;
}

/* CSS-drawn + / − accordion icon */
.nav-section__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-section__icon::before,
.nav-section__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-accordion) var(--ease-out),
              transform var(--dur-accordion) var(--ease-out);
}

.nav-section__icon::before { width: 10px; height: 1px; }
.nav-section__icon::after  { width: 1px;  height: 10px; }

/* Expanded: hide vertical bar (+ → −) */
.nav-section.is-expanded .nav-section__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ----------------------------------------------------------
   DROPDOWN — accordion height animation
   ---------------------------------------------------------- */

.nav-section__dropdown {
  height: 0;
  overflow: hidden;
  transition: height var(--dur-accordion) var(--ease-out);
}

.nav-section__items {
  display: flex;
  flex-direction: column;
  padding: 8px 0 24px 24px;
  gap: var(--sub-gap);
}

/* ----------------------------------------------------------
   NAV ITEMS
   ---------------------------------------------------------- */

.nav-item {
  display: block;
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: var(--text-nav-item);
  line-height: 1;
  letter-spacing: -0.64px;
  color: var(--color-nav-inactive);
  text-align: left;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-item.is-active {
  color: var(--color-nav-active);
}

.nav-item:hover {
  color: var(--color-nav-active);
}

/* ----------------------------------------------------------
   TABLET (441px – 999px)
   ---------------------------------------------------------- */

@media (max-width: 999px) {

  /* logo-tablet.svg is 164×56 — display at natural size, no clipping */
  .nav-bar__logo-clip {
    height: 56px;
    overflow: visible;
  }

  .nav-bar__logo {
    height: 56px;
    width: auto;
  }

  .nav-bar__menu {
    font-size: 18px;
    letter-spacing: -0.18px;
    gap: 4px;
  }
}

/* ----------------------------------------------------------
   MOBILE (≤ 440px)
   ---------------------------------------------------------- */

@media (max-width: 440px) {

  /* Mobile SVG (logo-mobile.svg) is already 162×56 — no clipping needed */
  .nav-bar__logo-clip {
    height: 56px;
    overflow: visible;
  }

  .nav-bar__logo {
    height: 56px;
    width: auto;
    display: block;
  }

  .nav-bar__menu {
    font-size: 18px;
    letter-spacing: -0.18px;
    gap: 4px;
    padding-right: 16px;
  }
}

/* ----------------------------------------------------------
   1920px
   ---------------------------------------------------------- */

@media (min-width: 1920px) {
  .nav-section__label {
    font-size: 28px;
    letter-spacing: -0.84px;
  }

  .nav-item {
    font-size: 24px;
    letter-spacing: -0.96px;
  }

  .nav-section__icon {
    width: 24px;
    height: 24px;
  }

  .nav-section__icon::before {
    width: 14px;
    height: 1.5px;
  }

  .nav-section__icon::after {
    width: 1.5px;
    height: 14px;
  }
}
