* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow-x: hidden;
}

.ts-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e8edf5;
  box-shadow: 0 4px 18px rgba(19, 45, 89, 0.05);
  padding: 6px 0;
}

.ts-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ts-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding-top: 4px;
}

.ts-logo img {
  display: block;
  height: 58px;
  width: auto;
  max-width: 100%;
}

.ts-nav {
  flex: 1;
  max-width: 980px;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Плитки меню */
.ts-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;

  background: #f8fbff;
  border: 1px solid #e2ebf7;
  box-shadow: 0 4px 14px rgba(19, 45, 89, 0.05);

  color: #17325c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;

  transition: all 0.2s ease;
}

.ts-nav__link:hover {
  background: #eef6ff;
  border-color: #bfd7f6;
  color: #0e66b3;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(19, 45, 89, 0.1);
}

.ts-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dfe8f5;
  background: #f4f8ff;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;

  appearance: none;
  -webkit-appearance: none;
}

.ts-burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0;
  background: #0e66b3;
  border-radius: 2px;
  flex: 0 0 auto;
}

.ts-mobile-menu {
  display: none;
  padding: 0 16px 16px;
  background: #ffffff;
  border-top: 1px solid #eef3f8;
}

.ts-mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-mobile-menu__link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #17325c;
  background: #f8fbff;
  border: 1px solid #e2ebf7;
  box-shadow: 0 4px 12px rgba(19, 45, 89, 0.04);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ts-mobile-menu__link:hover {
  background: #edf5ff;
  border-color: #bfd7f6;
  color: #0e66b3;
}

@media (max-width: 980px) {
  .ts-header__inner {
    align-items: center;
    padding: 12px 18px;
  }

  .ts-logo img {
    height: 50px;
  }

  .ts-nav {
    display: none;
  }

  .ts-burger {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .ts-header__inner {
    padding: 10px 14px;
  }

  .ts-logo img {
    height: 42px;
  }
}

@media (max-width: 980px) {
  .ts-header {
    padding: 0;
  }

  .ts-header__inner {
    min-height: 68px;
  }

  .ts-logo {
    max-width: calc(100% - 56px);
  }

  .ts-logo img {
    max-width: 100%;
    height: 46px;
  }

  .ts-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .ts-header__inner {
    gap: 12px;
    padding: 10px 12px;
  }

  .ts-logo img {
    height: 40px;
  }

  .ts-mobile-menu {
    padding: 0 12px 12px;
  }

  .ts-mobile-menu__link {
    font-size: 15px;
    padding: 13px 14px;
  }
}