/* =============================================================
   Header — шапка и навигация (desktop)
   ============================================================= */

/* Базово: шапка в потоке (страницы без hero) */
.header {
  position: relative;
  z-index: 100;
  padding: 15px 20px; /* 20px по бокам — чтобы контейнер не упирался в край экрана */
}

/* Главная страница с hero: шапка floating поверх */
.page--has-hero .header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
}

.header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-border); /* контур «овала» как в Figma */
  overflow: hidden; /* клипит индикатор активной вкладки в скруглённых углах */
}

.header__logo {
  flex-shrink: 0;
}

.header__nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 35px;
}

.header__nav-link {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  white-space: nowrap;
}

.header__nav-link--active {
  color: var(--color-secondary);
}

.header__nav-link--active::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 0 0 2px 2px;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  white-space: nowrap;
}

/* Бургер — скрыт на desktop */
.header__burger {
  display: none;
  width: 48px;
  height: 48px;
  background: var(--color-secondary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.header__burger img {
  display: block;
  pointer-events: none;
}

/* === Mobile === */
@media (max-width: 767px) {
  .header {
    padding: 12px 20px;
  }

  .page--has-hero .header {
    position: relative;
  }

  .header__inner {
    border: none;
    border-radius: 0;
    padding: 12px 0;
  }

  .header__nav,
  .header__phone,
  .header__cta {
    display: none;
  }

  .header__burger {
    display: flex;
  }
}

