/* Custom Navigation Display Classes - 910px breakpoint */
/* These replace Bootstrap's d-lg-* classes to avoid 992px conflict */

a {
  &:hover {
    color: #1677ff;

    .mobile-submenu-link-title {
      color: #1677ff;
    }
  }
}
/* Hide on mobile, show on desktop (≥ 911px) */
.d-nav-desktop {
  display: none !important;
}

@media (min-width: 911px) {
  .d-nav-desktop {
    display: block !important;
  }
  
  .d-nav-desktop.d-flex {
    display: flex !important;
  }
}

/* Show on mobile, hide on desktop */
.d-nav-mobile {
  display: block !important;
}

@media (min-width: 911px) {
  .d-nav-mobile {
    display: none !important;
  }
}

/* Mobile Navbar Styles - 910px breakpoint */
@media (max-width: 910px) {
  :root {
    --nav-height: 60px;
  }

  .navbar {
    height: 60px;
  }
  
  .navbar .navbar-brand img {
    width: 84px;
  }

  /* Remove navbar box-shadow when mobile menu is open */
  body.mobile-menu-open .navbar {
    box-shadow: none;
  }
}


#mobileMenuToggle {
  outline: none;
  box-shadow: none;
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icon transition styles */
#mobileMenuToggle .burger-icon,
#mobileMenuToggle .close-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

/* Ensure SVGs are centered */
#mobileMenuToggle .burger-icon svg,
#mobileMenuToggle .close-icon svg {
  display: block;
  margin: auto;
}

#mobileMenuToggle .burger-icon {
  opacity: 1;
}

#mobileMenuToggle .close-icon {
  opacity: 0;
}

/* When menu is open */
body.mobile-menu-open #mobileMenuToggle .burger-icon {
  opacity: 0;
}

body.mobile-menu-open #mobileMenuToggle .close-icon {
  opacity: 1;
}


/* Mobile Menu Overlay */
#mobileMenu.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  min-height: 100vh;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease-out, opacity .3s ease-out;
}

#mobileMenu.mobile-menu.open {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto;
}

/* Mobile Menu Header */
#mobileMenu .mobile-menu-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#mobileMenu .mobile-menu-header img {
  width: 84px;
}

#mobileMenu .close-btn {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #111827;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Content */
#mobileMenu .mobile-menu-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 0;
  margin-top: 60px
}

/* Mobile Menu Items */
#mobileMenu .mobile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  text-decoration: none;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#mobileMenu .mobile-menu-item:hover {
  /* background-color: #f9fafb; */
  color: #1677ff
}

#mobileMenu .mobile-menu-item svg {
  flex-shrink: 0;
}

/* Mobile Menu Footer */
#mobileMenu .mobile-menu-footer {
  display: none !important;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eef0f4;
  z-index: 3;
  padding: 24px;
}

#mobileMenu .mobile-menu-footer .mobile-menu-item {
  padding: 12px 0;
}

/* Lock background scroll when menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Sliding Submenus */
.mobile-submenu {
  position: fixed;
  top: 60px; /* Below navbar */
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  z-index: 1010; /* Higher than main menu, but below navbar */
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-submenu.active {
  transform: translateX(0);
}

.mobile-submenu-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f3f4f6;
  border-top: 1px solid #f3f4f6;
}

.mobile-submenu-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 12px 24px;
}

.mobile-submenu-title-bar {
  display: flex;
  align-items: center;
  padding: 12px 24px;
}

.mobile-submenu-back {
  background: none;
  border: none;
  padding: 0;
  margin-right: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #111827;
}

.mobile-submenu-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.mobile-submenu-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #111827;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-submenu-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
}

/* Submenu Content Styling */
.mobile-submenu-section {
  margin-bottom: 32px;
}

.mobile-submenu-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-submenu-item {
  margin-bottom: 16px;
}

.mobile-submenu-link {
  display: block;
  margin-bottom: 4px;
  text-decoration: none;
}

.mobile-submenu-link-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #0A22AA; /* Brand Blue */
  margin-bottom: 4px;
}

.mobile-submenu-link-desc {
  display: block;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.mobile-submenu-intro-text {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 24px;
  line-height: 1.5;
}

.mobile-submenu-view-all {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #0A22AA;
  text-decoration: none;
  margin-bottom: 24px;
}
