.nav__menu-tools {
  display: none;
}

.nav__control-online__ip {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav__control-online__ip--phone {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
}

.hero-card__actions,
.home-tabs__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.hero-card__cta,
.hero-card__shop {
  width: 100%;
  min-height: 64px;
}

.hero-card__shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  white-space: nowrap;
}

.nav__control-item.nav__control-online {
  height: auto;
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.hero-server-widget {
  cursor: default;
}

.hero-server-widget:active {
  transform: none;
}

.hero-server-widget__action {
  display: none;
}

@media screen and (max-width: 1245px) {
  .nav {
    padding: 12px 0;
  }

  .nav ._container {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .nav__logo {
    min-width: 0;
  }

  .nav__logo img {
    max-height: 40px;
    max-width: min(168px, 46vw);
  }

  .nav__list {
    display: none !important;
  }

  .nav__control {
    display: flex !important;
    margin-left: auto;
    gap: 8px;
    flex-shrink: 0;
  }

  .nav__control-theme {
    display: flex !important;
  }

  .nav__control-burger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-left: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    overflow: visible;
  }

  .nav__control-burger__line {
    width: 22px;
    height: 3px;
    background-color: #E8C547;
  }

  .nav.active {
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    background-color: var(--surface);
    overflow: hidden;
  }

  .nav.active::before {
    display: none;
    padding-bottom: 0;
  }

  .nav.active ._container {
    display: flex !important;
    height: 100%;
    max-height: 100%;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.active .nav__logo {
    flex-shrink: 0;
    max-width: calc(100% - 64px);
  }

  .nav.active .nav__control {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 10px;
    z-index: 3;
    margin-left: 0;
    gap: 0;
  }

  .nav.active .nav__control-online,
  .nav.active .nav__control-theme,
  .nav.active .nav__control-social {
    display: none !important;
  }

  .nav.active .nav__control-burger {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 0;
  }

  .nav.active .nav__list {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 400px;
    margin: 8px auto 0;
    gap: 8px;
  }

  .nav.active .nav__list-item,
  .nav.active .nav__list-itemACT {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    min-height: 48px;
    padding: 12px 16px;
    text-align: center;
    white-space: normal;
    box-sizing: border-box;
  }

  .nav.active .nav__menu-tools {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0;
    padding-top: 0;
    min-width: 0;
    box-sizing: border-box;
  }

  .nav__menu-online {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    background: var(--surface);
    min-width: 0;
    box-sizing: border-box;
  }

  .nav__menu-online__label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .nav__menu-online__ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.08);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
  }

  .nav__menu-online__ip span {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
  }

  .nav__menu-online__ip strong {
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .nav__menu-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .nav__menu-social {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav__menu-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #1A1408;
  }

  .nav__menu-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
}

@media screen and (max-width: 1100px) {
  .nav__control-social {
    display: none;
  }
}

@media screen and (max-width: 800px) {
  .hero-card__actions,
  .home-tabs__actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .hero-card__cta,
  .hero-card__shop {
    max-width: none;
    width: 100%;
  }

  .hero-card__cta {
    align-items: flex-start;
    text-align: left;
  }

  .hero-card {
    text-align: left;
  }
}

@media screen and (max-width: 640px) {
  .home-tabs__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    flex-wrap: unset;
    justify-content: stretch;
    padding-bottom: 4px;
  }

  .home-tabs__nav-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 12px 10px;
    min-height: 48px;
  }

  .news {
    padding-top: 84px;
    margin-bottom: 48px;
  }

  .hero-card {
    padding: 24px 16px;
    gap: 24px;
  }

  .hero-card__title {
    font-size: 28px;
    line-height: 1.15;
    word-break: break-word;
  }

  .footer__copyright-text {
    padding: 0 8px;
    font-size: 13px;
  }
}

body.theme-dark .nav__menu-theme,
body.theme-dark .nav__menu-online {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 248, 230, 0.92);
}

body.theme-dark .nav__menu-online__ip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 230, 0.92);
}

body.theme-dark .hero-card__cta--phone {
  box-shadow: none;
}
