:root {
  --desktop-sidebar-width: clamp(300px, 15vw, 420px);
  --sidebar-background: #fbfbfb;
  --sidebar-text: #4d4d4d;
  --sidebar-muted: #70706d;
  --sidebar-accent: #9a7336;
  --sidebar-accent-soft: rgba(204, 161, 82, 0.12);
}

@media (min-width: 1025px) {
  body .sidebar {
    position: fixed;
    z-index: 5000;
    inset: 0 auto 0 0;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: var(--desktop-sidebar-width);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(1.25rem, 2.2vw, 2rem);
    border-right: 1px solid rgba(77, 77, 77, 0.24);
    background: var(--sidebar-background);
    box-shadow: 12px 0 32px rgba(60, 61, 55, 0.035);
    pointer-events: auto;
  }

  body .sidebar,
  body .sidebar * {
    box-sizing: border-box;
  }

  body .sidebar .logo-wrapper {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    margin: 0;
  }

  body .sidebar .logo-wrapper a {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
  }

  body .sidebar .logo-wrapper img {
    display: block;
    width: min(100%, 216px);
    height: auto;
  }

  body .sidebar .main-navigation {
    min-width: 0;
    min-height: 0;
    margin: clamp(1.25rem, 3.5vh, 3rem) 0 0;
    padding: 0 0.45rem 1rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(154, 115, 54, 0.45) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  body .sidebar .main-navigation::-webkit-scrollbar {
    width: 5px;
  }

  body .sidebar .main-navigation::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(154, 115, 54, 0.38);
  }

  body .sidebar .main-navigation::-webkit-scrollbar-track {
    background: transparent;
  }

  body .sidebar .main-navigation > ul {
    margin: 0;
    padding: 0;
  }

  body .sidebar .main-navigation li {
    min-width: 0;
    list-style: none;
  }

  body .sidebar .main-navigation > ul > li + li {
    margin-top: 0.15rem;
  }

  body .sidebar .main-link {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border-radius: 3px;
    color: var(--sidebar-text);
    font-size: clamp(1.08rem, 0.45vw + 0.86rem, 1.3rem);
    font-weight: 200;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition:
      color 0.18s ease,
      background-color 0.18s ease;
  }

  body .sidebar .main-link:hover {
    color: #3c3d37;
    background: var(--sidebar-accent-soft);
  }

  body .sidebar .main-link.current-page,
  body .sidebar .main-link[aria-current="page"] {
    color: #3c3d37;
    text-decoration-color: #cca152;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
  }

  body .sidebar .main-link img {
    width: 7px;
    height: 12px;
    flex: 0 0 auto;
    margin-inline-start: auto;
    transition: transform 0.18s ease;
  }

  body .sidebar .main-link[aria-expanded="true"] img {
    transform: rotate(90deg);
  }

  html[dir="rtl"] body .sidebar .main-link img {
    transform: rotate(180deg);
  }

  html[dir="rtl"] body .sidebar .main-link[aria-expanded="true"] img {
    transform: rotate(90deg);
  }

  body .sidebar .has-submenu {
    position: relative;
    overflow: visible;
  }

  body .sidebar .has-submenu > .submenu {
    display: none;
    max-height: none;
    flex-direction: column;
    gap: 0.12rem;
    margin: 0.1rem 0 0.55rem;
    padding: 0 0 0 0.65rem !important;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }

  html[dir="rtl"] body .sidebar .has-submenu > .submenu {
    padding: 0 0.65rem 0 0 !important;
  }

  body .sidebar .has-submenu.is-open > .submenu,
  body
    .sidebar
    .has-submenu
    > .main-link[aria-expanded="true"]
    + .submenu {
    display: flex;
  }

  body .sidebar .has-submenu > .submenu[hidden] {
    display: none !important;
  }

  html:not(.sidebar-menu-ready)
    body
    .sidebar
    .has-submenu:hover
    > .submenu,
  html:not(.sidebar-menu-ready)
    body
    .sidebar
    .has-submenu:focus-within
    > .submenu {
    display: flex;
  }

  body .sidebar .submenu a {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    padding: 0.45rem 0.65rem;
    border-inline-start: 1px solid rgba(154, 115, 54, 0.28);
    border-radius: 0 3px 3px 0;
    color: var(--sidebar-muted);
    font-size: clamp(0.94rem, 0.25vw + 0.82rem, 1.08rem);
    font-weight: 200;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition:
      color 0.18s ease,
      border-color 0.18s ease,
      background-color 0.18s ease;
  }

  html[dir="rtl"] body .sidebar .submenu a {
    border-radius: 3px 0 0 3px;
  }

  body .sidebar .submenu a:hover {
    border-inline-start-color: var(--sidebar-accent);
    color: #3c3d37;
    background: rgba(204, 161, 82, 0.1);
  }

  body .sidebar .main-link:focus-visible,
  body .sidebar .submenu a:focus-visible,
  body .sidebar .logo-wrapper a:focus-visible,
  body .sidebar .lang-trigger:focus-visible,
  body .sidebar .lang-list [role="option"]:focus-visible {
    outline: 2px solid var(--sidebar-accent);
    outline-offset: 2px;
  }

  body .sidebar .sidebar-footer {
    position: static;
    inset: auto;
    z-index: 3;
    flex: 0 0 auto;
    margin: 0;
    padding: 0.9rem 0 max(0rem, env(safe-area-inset-bottom));
    background: var(--sidebar-background);
  }

  body .sidebar .language-switch {
    position: relative;
    width: max-content;
  }

  body .sidebar .lang-trigger {
    min-width: 78px;
    min-height: 44px;
    justify-content: space-between;
    border-color: rgba(77, 77, 77, 0.24);
    color: var(--sidebar-text);
    background: var(--sidebar-background);
  }

  body .sidebar .lang-list {
    z-index: 20;
    min-width: 180px;
  }

  body .sidebar .lang-list[hidden] {
    display: none !important;
  }

  html[dir="rtl"] body .sidebar .lang-list {
    right: 0;
    left: auto;
    transform-origin: bottom right;
  }

  body .mobile-header,
  body .menu-mobile,
  body .menu-mobile-page {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (min-width: 1025px) and (max-height: 820px) {
  body .sidebar {
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }

  body .sidebar .logo-wrapper img {
    width: min(100%, 185px);
  }

  body .sidebar .main-navigation {
    margin-top: 0.8rem;
  }

  body .sidebar .main-link {
    min-height: 40px;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
  }

  body .sidebar .sidebar-footer {
    padding-top: 0.55rem;
  }
}

@media (max-width: 1024px) {
  body .sidebar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .sidebar .main-link,
  body .sidebar .main-link img,
  body .sidebar .submenu a,
  body .sidebar .lang-trigger,
  body .sidebar .lang-list,
  body .sidebar .chev {
    transition: none;
  }
}
