﻿/* =========================================================
   NAVBAR
========================================================= */

.tq-header {
  position: fixed;
  width: 100%;
  background: var(--tq-surface, #ffffff);
  z-index: 1000;
  border-bottom: 1px solid var(--tq-border, #eeeeee);
}

.tq-header__inner {
  width: 100%;
  min-height: 65px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
}

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

.tq-logo {
  display: inline-flex;
  align-items: center;
  margin-right: clamp(20px, 4vw, 60px);
  text-decoration: none;
  flex-shrink: 0;
}

.tq-logo__image {
  display: block;
  width: auto;
  height: clamp(28px, 2.5vw, 38px);
  object-fit: contain;
}

/* =========================================================
   HEADER RIGHT
========================================================= */

.tq-header__right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
  margin-left: auto;
}

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

.tq-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-nav);
}

.tq-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sl);
  color: var(--tq-text, #000000);
  background-color: transparent;
  font-family: var(--font-family-roboto);
  font-size: var(--font-size-t6);
  font-weight: 600;
  line-height: var(--line-height-heading);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

/* =========================================================
   SINGLE THEME TOGGLE
========================================================= */

.tq-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: var(--tq-surface-sunken, #f1f4f8);
  border: 1px solid var(--tq-border, #e6e8ec);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.tq-theme-toggle:hover {
  background-color: var(--tq-accent-fill, #1e4f94);
}

.tq-theme-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

/* =========================================================
   ACTIVE MENU ITEM
========================================================= */

.tq-header__nav-link--active {
  position: relative;
  color: var(--tq-accent, #1e4f94);
  font-weight: 600;
}

/* =========================================================
   HOVER
========================================================= */

.tq-header__nav-link:hover {
  color: var(--tq-text-on-accent, #ffffff);
  background-color: var(--tq-accent-fill, #1e4f94);
}

/* =========================================================
   ACTIVE + HOVER
========================================================= */

.tq-header__nav-link--active:hover {
  color: var(--tq-text-on-accent, #ffffff);
  background-color: var(--tq-accent-fill, #1e4f94);
}

/* =========================================================
   SIGN UP BUTTON
========================================================= */

.tq-login__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px clamp(16px, 1.5vw, 24px);
  color: var(--tq-btn-signup-text, #ffffff) !important;
  background-color: var(--tq-cp-logo);
  border: 1px solid var(--tq-cp-logo);
  border-radius: 5px;
  font-family: var(--font-family-roboto);
  font-size: var(--font-size-t6);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.tq-login__button:hover {
  color: var(--tq-btn-signup-text);
  background-color: var(#4d0d11);
  border-color: var(#4d0d11);
}

/* =========================================================
   HAMBURGER
========================================================= */

.tq-hamburger {
  display: none;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  margin: -8px;
}

.tq-hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--tq-text, #000000);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* =========================================================
   HAMBURGER OPEN STATE
========================================================= */

.tq-hamburger--open .tq-hamburger__line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.tq-hamburger--open .tq-hamburger__line:nth-child(2) {
  opacity: 0;
}

.tq-hamburger--open .tq-hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.tq-mobile-menu {
  display: none;
  width: 100%;
  padding: var(--space-md) clamp(var(--space-md), 5vw, 40px) var(--space-md);
  background-color: var(--tq-surface, #ffffff);
  border-top: 1px solid var(--tq-border, #eeeeee);
}

.tq-mobile-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: var(--space-sl) 14px;
  color: var(--tq-text, #000000);
  background-color: transparent;
  font-family: var(--font-family-roboto);
  font-size: var(--font-size-body);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.tq-mobile-menu__item:hover {
  color: var(--tq-text-on-accent, #ffffff);
  background-color: var(--tq-accent-fill, #1e4f94);
}

/* =========================================================
   MOBILE ACTIVE ITEM
========================================================= */

.tq-mobile-menu__item--active {
  color: var(--tq-accent, #1e4f94);
  font-weight: 600;
}

.tq-mobile-menu__item--active:hover {
  color: var(--tq-text-on-accent, #ffffff);
  background-color: var(--tq-accent-fill, #1e4f94);
}

/* =========================================================
   TABLET
========================================================= */

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

  .tq-header__nav {
    gap: 2px;
  }

  .tq-header__nav-link {
    padding-left: 9px;
    padding-right: 9px;
  }
}

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

@media (max-width: 768px) {
  .tq-header__inner {
    min-height: 64px;
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
  }

  /* Logo */

  .tq-logo {
    margin-right: 0;
  }

  .tq-header__nav {
    display: none;
  }

  .tq-header__right > .tq-login__button {
    display: none;
  }

  /* Show hamburger */

  .tq-hamburger {
    display: flex;
  }

  /* Mobile menu */

  .tq-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  /* Mobile sign-up button */

  .tq-mobile-menu .tq-login__button {
    display: flex;
    width: 100%;
    margin-top: 8px;
    color: var(--tq-btn-signup-text, #ffffff) !important;
    background-color: var(--tq-cp-logo);
    border: 1px solid var(--tq-cp-logo);
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

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

  .tq-header__right {
    gap: 6px;
  }

  .tq-theme-toggle {
    width: 36px;
    height: 36px;
  }

  .tq-hamburger {
    width: 38px;
    height: 38px;
  }

  .tq-hamburger__line {
    width: 22px;
  }
}
