/**
 * Zone 2 — Unified Brand Header (.ta-header)
 *
 * All sub-component rules are scoped under the .ta-header wrapper.
 * Mobile-first. Breakpoints: ≥600px tablet | ≥1024px desktop.
 */

/* ── Header shell ──────────────────────────────────────────── */
.ta-header {
  background: var(--ta-navy-mid);
  border-top: 3px solid var(--ta-orange);
  position: relative;
}

/* Subtle radial glow from top-left */
.ta-header::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 320px;
  height: 100%;
  background: radial-gradient(
    ellipse 280px 100% at 0% 50%,
    rgba(255, 92, 0, .06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* ── Inner layout ───────────────────────────────────────────── */
.ta-header .ta-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Logo ───────────────────────────────────────────────────── */
.ta-header .ta-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.ta-header .ta-logo__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.ta-header .ta-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.ta-header .ta-logo__primary {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ta-white);
}

.ta-header .ta-logo__primary span {
  color: var(--ta-orange);
}

.ta-header .ta-logo__sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ta-white-muted);
  margin-top: 3px;
}

/* ── Nav panel (mobile: slide-down; desktop: inline flex) ────── */
.ta-header .ta-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: #031a30;
  border-top: 2px solid var(--ta-orange);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s ease;
}

.ta-header .ta-nav--open {
  max-height: 520px;
}

.ta-header .ta-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  margin: 0;
  gap: 0;
}

.ta-header .ta-nav__item {
  position: relative;
  width: 100%;
}

.ta-header .ta-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 13px 24px;
  width: 100%;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ta-white-sub);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}

.ta-header .ta-nav__link:hover {
  color: var(--ta-white);
  border-left-color: var(--ta-orange);
  background: rgba(255, 255, 255, .04);
}

.ta-header .ta-nav__item--active .ta-nav__link {
  color: var(--ta-white);
  border-left-color: var(--ta-orange);
  background: rgba(255, 255, 255, .04);
}

.ta-header .ta-nav__link svg {
  opacity: .5;
  transition: opacity .2s, transform .2s;
}

.ta-header .ta-nav__link:hover svg {
  opacity: 1;
  transform: translateY(1px);
}

/* Dropdown — mobile: accordion; desktop: hover panel */
.ta-header .ta-nav__dropdown {
  position: static;
  opacity: 1;
  pointer-events: all;
  transform: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  background: transparent;
  z-index: 100;
}

.ta-header .ta-nav__item--open .ta-nav__dropdown {
  max-height: 300px;
}

.ta-header .ta-nav__dropdown-inner {
  background: rgba(0, 0, 0, .15);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.ta-header .ta-nav__dropdown-link {
  display: block;
  padding: 10px 42px;
  font-size: 12.5px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ta-white-sub);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
  letter-spacing: 0.02em;
}

.ta-header .ta-nav__dropdown-link:hover,
.ta-header .ta-nav__dropdown-link.active {
  color: var(--ta-white);
  border-left-color: var(--ta-orange);
  background: var(--ta-white-faint);
}

/* ── Right actions ──────────────────────────────────────────── */
.ta-header .ta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ta-header .ta-actions__icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ta-white-sub);
  cursor: pointer;
  border-radius: 50%;
  transition: color .2s, background .2s;
}

.ta-header .ta-actions__icon-btn:hover {
  color: var(--ta-white);
  background: var(--ta-white-faint);
}

/* CTA: hidden on mobile, shown at ≥600px */
.ta-header .ta-actions__cta {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ta-white);
  text-decoration: none;
  background: var(--ta-orange);
  border: 1px solid var(--ta-orange);
  border-radius: 2px;
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}

.ta-header .ta-actions__cta:hover {
  background: #e65200;
  border-color: #e65200;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 92, 0, .35);
}

.ta-header .ta-actions__cta svg {
  transition: transform .2s;
}

.ta-header .ta-actions__cta:hover svg {
  transform: translateX(2px);
}

/* ── Hamburger ──────────────────────────────────────────────── */
.ta-header .ta-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background .2s;
  flex-shrink: 0;
}

.ta-header .ta-hamburger:hover {
  background: var(--ta-white-faint);
}

.ta-header .ta-hamburger__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ta-white-sub);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .25s ease, opacity .2s ease, background .2s ease;
}

/* × state when .is-open */
.ta-header .ta-hamburger.is-open .ta-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--ta-orange);
}
.ta-header .ta-hamburger.is-open .ta-hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.ta-header .ta-hamburger.is-open .ta-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--ta-orange);
}

/* ── Search overlay ─────────────────────────────────────────── */
.ta-header .ta-search-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(
    90deg,
    var(--ta-navy-deep) 0%,
    var(--ta-navy-mid) 100%
  );
  border-left: 3px solid var(--ta-orange);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ta-header .ta-search-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.ta-header .ta-search__icon {
  width: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ta-orange);
  font-size: 1.2rem;
}

.ta-header .ta-search__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, .1);
  border-right: 1px solid rgba(255, 255, 255, .1);
}

.ta-header .ta-search__input {
  width: 100%;
  max-width: 680px;
  background: transparent;
  border: none;
  color: var(--ta-white);
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  padding: 0;
  caret-color: var(--ta-orange);
}

.ta-header .ta-search__input:focus {
  outline: none;
  box-shadow: none;
}

.ta-header .ta-search__input::placeholder {
  color: rgba(255, 255, 255, .3);
  letter-spacing: 0.28em;
}

.ta-header .ta-search__input::-webkit-search-cancel-button {
  display: none;
}

.ta-header .ta-search__close {
  width: 72px;
  flex-shrink: 0;
  height: 100%;
  border: none;
  background: var(--ta-orange);
  color: var(--ta-white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.ta-header .ta-search__close:hover {
  background: #e64d00;
}

#taSearchOpen {
  display: none;
}

/* ── Tablet (≥600px) ──────────────────────────────────────── */
@media (min-width: 600px) {
  .ta-header .ta-header__inner {
    padding: 0 20px;
    height: 68px;
    gap: 12px;
  }

  .ta-header .ta-actions__cta {
    display: flex;
  }
}

/* ── Desktop (≥1024px) ────────────────────────────────────── */
@media (min-width: 1024px) {
  .ta-header .ta-header__inner {
    padding: 0px;
    height: 72px;
    gap: 40px;
    justify-content: flex-start;
  }

  .ta-header .ta-logo__mark    { width: 40px; height: 40px; }
  .ta-header .ta-logo__primary { font-size: 18px; }

  /* Nav: inline horizontal flex.
     z-index:auto resets mobile z-index:300 — prevents the nav stacking
     context from painting above the search overlay (z-index:200). */
  .ta-header .ta-nav {
    flex: 1;
    position: static;
    z-index: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    transition: none;
    display: flex;
    justify-content: center;
  }

  .ta-header .ta-nav__list {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
  }

  .ta-header .ta-nav__item { width: auto; }

  .ta-header .ta-nav__link {
    padding: 8px 16px;
    width: auto;
    justify-content: flex-start;
    border-left: none;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
  }

  /* Hover: no left accent or background on desktop */
  .ta-header .ta-nav__link:hover {
    border-left-color: transparent;
    background: transparent;
  }

  /* Active: orange bottom border */
  .ta-header .ta-nav__item--active .ta-nav__link {
    border-left-color: transparent;
    border-bottom-color: var(--ta-orange);
    background: transparent;
  }

  /* Dropdown: hover panel */
  .ta-header .ta-nav__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding-top: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .2s, transform .2s;
    max-height: none;
    overflow: visible;
  }

  .ta-header .ta-nav__item:hover .ta-nav__dropdown,
  .ta-header .ta-nav__item--open .ta-nav__dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .ta-header .ta-nav__dropdown-inner {
    background: #031a30;
    border: 1px solid rgba(255, 255, 255, .08);
    border-top: 2px solid var(--ta-orange);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
  }

  .ta-header .ta-nav__dropdown-link { padding: 10px 18px; }

  /* Hide hamburger on desktop */
  .ta-header .ta-hamburger { display: none; }
}

/* ── User account dropdown ─────────────────────────────────────── */
.ta-header .ta-user {
  position: relative;
}

.ta-header .ta-user__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: #031a30;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 2px solid var(--ta-orange);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 400;
  overflow: hidden;
}

.ta-header .ta-user__dropdown.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.ta-header .ta-user__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ta-white-sub);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}

.ta-header .ta-user__link:hover {
  color: var(--ta-white);
  background: var(--ta-white-faint);
  border-left-color: var(--ta-orange);
}

/* Log out row gets a subtle top separator and a red-tinted hover */
.ta-header .ta-user__link--signout {
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.ta-header .ta-user__link--signout:hover {
  color: #ff8060;
  border-left-color: #ff8060;
  background: rgba(255, 128, 96, .06);
}

.ta-header .ta-user__link svg {
  opacity: .6;
  flex-shrink: 0;
}

.ta-header .ta-user__link:hover svg {
  opacity: 1;
}

.ta-header .ta-user__link:focus-visible {
  outline: 2px solid var(--ta-orange);
  outline-offset: -2px;
}

/* ── Accessibility ──────────────────────────────────────────────── */
.ta-header .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ta-header .ta-nav__link:focus-visible,
.ta-header .ta-actions__icon-btn:focus-visible,
.ta-header .ta-actions__cta:focus-visible,
.ta-header .ta-hamburger:focus-visible {
  outline: 2px solid var(--ta-orange);
  outline-offset: 2px;
}

