/**
 * Header — mobile base @390, desktop @1024+ (do not change desktop block lightly).
 */

.v2-header,
.v2-header *,
.v2-header *::before,
.v2-header *::after {
  box-sizing: border-box;
}

.v2-header {
  position: sticky;
  top: 0;
  z-index: 350;
  overflow: visible;
}

.v2-header__bar {
  overflow: visible;
}

/* —— Mobile (<1024) — Figma 390 —— */
.v2-header__bar {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--color-canvas);
  min-height: calc(100vw * 70 / 390); /* 70 / 390 */
  padding-block: 0;
  padding-inline: 0;
  border-bottom: 1px dashed #d6d6d6;
}

.v2-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(100vw * 16 / 390);
  width: 100%;
  min-height: calc(100vw * 70 / 390);
}

.v2-header__logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.v2-header__logo-img {
  display: block;
  object-fit: contain;
}

.v2-header__logo-img--desktop {
  display: none;
}

.v2-header__logo-img--mobile {
  display: block;
  width: calc(100vw * 64 / 390);
  height: auto;
  max-width: none;
}

.v2-header__nav--desktop,
.v2-header__actions--desktop {
  display: none !important;
}

.v2-header__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(100vw * 5 / 390);
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
  padding: calc(100vw * 6.5 / 390) calc(100vw * 10 / 390);
  border: 1px dotted #d6d6d6;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--color-black);
}

.v2-header__burger-label {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: calc(100vw * 14 / 390);
  font-weight: 500;
  line-height: 1;
}

.v2-header__burger-icon {
  display: block;
  flex-shrink: 0;
}

.v2-header__burger-icon--menu {
  width: calc(100vw * 20 / 390);
  height: calc(100vw * 4 / 390);
}

.v2-header__burger-icon--close {
  display: none;
  width: calc(100vw * 16 / 390);
  height: calc(100vw * 15 / 390);
}

body.is-v2-menu-open .v2-header__burger-icon--menu {
  display: none;
}

body.is-v2-menu-open .v2-header__burger-icon--close {
  display: block;
}

.v2-header__menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-header__menu-item-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.v2-header__dropdown-trigger--icon {
  padding: 0;
}

.v2-header__menu a,
.v2-header__menu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(0, 0, 0, 0.4);
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.5s ease;
}

.v2-header__menu-item.is-active a,
.v2-header__menu-item.is-active .v2-header__menu-link,
.v2-header__menu .current-menu-item > a {
  color: #000000;
}

.v2-header__menu a:hover,
.v2-header__menu-link:hover {
  color: #000000;
}

.v2-header__chevron {
  display: block;
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  object-fit: contain;
}

.v2-header__lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  color: #202020;
  cursor: pointer;
  text-transform: uppercase;
}

.v2-header .v2-btn-request {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  width: 121px;
  height: 50px;
  padding: 0 25px;
  border: 0;
  border-radius: 130px;
  background: #202020;
  color: #ffffff;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.5s ease, color 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
  .v2-header .v2-btn-request:hover {
    background: var(--color-green);
    color: var(--color-white);
  }
}

@media (min-width: 1024px) {
  .v2-header {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .v2-header.is-scroll-hidden {
    transform: translateY(-100%);
  }

  .v2-header__bar {
    min-height: 0;
    padding-block: 11px;
    border-bottom: none;
  }

  .v2-header .v2-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: initial;
    gap: 0;
    min-height: clamp(40px, 2.604vw, 50px);
  }

  .v2-header__logo-img--mobile {
    display: none;
  }

  .v2-header__logo-img--desktop {
    display: block;
    width: clamp(80px, 5.781vw, 111px);
    height: clamp(28px, 1.979vw, 38px);
  }

  .v2-header__logo {
    line-height: 0;
  }

  .v2-header__nav--desktop {
    display: flex !important;
    justify-content: center;
    min-width: 0;
  }

  .v2-header__menu {
    gap: clamp(12px, 1.042vw, 20px);
  }

  .v2-header__menu a,
  .v2-header__menu-link {
    font-size: clamp(14px, 0.938vw, 18px);
    line-height: clamp(17px, 1.146vw, 22px);
    gap: clamp(4px, 0.26vw, 5px);
  }

  .v2-header__menu-item--dropdown {
    position: relative;
  }

  .v2-header__dropdown {
    position: absolute;
    top: calc(100% + clamp(24px, 1.927vw, 37px));
    left: 0;
    z-index: 50;
    list-style: none;
    margin: 0;
    padding: clamp(16px, 1.042vw, 20px) clamp(20px, 1.302vw, 25px);
    min-width: max-content;
    border-radius: clamp(8px, 0.521vw, 10px);
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(32, 32, 32, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .v2-header__dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: clamp(24px, 1.927vw, 37px);
  }

  [data-v2-dropdown].is-open .v2-header__dropdown,
  [data-v2-dropdown]:hover .v2-header__dropdown,
  [data-v2-dropdown]:focus-within .v2-header__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  [data-v2-dropdown].is-dropdown-suppressed .v2-header__dropdown,
  [data-v2-dropdown].is-dropdown-suppressed:hover .v2-header__dropdown,
  [data-v2-dropdown].is-dropdown-suppressed:focus-within .v2-header__dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .v2-header__dropdown li + li {
    margin-top: clamp(16px, 1.406vw, 27px);
  }

  .v2-header__dropdown a {
    display: block;
    color: #202020;
    font-size: clamp(14px, 0.938vw, 18px);
    font-weight: 400;
    line-height: clamp(17px, 1.146vw, 22px);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.5s ease;
  }

  .v2-header__dropdown a:hover,
  .v2-header__dropdown a:focus-visible,
  .v2-header__dropdown a.is-active:hover,
  .v2-header__dropdown a.is-active:focus-visible {
    color: rgba(0, 0, 0, 0.4);
  }

  .v2-header__dropdown a.is-active {
    color: #202020;
  }

  .v2-header__lang-dropdown {
    position: relative;
  }

  .v2-header__dropdown--lang {
    left: 0;
  }

  [data-v2-dropdown].is-open .v2-header__chevron,
  [data-v2-dropdown]:hover .v2-header__chevron,
  [data-v2-dropdown]:focus-within .v2-header__chevron {
    transform: rotate(180deg);
  }

  [data-v2-dropdown].is-dropdown-suppressed .v2-header__chevron {
    transform: rotate(0deg);
  }

  .v2-header__chevron {
    transition: transform 0.2s ease;
  }

  .v2-header__actions--desktop {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(20px, 1.979vw, 38px);
  }

  .v2-header__lang {
    font-size: clamp(14px, 0.938vw, 18px);
    line-height: clamp(17px, 1.146vw, 22px);
    gap: clamp(4px, 0.26vw, 5px);
  }

  .v2-header .v2-btn-request {
    width: auto;
    min-width: clamp(108px, 6.302vw, 121px);
    height: clamp(40px, 2.604vw, 50px);
    padding-inline: clamp(22px, 1.563vw, 30px);
    font-size: clamp(16px, 1.042vw, 20px);
  }

  .v2-header__burger {
    display: none;
  }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .v2-header {
    transition: none;
  }
}
