/* Tamiyouz Unified Global Header — scoped to #tyz-global-header */
#tyz-global-header {
  --tyz-navy: #0a1628;
  --tyz-navy-light: #132240;
  --tyz-gold: #c9a96e;
  --tyz-gold-hover: #dbbf88;
  --tyz-text: #f0ece4;
  --tyz-text-muted: rgba(240, 236, 228, 0.7);
  --tyz-height: 80px;
  --tyz-blur: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  height: var(--tyz-height);
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: var(--tyz-blur);
  -webkit-backdrop-filter: var(--tyz-blur);
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  direction: rtl;
  box-sizing: border-box;
}

#tyz-global-header *,
#tyz-global-header *::before,
#tyz-global-header *::after {
  box-sizing: inherit;
}

/* Admin bar offset */
body.admin-bar #tyz-global-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar #tyz-global-header {
    top: 46px;
  }
}

#tyz-global-header.tyz-header--scrolled {
  background: rgba(10, 22, 40, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

#tyz-global-header .tyz-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
#tyz-global-header .tyz-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

#tyz-global-header .tyz-header__logo img {
  height: 52px;
  width: 23px;
  object-fit: contain;
  filter: none;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

#tyz-global-header .tyz-header__logo:hover img {
  opacity: 1;
}

/* Desktop Nav */
#tyz-global-header .tyz-header__nav {
  display: flex;
  align-items: center;
}

#tyz-global-header .tyz-header__nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#tyz-global-header .tyz-header__link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tyz-text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

#tyz-global-header .tyz-header__link:hover,
#tyz-global-header .tyz-header__link:focus-visible {
  color: var(--tyz-gold);
  background: rgba(201, 169, 110, 0.08);
}

#tyz-global-header .tyz-header__link--active {
  color: var(--tyz-gold);
  background: rgba(201, 169, 110, 0.12);
}

/* Actions */
#tyz-global-header .tyz-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#tyz-global-header .tyz-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tyz-gold);
  text-decoration: none;
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 8px;
  background: rgba(201, 169, 110, 0.08);
  transition: all 0.3s ease;
  white-space: nowrap;
}

#tyz-global-header .tyz-header__cta:hover,
#tyz-global-header .tyz-header__cta:focus-visible {
  background: var(--tyz-gold);
  color: var(--tyz-navy);
  border-color: var(--tyz-gold);
}

/* Burger */
#tyz-global-header .tyz-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

#tyz-global-header .tyz-header__burger:hover,
#tyz-global-header .tyz-header__burger:focus-visible {
  background: rgba(201, 169, 110, 0.08);
}

#tyz-global-header .tyz-header__burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tyz-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#tyz-global-header .tyz-header__burger[aria-expanded="true"] .tyz-header__burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#tyz-global-header .tyz-header__burger[aria-expanded="true"] .tyz-header__burger-bar:nth-child(2) {
  opacity: 0;
}

#tyz-global-header .tyz-header__burger[aria-expanded="true"] .tyz-header__burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
#tyz-global-header .tyz-header__mobile {
  position: absolute;
  top: var(--tyz-height);
  left: 0;
  right: 0;
  background: var(--tyz-navy-light);
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

#tyz-global-header .tyz-header__mobile[aria-hidden="false"] {
  max-height: 480px;
  opacity: 1;
}

#tyz-global-header .tyz-header__mobile-list {
  list-style: none;
  margin: 0;
  padding: 12px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#tyz-global-header .tyz-header__mobile-link {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tyz-text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

#tyz-global-header .tyz-header__mobile-link:hover,
#tyz-global-header .tyz-header__mobile-link:focus-visible {
  color: var(--tyz-gold);
  background: rgba(201, 169, 110, 0.08);
}

#tyz-global-header .tyz-header__mobile-link--active {
  color: var(--tyz-gold);
  background: rgba(201, 169, 110, 0.12);
}

#tyz-global-header .tyz-header__mobile-cta {
  display: block;
  margin-top: 8px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--tyz-navy);
  text-align: center;
  text-decoration: none;
  background: var(--tyz-gold);
  border-radius: 8px;
  transition: background 0.2s ease;
}

#tyz-global-header .tyz-header__mobile-cta:hover,
#tyz-global-header .tyz-header__mobile-cta:focus-visible {
  background: var(--tyz-gold-hover);
}

/* Responsive */
@media (max-width: 960px) {
  #tyz-global-header .tyz-header__nav {
    display: none;
  }

  #tyz-global-header .tyz-header__cta {
    display: none;
  }

  #tyz-global-header .tyz-header__burger {
    display: flex;
  }
}

@media (max-width: 390px) {
  #tyz-global-header .tyz-header__inner {
    padding: 0 16px;
  }

  #tyz-global-header .tyz-header__logo img {
    height: 43px;
    width: 19px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  #tyz-global-header,
  #tyz-global-header *,
  #tyz-global-header *::before,
  #tyz-global-header *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Focus visible */
#tyz-global-header :focus-visible {
  outline: 2px solid var(--tyz-gold);
  outline-offset: 2px;
}
/* Live WordPress deployment adapter, keeping the existing brand and theme controls. */
#tyz-global-header .tyz-header__wordmark {
  display: inline-flex;
  flex-direction: column;
  color: #f8f4eb;
  font: 800 22px/1.2 "Cairo", Tahoma, sans-serif;
  letter-spacing: -.4px;
  white-space: nowrap;
}
#tyz-global-header .tyz-header__wordmark small {
  color: #c9a96e;
  font: 700 9px/1.8 "Outfit", Arial, sans-serif;
  letter-spacing: 2.5px;
}
#tyz-global-header .tyz-header__theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 39px; height: 39px; flex: none;
  color: #e9c788; background: #1b2a40;
  border: 1px solid rgba(201,169,110,.28);
  border-radius: 50%;
  cursor: pointer;
}
#tyz-global-header .tyz-header__theme-toggle:hover {
  background: rgba(201,169,110,.15);
}
#tyz-global-header, #tyz-global-header a, #tyz-global-header button {
  -webkit-tap-highlight-color: transparent;
}
#tyz-global-header .tyz-header__nav-list a[aria-current="page"] {
  color: #e6c285;
}
/* The homepage already has its own hero offset for a fixed header.
   Other legacy page wrappers need an equal offset under this unified header. */
#tyz-site-v1, #tyz-join { padding-top: 80px; }
@media (max-width: 960px) {
  #tyz-global-header .tyz-header__nav { display: none; }
}
@media (max-width: 520px) {
  #tyz-global-header .tyz-header__inner { padding-inline: 18px; gap: 12px; }
  #tyz-global-header .tyz-header__wordmark { font-size: 19px; }
  #tyz-global-header .tyz-header__wordmark small { font-size: 7px; letter-spacing: 1.5px; }
  #tyz-global-header .tyz-header__actions { gap: 4px; }
  #tyz-global-header .tyz-header__theme-toggle { height: 38px; width: 38px; }
}
