/*==============================================
  AURA MARKET RESEARCH - Navigation Styles (Advanced)
==============================================*/

/* ----- Top Announcement Bar ----- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: linear-gradient(90deg, #071A3D, #0F2B5E);
  border-bottom: 1px solid rgba(39,167,207,0.15);
  height: 36px;
  overflow: hidden;
}

.top-bar-inner {
  width: 100%;
  overflow: hidden;
  height: 100%;
}

.top-bar-track {
  display: flex;
  gap: 48px;
  align-items: center;
  height: 100%;
  animation: topBarScroll 30s linear infinite;
  width: max-content;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.top-bar-item i {
  color: var(--primary-light, #27A7CF);
  font-size: 0.65rem;
}

@keyframes topBarScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----- Header ----- */
.header {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  background: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(7,26,61,0.08);
  border-bottom-color: var(--gray-soft);
}

.header.hide {
  transform: translateY(-100%);
}

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

/* ----- Logo ----- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  z-index: 5;
}

.logo-img {
  display: block;
  height: 46px;
  width: auto;
  max-width: 200px;
  transition: height 0.3s ease;
}

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

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ----- Navigation ----- */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, background 0.25s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

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

.nav-link .chevron {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav-link:hover .chevron {
  transform: rotate(180deg);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ----- Dropdown (regular) ----- */
.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.97);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border: 1px solid var(--gray-soft);
  transform-origin: top center;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: var(--bg-light);
  color: var(--primary);
  padding-left: 18px;
}

.dropdown-link .dd-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.dropdown-link:hover .dd-icon {
  background: rgba(0,102,204,0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-soft);
  margin: 4px 8px;
}

/* ----- Mega Menu ----- */
.mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.97);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: auto;
  min-width: 500px;
  max-width: min(780px, calc(100vw - 3rem));
  padding: 20px 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border: 1px solid var(--gray-soft);
  max-height: 80vh;
  overflow-y: auto;
  transform-origin: top center;
}

.has-dropdown:hover .mega-menu,
.has-dropdown:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mega-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 6px 10px;
  margin-top: 10px;
}

.mega-section-title:first-child {
  margin-top: 0;
}

/* ----- Header Actions ----- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.25s ease;
  font-size: 1.1rem;
  position: relative;
  flex-shrink: 0;
}

.header-btn:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.header-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-cta.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.header-cta.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,102,204,0.3);
}

.header-cta.btn-outline {
  border: 1.5px solid var(--gray-soft);
  color: var(--text-dark);
}

.header-cta.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,102,204,0.04);
}

/* ----- Hamburger ----- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  border: none;
  background: none;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  width: 24px;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-5px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 24px;
}

/* ----- Mobile Overlay ----- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,26,61,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

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

/* ----- Mobile Menu ----- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 85vw;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -10px 0 40px rgba(7,26,61,0.1);
  display: flex;
  flex-direction: column;
}

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

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-soft);
  flex-shrink: 0;
}

.mobile-menu-header .logo-img {
  height: 38px;
  max-width: 160px;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.mobile-menu-close:hover {
  background: var(--gray-soft);
  color: var(--text-dark);
}

.mobile-nav-list {
  padding: 12px 16px;
  flex: 1;
}

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

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.mobile-nav-link .chevron {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-nav-link.active .chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
}

.mobile-submenu.open {
  max-height: 500px;
}

.mobile-submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.mobile-submenu-link:hover {
  color: var(--primary);
  padding-left: 26px;
}

.mobile-menu-ctas {
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--gray-soft);
  flex-shrink: 0;
}

.mobile-menu-ctas .btn {
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
}

/* ----- Focus States (Accessibility) ----- */
.nav-link:focus-visible,
.dropdown-link:focus-visible,
.mobile-nav-link:focus-visible,
.mobile-submenu-link:focus-visible,
.hamburger:focus-visible,
.header-btn:focus-visible,
.mobile-menu-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----- Responsive Nav ----- */
@media (max-width: 1200px) {
  .nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .header-cta {
    display: none;
  }
  .header-inner {
    padding: 0 20px;
  }
  .header-actions {
    gap: 6px;
  }
}

@media (max-width: 992px) {
  .header-inner {
    padding: 0 18px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    height: 30px;
  }
  .top-bar-item {
    font-size: 0.7rem;
  }
  .header {
    top: 30px;
    height: 64px;
  }
  :root { --header-height: 94px; }
  .header-inner {
    padding: 0 14px;
  }
  .logo-img {
    height: 37px;
    max-width: 160px;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .logo-text span {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }
  .header-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .mobile-menu {
    width: 320px;
    max-width: 85vw;
  }
  .mobile-menu-header {
    padding: 14px 16px;
  }
  .mobile-menu-header .logo-img {
    height: 34px;
  }
  .mobile-nav-list {
    padding: 8px 12px;
  }
  .mobile-nav-link {
    padding: 12px 8px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  .mobile-submenu-link {
    padding: 10px 12px 10px 18px;
    font-size: 0.85rem;
    min-height: 40px;
  }
  .mobile-menu-ctas {
    padding: 12px 16px 20px;
  }
  .mobile-menu-ctas .btn {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .header {
    height: 58px;
  }
  .header-inner {
    padding: 0 10px;
  }
  .logo-img {
    height: 31px;
    max-width: 140px;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .logo-text {
    font-size: 0.95rem;
  }
  .logo-text span {
    display: none;
  }
  .header-btn {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
  .hamburger span {
    width: 20px;
  }
  .mobile-menu {
    width: 280px;
  }
  .mobile-nav-link {
    padding: 10px 6px;
    font-size: 0.85rem;
    min-height: 40px;
  }
}

@media (max-width: 375px) {
  .header {
    height: 54px;
  }
  .logo-img {
    height: 26px;
    max-width: 120px;
  }
  .logo-text {
    font-size: 0.85rem;
  }
  .header-btn {
    width: 32px;
    height: 32px;
  }
  .hamburger span {
    width: 18px;
    height: 1.5px;
  }
}

@media (max-width: 320px) {
  .header {
    height: 50px;
  }
  .header-inner {
    padding: 0 6px;
  }
  .logo-img {
    height: 22px;
    max-width: 100px;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .logo-text {
    font-size: 0.78rem;
  }
  .header-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .hamburger {
    width: 26px;
    height: 26px;
  }
  .hamburger span {
    width: 16px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .header,
  .header.hide,
  .mobile-menu,
  .hamburger span,
  .dropdown,
  .mega-menu,
  .mobile-submenu,
  .mobile-overlay {
    transition: none !important;
  }
}
