/* Header styles for Trusted Choicce Hub */

.tch-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: radial-gradient(circle at top left, rgba(211, 165, 100, 0.18) 0, rgba(5, 8, 21, 0.96) 48%, rgba(2, 3, 10, 0.98) 100%);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tch-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  gap: var(--space-4);
}

.tch-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tch-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.tch-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 32% 68% 58% 42% / 45% 40% 60% 55%;
  background: conic-gradient(from 210deg, var(--color-primary-strong), var(--color-accent-bronze), #f5f0e6, var(--color-primary), var(--color-accent-bronze));
  box-shadow: 0 0 0 1px rgba(245, 240, 230, 0.15), 0 14px 30px rgba(0, 0, 0, 0.7);
}

.tch-header__title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tch-header__site-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-bg-ivory);
}

.tch-header__site-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Navigation */

.tch-header__nav {
  display: flex;
}

.tch-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.tch-header__nav-link {
  position: relative;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-text-soft);
  padding: 0.35rem 0;
}

.tch-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-primary-strong), var(--color-accent-bronze));
  transition: width var(--transition-normal);
}

.tch-header__nav-link:hover,
.tch-header__nav-link:focus-visible {
  color: var(--color-bg-ivory);
}

.tch-header__nav-link:hover::after,
.tch-header__nav-link:focus-visible::after {
  width: 100%;
}

/* Mobile toggle */

.tch-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at top left, rgba(211, 165, 100, 0.18) 0, rgba(5, 8, 21, 0.96) 70%);
  cursor: pointer;
  color: var(--color-bg-ivory);
}

.tch-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--color-bg-ivory);
  transition: transform var(--transition-normal), opacity var(--transition-normal), width var(--transition-normal);
}

/* Toggle animation */

.tch-header__toggle[aria-expanded="true"] .tch-header__toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
  width: 20px;
}

.tch-header__toggle[aria-expanded="true"] .tch-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.tch-header__toggle[aria-expanded="true"] .tch-header__toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 20px;
}

/* Mobile layout */

@media (max-width: 768px) {
  .tch-header__inner {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .tch-header__site-tagline {
    display: none;
  }

  .tch-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 64px;
    background: radial-gradient(circle at top, rgba(14, 20, 50, 0.98) 0, rgba(5, 8, 21, 0.98) 45%, rgba(1, 3, 10, 0.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  }

  .tch-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .tch-header__toggle {
    display: inline-flex;
  }

  .tch-header__nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 769px) {
  .tch-header__toggle {
    display: none;
  }
}

/* When header menu is open, prevent body scroll (class applied via JS) */

.body--nav-open {
  overflow: hidden;
}


/* Header desktop/mobile hard fix */

.tch-header__inner {
  min-height: 68px;
}

.tch-header__brand {
  flex: 0 1 auto;
}

.tch-header__logo-link {
  max-width: 100%;
}

.tch-header__title-group {
  min-width: 0;
}

.tch-header__site-title,
.tch-header__site-tagline {
  white-space: nowrap;
}

.tch-header__nav {
  margin-left: auto;
}

.tch-header__nav-list {
  margin: 0;
  padding: 0;
}

.tch-header__toggle {
  display: none;
  flex-shrink: 0;
}

/* Desktop */
@media (min-width: 769px) {
  .tch-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .tch-header__toggle {
    display: none !important;
  }

  .tch-header__nav {
    position: static;
    display: flex;
    width: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border-top: 0;
  }

  .tch-header__nav-list {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: var(--space-4);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .tch-header__inner {
    position: relative;
  }

  .tch-header__toggle {
    display: inline-flex !important;
    margin-left: auto;
  }

  .tch-header__nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    z-index: 50;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
  }

  .tch-header__nav.tch-header__nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    padding: 20px;
  }

  .tch-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
  }
}