/**
 * Header Section Styles
 * Fixed navigation header with desktop/mobile menu
 * Follows BEM naming convention
 */

/* ========================================
   HEADER CONTAINER
   ======================================== */

.header {
  width: 100%;
  height: var(--spacing-header-height);

  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-index-header);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 72px;

  border-bottom: var(--border-width-thick) solid var(--color-border-secondary);
  background-color: var(--color-bg-overlay-strong);
  backdrop-filter: var(--backdrop-blur-md);
  -webkit-backdrop-filter: var(--backdrop-blur-md);
}

.header::after {
  content: '';
  position: absolute;

  width: 415px;
  height: 415px;
  top: -178px;
  left: -175px;

  background: var(--color-primary);
  border-radius: var(--border-radius-full);

  filter: blur(729px);

  pointer-events: none;
}

/* ========================================
   HEADER LAYOUT
   ======================================== */

.header__left {
  display: flex;
  align-items: center;
}

.header__right {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

/* ========================================
   LOGO
   ======================================== */

.header__logo {
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* ========================================
   DESKTOP NAVIGATION
   ======================================== */

.header__nav {
  display: flex;
  margin-left: 200px;
  gap: 80px;
}

.header__nav-item {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  position: relative;
  cursor: pointer;
  user-select: none;
  transition:
    color var(--transition-default),
    background-color var(--transition-default),
    opacity var(--transition-default);
}

.header__nav-item::before,
.header__nav-item::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  color: rgba(44, 255, 128, 1);
  opacity: 0;
  transition: opacity var(--transition-default);
}

.header__nav-item::before {
  content: '[ ';
  left: -0.6em;
}

.header__nav-item::after {
  content: ' ]';
  right: -0.6em;
}

.header__nav-item:hover {
  color: rgba(44, 255, 128, 1);
}

.header__nav-item:hover::before,
.header__nav-item:hover::after {
  opacity: 1;
}

.header__nav-item:active,
.header__nav-item--active {
  background-color: transparent;
  color: rgba(53, 203, 113, 1);
}

.header__nav-item.header__menu-item[data-target='main']::before,
.header__nav-item.header__menu-item[data-target='main']::after {
  content: none;
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

.header__lang-switcher {
  display: flex;
  /*align-items: center;*/
  gap: 8px;
  cursor: pointer;

  transition: opacity var(--transition-default);
}

.header__lang-switcher:hover {
  opacity: 0.5;
}

.header__lang-flag {
  width: 20px;
  height: 13px;
}

.header__lang-value {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  text-transform: uppercase;
  line-height: 16px;
  color: var(--color-text-primary);
  user-select: none;
}

/* ========================================
   DIVIDER
   ======================================== */

.header__divider {
  width: 1px;
  height: 31.5px;
  background-color: var(--color-border-primary);
  border-radius: var(--border-radius-full);
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.create_account_btn {
  padding: 12px 16px;
  background-color: #2cff80;
  border-radius: 36px;
  cursor: pointer;
  font-family: var(--subfont);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  color: #000000;
  user-select: none;
  transition: all 300ms ease-out;
}

.create_account_btn:hover {
  background-color: rgba(44, 255, 128, 0.2);
  color: rgba(44, 255, 128, 1);
}

.create_account_btn:active {
  background-color: rgba(53, 203, 113, 1);
  color: rgba(0, 0, 0, 1);
}

.login_btn {
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  user-select: none;
  font-family: var(--subfont);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  color: #ffffff;
  transition: all 300ms ease-out;
}

.login_btn:hover {
  background-color: rgba(44, 255, 128, 0.2);
  color: rgba(44, 255, 128, 1);
  border: 1px solid transparent;
}

.login_btn:active {
  background-color: rgba(53, 203, 113, 1);
  color: rgba(0, 0, 0, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ========================================
   BURGER MENU TOGGLE (Mobile)
   ======================================== */

.header__burger {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.header__burger-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;

  transition: opacity var(--transition-base) var(--transition-timing-default);
}

.header__burger-icon--close {
  opacity: 0;
}

.header__burger.active .header__burger-icon--open {
  opacity: 0;
}

.header__burger.active .header__burger-icon--close {
  opacity: 1;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.header__mobile-menu {
  display: none;
  position: absolute;
  top: 70px;
  left: var(--spacing-md);
  right: var(--spacing-md);

  border: var(--border-width-base) solid var(--color-border-primary);
  border-radius: var(--border-radius-lg);
  background-color: var(--color-bg-overlay-strong);
  backdrop-filter: var(--backdrop-blur-md);
  -webkit-backdrop-filter: var(--backdrop-blur-md);

  opacity: 0;
  pointer-events: none;

  transition: opacity var(--transition-base) var(--transition-timing-default);
}

.header__mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.header__mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: var(--border-width-base) solid var(--color-border-primary);

  cursor: pointer;

  transition: background-color var(--transition-default);
}

.header__mobile-nav-item.mobile-menu__item--active:first-child {
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.header__mobile-nav-item.mobile-menu__item--active {
  background-color: var(--color-border-primary);
}

.header__mobile-nav-item:last-of-type {
  border-bottom: none;
}

.header__mobile-nav-text {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
}

.header__mobile-nav-marker {
  width: 16px;
  height: 16px;
  opacity: 0;

  transition: opacity var(--transition-base) var(--transition-timing-default);
}

.header__mobile-nav-item.mobile-menu__item--active .header__mobile-nav-marker {
  opacity: 1;
}

.header__mobile-actions {
  display: flex;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  gap: 10px;
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */

.header__progress-indicator {
  position: fixed;
  left: 0;
  bottom: 0;

  height: var(--border-width-thick);
  width: 0%;

  background-color: var(--color-accent);
  z-index: var(--z-index-indicator);

  transition: width 0.1s linear;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .header {
    height: var(--spacing-header-height-mobile);
    padding: 0 var(--spacing-md);
    border-bottom: none;
    backdrop-filter: none;
    background-color: var(--color-bg-primary);
  }

  .header::after {
    display: none;
  }

  .header__right {
    gap: var(--spacing-sm);
  }

  .header__logo {
    width: 24px;
    height: 24px;
  }

  /* Hide desktop navigation */
  .header__nav {
    display: none;
  }

  /* Hide desktop elements */
  .header__lang-flag {
    display: none;
  }

  .header__divider {
    display: none;
  }

  .header__actions {
    display: none;
  }

  /* Show mobile burger */
  .header__burger {
    display: flex;
  }

  /* Show mobile menu */
  .header__mobile-menu {
    display: block;
  }

  /* Hide progress indicator on mobile */
  .header__progress-indicator {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1194px) {
  .header__nav {
    margin-left: 30px;
    gap: 25px;
  }
  .header__right {
    gap: 16px;
  }
  .header {
    padding: 0 30px;
  }
}
