:root {
  --header-bg: #0b1220;
  --header-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --accent: #f59e0b;
  --accent-bg: rgba(245, 158, 11, 0.14);
  --menu-bg-mobile: #111827;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --radius: 14px;
  --container-width: 1280px;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

.site-header {
  position: relative;
  width: 100%;
  background: var(--header-bg);
  color: var(--text-main);
  border-bottom: 1px solid var(--header-border);
  z-index: 1000;
}

.header-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 14px 20px;
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

/* LEFT */
.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.site-logo-image {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-logo-text {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text-main);
}

/* CENTER */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--accent-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.ad-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.ad-badge-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

/* RIGHT */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.header-nav {
  display: block;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-list a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  transition: color var(--transition), opacity var(--transition), background var(--transition);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text-main);
}

/* BURGER */
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background var(--transition), border-color var(--transition);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: #fff;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* TABLET */
@media (max-width: 991px) {
  .header-container {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    padding: 12px 16px;
    min-height: 68px;
  }

  .site-logo {
    gap: 8px;
  }

  .site-logo-image {
    width: 34px;
    height: 34px;
  }

  .site-logo-text {
    font-size: 18px;
  }

  .header-center {
    justify-content: center;
  }

  .ad-badge {
    padding: 8px 14px;
  }

  .ad-badge-text {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    background: var(--menu-bg-mobile);
    border: 1px solid var(--header-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 14px;
    display: none;
  }

  .header-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border-radius: 10px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
  }

  .nav-list a:hover,
  .nav-list a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* MOBILE */
@media (max-width: 640px) {
  .header-container {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 10px 12px;
    min-height: 62px;
  }

  .site-logo {
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  .site-logo-image {
    width: 28px;
    height: 28px;
  }

  .site-logo-text {
    font-size: 15px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ad-badge {
    padding: 7px 10px;
    gap: 6px;
  }

  .ad-badge-dot {
    width: 7px;
    height: 7px;
  }

  .ad-badge-text {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .header-nav {
    left: 12px;
    right: 12px;
    padding: 12px;
  }
}
/*  */
