/**
 * header.css — BEM: header, header__*, header--modifier
 */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid rgba(241, 244, 244, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.header__logo {
  flex-shrink: 0;
  display: inline-flex;
}

.header__logo img {
  width: auto;
  height: 2.25rem;
}

.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header__nav-link {
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  padding: 0.5rem 0;
  position: relative;
}

.header__nav-link:hover,
.header__nav-link--active {
  color: var(--color-accent-green);
}

.header__nav-link--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  height: 2px;
  background-color: var(--color-accent-green);
  border-radius: var(--radius-badge);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__actions-item.btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
}

.header__login,
.header__register {
  display: none;
}

.header__flag {
  display: none;
  border-radius: 2px;
}

.header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-btn);
}

.header__burger-line {
  display: block;
  width: 1.4rem;
  height: 2px;
  background-color: var(--color-white);
  border-radius: var(--radius-badge);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.header__burger[aria-expanded='true'] .header__burger-line:nth-child(1) {
  transform: translateY(0.42rem) rotate(45deg);
}

.header__burger[aria-expanded='true'] .header__burger-line:nth-child(2) {
  opacity: 0;
}

.header__burger[aria-expanded='true'] .header__burger-line:nth-child(3) {
  transform: translateY(-0.42rem) rotate(-45deg);
}

/* Mobile flat menu — no dropdowns, all sub-items as top-level entries */
.header__mobile-menu {
  border-top: 1px solid rgba(241, 244, 244, 0.06);
  background-color: var(--color-bg-primary);
}

.header__mobile-menu[hidden] {
  display: none;
}

ul.header__mobile-list {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 1.5rem;
  gap: 0.25rem;
}

.header__mobile-item {
  border-bottom: 1px solid rgba(241, 244, 244, 0.05);
}

.header__mobile-link {
  display: block;
  padding: 0.9rem 0.25rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
}

.header__mobile-link:hover,
.header__mobile-link--active {
  color: var(--color-accent-green);
}

.header__mobile-item--cta {
  border-bottom: none;
  padding-top: 0.75rem;
}

@media (min-width: 64rem) {
  .header__nav {
    display: block;
  }

  .header__login,
  .header__register {
    display: inline-flex;
  }

  .header__flag {
    display: block;
  }

  .header__burger {
    display: none;
  }

}
