/* ============================================
   MODERN INNOVATIVE NAVBAR
   Clean, Spacious & Premium Design
   ============================================ */

:root {
  --navbar-height: 80px;
  --navbar-bg: #ffffff;
  --navbar-text: #1a1a1a;
  --navbar-hover: #0066FF;
  --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   NAVBAR CONTAINER
   ============================================ */

.modern-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition-smooth);
}

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

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ============================================
   BRAND SECTION
   ============================================ */

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.brand-link:hover {
  transform: scale(1.05);
}

.brand-logo {
  height: 80px;
  width: auto;
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1px solid rgba(0, 102, 255, 0.15);
  border-radius: 10px;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none
}

.partner-badge:hover {
  background: linear-gradient(135deg, #e6f2ff 0%, #f0f7ff 100%);
  border-color: rgba(0, 102, 255, 0.25);
  transform: translateY(-1px);
}

.partner-logo {
  height: 30px;
  width: auto;
}

.partner-label {
  font-size: 12px;
  font-weight: 700;
  color: #0066FF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   NAVIGATION MENU
   ============================================ */

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navbar-text);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(0, 102, 255, 0.08);
  color: var(--navbar-hover);
}

.nav-link.nav-link--highlight{
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 102, 255, 0.05) 100%);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

.nav-link.nav-link--highlight:hover {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 102, 255, 0.1) 100%);
  border-color: rgba(0, 102, 255, 0.3);
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: var(--transition-smooth);
}

.nav-link:hover .nav-icon {
  opacity: 1;
  transform: scale(1.1);
}

.chevron {
  transition: var(--transition-smooth);
  opacity: 0.5;
}

.dropdown.open .chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-link.nav-link--highlight > .badge,
.mobile-item > .badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 120%;
  transform: translateX(-50%) translateY(-10px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  pointer-events: none;
  min-width: 240px;
}

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

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

/* ============================================
   MEGA MENU
   ============================================ */

.mega-menu {
  width: 1400px;
  max-width: calc(100vw - 40px);
  padding: 32px;
  left: 120%;
  transform: translateX(-50%) translateY(-10px);
  box-sizing: border-box;
}

.mega-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.mega-menu-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.view-all {
  font-size: 14px;
  font-weight: 600;
  color: #0066FF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.view-all:hover {
  gap: 10px;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.mega-col {
  min-width: 0;
}

.brand-card {
  padding: 20px;
  background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.brand-card:hover {
  background: #fff;
  border-color: rgba(0, 102, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.brand-icon img {
  width: 32px;
  height: 32px;
}

.brand-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 14px 0;
}

.model-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}

.model-list li {
  margin-bottom: 8px;
}

.model-list a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  display: block;
  padding: 6px 0;
  transition: var(--transition-smooth);
}

.model-list a:hover {
  color: #0066FF;
  padding-left: 8px;
}

.brand-link {
  font-size: 13px;
  font-weight: 600;
  color: #0066FF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.brand-link:hover {
  gap: 8px;
}

/* ============================================
   DISTRICTS MENU
   ============================================ */

.districts-menu {
  width: 600px;
  max-width: calc(100vw - 40px);
  padding: 24px;
  box-sizing: border-box;
}

.districts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.district-col a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.district-col a:hover {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
  padding-left: 20px;
}

/* ============================================
   NAVBAR ACTIONS
   ============================================ */

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.cta-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-button:hover {
  box-shadow: 0 6px 24px rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
}

.cta-button svg {
  flex-shrink: 0;
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger {
  width: 24px;
  height: 2px;
  background: var(--navbar-text);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

.mobile-toggle.active .hamburger:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active .hamburger:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active .hamburger:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  overflow-y: auto;
}

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

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.mobile-logo {
  height: 65px;
}

.mobile-close {
  padding: 8px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mobile-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.mobile-menu-items {
  flex: 1;
}

.mobile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navbar-text);
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
}

.mobile-item:hover {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
}

.mobile-accordion {
  margin-bottom: 8px;
}

.accordion-toggle {
  width: 100%;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 20px;
}

.mobile-accordion.open .accordion-content {
  max-height: 2000px;
}

.accordion-content a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.accordion-content a:hover {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
}

/* Mobile Brand Sections */
.mobile-brand-section {
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

.mobile-brand-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.mobile-model-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.mobile-model-list li {
  margin-bottom: 8px;
}

.mobile-model-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.mobile-model-list a:hover {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
  padding-left: 16px;
}

.mobile-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0066FF;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.mobile-brand-link:hover {
  gap: 8px;
}

/* Mobile Brands Scroll Container */
.mobile-brands-scroll {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.mobile-brands-scroll::-webkit-scrollbar {
  width: 6px;
}

.mobile-brands-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.mobile-brands-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.mobile-brands-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Mobile Districts Scroll Container */
.mobile-districts-scroll {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.mobile-districts-scroll::-webkit-scrollbar {
  width: 6px;
}

.mobile-districts-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.mobile-districts-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.mobile-districts-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.mobile-districts-scroll a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: #666;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.mobile-districts-scroll a:hover {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
}

.mobile-all-brands {
  display: block;
  margin-top: 16px;
  padding: 12px 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #0066FF;
  background: rgba(0, 102, 255, 0.08);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.mobile-all-brands:hover {
  background: rgba(0, 102, 255, 0.15);
}

.mobile-menu-footer {
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
  margin-top: 24px;
}

.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
  transition: var(--transition-smooth);
}

.mobile-cta:hover {
  box-shadow: 0 6px 24px rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1400px) {
  .navbar-container {
    gap: 16px;
    padding: 0 20px;
  }

  .navbar-menu {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
    gap: 4px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .mega-menu-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cta-button {
    padding: 10px 16px;
    font-size: 13px;
  }
}

@media (max-width: 1200px) {
  .navbar-menu {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .cta-button span {
    display: none;
  }

  .cta-button {
    padding: 12px;
  }

  .navbar-container {
    height: 70px;
  }

  .brand-logo {
    height: 65px;
  }

  .partner-badge {
    padding: 6px 12px;
  }

  .partner-label {
    font-size: 10px;
  }

  /* Hide-on-scroll Verhalten auf Mobile */
  .waves-navbar-1,
  .modern-navbar {
    transition: transform 0.3s ease-in-out;
  }

  /* Hidden state für mobile navbar */
  .modern-navbar.hidden {
    transform: translateY(-100%);
  }
}

@media (max-width: 640px) {
  .navbar-container {
    padding: 0 16px;
    gap: 12px;
  }

  .brand-divider {
    display: none;
  }

  .partner-badge {
    display: none;
  }

  .brand-logo {
    height: 65px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.nav-link:focus-visible,
.cta-button:focus-visible,
.mobile-toggle:focus-visible {
  outline: 3px solid #0066FF;
  outline-offset: 2px;
}

@media (min-width: 1200px) {
  .dropdown-menu:not(.districts-menu){
    left: 220%;
  }
  
}