// ========================
// HEADER / NAVIGATION SCSS
// ========================

@use '../variables' as *;
@use '../mixins' as *;

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: map-get($z-index, fixed);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  @include transition();

  [data-theme="dark"] & {
    background: rgba(15, 23, 42, 0.95);
  }

  .nav {
    @include flex-center();
    justify-content: space-between;
    padding: 16px 20px;
    max-width: map-get($breakpoints, xl);
    margin: 0 auto;
  }

  .nav-brand {
    a {
      font-size: map-get($font-sizes, xl);
      font-weight: 700;
      color: var(--text-primary);
      @include gradient-text();
      @include transition();

      &:hover {
        transform: scale(1.05);
      }
    }
  }

  .nav-menu {
    display: flex;
    gap: 32px;

    a {
      color: var(--text-secondary);
      font-weight: 500;
      @include link-hover();
    }

    &.mobile-menu {
      display: none;
      position: fixed;
      top: 100%;
      right: 0;
      width: 100%;
      height: calc(100vh - 80px);
      background: var(--bg-primary);
      flex-direction: column;
      padding: 40px 20px;
      gap: 24px;
      border-top: 1px solid var(--border-color);
      @include box-shadow(large);
      @include transition(transform opacity);
      
      &.open {
        top: 80px;
        transform: translateX(0);
        opacity: 1;
      }

      &:not(.open) {
        transform: translateX(100%);
        opacity: 0;
      }

      a {
        font-size: map-get($font-sizes, lg);
        padding: 16px 0;
        border-bottom: 1px solid var(--border-color);
      }
    }
  }

  .nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .theme-toggle,
  .menu-toggle,
  .language-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    @include transition();

    &:hover {
      color: $primary-color;
      background: var(--bg-secondary);
      transform: scale(1.1);
    }

    &:focus-visible {
      @include focus-style();
    }
  }

  .language-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    
    .language-text {
      font-size: map-get($font-sizes, sm);
      font-weight: 600;
      line-height: 1;
    }
  }

  .menu-toggle {
    display: none;

    @include respond-to(md) {
      display: block;
    }
  }

  .desktop-menu {
    @include respond-to(md) {
      display: none;
    }
  }
}

// Responsive
@include respond-to(md) {
  .header {
    .nav {
      padding: 12px 16px;
    }

    .mobile-menu {
      display: flex !important;
    }
  }
}