.site-header.sticky-header {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(13, 11, 29, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: top 0.3s ease;
}

body.nav-open .site-header.sticky-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sticky-header-spacer {
  display: none;
}

.site-header.sticky-header + .sticky-header-spacer {
  display: block;
  height: 72px;
}

.menu-toggle {
  display: none;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1300px;
  margin: auto;
  padding: 0 var(--ta-spacing-md, 20px);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding .custom-logo {
  vertical-align: middle;
}

.site-logo {
  width: 40px;
  height: 40px;
  background: #2d2d4d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #a78bfa;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 1px;
}

/* Navigation */
.main-navigation {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav-menu {
  display: flex;
  gap: 25px;
  border-radius: 32px;
  border: 1px solid #F6F4FF;
  padding: 8px 30px;
  list-style: none;
  margin: 0;
  flex-shrink: 1;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-menu a {
  color: #B1B1B1;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  padding: 6px 0;
  position: relative;
  text-transform: capitalize;
  transition: color 0.2s;
}

.nav-menu a.active,
.nav-menu a[aria-current="page"] {
  color: #FFFFFF;
}

.nav-menu a.active::after,
.nav-menu a[aria-current="page"]::after {
  content: '';
  position: absolute;
  display: block;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: #a78bfa;
}

.nav-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #B1B1B1;
  padding: 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-menu .menu-item-has-children:hover .nav-submenu-toggle,
.nav-menu .menu-item-has-children:hover > a,
.nav-menu a:hover {
    color: #a78bfa;
}

.nav-submenu-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-submenu-toggle:focus-visible {
  outline: 2px solid var(--ta-accent-purple, #8B5CF6);
  outline-offset: 2px;
}

.nav-submenu-icon {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.menu-item-has-children.is-open > .nav-submenu-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.menu-item-has-children.is-open > .nav-submenu-toggle .nav-submenu-icon {
  transform: rotate(180deg);
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -4px);
  min-width: 240px;
  padding: 10px;
  margin: 0;
  background: #06050f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 15;
}

.nav-menu .sub-menu li {
  list-style: none;
  margin: 0;
}

.nav-menu .menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

@media (min-width: 901px) {
  .nav-menu .menu-item-has-children:hover > .sub-menu,
  .nav-menu .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

.nav-menu .sub-menu a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  text-transform: none;
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

/* Dashboard external link icon */
.nav-menu .external-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu .external-link svg {
  width: 16px;
  height: 16px;
  fill: #a78bfa;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ta-language-switcher {
  position: relative;
  z-index: 20;
}

.ta-language-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #0d0c18;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ta-language-current:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.ta-language-current:focus-visible {
  outline: 2px solid var(--ta-accent-purple, #8B5CF6);
  outline-offset: 2px;
}

.ta-language-flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ta-language-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ta-language-flag--text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.ta-language-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.ta-language-option .ta-language-name {
  font-weight: 500;
  font-size: 0.85rem;
}

.ta-language-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  color: #fff;
  transition: transform 0.2s ease;
}

.ta-language-switcher.is-open .ta-language-toggle-icon {
  transform: rotate(180deg);
}

.ta-language-list {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  margin: 0;
  background: #06050f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}

.ta-language-list li {
  list-style: none;
  margin: 0;
}

.ta-language-switcher.is-open .ta-language-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ta-language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.ta-language-option:hover,
.ta-language-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.ta-language-list .is-active .ta-language-option {
  background: rgba(139, 92, 246, 0.18);
}

.header-actions .btn-primary {
  background: #7B62FF;
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 12px 35px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s ease;
  cursor: pointer;
}

.header-actions .btn-primary:hover {
  background: #5d3ff4;
}

  /* Mobile menu actions styling */
  .mobile-menu-actions {
    display: none; /* Hidden by default */
  }

/* Responsive */
@media (max-width: 900px) {
  .nav-menu {
    border: none;
    padding: 0;
    border-radius: 0;
  }

  .header-content {
    padding: 12px;
  }

  .menu-toggle {
    display: block;
    border: none;
    cursor: pointer;
    padding: 0.75em;
    z-index: 1002;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.258);
  }

  .menu-toggle .hamburger {
    display: inline-block;
    width: 24px;
    height: 18px;
    position: relative;
  }
  
  .menu-toggle .hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 1px;
    margin: 4px 0;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    transform-origin: center;
  }
  /* Hamburger animation when menu is open */
  .menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  .main-navigation {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #0D0B1D 0%, #1A1A2E 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .main-navigation {
    display: flex;
    opacity: 1;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    padding: 2em 1.5em;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  .nav-menu a {
    width: 100%;
  }
  
  .nav-menu li {
    width: 100%;
    margin: 0;
    text-align: center;
    justify-content: center;
  }

  .nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
  }
 
  .nav-menu a:hover,
  .nav-menu a:focus {
    color: #a78bfa;
  }

  .nav-menu a.active,
  .nav-menu a[aria-current="page"] {
    color: #a78bfa;
  }

  .nav-menu a.active::after,
  .nav-menu a[aria-current="page"]::after {
    display: none;
  }

  .nav-menu .menu-item-has-children {
    flex-wrap: wrap;
  }

  .nav-menu .nav-submenu-toggle {
    position: absolute;
    inset-inline-end: 5%;
    padding: 20px;
  }

  .nav-menu .sub-menu {
    position: absolute;
    width: 100%;
    min-width: 0;
    transform: none;
    opacity: 0;
    pointer-events: none;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    margin-top: 8px;
    padding: 12px;
  }

  .nav-menu .menu-item-has-children.is-open > .sub-menu {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu .sub-menu a {
    font-size: 1rem;
    white-space: normal;
  }

  .menu-toggle[aria-expanded="true"] {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }
  
  .header-actions {
    display: none;
  }
  
  .mobile-menu-actions .ta-language-switcher {
    width: 100%;
    margin-bottom: 20px;
  }

  .mobile-menu-actions .ta-language-current {
    width: 100%;
    justify-content: flex-start;
  }
  
  .mobile-menu-actions .ta-language-list {
    width: 100%;
    min-width: 100%;
    right: auto;
    left: 0;
  }
  
  /* Show mobile menu actions when menu is open */
  body.nav-open .mobile-menu-actions {
    display: block;
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    text-align: center;
    width: calc(100% - 1.5em);
    padding: 0 1em;
    z-index: 1;
  }
  
  .mobile-menu-actions .btn-primary {
    background: #7B62FF;
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 16px 48px;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    width: 100%;
  }
  
  .mobile-menu-actions .btn-primary:hover {
    background: #5d3ff4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123, 98, 255, 0.4);
  }

  .ta-language-switcher.is-open .ta-language-list {
    transform: translateY(-100%);
  }
}

@media (max-width: 600px) {
  .nav-menu {
    padding: 1.5em 1em;
  }
  .nav-menu a {
    padding: 0.5em;
    font-size: 1.25rem;
  }
  .menu-toggle[aria-expanded="true"] {
    top: 1.5rem;
    right: 1.5rem;
  }
  
  /* Smaller mobile button styling */
  .mobile-menu-actions .btn-primary {
    padding: 14px 36px;
    font-size: 14px;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .nav-menu {
    gap: 14px;
    padding: 8px 16px;
  }

  .nav-menu a {
    font-size: 15px;
  }

  .header-content {
    padding: 0 16px;
  }
}
