/* --- Basis Header Stabilität --- */
.bluebird-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: 'Poppins', sans-serif !important;
  transition: background 0.3s ease;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

.main-nav {
  position: relative;
  z-index: 20;
}

.nav-wrapper {
  min-height: 86px;
  width: 100%;
}

.main-nav > .container.nav-wrapper {
  display: grid !important;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  column-gap: 40px;
  min-height: 86px;
  width: 100%;
  transition: min-height 0.3s ease-in-out;
}

/* --- Logo --- */
.logo {
  width: 120px;
  min-width: 120px;
}

.bluebird-header .logo {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: 120px;
  transform: translateY(10px);
  transition: all 0.4s ease-in-out;
}

.bluebird-header .logo img {
  width: 120px;
  display: block;
}

.bluebird-header.is-sticky .logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  margin-left: 60px;
}

/* --- Navigation --- */
.navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: max-content;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
}

.navigation ul li {
  position: relative;
}

.navigation ul li a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
}

.navigation .hs-menu-wrapper > ul > li {
padding-bottom: 20px; 
  margin-bottom: -20px;
}

/* Menü-Links Weiss machen */
.navigation .hs-menu-wrapper > ul > li > a {
  color: #ffffff !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  position: relative;
  transition: color 0.3s ease-in-out;
}

.navigation .hs-menu-wrapper > ul > li > a:hover {
  color: #0b5fa5 !important;
}

.navigation .hs-menu-wrapper > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #0b5fa5;
  transition: width 0.25s ease;
}

@media (min-width: 1241px) {
  .navigation .hs-menu-wrapper > ul > li:hover > a::after {
    width: 100%;
  }
}

/* Standard-Submenu */
.navigation ul li ul {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 18px);
  background: #f5f6f7;
  padding: 24px;
  min-width: 720px;
  gap: 16px;
  align-items: start;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  grid-template-columns: repeat(3, 1fr);
}

.navigation ul li:hover ul {
  display: none;
}

.navigation ul ul li {
  margin: 0;
}

.navigation ul ul li a {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  min-height: 72px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 10px;
  color: #0b1f3a;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}

.navigation ul ul li a:hover {
  background: #d9dde3;
}

.navigation ul ul li a img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* HubSpot Standard-Submenu ausblenden */
.navigation .hs-menu-wrapper > ul > li > ul {
  display: none !important;
}

/* --- CTA --- */
.cta-button {
  flex: 0 0 auto;
  margin-left: 24px;
}

.cta-button,
.cta-button a {
  white-space: nowrap;
}

.cta-button a {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cta-button a:hover {
  background: #ffffff;
  color: #0b1f3a;
  border-color: #ffffff;
}

/* --- Top Bar --- */
.bluebird-header .top-bar {
  background: #0b1f3a;
  height: 40px;
  display: flex;
  align-items: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.bluebird-header .top-bar > .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: flex-end;
  height: 100%;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: 0;
}

.top-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.top-links a:hover {
  color: #ffffff;
}

.top-links a i {
  font-size: 12px;
}

/* --- Sticky Status --- */
.bluebird-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(11, 31, 58, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bluebird-header.is-sticky .top-bar {
  display: none;
}

.bluebird-header.is-sticky .main-nav {
  background-color: rgba(11, 31, 58, 0.85) !important;
  backdrop-filter: blur(6px);
}

.bluebird-header.is-sticky .main-nav > .container.nav-wrapper {
  min-height: 86px;
}

/* --- Mega Menu --- */
.mega-menu-container {
  display: grid;
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  width: min(1120px, calc(100vw - 40px));
  max-width: 1120px;
  padding: 24px 40px;
  gap: 28px;
  align-items: start;
  grid-template-columns: repeat(3, 1fr) 280px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 12px 12px;
  opacity: 0;
  visibility: hidden;
  z-index: 999999 !important;
  pointer-events: auto !important;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Erzwungene Sichtbarkeit wenn offen */
.mega-menu-container.mega-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.mega-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mega-column:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.mega-image img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.mega-column:hover .mega-image img {
  transform: scale(1.04);
}

.mega-title {
  display: inline-block;
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mega-title:hover {
  color: #0b5fa5;
}

.mega-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block !important;
  gap: 0 !important;
}

.mega-links li,
.mega-links li a {
  display: block;
  writing-mode: initial;
  white-space: normal;
}

.mega-links li {
  margin: 0 0 6px 0;
  width: 100%;
}

.mega-links a,
.mega-links li a {
  text-decoration: none;
  color: #1f2f44 !important;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  padding: 6px 0;
  min-height: auto;
  background: transparent;
  border-radius: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  transition: all 0.25s ease;
}

.mega-links a:hover,
.mega-links li a:hover {
  color: #0b5fa5 !important;
  transform: translateX(4px);
  text-decoration: none;
  background: transparent;
}

/* Featured Links / Card */
.mega-featured {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mega-featured-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #0b5fa5;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mega-featured-link:hover {
  color: #0070c0;
  transform: translateX(4px);
}

.mega-feature-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b1f3a, #123a63);
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.mega-feature-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #ffffff;
}

.mega-feature-card p {
  font-size: 14px;
  margin-bottom: 16px;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.85);
}

.mega-feature-button {
  background: #ffffff;
  color: #0b1f3a;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mega-feature-button:hover {
  transform: translateY(-2px);
  background: #f2f6fa;
}

/* --- Submenu Visual --- */
.submenu-visual {
  display: none;
  position: absolute;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 260px;
}

.submenu-visual img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}

.submenu-visual p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

/* --- Optional Hero Logo Fade --- */
.is-sticky ~ .content-wrapper .hero-logo {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* --- Tablet --- */
@media (max-width: 1200px) {
  .main-nav > .container.nav-wrapper {
    grid-template-columns: 70px 1fr auto;
    column-gap: 16px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .logo {
    width: 80px;
    min-width: 80px;
  }

  .bluebird-header .logo {
    width: 80px;
  }

  .bluebird-header .logo img {
    width: 80px;
    min-width: 80px;
  }

  .bluebird-header.is-sticky .logo {
    margin-left: 0;
  }

  .navigation ul {
    gap: 12px;
  }

  .top-links {
    margin-right: 24px;
  }

  .mega-menu-container {
    max-width: calc(100vw - 48px);
    padding: 24px;
    gap: 20px;
  }
}

/* --- Mobile Navigation Toggle --- */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
}

/* --- Mobile --- */
@media (max-width: 1240px) {
  .mobile-nav-toggle {
    display: flex;
    position: relative;
    width: 40px;
    height: 40px;
  }

  .mobile-nav-toggle span {
    position: absolute;
    left: 8px;
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
  }

  .mobile-nav-toggle span:nth-child(1) {
    top: 11px;
  }

  .mobile-nav-toggle span:nth-child(2) {
    top: 19px;
  }

  .mobile-nav-toggle span:nth-child(3) {
    top: 27px;
  }

  .mobile-nav-toggle.active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
  }

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

  .mobile-nav-toggle.active span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
  }

  .cta-button {
    display: none;
  }

  .navigation {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 86px);
    padding: 24px;
    background: #0b1f3a;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navigation.mobile-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navigation ul {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }

  .navigation ul li {
    width: 100%;
  }

  .navigation ul li a {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 18px;
  }

  .navigation ul li ul {
    display: none;
    position: static;
    width: 100%;
    min-width: 100%;
    padding: 12px 0 0 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    grid-template-columns: 1fr !important;
  }

  .navigation ul li.open > ul {
    display: block !important;
  }

  .navigation ul li ul li a {
    font-size: 16px;
    padding: 10px 0 10px 16px;
  }

.navigation ul li.hs-item-has-children {
  position: relative !important;
}

.navigation ul li.hs-item-has-children::after {
  content: '+' !important;
  position: absolute !important;
  right: 0 !important;
  top: 22px !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #ffffff !important;
}

.navigation ul li.hs-item-has-children.open::after {
  content: '–' !important;
}

  .mega-menu-container {
    display: none !important;
  }

  .mega-image {
    display: none;
  }

  .mega-title {
    margin-top: 0;
  }

  .navigation ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

body.menu-open {
  overflow: hidden;
}

/* Erhöht die Trefferzone, damit keine Lücke zwischen Nav und Mega-Menu entsteht */
.navigation .hs-menu-wrapper > ul > li {
  padding-bottom: 45px !important;
  margin-bottom: -25px !important;
}


/* --- Desktop Mega Menu (Neu & Zentriert) --- */

/* Die "Brücke" für die Maus */
.navigation .hs-menu-wrapper > ul > li {
  padding-bottom: 25px !important; 
  margin-bottom: -25px !important;
}

/* --- MEGA MENU MASTER RESET --- */
.mega-menu-container {
  display: block !important; /* Wir schalten hier auf Block, das Grid kommt innen */
  position: absolute !important;
  top: calc(100% - 15px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  
  /* FORCE WIDTH: Wir geben ihm eine feste Breite, die nicht verhandelt werden kann */
  width: 1180px !important; 
  min-width: 1180px !important;
  
  padding: 40px !important;
  background: #ffffff !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2) !important;
  border-radius: 12px !important;
  
  opacity: 0;
  visibility: hidden;
  z-index: 999999 !important;
  transition: all 0.3s ease-in-out;
}



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

/* Das innere Grid erzwingen */
.mega-grid-inner {
  display: grid !important;
  /* 3 Spalten für Kategorien + 1 breitere für die Card */
  grid-template-columns: 1fr 1fr 1fr 320px !important; 
  gap: 40px !important;
  width: 100% !important;
  align-items: start !important;
}

/* Verhindert das vertikale Umbrechen der Texte */
.mega-column {
  min-width: 0 !important;
  width: 100% !important;
}

.mega-title {
  white-space: normal !important; /* Erlaubt normales Umbrechen */
  writing-mode: horizontal-tb !important; /* Erzwingt horizontale Schrift */
  display: block !important;
  width: 100% !important;
}

.mega-links {
  display: block !important;
  width: 100% !important;
}

/* Die blaue Card rechts fixieren */
.mega-feature-card {
  grid-column: 4 !important; /* Zwingt die Card in die 4. Spalte */
  min-width: 280px !important;
}

/* --- Schriftgrößen im Megamenü --- */

/* 1. Die Spalten-Überschriften (z.B. STRATEGIE & AUSWAHL) */
/* --- Megamenü Design-Update (Ersetzt die alten wuchtigen Styles) --- */

.mega-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  text-transform: none !important; /* Keine reinen Großbuchstaben mehr */
  color: #0b5fa5 !important;
  margin-bottom: 12px !important;
  display: block !important;
}

.mega-links a, 
.mega-links li a {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #4a4a4a !important; /* Weicheres Grau */
  padding: 3px 0 !important;
  text-decoration: none !important;
}

.mega-links a:hover, 
.mega-links li a:hover {
  color: #00b4ff !important;
  text-decoration: underline !important;
  transform: none !important; /* Wir lassen das Hüpfen weg, das wirkt ruhiger */
}

/* Die Karte rechts: Jetzt in hellem Look für weniger "Wucht" */
.mega-feature-card {
  padding: 20px !important; /* Weniger Innenabstand macht die Box kompakter */
  min-width: 240px !important;
  max-width: 260px !important;
  justify-self: end; /* Schiebt die Karte ganz nach rechts */
}

.mega-feature-card h4 {
  font-size: 15px !important; /* Etwas kleinere Headline */
  margin-bottom: 6px !important;
}

.mega-feature-card p {
  font-size: 12px !important; /* Kompakterer Text */
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
}

/* --- Vertikale Trennlinien zwischen den Kategorien --- */

.mega-column {
  /* Erzeugt einen feinen Strich rechts von jeder Kategorie-Spalte */
  border-right: 1px solid #e2e8f0 !important; 
  padding-right: 20px !important;
  height: 100%; /* Sorgt dafür, dass die Linien gleich lang sind */
}

/* Wir entfernen den Strich nach der 3. Spalte, damit er nicht vor der Feature-Card klebt */
.mega-column:nth-child(3) {
  border-right: none !important;
}

/* Optional: Damit die Titel und Links perfekt ausgerichtet sind */
.mega-grid-inner {
  display: grid !important;
  /* Wir reduzieren die 4. Spalte von 320px auf 260px */
  grid-template-columns: 1fr 1fr 1fr 260px !important; 
  gap: 30px !important;
  align-items: center !important; /* Zentriert die Karte vertikal, falls sie kürzer ist als die Listen */
}

.mega-feature-button {
  font-size: 13px !important;
  padding: 8px 12px !important; /* Kleinerer Button */
}



/* --- TABLET ULTIMATIVE LÖSUNG (Fixed Viewport) --- */
@media (max-width: 1240px) and (min-width: 769px) {

  .mega-menu-container {
    /* Wir lösen das Menü komplett vom Header los */
    position: fixed !important;
    
    /* Wir setzen es exakt in die Mitte des Browserfensters */
    left: 50% !important;
    top: 86px !important; /* Passt das Menü unter deinen Header an */
    transform: translateX(-50%) translateY(10px) !important;
    
    /* Wir erzwingen die Breite auf 94% des Bildschirms */
    width: 94vw !important;
    min-width: 94vw !important;
    max-width: 1100px !important;
    
    margin: 0 auto !important;
    padding: 30px !important;
    background: #ffffff !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3) !important;
    z-index: 9999999 !important; /* Extrem hoher Wert */
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }


