.menu-toggle {
  display: none;
}

@media (max-width: 1050px) {
  html {
    scroll-padding-top: 82px;
  }

  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    height: auto;
    padding: 10px 5%;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #565957;
    border-radius: 12px;
    background: #222423;
    color: #f4f4ee;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .menu-toggle[aria-expanded="true"] {
    border-color: var(--red);
  }

  .menu-icon {
    position: relative;
    width: 16px;
    height: 12px;
    border-block: 2px solid currentColor;
  }

  .menu-icon::before,
  .menu-icon::after {
    position: absolute;
    inset: 3px 0 auto;
    height: 2px;
    background: currentColor;
    content: '';
  }

  .menu-toggle[aria-expanded="true"] .menu-icon {
    border-color: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-icon::before {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-icon::after {
    transform: rotate(-45deg);
  }

  header nav {
    position: absolute;
    inset: calc(100% + 8px) 5% auto;
    display: grid;
    gap: 4px;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border: 1px solid #424542;
    border-radius: 18px;
    background: #1b1d1c;
    box-shadow: 0 16px 36px #0009;
    font-size: 16px;
  }

  .menu-toggle[aria-expanded="false"] + nav {
    display: none;
  }

  header nav > a,
  .nav-dropdown summary,
  .nav-dropdown a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 9px;
  }

  .nav-dropdown summary {
    justify-content: space-between;
  }

  .nav-dropdown summary::-webkit-details-marker {
    display: none;
  }

  .nav-dropdown summary::after {
    content: '+';
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
  }

  .nav-dropdown[open] summary::after {
    content: '−';
  }

  .nav-dropdown[open],
  header nav a[aria-current="location"] {
    border-radius: 9px;
    background: #2a2c2b;
  }

  header nav .nav-dropdown div {
    position: static;
    margin: 0 10px 8px 16px;
    padding: 0 0 0 6px;
    border: 0;
    border-left: 2px solid var(--red);
    border-radius: 0;
    background: transparent;
    white-space: normal;
  }

  header nav .language-picker {
    display: flex;
    gap: 6px;
    padding: 8px 2px 0;
    border-top: 1px solid var(--line);
  }

  .language-picker span {
    display: none;
  }

  .language-picker a {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    border-radius: 9px;
    font-size: 14px;
  }

  header nav .language-picker a[aria-current="page"] {
    background: #303331;
    text-decoration: none;
  }
}

header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-photo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #777;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.header-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.header-social a:hover,
.header-social a:focus-visible {
  background: #303331;
}

@media (max-width: 1050px) {
  .header-social {
    margin-inline-start: auto;
  }
}

@media (max-width: 420px) {
  header {
    gap: 2px;
    padding-inline: 3%;
  }

  header .brand {
    gap: 6px;
    font-size: 15px;
  }

  .brand span {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .brand-photo {
    width: 35px;
    height: 35px;
  }

  .menu-toggle {
    padding-inline: 8px;
    gap: 5px;
  }
}
