/* =========================================================
   HÖFER — header.css
   ========================================================= */

/* ---------- Шапка ---------- */
.header {
  background: var(--c-black);
  color: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--tr-base);
}

.header.is-scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 86px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ---------- Логотип ---------- */
.logo {
    display: inline-flex;
    /* align-items: center; */
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-yellow);
  transition: color var(--tr-fast);
}

.logo:hover .logo__text {
  color: var(--c-white);
}

/* Логотип-картинка */
.logo__img {
  display: block;
  height: 50px;
  width: auto;
}

/* ---------- Навигация ---------- */
.header__nav {
  flex: 1;                        /* занимает всё свободное место */
  display: flex;
  justify-content: center;        /* меню по центру */
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header__link {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: 6px 0;
  transition: color var(--tr-fast);
}

.header__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tr-base);
}

.header__link:hover {
  color: var(--c-white);
}

.header__link:hover::after,
.header__link.is-active::after {
  transform: scaleX(1);
}

.header__link.is-active {
  color: var(--c-white);
}

/* ---------- Поиск ---------- */
.header__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--c-white);
  border-radius: var(--radius-sm);
  transition: background var(--tr-fast), color var(--tr-fast);
  flex-shrink: 0;
  margin-left: auto;              /* прижимает поиск вправо */
}

.header__search:hover {
  background: var(--c-red);
  color: var(--c-white);
}

/* ---------- Бургер (мобильный) ---------- */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  padding: 0;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-white);
  transition: transform var(--tr-base), opacity var(--tr-fast);
}

.header__burger.is-open span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.header__burger.is-open span:nth-child(2) {
  opacity: 0;
}
.header__burger.is-open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ---------- Оверлей ---------- */
.header__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--tr-base);
}

.header__overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .header__inner {
    gap: 16px;
    min-height: 76px;
  }

  .header__menu {
    gap: 20px;
  }

  .header__link {
    font-size: 13px;
  }

  .logo__img {
    height: 44px;
  }
}

@media (max-width: 900px) {
  .header__burger {
    display: flex;
    order: 3;
    margin-left: 0;
  }

  .header__search {
    margin-left: auto;
    order: 2;
  }

@media (max-width: 900px) {
    .header__nav {
        position: fixed;
        top: 61px;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--c-black);
        padding: 9px 24px 32px;
        margin: 0;
        z-index: 95;
        transform: translateX(100%);
        transition: transform var(--tr-base);
        overflow-y: auto;
        box-shadow: -8px 0 24px rgba(0, 0, 0, .3);
        display: block;
    }
}

  .header__nav.is-open {
    transform: translateX(0);
  }

  .header__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .header__menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .header__link {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 15px;
  }

  .header__link::after {
    display: none;
  }

  .header__link.is-active {
    color: var(--c-yellow);
  }
}

@media (max-width: 480px) {
  .header__inner {
    min-height: 70px;
  }

  .logo__text {
    font-size: 22px;
  }

  .logo__img {
    height: 38px;
  }

  .header__search {
    width: 36px;
    height: 36px;
  }
}

/* Блокировка скролла при открытом меню */
body.is-menu-open {
  overflow: hidden;
}