/* Logo + mobile header scroll behavior
   Desktop / notebook: initial white logo on transparent header, scrolled dark logo on white header
   Mobile / tablet: now matches desktop behavior, while menu-open keeps the white header for readability */
.topbar .logo-dark,
.topbar .logo-white{
  display:block !important;
  transition:opacity .35s ease, visibility .35s ease !important;
}

.topbar .logo-dark{opacity:0 !important;visibility:hidden !important;}
.topbar .logo-white{opacity:1 !important;visibility:visible !important;}
.topbar.scrolled .logo-dark,
.topbar.menu-open .logo-dark{opacity:1 !important;visibility:visible !important;}
.topbar.scrolled .logo-white,
.topbar.menu-open .logo-white{opacity:0 !important;visibility:hidden !important;}

@media (min-width: 1025px){
  .topbar .logo-dark{opacity:0 !important;visibility:hidden !important;}
  .topbar .logo-white{opacity:1 !important;visibility:visible !important;}
  .topbar.scrolled .logo-dark{opacity:1 !important;visibility:visible !important;}
  .topbar.scrolled .logo-white{opacity:0 !important;visibility:hidden !important;}
}

@media (max-width: 1024px){
  .topbar{
    transition:background .35s ease, border-color .35s ease, box-shadow .35s ease, backdrop-filter .35s ease !important;
  }
  .topbar:not(.scrolled):not(.menu-open){
    background:transparent !important;
    border-bottom-color:transparent !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  .topbar.scrolled,
  .topbar.menu-open{
    background:rgba(255,255,255,.97) !important;
    border-bottom:1px solid rgba(221,230,240,.92) !important;
    box-shadow:0 4px 18px rgba(7,30,61,.08) !important;
    backdrop-filter:blur(16px) !important;
    -webkit-backdrop-filter:blur(16px) !important;
  }

  .topbar .brand,
  .topbar .brand-wrap,
  .topbar .brand-wrap a{position:relative !important;}

  .topbar .logo-dark,
  .topbar .logo-white{
    display:block !important;
    position:absolute !important;
    top:50% !important;
    left:0 !important;
    transform:translateY(-50%) !important;
  }

  .topbar:not(.scrolled):not(.menu-open) .logo-dark{opacity:0 !important;visibility:hidden !important;}
  .topbar:not(.scrolled):not(.menu-open) .logo-white{opacity:1 !important;visibility:visible !important;}
  .topbar.scrolled .logo-dark,
  .topbar.menu-open .logo-dark{opacity:1 !important;visibility:visible !important;}
  .topbar.scrolled .logo-white,
  .topbar.menu-open .logo-white{opacity:0 !important;visibility:hidden !important;}

  .topbar:not(.scrolled):not(.menu-open) .mobile-menu-toggle{color:#fff !important;}
  .topbar.scrolled .mobile-menu-toggle,
  .topbar.menu-open .mobile-menu-toggle{color:var(--navy,#071e3d) !important;}
}
