/* =========================================================
   VAVADA UZ — HEADER
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(14, 16, 27, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   CONTAINER
========================================================= */

.site-header__container {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  padding-block: 10px;
  gap: 18px;
}

/* =========================================================
   LOGO
========================================================= */

.site-header__logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
}

.site-header__logo img {
  display: block;
  width: 150px;
  max-width: 100%;
  max-height: 38px;
  object-fit: contain;
}

.site-header__logo .site-logo__text {
  color: var(--accent);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.site-header__nav {
  min-width: 0;
  margin-left: auto;
}

.site-header__nav-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__nav-list > li {
  position: relative;
  flex: 0 0 auto;
}

.site-header__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color 0.2s ease;
}

.site-header__nav a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* =========================================================
   ACTIONS
========================================================= */

.site-header__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: 20px;
}

.site-header__logo + .site-header__actions {
  margin-left: auto;
}
/* =========================================================
   LANGUAGE SWITCH
   UZ page -> RU
   RU page -> UZ
========================================================= */

.site-header__language-switch {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 46px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 5px 14px rgba(0, 0, 0, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* =========================================================
   HEADER BUTTONS
========================================================= */

.site-header__btn {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.site-header__btn-text {
  position: relative;
  z-index: 2;
}

.site-header__btn--secondary {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 5px 14px rgba(0, 0, 0, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.site-header__btn--primary {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #ff4568 0%, #f42555 52%, #e61549 100%);
  box-shadow:
    0 8px 22px rgba(255, 36, 82, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
}

.site-header__btn--primary::before {
  content: '';
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -70%;
  z-index: 1;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.5s ease;
}

/* =========================================================
   BURGER
========================================================= */

.site-header__burger {
  position: relative;
  box-sizing: border-box;
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.site-header__burger span {
  position: absolute;
  left: 50%;
  display: block;
  width: 18px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
  transition:
    top 0.2s ease,
    width 0.2s ease,
    opacity 0.15s ease,
    transform 0.2s ease;
}

.site-header__burger span:nth-child(1) {
  top: 14px;
}
.site-header__burger span:nth-child(2) {
  top: 20px;
  width: 14px;
}
.site-header__burger span:nth-child(3) {
  top: 26px;
}

.site-header__burger.is-active span:nth-child(1) {
  top: 20px;
  transform: translateX(-50%) rotate(45deg);
}

.site-header__burger.is-active span:nth-child(2) {
  width: 0;
  opacity: 0;
}

.site-header__burger.is-active span:nth-child(3) {
  top: 20px;
  transform: translateX(-50%) rotate(-45deg);
}

.site-header__mobile-secondary,
.site-header__secondary-icon {
  display: none !important;
}

/* =========================================================
   HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {
  .site-header__nav a:hover {
    color: var(--accent);
  }

  .site-header__nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .site-header__language-switch:hover {
    color: #fff;
    border-color: rgba(255, 40, 84, 0.34);
    background: rgba(255, 40, 84, 0.075);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.045),
      0 7px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
  }

  .site-header__btn--secondary:hover {
    color: #fff;
    border-color: rgba(255, 40, 84, 0.32);
    background: rgba(255, 40, 84, 0.065);
    transform: translateY(-1px);
  }

  .site-header__btn--primary:hover {
    background: linear-gradient(135deg, #ff5575 0%, #ff2d5b 52%, #ec174d 100%);
    box-shadow:
      0 11px 28px rgba(255, 36, 82, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.23);
    transform: translateY(-2px);
  }

  .site-header__btn--primary:hover::before {
    left: 140%;
  }

  .site-header__burger:hover {
    border-color: rgba(255, 40, 84, 0.3);
    background: rgba(255, 40, 84, 0.065);
  }
}

/* =========================================================
   FOCUS
========================================================= */

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =========================================================
   TABLET / BURGER
========================================================= */

@media (max-width: 1023px) {
  .site-header__container {
    gap: 10px;
  }

  .site-header__nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: block;
    max-height: calc(100dvh - 110px);
    padding: 8px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(20, 22, 34, 0.985);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease,
      transform 0.2s ease;
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-header__nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
  }

  .site-header__nav a::after {
    display: none;
  }

  .site-header__actions {
    margin-left: auto;
  }

  .site-header__burger {
    display: block;
  }

  .site-header__logo img {
    width: 128px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .site-header__container {
    flex-wrap: nowrap;
    gap: 6px;
    padding-block: 8px;
  }

  .site-header__logo {
    min-width: 0;
  }

  .site-header__logo img {
    width: 84px;
    max-height: 32px;
  }

  .site-header__logo .site-logo__text {
    font-size: 16px;
  }

  .site-header__actions {
    gap: 5px;
    margin-left: auto;
  }

  .site-header__language-switch {
    min-width: 40px;
    height: 40px;
    padding-inline: 8px;
    border-radius: 10px;
    font-size: 11px;
  }

  .site-header__btn {
    min-height: 40px;
    padding-inline: 10px;
    border-radius: 10px;
    font-size: 11px;
  }

  .site-header__btn--secondary {
    padding-inline: 10px;
  }
  .site-header__btn--primary {
    padding-inline: 11px;
  }

  .site-header__burger {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 520px) {
  .site-header__container {
    gap: 4px;
  }

  .site-header__logo img {
    width: 66px;
  }
  .site-header__logo .site-logo__text {
    font-size: 14px;
  }

  .site-header__actions {
    gap: 4px;
  }

  .site-header__language-switch {
    min-width: 36px;
    height: 38px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .site-header__btn {
    min-height: 38px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .site-header__btn--secondary {
    padding-inline: 8px;
  }
  .site-header__btn--primary {
    padding-inline: 9px;
  }

  .site-header__burger {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
  }

  .site-header__burger span:nth-child(1) {
    top: 12px;
  }
  .site-header__burger span:nth-child(2) {
    top: 18px;
  }
  .site-header__burger span:nth-child(3) {
    top: 24px;
  }

  .site-header__burger.is-active span:nth-child(1),
  .site-header__burger.is-active span:nth-child(3) {
    top: 18px;
  }
}

/* =========================================================
   VERY SMALL
========================================================= */

@media (max-width: 370px) {
  .site-header__logo img {
    width: 58px;
  }

  .site-header__language-switch {
    min-width: 34px;
    padding-inline: 6px;
  }

  .site-header__btn {
    padding-inline: 6px;
    font-size: 9.5px;
  }

  .site-header__btn--primary {
    padding-inline: 7px;
  }

  .site-header__burger {
    flex-basis: 36px;
    width: 36px;
  }
}

/* =========================================================
   WORDPRESS ADMIN BAR
========================================================= */

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    transition-duration: 0.01ms !important;
  }

  .site-header__btn--primary::before {
    display: none;
  }
}

.site-header__nav a:focus-visible { color: var(--accent); }
@media (min-width: 1024px) {
  .site-header__nav a:focus-visible::after { opacity: 1; transform: scaleX(1); }
}
