.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

html { scroll-padding-top: 88px; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 2.5vw - 8px, 40px);
  height: 88px;
  padding-inline: 20px 30px;
}

.header__logo {
  flex: none;
  padding-block: 8px;
  margin-block: -8px;
}

.header__logo img { height: 29px; width: auto; }

.header__nav {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: clamp(24px, 2.5vw - 8px, 40px);
  margin-left: auto;
  font-size: var(--fs-btn);
}

.header__link { transition: color 0.25s ease; white-space: nowrap; }
.header__link:hover { color: var(--color-blue); }

@media (min-width: 1601px) {
  .header__link:nth-child(3) { margin-right: 2px; }
}

.header__group {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.header__switch {
  padding: 3px;
  border-radius: 999px;
  background: var(--color-light-blue);
}

.header__group-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.header__group:hover .header__group-btn,
.header__group.is-open .header__group-btn { color: var(--color-blue); }

.header__group--active .header__group-btn,
.header__group--active:hover .header__group-btn,
.header__group--active.is-open .header__group-btn {
  background: var(--color-blue);
  color: var(--color-white);
}

.header__chevron { flex: none; transition: transform 0.25s ease; }
.header__group:hover .header__chevron,
.header__group.is-open .header__chevron { transform: rotate(180deg); }

.header__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 0 0 16px 16px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.header__group:hover .header__dropdown,
.header__group:focus-within .header__dropdown,
.header__group.is-open .header__dropdown { display: flex; }

.header__option {
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.header__option:hover { color: var(--color-blue); }

.header__menu-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.header__menu-class {
  padding: 6px 14px;
  border: 1px solid var(--color-white);
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

.header__menu-class--active {
  background: var(--color-white);
  color: var(--color-blue);
}

.header__phone {
  flex: none;
  font-size: var(--fs-btn);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.header__phone:hover { color: var(--color-blue); }

.header__cta {
  flex: none;
  white-space: nowrap;
}

.header__burger {
  display: none;
  color: var(--color-pink);
  padding: 8px;
  margin-right: -8px;
}

.header__menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  background: var(--gradient-accent);
  overflow-y: auto;
}

.header__menu.is-open { display: flex; }

.header__menu-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 49px;
  padding-inline: 10px;
  background: var(--color-white);
}

.header__menu-bar img { height: 29px; width: auto; }

.header__menu-close {
  color: var(--color-pink);
  padding: 8px;
}

.header__menu-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 56px 20px 0;
  color: var(--color-white);
  font-size: 16px;
  line-height: 1.4;
}

.header__menu-phone {
  flex: none;
  margin: 30px 20px 0;
  color: var(--color-white);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.header__menu-cta {
  flex: none;
  width: calc(100% - 40px);
  height: 48px;
  padding: 0;
  margin: 56px 20px 40px;
}

@media (max-width: 1280px) {
  html { scroll-padding-top: 64px; }

  .header__inner { height: 64px; }

  .header__nav,
  .header__phone,
  .header__cta { display: none; }

  .header__burger { display: block; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 49px; }

  .header__inner {
    height: 49px;
    gap: 16px;
    padding-inline: 10px;
  }

  .header__logo img { height: 29px; }

  .header__burger {
    padding: 7px;
    margin: -7px -7px -7px 0;
  }

  .header__burger svg { width: 30px; height: 30px; }

}
