/* ======================================================
   HEADER — 7422.by
====================================================== */

.header {
  padding: 16px 0;
  background: rgba(5, 7, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(30,136,229,0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 24px;
}

/* logo */

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1002;
  text-decoration: none;
}

.logo-img {
  max-width: 200px;
  max-height: 50px;
  display: block;
}

/* main nav */

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.nav-parent-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #cbd5e6;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-parent-link:hover {
  color: #2ecc71;
}

.nav-item {
  position: relative;
}

.nav-parent-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* submenu toggles */

.menu-toggle,
.submenu-toggle {
  display: none;
}

/* arrow */

.submenu-arrow {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.submenu-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #7f8794;
  border-bottom: 2px solid #7f8794;
  transform: rotate(45deg) translateY(-2px);
  transition: 0.2s ease;
}

.has-submenu:hover .submenu-arrow::before {
  border-color: #2ecc71;
  transform: rotate(225deg) translateY(-1px);
}

/* desktop dropdown */

.submenu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  min-width: 285px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(15, 18, 25, 0.98);
  border: 1px solid rgba(30,136,229,0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  transition: 0.22s ease;
  pointer-events: none;
  z-index: 1005;
}

.submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.submenu a {
  display: block;
  padding: 13px 14px;
  border-radius: 15px;
  text-decoration: none;
  color: #ffffff;
  transition: 0.2s ease;
}

.submenu a:hover,
.submenu a.active {
  background: rgba(46,204,113,0.1);
}

.submenu a span {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.submenu a small {
  display: block;
  color: #8f96a3;
  font-size: 12px;
  line-height: 1.35;
}

.submenu a:hover span,
.submenu a.active span {
  color: #2ecc71;
}

/* city selector */

.city-nav-item .submenu {
  min-width: 225px;
}

.nav-city-link {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(30,136,229,0.09);
  border: 1px solid rgba(30,136,229,0.18);
  color: #cbd5e6;
}

.nav-city-link:hover,
.nav-city-link.active {
  color: #ffffff;
  border-color: rgba(46,204,113,0.35);
  background: rgba(46,204,113,0.08);
}

.city-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46,204,113,0.12);
  flex-shrink: 0;
}

/* callback */

.callback-btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* burger */

.burger {
  display: none;
  width: 32px;
  height: 24px;
  cursor: pointer;
  position: relative;
  z-index: 1002;
  flex-shrink: 0;
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 10px;
  position: absolute;
  left: 0;
  transition: 0.25s ease;
}

.burger span:nth-child(1) {
  top: 0;
}

.burger span:nth-child(2) {
  top: 11px;
}

.burger span:nth-child(3) {
  bottom: 0;
}

/* ======================================================
   TABLET / MOBILE
====================================================== */

@media (max-width: 1100px) {
  .nav-links {
    gap: 18px;
  }

  .nav-link,
  .nav-parent-link {
    font-size: 14px;
  }

  .logo-img {
    max-width: 180px;
  }
}

@media (max-width: 940px) {
  .header {
    padding: 14px 0;
  }

  .burger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
    background: rgba(15, 18, 25, 0.99);
    border-bottom: 1px solid rgba(30,136,229,0.2);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1001;
  }

  .menu-toggle:checked ~ .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle:checked + .burger span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
  }

  .menu-toggle:checked + .burger span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked + .burger span:nth-child(3) {
    bottom: 11px;
    transform: rotate(-45deg);
  }

  .nav-link,
  .nav-parent-link {
    width: 100%;
    min-height: 48px;
    padding: 14px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    color: #ffffff;
    font-size: 15px;
  }

  .nav-link:hover,
  .nav-parent-link:hover {
    background: rgba(30,136,229,0.08);
    color: #ffffff;
  }

  .nav-item {
    width: 100%;
  }

  .nav-parent-row {
    display: grid;
    grid-template-columns: 1fr 48px;
    gap: 8px;
    width: 100%;
  }

  .submenu-arrow {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
  }

  .submenu-arrow::before {
    width: 8px;
    height: 8px;
    border-color: #9da1ab;
  }

  .submenu-toggle:checked ~ .nav-parent-row .submenu-arrow::before {
    border-color: #2ecc71;
    transform: rotate(225deg) translateY(-1px);
  }

  .submenu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.055);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: none;
  }

  .submenu::before {
    display: none;
  }

  .submenu-toggle:checked ~ .submenu {
    display: block;
  }

  .has-submenu:hover .submenu {
    transform: none;
  }

  .has-submenu:hover .submenu-arrow::before {
    transform: rotate(45deg) translateY(-2px);
  }

  .submenu-toggle:checked ~ .nav-parent-row .submenu-arrow::before {
    transform: rotate(225deg) translateY(-1px);
  }

  .submenu a {
    padding: 13px 12px;
    border-radius: 14px;
  }

  .submenu a:hover,
  .submenu a.active {
    background: rgba(46,204,113,0.08);
  }

  .nav-city-link {
    justify-content: flex-start;
    background: rgba(30,136,229,0.1);
    border-color: rgba(30,136,229,0.18);
  }

  .callback-btn {
    width: 100%;
    margin-top: 4px;
    padding: 14px 18px;
    border-radius: 50px;
  }
}

@media (max-width: 520px) {
  .logo-img {
    max-width: 160px;
  }

  .nav-links {
    top: 74px;
    max-height: calc(100vh - 74px);
  }
}

@media (max-width: 420px) {
  .header {
    padding: 13px 0;
  }

  .logo-img {
    max-width: 145px;
  }

  .nav-links {
    top: 69px;
    max-height: calc(100vh - 69px);
    padding: 14px;
  }

  .nav-link,
  .nav-parent-link {
    font-size: 14px;
  }
}