.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  z-index: 1001;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.125rem;
}

.header-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.header-logo-text span {
  color: var(--primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.header-nav-link:hover {
  color: var(--primary);
}

.header-nav-link.has-mega {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav-link.has-mega svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.header-nav-link.has-mega:hover svg,
.header-nav-link.has-mega.active svg {
  transform: rotate(180deg);
}

.header-cta {
  flex-shrink: 0;
  z-index: 1001;
}

.header-cta .btn {
  padding: 10px 20px;
  font-size: 0.8125rem;
}

.mega-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mega-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mega-menu {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  max-width: 1280px;
  width: calc(100% - 48px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
}

.mega-menu::-webkit-scrollbar {
  width: 6px;
}

.mega-menu::-webkit-scrollbar-track {
  background: transparent;
}

.mega-menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.mega-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

.mega-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 28px;
}

.mega-menu-column {
  border-right: 1px solid var(--border-light);
  padding: 0 16px;
}

.mega-menu-column:last-child {
  border-right: none;
}

.mega-menu-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.mega-menu-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-menu-item {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  transition: color var(--transition);
  line-height: 1.4;
}

.mega-menu-item:hover {
  color: var(--primary);
}

.mega-menu-item.highlight {
  color: var(--primary);
  font-weight: 600;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: var(--white);
  z-index: 1000;
  transition: right 0.3s ease;
  padding: 100px 24px 24px;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dark);
}

.mobile-nav-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.mobile-nav-link.active svg {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  padding: 0 0 16px 16px;
  flex-direction: column;
  gap: 8px;
}

.mobile-submenu.open {
  display: flex;
}

.mobile-submenu-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
  margin-bottom: 4px;
}

.mobile-submenu-item {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-light);
  padding: 4px 0;
}

.mobile-submenu-item:hover {
  color: var(--primary);
}

.mobile-cta {
  margin-top: 24px;
}

.mobile-cta .btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 1200px) {
  .mega-menu {
    max-width: calc(100% - 32px);
  }

  .mega-menu-grid {
    padding: 20px;
  }

  .mega-menu-column {
    padding: 0 10px;
  }
}

@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 640px) {
  .mobile-menu {
    width: 100%;
  }
}
