/* ==========================================================================
   Tandem Header & Navigation Components
   ========================================================================== */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 35px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  height: 100%;
}

@media (max-width: 1440px) {
  .nav-menu {
    gap: 18px;
  }
}

@media (max-width: 1280px) {
  .nav-menu:not(.open) {
    display: none !important;
  }

  .nav-menu.open {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    overflow-y: auto;
    background: rgba(7, 5, 13, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px var(--space-xl) var(--space-xl);
    gap: 12px;
    z-index: 999;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    width: 100%;
    max-width: 100vw;
  }
}

.nav-link {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-white);
  text-decoration: none;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  transition: opacity 0.3s ease, color 0.3s ease;
  opacity: 0.8;
}

@media (hover: hover) {
  .nav-link:hover {
    opacity: 1;
    color: var(--primary-purple-light);
  }
}

.nav-link.active {
  background: linear-gradient(90deg, var(--primary-purple-light) 0%, var(--secondary-purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 1;
}

@media (max-width: 1440px) {
  .nav-link {
    font-size: 14px;
  }
}

@media (max-width: 1280px) {
  .nav-link {
    font-size: 20px;
    width: fit-content;
    height: auto;
    display: block;
    padding: 6px 0;
    opacity: 0.8;
  }

  .nav-link:hover, .nav-link.active {
    opacity: 1;
  }
}

.nav-link-underline {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: var(--primary-purple);
  border-radius: var(--radius-sharp);
  box-shadow:
    0 0 8px var(--primary-purple-light),
    0 0 20px var(--primary-purple),
    0 0 35px rgba(var(--primary-purple-rgb), 0.9);
}

@media (max-width: 1280px) {
  .nav-link-underline {
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 2px;
    box-shadow: 
      0 0 8px var(--primary-purple-light), 
      0 0 20px var(--primary-purple), 
      0 0 35px rgba(var(--primary-purple-rgb), 0.9);
  }
}

/* Language Selector (Desktop) */
.lang-selector {
  position: relative;
  width: 74px;
}

@media (max-width: 1280px) {
  .lang-selector {
    display: none;
  }
}

.lang-btn {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--radius-sharp);
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

.lang-arrow-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.lang-selector.open .lang-arrow-icon {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(7, 5, 13, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
  flex-direction: column;
  z-index: 105;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.lang-selector.open .lang-dropdown {
  display: flex;
}

.lang-option {
  font-family: var(--font-text);
  color: var(--text-white);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  transition: background-color 0.3s ease;
}

@media (hover: hover) {
  .lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

.lang-option.active {
  background: var(--primary-purple);
}

/* Mobile Languages & Toggle Menu */
.mobile-languages {
  display: none;
}

@media (max-width: 1280px) {
  .mobile-languages {
    display: flex;
    gap: var(--space-md);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
  }

  .mobile-lang-option {
    flex: 1;
    font-family: var(--font-text);
    color: var(--text-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sharp);
    text-align: center;
    box-sizing: border-box;
  }

  @media (hover: hover) {
    .mobile-lang-option:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.2);
    }
  }

  .mobile-lang-option.active {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(146, 58, 255, 0.4);
  }
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-white);
  transition: all 0.3s ease;
}

@media (max-width: 1280px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
