/* Home / public header — mobile drawer polish */
.nav__actions {
  display: none;
}

.header-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(15, 40, 34, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.header-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.header {
  z-index: 40;
}

.menu {
  position: relative;
  z-index: 2;
  display: none;
  border: 1px solid transparent;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu:hover,
.menu:focus-visible {
  background: #f3f8f6;
  border-color: var(--line, #dfe9e5);
  outline: none;
}

.menu i {
  display: block;
  width: 20px;
  height: 2px;
  margin: 2.5px 0;
  background: var(--dark, #132c27);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu.is-open i:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu.is-open i:nth-child(2) {
  opacity: 0;
}

.menu.is-open i:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 950px) {
  .menu {
    display: inline-flex;
    margin-inline-start: auto;
    order: 2;
  }

  .header__actions {
    order: 3;
    gap: 6px;
  }

  .header__auth {
    display: none;
  }

  .header__actions .btn {
    display: none;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-h, 68px) + 8px);
    right: 12px;
    left: 12px;
    z-index: 41;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: min(78vh, calc(100dvh - 96px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line, #dfe9e5);
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(17, 61, 50, 0.18);
  }

  .nav.is-open {
    display: flex;
    animation: headerDrawerIn 0.2s ease;
  }

  .nav > a,
  .nav .mega-trigger {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1d2f2b;
  }

  .nav > a:hover,
  .nav .mega-trigger:hover {
    background: #f4f9f7;
    color: var(--green, #00845a);
  }

  .nav > a::after {
    display: none;
  }

  .nav__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line, #dfe9e5);
  }

  .nav__actions .site-menu__logout {
    display: contents;
  }

  .nav__actions .btn,
  .nav__actions a.btn,
  .nav__actions button.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
  }

  .nav__actions .btn--ghost {
    background: #fff;
    color: #172725;
    border: 1px solid var(--line, #dfe9e5) !important;
  }

  .nav__actions .btn--primary {
    background: var(--green, #00845a);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 132, 90, 0.22);
  }

  .header {
    --header-h: 68px;
    height: var(--header-h);
  }

  .header.is-scrolled {
    height: var(--header-h);
  }

  .header__inner {
    gap: 8px;
  }

  .lang {
    min-width: 40px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  .nav__actions {
    grid-template-columns: 1fr;
  }
}

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

@media (min-width: 951px) {
  .header-backdrop {
    display: none !important;
  }

  .nav__actions {
    display: none !important;
  }

  .header__auth {
    display: contents;
  }
}
