/* Reset en basis */
.bb-header-2024.custom-header * {
   box-sizing: border-box;
   font-family: system-ui, -apple-system, sans-serif;
}

/* Top Banner Styling */
.bb-top-banner {
   background: #061226;
   color: white;
   padding: 12px 20px;
   position: relative;
   overflow: hidden;
   z-index: 10000;
   width: 100%;
}

.bb-top-banner-content {
   display: flex;
   align-items: center;
   justify-content: center;
   max-width: 1140px;
   margin: 0 auto;
   position: relative;
}

.bb-top-banner-text {
   font-size: 14px;
   font-weight: 500;
   text-align: center;
   line-height: 1.4;
   flex: 1;
   padding-right: 40px;
}

.bb-top-banner-link {
   color: white;
   text-decoration: underline;
   text-decoration-thickness: 1px;
   text-underline-offset: 4px;
   transition: all 0.2s ease;
}

.bb-top-banner-link:hover {
   color: #e5e7eb;
   text-decoration-color: #e5e7eb;
}

.bb-top-banner-close {
   position: absolute;
   right: 0;
   top: 50%;
   transform: translateY(-50%);
   background: rgba(255, 255, 255, 0.2);
   border: none;
   color: white;
   width: 28px;
   height: 28px;
   border-radius: 50%;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 16px;
   font-weight: bold;
   transition: all 0.2s ease;
}

.bb-top-banner-close:hover {
   background: rgba(255, 255, 255, 0.3);
   transform: translateY(-50%) scale(1.1);
}

/* Banner is hidden class */
.bb-top-banner.hidden {
   display: none;
}

/* Header basis */
.bb-header-2024.custom-header {
   display: block;
   width: 100%;
   height: 64px;
   padding: 0;
   position: sticky!important;
   top: 0;
   z-index: 9999;
   background: #fcfcfc;
}

/* Adjust header top position when banner is visible */
body:has(.bb-top-banner:not(.hidden)) .bb-header-2024.custom-header {
   top: 0;
}

/* Header outer */
.bb-header-2024.custom-header .header-outer {
   width: 100%;
   height: 100%;
   background: #fcfcfc;
   border-bottom: 1px solid #eee;
}

/* Container */
.bb-header-2024.custom-header .header-container {
   max-width: 1140px;
   height: 100%;
   margin: 0 auto;
   padding: 0 20px;
   display: flex;
   align-items: center;
   justify-content: space-between;
}

/* Logo */
.bb-header-2024.custom-header .logo a {
   display: flex;
   align-items: center;
   text-decoration: none;
   color: #1a1f36;
   font-size: 18px;
   font-weight: 600;
   gap: 8px;
}

.bb-header-2024.custom-header .logo-icon {
   height: 24px;
   width: auto;
}

/* Main Navigation */
.bb-header-2024.custom-header .main-nav {
   flex: 1;
   margin: 0 20px 0 40px;
}

.bb-header-2024.custom-header .nav-list {
   display: flex;
   list-style: none;
   margin: 0;
   padding: 0;
   gap: 24px;
}

.bb-header-2024.custom-header .nav-item {
   position: relative;
   margin: 0;
   padding: 0;
   line-height: normal;
}

.bb-header-2024.custom-header .nav-link {
   display: flex;
   align-items: center;
   padding: 8px;
   color: #1e293b;
   text-decoration: none;
   font-size: 15px;
   font-weight: 500;
   transition: color 0.2s;
   line-height: normal;
}

.bb-header-2024.custom-header .nav-link:hover {
   color: #1d4ed8;
}

/* Popular Label */
.bb-header-2024.custom-header .menu-item-popular {
   display: inline-flex;
   align-items: center;
   margin-left: 8px;
   padding: 2px 8px;
   background-color: #2563eb;
   color: white;
   border-radius: 4px;
   font-size: 12px;
   font-weight: 500;
   line-height: 16px;
}

/* Dropdown Menu Styling */
.bb-header-2024.custom-header .dropdown-menu {
   display: none;
   position: absolute;
   top: 100%;
   left: 0;
   background: #fcfcfc;
   border: 1px solid #eee;
   border-radius: 8px;
   box-shadow: 0 4px 12px rgba(0,0,0,0.1);
   min-width: 200px;
   padding: 8px 0;
   margin: 0;
   list-style: none;
}

.bb-header-2024.custom-header .dropdown-menu.show {
   display: block;
}

.bb-header-2024.custom-header .dropdown-menu .dropdown-menu {
   top: 0;
   left: calc(100% + 0.5rem);
}

.bb-header-2024.custom-header .nav-item:hover > .dropdown-menu {
   display: block;
}

.bb-header-2024.custom-header .dropdown-menu li {
   position: relative;
   margin: 0;
   padding: 0;
}

.bb-header-2024.custom-header .dropdown-menu li::before {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   width: 3px;
   height: 0;
   background: #1d4ed8;
   transition: height 0.2s;
}

.bb-header-2024.custom-header .dropdown-menu li:hover::before {
   height: 100%;
}

.bb-header-2024.custom-header .dropdown-menu a {
   display: block;
   padding: 8px 16px;
   color: #1e293b;
   text-decoration: none;
   font-size: 14px;
   transition: all 0.2s;
}

.bb-header-2024.custom-header .dropdown-menu a:hover {
   background: #f0f9ff;
   color: #1d4ed8;
}

.bb-header-2024.custom-header .dropdown-arrow {
   font-size: 12px;
   margin-left: 4px;
   color: #94a3b8;
}

/* Mobile Menu Button */
.bb-header-2024.custom-header .mobile-menu-button {
   display: none;
   background: none;
   border: none;
   cursor: pointer;
   padding: 12px;
   z-index: 2000;
}

.bb-header-2024.custom-header .menu-icon {
   position: relative;
   display: block;
   width: 24px;
   height: 2px;
   background: #1e293b;
   transition: background 0.3s;
}

.bb-header-2024.custom-header .menu-icon::before,
.bb-header-2024.custom-header .menu-icon::after {
   content: '';
   position: absolute;
   width: 100%;
   height: 2px;
   background: #1e293b;
   transition: transform 0.3s;
}

.bb-header-2024.custom-header .menu-icon::before {
   transform: translateY(-8px);
}

.bb-header-2024.custom-header .menu-icon::after {
   transform: translateY(8px);
}

/* Mobile Navigation Overlay */
.bb-header-2024.custom-header .mobile-nav-overlay {
   display: none;
   position: fixed;
   top: 64px;
   left: 0;
   right: 0;
   bottom: 0;
   background: #fff;
   z-index: 1900;
   overflow-y: auto;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s, visibility 0.3s;
}

/* Adjust mobile overlay top position when banner is visible */
body:has(.bb-top-banner:not(.hidden)) .bb-header-2024.custom-header .mobile-nav-overlay {
   top: calc(64px + 52px); /* header height + approximate banner height */
}

.bb-header-2024.custom-header .mobile-nav-overlay.active {
   opacity: 1;
   visibility: visible;
}

.bb-header-2024.custom-header .mobile-nav {
   padding: 20px;
}

.bb-header-2024.custom-header .mobile-nav-list {
   list-style: none;
   padding: 0;
   margin: 0;
}

/* Mobile Menu Active States */
.bb-header-2024.custom-header .mobile-menu-button[aria-expanded="true"] .menu-icon {
   background: transparent;
}

.bb-header-2024.custom-header .mobile-menu-button[aria-expanded="true"] .menu-icon::before {
   transform: translateY(0) rotate(45deg);
}

.bb-header-2024.custom-header .mobile-menu-button[aria-expanded="true"] .menu-icon::after {
   transform: translateY(0) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
   /* Top Banner Mobile */
   .bb-top-banner {
       padding: 10px 16px;
   }
   
   .bb-top-banner-text {
       font-size: 13px;
       padding-right: 35px;
   }
   
   .bb-top-banner-close {
       width: 24px;
       height: 24px;
       font-size: 14px;
   }

   .bb-header-2024.custom-header .mobile-menu-button {
       display: block;
   }

   .bb-header-2024.custom-header .main-nav {
       display: none;
   }

   .bb-header-2024.custom-header .mobile-nav-overlay {
       display: block;
   }

   /* Mobile Navigation Styling */
   .bb-header-2024.custom-header .mobile-nav-list .nav-item {
       margin: 8px 0;
   }

   .bb-header-2024.custom-header .mobile-nav-list .nav-link {
       display: flex;
       align-items: center;
       width: 100%;
       font-size: 18px;
       padding: 12px 16px;
   }

   .bb-header-2024.custom-header .mobile-nav-list .dropdown-menu {
       position: static;
       box-shadow: none;
       border: none;
       display: none;
       background: #f8fafc;
       padding: 0;
       margin-top: 4px;
       border-left: 2px solid #e2e8f0;
   }

   .bb-header-2024.custom-header .mobile-nav-list .nav-item.active > .dropdown-menu {
       display: block;
   }

   /* Level-based indentation */
   .bb-header-2024.custom-header .mobile-nav-list .level-0 > .nav-link { padding-left: 1rem; }
   .bb-header-2024.custom-header .mobile-nav-list .level-1 > .nav-link { padding-left: 2rem; }
   .bb-header-2024.custom-header .mobile-nav-list .level-2 > .nav-link { padding-left: 3rem; }
   .bb-header-2024.custom-header .mobile-nav-list .level-3 > .nav-link { padding-left: 4rem; }

   /* Mobile Dropdown Arrow */
   .bb-header-2024.custom-header .mobile-nav-list .dropdown-arrow {
       margin-left: auto;
       padding-left: 8px;
       transition: transform 0.2s;
   }

   .bb-header-2024.custom-header .mobile-nav-list .nav-item.active > .nav-link .dropdown-arrow {
       transform: rotate(180deg);
   }

   /* Mobile Active States */
   .bb-header-2024.custom-header .mobile-nav-list .nav-link:active {
       background: #f0f9ff;
       color: #1d4ed8;
   }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
   .bb-header-2024.custom-header *,
   .bb-top-banner * {
       transition: none;
   }
}

/* Header Visibility Control */
body.bb-header-hidden {
   padding-top: 0 !important;
}

body.bb-header-hidden .bb-header-2024.custom-header {
   display: none !important;
}

/* When header is hidden but banner is visible, ensure banner stays visible */
body.bb-header-hidden .bb-top-banner {
   display: block !important;
}

/* CTA Button Styling */
.bb-header-2024.custom-header .header-cta {
   background: linear-gradient(135deg, #134381 0%, #0D305E 100%);
   border-radius: 8px;
   color: #fff;
   text-decoration: none;
   padding: 10px 16px;
   font-weight: 600;
   font-size: 14px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   transition: all .3s cubic-bezier(.4, 0, .2, 1);
   box-shadow: 0 2px 6px rgba(19, 67, 129, 0.2);
   white-space: nowrap;
   pointer-events: auto;
   z-index: 2;
   position: relative;
   min-width: 150px;
   margin-left: 24px;
}

.bb-header-2024.custom-header .header-cta:hover {
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(19, 67, 129, 0.3);
   background: linear-gradient(135deg, #0D305E 0%, #134381 100%);
}

.bb-header-2024.custom-header .header-cta svg {
   width: 16px;
   height: 16px;
}

/* CTA Button in Mobile Menu */
.bb-header-2024.custom-header .mobile-nav .header-cta-wrapper {
   padding: 16px;
   margin-top: 16px;
   border-top: 1px solid #eee;
}

.bb-header-2024.custom-header .mobile-nav .header-cta {
   display: flex;
   width: 100%;
   justify-content: center;
   margin-left: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
   .bb-header-2024.custom-header .desktop-cta-wrapper {
       display: none;
   }
}

@media (min-width: 769px) {
   .bb-header-2024.custom-header .mobile-nav .header-cta-wrapper {
       display: none;
   }
}

/* Broker icon container - voor broker icoontjes */
.bb-header-2024.custom-header .broker-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   margin-right: 8px;
   width: 16px;
   height: 16px;
   overflow: hidden;
   flex-shrink: 0;
}

.bb-header-2024.custom-header .broker-icon img {
   width: 100%;
   height: 100%;
   object-fit: contain;
   object-position: center;
}

/* Spacing in het menu-item met icoon */
.bb-header-2024.custom-header .has-menu-icon .nav-link {
   display: inline-flex;
   align-items: center;
}

/* Dropdown menu's specifieke aanpassingen voor derde niveau */
.bb-header-2024.custom-header .dropdown-menu .dropdown-menu .broker-icon {
   width: 14px;
   height: 14px;
}

/* Mobiele menu aanpassingen */
@media (max-width: 768px) {
   .bb-header-2024.custom-header .mobile-nav-list .has-menu-icon .nav-link {
       display: flex;
       align-items: center;
   }
   
   .bb-header-2024.custom-header .mobile-nav-list .broker-icon {
       margin-right: 12px;
       width: 20px;
       height: 20px;
   }
   
   /* Specifiek voor diepte 2 (derde niveau) */
   .bb-header-2024.custom-header .mobile-nav-list .level-2 .broker-icon {
       margin-left: 0;
   }
}