body {
  padding-top: var(--header-height);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bb-header-bg);
  border-bottom: 1px solid var(--bb-line);
  box-shadow: 0 8px 24px rgba(23, 42, 70, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  overflow: visible;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--bb-secondary);
}

.header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.6rem 0 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
  overflow: visible;
}

.site-header .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  height: var(--header-height);
  overflow: visible;
}

.site-header .logo img {
  height: var(--bb-logo-height);
  width: auto;
  max-width: min(340px, 58vw);
  padding: 8px;
  object-fit: contain;
  object-position: left center;
  margin-top: 18px;
  filter: drop-shadow(0 8px 12px rgba(23, 42, 70, 0.12));
}

.mobile-panel .logo img {
  height: 46px;
  width: auto;
  max-width: 210px;
  padding: 7px;
  object-fit: contain;
  object-position: left center;
  margin: 0;
  filter: none;
}

.desktop-nav { display: none; height: 100%; }
.header-signin { display: none; }

@media (min-width: 992px) {
  .desktop-nav { display: flex; align-items: center; margin-left: auto; }
  .header-signin { display: inline-flex; margin-left: 0.5rem; }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
  position: static;
}

.site-header .nav-link {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--bb-header-text);
  padding: 0.5rem 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.site-header .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bb-gradient);
  transition: width var(--transition-smooth);
}

.site-header .nav-link:hover,
.has-mega-menu:hover .nav-link { color: var(--primary-color); }

.site-header .nav-link:hover::after,
.has-mega-menu:hover .nav-link::after { width: 100%; }

.chevron-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform var(--transition-smooth);
}

.has-mega-menu:hover .chevron-icon { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-light);
  box-shadow: var(--shadow-lg);
  border-top: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.has-mega-menu:hover .mega-menu,
.has-mega-menu:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu-container {
  width: 100%;
  max-width: 1400px;
  padding: 2.4rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.mega-grid-main {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.mega-col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--transition-smooth), transform var(--transition-smooth);
}

.mega-item:hover {
  background: var(--bg-gray);
  transform: translateX(4px);
}

.mega-icon {
  width: 46px;
  height: 46px;
  background: #EAF2FD;
  color: var(--bb-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.mega-item:hover .mega-icon {
  background: var(--bb-secondary);
  color: #fff;
}

.mega-content h4 {
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.mega-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.mega-sidebar {
  background: var(--bb-navy);
  color: #fff;
  padding: 1.8rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mega-sidebar h4 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.mega-sidebar p { color: #DCE7F5; margin-bottom: 1.2rem; font-size: 0.95rem; }

.site-header .btn-primary,
.mega-sidebar .btn-primary,
.mobile-panel .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bb-gradient);
  color: #fff;
  padding: 0.72rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.site-header .btn-primary:hover,
.mega-sidebar .btn-primary:hover,
.mobile-panel .btn-primary:hover { filter: brightness(1.06); }

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--bb-navy);
  border-radius: 10px;
}

@media (min-width: 992px) {
  .hamburger-btn { display: none; }
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 42, 70, 0.55);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

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

.mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(85%, 400px);
  height: 100vh;
  background: #fff;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-panel.open { transform: translateX(0); }

.mobile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.close-btn {
  background: none;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--bb-navy);
  cursor: pointer;
}

.mobile-nav-list { list-style: none; margin: 0; padding: 0.4rem 0; }

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

.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background: var(--bg-gray);
}

.mobile-nav-item.active .mobile-submenu { max-height: 420px; }

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

.mobile-sub-item {
  display: block;
  padding: 0.85rem 1.4rem 0.85rem 2.2rem;
  color: var(--text-dark);
  text-decoration: none;
}

.mobile-sub-item:hover { color: var(--primary-color); }

.mobile-panel-foot { margin-top: auto; padding: 1.4rem; }
.mobile-panel-foot .btn-primary { width: 100%; }
