/**
 * TB Mega Menu - Taevas Life Sciences Custom Styling
 * Matches the design from the screenshots
 */

/* ============================================
   MEGA MENU CONTAINER
   ============================================ */
@media (max-width: 991.98px) {
  .navbar .navbar-mobile {
    width: 100% !important;
    left: 0 !important;
  }
  .navbar-expand-lg .navbar-mobile>* {
    width: 100%;
    padding: 0 !important;
  }
  .tbm-item--has-flyout .tbm-submenu-toggle:before {
    transform: translateY(-50%) translateX(-50%) !important;
  }
  .tbm.tbm--mobile .tbm-item--has-flyout.open .tbm-submenu-toggle:before, 
  .tbm-item--has-flyout.open>.tbm-link-container>.tbm-submenu-toggle:before {
    transform: translateY(-50%) translateX(-50%) rotate(180deg) !important;
  }
  .tbm-column .tbm-subnav.level-1 > .tbm-item[class*="-icon"] .tbm-link-container::before {
    background-size: 32px 32px !important;
    width: 32px !important;
    height: 32px !important;
  }
  .tbm-column .tbm-subnav.level-1 > .tbm-item.level-3[class*="-icon"] .tbm-link-container::before {
    display: none !important;
  }
  .tbm-column.span4:has(> .tbm-block),
  .tbm-column.span12:has(> .tbm-block) {
    display: none !important;
  }
  .tbm-submenu .tbm-item.level-3 .tbm-link-container::before, 
  .tbm-item-child .tbm-item.level-3 .tbm-link-container::before {
    display: none !important;
  }
  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-submenu{
    padding: 10px 20px !important;
  }
}

.tbm.tbm--mobile .tbm-collapse{
  position: relative;
  padding-top: 0.5rem;
}

.tbm {
  background-color: #f5f5f500;
  position: relative;
}

/* Ensure navbar doesn't cause overflow */
.navbar {
  overflow: visible !important;
}

/* Prevent horizontal scroll on body */
body.tbm-submenu-open {
  overflow-x: hidden !important;
}

.tbm-button-container {
    margin: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* Enhanced hover system - maintain submenu visibility */
.tbm-item.level-1:hover .tbm-submenu,
.tbm-item.level-1 .tbm-submenu:hover,
.tbm-item.level-1:focus-within .tbm-submenu,
.tbm-item.level-2:hover .tbm-submenu,
.tbm-item.level-2 .tbm-submenu:hover,
.tbm-item.level-2:focus-within .tbm-submenu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Create a larger hover area around the menu */
.tbm-nav.level-0 > .tbm-item.level-1:hover,
.tbm-nav.level-0 > .tbm-item.level-1:focus-within {
  z-index: 10000;
}

/* Ensure submenu container has proper hover detection */
.tbm-submenu.tbm-has-width:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Keep main submenu open when hovering over flyout submenus */
.tbm-item.level-1:hover > .tbm-submenu,
.tbm-item.level-1:has(.tbm-item.level-2:hover) > .tbm-submenu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.tbm-item.level-1 {
    border-right: 0 !important;
    position: relative !important;
}

/* Add hover zone to prevent submenu from closing */
.tbm-item.level-1::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -50px;
    right: -50px;
    height: 30px;
    z-index: 9998;
    pointer-events: auto;
    background: transparent;
}

/* More robust hover detection */
.tbm-item.level-1,
.tbm-item.level-1 .tbm-submenu {
    transition: all 0.3s ease;
}

/* Ensure submenu stays visible during transition */
.tbm-item.level-1:hover > .tbm-submenu,
.tbm-item.level-1 > .tbm-submenu:hover,
.tbm-item.level-1:focus-within > .tbm-submenu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    transition-delay: 0ms !important;
}

/* Hover zone for level-2 items with flyouts */
.tbm-item.level-2.tbm-item--has-flyout::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 100%;
    z-index: 9998;
    pointer-events: auto;
}

/* Hide submenu by default, show on hover with better interaction */
.tbm-item > .tbm-submenu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
  border-radius: 20px;
  background-color: #F5F5F7 !important;
}

/* Ensure main submenu doesn't get positioned incorrectly - JavaScript will handle positioning */

/* Better hover behavior - keep submenu visible when moving between elements */
.tbm-item.level-1:hover > .tbm-submenu,
.tbm-item.level-1:focus-within > .tbm-submenu,
.tbm-item.level-1 > .tbm-submenu:hover,
.tbm-item.level-2:hover > .tbm-submenu,
.tbm-item.level-2:focus-within > .tbm-submenu,
.tbm-item.level-2 > .tbm-submenu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* Prevent submenu from closing when moving cursor */
/* .tbm-item.level-1:hover,
.tbm-item.level-1:focus-within {
  .tbm-submenu {
    transition-delay: 0ms !important;
  }
} */

/* Add delay when leaving to prevent flickering */
.tbm-item.level-1:not(:hover):not(:focus-within) .tbm-submenu {
  transition-delay: 150ms !important;
}

/* Mega Menu Dropdown Container - Full Width */
.tbm-submenu.tbm-has-width {
  background: #E6E6E6 !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
  padding: 2.25rem !important; /* Add horizontal padding for margins */
  position: absolute !important;
  margin: 0 10px 0 0 !important;
  transform: none !important;
  z-index: 9999 !important;
  box-sizing: border-box !important;
  /* Width and left position will be dynamically set by JavaScript */
}

/* ============================================
   MEGA MENU GRID LAYOUT
   ============================================ */

.tbm-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 24px !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
}

/* All columns should flex equally */
.tbm-column.span4 {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure subnav respects column width */
.tbm-column .tbm-subnav.level-1 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ============================================
   LEFT COLUMN - ICON CARDS
   ============================================ */

.tbm-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100% !important;
  overflow: hidden !important;
}

.tbm-column-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Style for menu items in left column (icon cards) */
.tbm-column .tbm-subnav.level-1 > .tbm-item {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  padding: 20px 24px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  list-style: none !important;
  margin-bottom: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  position: relative !important;
}

.tbm-column .tbm-subnav.level-1 > .tbm-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Default style for menu items - ensure they don't overflow */
.tbm-subnav.level-1 > .tbm-item {
  list-style: none !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Simple link items (Company menu style) - shown as cards but contained */
.tbm-subnav.level-1 > .tbm-item:not(.tbm-item--has-flyout) .tbm-link {
  max-width: 100% !important;
  width: 100% !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Reset hover for non-first-column items */
.tbm-column .tbm-subnav.level-1 > .tbm-item:hover {
  box-shadow: none !important;
  transform: none !important;
  border-color: transparent !important;
}

/* Icon Container - using ::before pseudo-element (only for left column) */
.tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link-container {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  width: 100% !important;
}

.tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link-container::before {
  content: '';
  display: none;
}

.tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link {
  text-decoration: none !important;
  color: #1A1A1A !important;
  flex: 1 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  display: flex !important;
  gap: 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  border: none !important;
  box-shadow: none !important;
  align-items: center;
  justify-content: flex-start;
}

.tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link::after {
  content: '' !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  color: #000;
  margin-left: auto !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'><path fill='currentColor' d='M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z'/></svg>");
}

.tbm-column .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link::after{
  display: none !important;
}

.tbm-link span.fa-solid, .tbm-link span.fa-regular, .tbm-link span.fa-light{
  font-size: 32px;
  color: var(--taevas-purple);
}

/* Default link styling for simple items (Company menu) */
.tbm-subnav.level-1 > .tbm-item .tbm-link {
  text-decoration: none !important;
  color: #1A1A1A !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  display: block !important;
  padding: 16px 20px !important;
  background: #FFFFFF !important;
  border-radius: 12px !important;
  margin-bottom: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.tbm-subnav.level-1 > .tbm-item .tbm-link:hover {
  background: #FAFAFA !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.tbm-subnav.level-1 > .tbm-item .tbm-link::after {
  display: none !important;
}

.tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link:hover {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* Default link container for simple items */
.tbm-subnav.level-1 > .tbm-item .tbm-link-container {
  display: block !important;
  width: 100% !important;
}

/* Products with flyout menus - style as white cards */
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout {
  background: #ffffffb4 !important;
  border-radius: 12px !important;
  padding: 25px 20px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 10px !important;
  position: relative !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  display: flex !important;
  align-items: center !important;
}

.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout:hover {
  background: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transform: translateX(2px) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #2C2C2E !important;
  text-decoration: none !important;
  display: block !important;
}

/* Arrow indicator for flyout items */
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link-container {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 12px !important;
}

.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link-container::before {
  display: none !important;
}

.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout:hover .tbm-link-container::after {
  transform: translateX(3px) !important;
  color: #86868B !important;
}

/* Reposition flyout submenus to appear in the second column area */
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-submenu {
  position: absolute !important;
  left: calc(100% + 32px) !important; /* Position in second column */
  top: 0 !important;
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  padding: 20px !important;
  background: #FFFFFF !important;
  border-radius: 15px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  z-index: 10001 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Show first item's submenu by default */
.tbm-column:first-child .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout:first-child > .tbm-submenu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Show flyout on hover */
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout:hover > .tbm-submenu,
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout:focus-within > .tbm-submenu,
.tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-submenu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Hide other flyouts when one is active */
.tbm-column:first-child .tbm-subnav.level-1:hover > .tbm-item.tbm-item--has-flyout:not(:hover) > .tbm-submenu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Style for level-3 display list */
.level-3-display-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.level-3-display-list > .tbm-item {
  list-style: none !important;
  margin-bottom: 8px !important;
}

/* Styling for level-3 display items - white card style */
.level-3-display-list > .tbm-item .tbm-link-container {
  display: flex !important;
  align-items: center !important;
  background: #FFFFFF !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}

.level-3-display-list > .tbm-item .tbm-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #2C2C2E !important;
  text-decoration: none !important;
  flex: 1 !important;
}

.tbm-item .tbm-link {
  display: flex !important;
  justify-content: flex-start !important;
  width: 100% !important;
  color: #1A1A1A !important;
  font-weight: 400 !important;
  text-decoration: none !important;
}

/* Legacy support for old container */
.level-3-display-container {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.level-3-display-container .tbm-subnav.level-2 {
  margin: 0 !important;
  padding: 0 !important;
}

/* Active state for level-2 items */
.tbm-item.level-2.active-level-3 {
  background: #F8F8FA !important;
  border-color: rgba(124, 58, 237, 0.1) !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08) !important;
}

/* Remove the Products title */
.level-3-display-container::before {
  display: none !important;
}

.tbm-subnav.level-2 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.tbm-subnav.level-2 > .tbm-item {
  list-style: none !important;
  margin-bottom: 8px !important;
}

.tbm-subnav.level-2 > .tbm-item .tbm-link-container {
  display: flex !important;
  align-items: center !important;
  padding: 12px 16px !important;
  background: #FFFFFF !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease !important;
}

.tbm-subnav.level-2 > .tbm-item:hover .tbm-link-container {
  background: #F8F8FA !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  transform: translateX(2px) !important;
}

.tbm-subnav.level-2 .tbm-link {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #2C2C2E !important;
  text-decoration: none !important;
  display: block !important;
  flex: 1 !important;
}

/* Arrow for level-3 items */
.tbm-subnav.level-2 > .tbm-item .tbm-link-container::after {
  content: '→' !important;
  margin-left: auto !important;
  color: #C7C7CC !important;
  font-size: 16px !important;
  font-weight: 300 !important;
  transition: all 0.2s ease !important;
}

.tbm-subnav.level-2 > .tbm-item:hover .tbm-link-container::after {
  transform: translateX(2px) !important;
  color: #86868B !important;
}

/* ============================================
   FEATURED CARD (Right Side) & BLOCKS
   ============================================ */

.tbm-block {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  height: 100% !important;
  position: relative !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.tbm-block .card{
  background-color: #ffffff;
}

.tbm-block:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-4px) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.tbm-block .block-inner {
  padding: 0 !important;
  position: relative !important;
  z-index: 2 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Hide site branding blocks in mega menu */
.tbm-block .site-branding {
  display: none !important;
}

/* Featured card with image */
.tbm-block img {
  width: 100% !important;
  height: 240px !important;
  object-fit: cover !important;
  display: block !important;
  margin-bottom: 0 !important;
}

.tbm-block h2,
.tbm-block h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1A1A1A !important;
  line-height: 1.3 !important;
  margin-bottom: 12px !important;
  padding: 0 24px !important;
  margin-top: 20px !important;
}

.tbm-block p {
  font-size: 14px !important;
  color: #86868B !important;
  line-height: 1.5 !important;
  flex-grow: 1 !important;
}

.tbm-block .card-body {
  padding: 0.75rem 0.25rem 0.25rem 0.25rem;
}

.tbm-block a.button,
.tbm-block .btn {
  display: inline-flex !important;
  align-items: center !important;
  padding: 5px 10px !important;
  background: var(--taevas-purple) !important;
  color: #FFFFFF !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  transition: all 0.2s ease !important;
  border: none !important;
  align-self: flex-start !important;
  margin: 0 !important;
}

.tbm-block a.button:hover,
.tbm-block .btn:hover {
  background: var(--taevas-purple) !important;
  transform: translateX(3px) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.tbm-block a.button:hover::after,
.tbm-block .btn:hover::after {
  transform: translateX(2px) !important;
}

/* ============================================
   TOP LEVEL MENU ITEMS
   ============================================ */
.scrollup .tbm-link.level-1, .navbar-light .tbm-link.level-1 {
  color: #ffffffa6 !important;
}

.body-scrolled .tbm-link.level-1,.navbar-dark .tbm-link.level-1  {
  color: #757575cc !important;
}

.scrollup .tbm-item.level-1.active .tbm-link.level-1, .navbar-light .tbm-item.level-1.active .tbm-link.level-1 {
  color: #ffffff !important;
}

.body-scrolled .tbm-item.level-1.active .tbm-link.level-1,.navbar-dark .tbm-item.level-1.active .tbm-link.level-1 {
  color: #000 !important;
}

.tbm-link.level-1 {
  font-weight: 600 !important;
  font-family: 'Clash Display';
  text-transform: uppercase;
  transition: color 0.3s ease !important;
  letter-spacing: 1px;
  font-size: 0.85em;
  word-spacing: 2px;
  padding: 0 1.125rem !important;
  line-height: 56px;
}

.tbm-no-arrows .tbm-item--has-flyout>.tbm-link-container .tbm-link:before {
  float: right;
  width: auto;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 0;
  border-left-color: #cccccc00;
  margin: 20px 0;
  font-family: 'themify';
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  font-size: 0.8rem;
  content: "\e649";
  display: flex;
  align-items: center;
}

.tbm-item--has-dropdown .tbm-link-container .tbm-link.level-1.tbm-toggle:after {
  font-family: 'themify';
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  margin-left: 3px;
  font-size: 0.5rem;
  content: "\e64b";
}

.tbm-submenu-toggle.always-show {
    display: none;
}

.tbm-link.level-1:hover, .tbm-link.level-1:focus {
  background-color: #27272700;
}

.tbm-link.level-1:hover,
.tbm-item:hover > .tbm-link-container > .tbm-link.level-1 {
  color: var(--taevas-green) !important;
}

/* Hide submenu toggle buttons in desktop view */
.tbm-submenu-toggle {
  background-color: #ffffff00;
  width: auto;
}

.scrollup .tbm-submenu-toggle, .navbar-light .tbm-submenu-toggle {
  color: #FFFFFF !important;
}

.body-scrolled .tbm-submenu-toggle,.navbar-dark .tbm-submenu-toggle  {
  color: #1D1D1F !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Animation handled by transition in hover state */
@keyframes megaMenuFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1400px) {
  .tbm-submenu.tbm-has-width {
    padding: 32px !important;
  }
  
  .tbm-row {
    gap: 24px !important;
  }
}

@media (max-width: 1200px) {
  .tbm-submenu.tbm-has-width {
    padding: 24px !important;
  }
  
  .tbm-row {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .tbm-column.span4 {
    flex: none !important;
    width: 100% !important;
  }
  
  /* Show submenu toggle for mobile */
  .tbm-submenu-toggle {
    display: block !important;
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES (max-width: 991px)
   ============================================ */
@media (max-width: 991px) {  
  .tbm.tbm--mobile-show ~ .navbar-mobile,
  .navbar-mobile.menu-open,
  .tbm-button[aria-expanded="true"] ~ .navbar-mobile {
    display: block !important;
  }

  .tbm.tbm--mobile {
    position: relative !important;
  }
  
  .tbm.tbm--mobile::before {
    content: '' !important;
    display: block !important;
    width: 120px !important;
    height: 40px !important;
    background-image: url('/themes/custom/thesaas/logo-dark.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    position: absolute !important;
    left: 15px !important;
    top: 8px !important;
    z-index: 100 !important;
  }
  
  .backdrop,
  .backdrop-navbar {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999 !important;
  }
  
  body.navbar-open .backdrop,
  body.navbar-open .backdrop-navbar {
    display: block !important;
  }
  
  .scrollup .tbm-item.level-1.active .tbm-link.level-1, 
  .navbar-light .tbm-item.level-1.active .tbm-link.level-1{
    color: #000 !important;
  }

  body.navbar-open {
    overflow: hidden !important;
  }
  
  .tbm.tbm--mobile .tbm-button {
    margin-left: auto;
    background-color: #FFFFFF !important;
    border: 1px solid #7C3AED !important;
  }

  .tbm-button-container span{
    background: #7C3AED !important;
    height: 0.25rem !important;
    border-radius: 5px !important;
  }
  
  .tbm-collapse {
    display: none;
    width: 100%;
  }
  
  .tbm-collapse.show,
  .tbm.tbm--mobile-show .tbm-collapse {
    display: block !important;
  }
  
  .tb-megamenu,
  .tb-megamenu-nav {
    background: transparent !important;
  }
  
  .tb-megamenu .nav,
  .tb-megamenu .tbm-nav,
  .tb-megamenu ul.level-0,
  ul.tbm-nav.level-0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 5px !important;
    gap: 10px !important;
    background: transparent !important;
  }
  
  .tb-megamenu .nav > li,
  .tbm-nav.level-0 > .tbm-item,
  .tbm-nav.level-0 > .tbm-item.level-1 {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    border-radius: 20px !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: block !important;
    position: relative !important;
  }
  
  /* Reset desktop mega menu styles for mobile */
  .tbm-submenu,
  .tbm-submenu.tbm-has-width,
  .tbm-item > .tbm-submenu,
  .tbm-item > .tbm-item-child {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* First level menu items - accordion style */
  .tbm-subnav.level-1 > .tbm-item {
    width: 100% !important;
    margin-bottom: 10px !important;
    background: #FFFFFF !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  /* First level link styling */
  .tbm-nav.level-0 > .tbm-item > .tbm-link-container,
  .tbm-nav.level-0 > .tbm-item.level-1 > .tbm-link-container,
  .tbm-subnav.level-1 > .tbm-item > .tbm-link-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .tbm-nav.level-0 > .tbm-item .tbm-link.level-1,
  .tbm-nav.level-0 > .tbm-item > .tbm-link-container .tbm-link,
  .tbm-subnav.level-1 > .tbm-item > .tbm-link-container .tbm-link {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1D1D1F !important;
    flex: 1 !important;
    text-decoration: none !important;
    display: block !important;
  }

  /* Submenu toggle button for mobile */
  .tbm-submenu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: #F5F5F7 !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-left: 10px !important;
  }

  .tbm-submenu-toggle::before {
    content: '' !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: transform 0.3s ease !important;
  }

  .tbm-submenu-toggle[aria-expanded="true"] {
    background: #1D1D1F !important;
  }

  .tbm-submenu-toggle[aria-expanded="true"]::before {
    /* transform: rotate(180deg) !important; */
    filter: invert(1) !important;
  }
  .tbm-submenu-toggle:before{
    border: 0 !important;
  }

  /* Hide the visually-hidden text */
  .tbm-submenu-toggle .visually-hidden {
    display: none !important;
  }

  .tbm-nav.level-0 > .tbm-item > .tbm-submenu,
  .tbm-nav.level-0 > .tbm-item > .tbm-item-child,
  .tbm-item.level-1 > .tbm-submenu,
  .tbm-item.level-1 > .tbm-item-child,
  .tbm-item.level-2 > .tbm-submenu,
  .tbm-item.level-2 > .tbm-item-child {
    display: none !important;
    position: static !important;
    width: 100% !important;
    padding: 0 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
  }

  .tbm-item.tbm-item--expanded > .tbm-item-child,
  .tbm-item.level-2.tbm-item--expanded > .tbm-submenu,
  .tbm-item.level-2.tbm-item--expanded > .tbm-item-child,
  .tbm-item[aria-expanded="true"] > .tbm-submenu,
  .tbm-item[aria-expanded="true"] > .tbm-item-child,
  .tbm-nav.level-0 > .tbm-item.tbm-item--expanded > .tbm-submenu,
  .tbm-nav.level-0 > .tbm-item.tbm-item--expanded > .tbm-item-child {
    display: block !important;
  }

  .tbm-row {
    display: block !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tbm-column,
  .tbm-column.span4,
  .tbm-column.span12 {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide level-3 display column on mobile */
  .level-3-display-column {
    display: none !important;
  }

  /* Second level items inside submenu - gray background cards */
  .tbm-submenu .tbm-subnav.level-1 > .tbm-item,
  .tbm-item-child .tbm-subnav.level-1 > .tbm-item,
  .tbm-submenu .tbm-item.level-2,
  .tbm-item-child .tbm-item.level-2 {
    background: #F5F5F7 !important;
    border-radius: 16px !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
    border: none !important;
    display: block !important;
    overflow: visible !important;
  }

  .tbm-submenu .tbm-item.level-2 > .tbm-link-container,
  .tbm-item-child .tbm-item.level-2 > .tbm-link-container {
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .tbm-submenu .tbm-item.level-2 .tbm-link,
  .tbm-item-child .tbm-item.level-2 .tbm-link {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1D1D1F !important;
    text-decoration: none !important;
  }

  .tbm-submenu .tbm-item.level-2:hover,
  .tbm-item-child .tbm-item.level-2:hover {
    background: #E8E8ED !important;
    transform: none !important;
  }

  /* Override desktop positioning for level-2 item flyouts */
  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-submenu,
  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-item-child,
  .tbm-item.level-2.tbm-item--has-flyout > .tbm-submenu,
  .tbm-item.level-2.tbm-item--has-flyout > .tbm-item-child {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  /* Third level items - white cards */
  .tbm-submenu .tbm-subnav.level-2,
  .tbm-item-child .tbm-subnav.level-2,
  .tbm-item.level-2 > .tbm-submenu .tbm-subnav,
  .tbm-item.level-2 > .tbm-item-child .tbm-subnav,
  .tbm-item--has-flyout > .tbm-submenu .tbm-subnav,
  .tbm-item--has-flyout > .tbm-item-child .tbm-subnav {
    padding: 0 10px !important;
    display: block !important;
    list-style: none !important;
  }

  .tbm-submenu .tbm-subnav.level-2 > .tbm-item,
  .tbm-item-child .tbm-subnav.level-2 > .tbm-item,
  .tbm-submenu .tbm-item.level-3,
  .tbm-item-child .tbm-item.level-3,
  .tbm-item--has-flyout .tbm-subnav.level-2 > .tbm-item,
  .tbm-item--has-flyout .tbm-item.level-3 {
    background: #FFFFFF !important;
    margin-bottom: 0px !important;
    overflow: hidden !important;
    display: block !important;
    list-style: none !important;
  }

  .tbm.tbm--mobile .tbm-item {
    border-top: 1px solid rgb(0 0 0 / 44%);
  }

  .tbm-submenu .tbm-item.level-3 > .tbm-link-container,
  .tbm-item-child .tbm-item.level-3 > .tbm-link-container {
    padding: 8px 10px !important;
    background: #FFFFFF !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .tbm-submenu .tbm-item.level-3:hover,
  .tbm-item-child .tbm-item.level-3:hover {
    background: #F8F8FA !important;
    transform: none !important;
  }

  .tbm-submenu .tbm-item.level-3 .tbm-link,
  .tbm-item-child .tbm-item.level-3 .tbm-link {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #3C3C43 !important;
    text-decoration: none !important;
  }

  /* Remove icons from level-3 items on mobile */
  .tbm-submenu .tbm-item.level-3 .tbm-link-container::before,
  .tbm-item-child .tbm-item.level-3 .tbm-link-container::before {
    display: none !important;
  }

  /* Add arrow using ::after for level-3 items */
  .tbm-submenu .tbm-item.level-3 .tbm-link-container::after,
  .tbm-item-child .tbm-item.level-3 .tbm-link-container::after {
    content: '→' !important;
    display: inline-block !important;
    margin-left: auto !important;
    color: #C7C7CC !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    transition: all 0.2s ease !important;
  }

  .tbm-submenu .tbm-item.level-3:hover .tbm-link-container::after,
  .tbm-item-child .tbm-item.level-3:hover .tbm-link-container::after {
    color: #86868B !important;
    transform: translateX(2px) !important;
  }

  /* Remove desktop arrow styling */
  .tbm-subnav.level-2 > .tbm-item .tbm-link-container::after {
    content: '' !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    color: #000;
    margin-left: auto !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'><path fill='currentColor' d='M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z'/></svg>");
  }

  /* Featured blocks on mobile */
  .tbm-block {
    margin-top: 16px !important;
    background: #FFFFFF !important;
    border-radius: 16px !important;
    padding: 16px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  }

  .tbm-block img {
    height: 180px !important;
    border-radius: 12px !important;
  }

  /* Caption text styling */
  .tbm-caption {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #86868B !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
  }

  /* Active/Selected state */
  .tbm-item.active-level-3,
  .tbm-item.active > .tbm-link-container,
  .tbm-item.active-trail > .tbm-link-container {
    background: rgba(124, 58, 237, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
  }

  /* Book a Demo button on mobile */
  .book-demo-button {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #1D1D1F !important;
    color: #FFFFFF !important;
    padding: 16px 32px !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
  }

  /* Remove hover zones on mobile */
  .tbm-item::after,
  .tbm-submenu::after {
    display: none !important;
  }

  /* Ensure proper spacing */
  .tbm-nav {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide desktop-only elements */
  .level-3-display-container {
    display: none !important;
  }
  
  /* Remove all desktop-specific styling */
  .tbm-item.tbm-item--has-flyout .tbm-link-container::after,
  .tbm-item.level-2.active-level-3,
  .tbm-item::after,
  .tbm-submenu::after {
    display: none !important;
  }
  
  /* Ensure mobile menu has proper background */
  .navbar-collapse,
  .tb-megamenu-container {
    background: #F5F5F7 !important;
    padding: 10px 0 !important;
  }
  
  /* Remove any fixed positioning from desktop */
  .tbm-nav,
  .tbm-subnav {
    position: static !important;
  }
  
  /* Ensure caption text shows properly */
  .tbm-caption {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #86868B !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 768px) {
  /* Smaller screens - adjust padding */
  .tbm-nav.level-0 {
    padding: 15px !important;
  }

  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link.level-2 {
    font-size: 15px !important;
    font-weight: 600 !important;
  }

  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout .tbm-link.level-3 {
    font-size: 14px !important;
    font-weight: 500 !important;
  }

  .tbm-link span.fa-solid, .tbm-link span.fa-regular, .tbm-link span.fa-light {
      font-size: 18px;
  }

  .tbm-column .tbm-subnav.level-1 > .tbm-item .tbm-link::after {
    width: 18px !important;
    height: 18px !important;
  }

  .tbm-subnav.level-1 > .tbm-item > .tbm-link-container {
    padding: 15px !important;
  }

  .tbm-subnav.level-1 > .tbm-item > .tbm-link-container .tbm-link {
    font-size: 14px !important;
    display: flex !important;
  }

  .tbm-subnav.level-1 > .tbm-item.tbm-item--has-flyout > .tbm-link-container .tbm-link {
    flex-direction: column;
    align-items: stretch;
    gap: 0px !important; 
  }

  .tbm-column.span4:has(> .tbm-block){
    display: none !important;
  }

  .tbm-link.level-1{
    line-height:40px;
  }

  .tbm-item--has-dropdown .tbm-link-container .tbm-link.level-1.tbm-toggle:after {
    display: none !important;
  }

  .tbm-submenu-toggle {
    width: 32px !important;
    height: 32px !important;
  }
}

/* ============================================
   ICON STYLES (FontAwesome / Custom)
   ============================================ */

/* Add icon support via data attributes or classes */
.tbm-item[data-icon]::before,
.tbm-item.has-icon .tbm-link-container::before {
  content: attr(data-icon) !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Specific product icons */
.tbm-link:contains("Balance")::before,
.tbm-item:has(.tbm-link:contains("Balance")) .tbm-link-container::before {
  content: '⚖️' !important;
}

.tbm-link:contains("Audiology")::before,
.tbm-item:has(.tbm-link:contains("Audiology")) .tbm-link-container::before {
  content: '�' !important;
}

.tbm-link:contains("Sleep")::before,
.tbm-item:has(.tbm-link:contains("Sleep")) .tbm-link-container::before {
  content: '�️' !important;
}

.tbm-link:contains("Imaging")::before,
.tbm-item:has(.tbm-link:contains("Imaging")) .tbm-link-container::before {
  content: '🎯' !important;
}

/* ============================================
   CUSTOM SVG ICONS FOR SPECIFIC CLASSES
   ============================================ */

/* Audiology Icon - More specific selector */
.tbm-column .tbm-subnav.level-1 > .audiology-icon .tbm-link-container::before,
.audiology-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50.303.345C38.875-1.332 31.925 3.328 28.107 7.531c-6.093 6.704-8.234 16.803-6.786 22.694a2.5 2.5 0 0 0 4.856-1.194c-.969-3.94.448-12.435 5.63-18.137 4.367-4.806 10.344-6.691 17.771-5.601 17.614 2.583 25.499 20.083 25.499 36.28 0 12.635-4.263 23.459-13.822 35.095l-1.231 1.502c-8.01 9.782-14.924 18.231-23.52 16.627-11.985-2.24-11.587-15.556-11.564-16.115a2.5 2.5 0 0 0-2.383-2.611 2.48 2.48 0 0 0-2.612 2.383c-.288 6.288 2.609 18.823 15.641 21.258 1.067.2 2.105.295 3.118.295 9.903 0 17.35-9.094 25.189-18.669l1.226-1.495C75.465 67.25 80.078 55.447 80.078 41.574 80.076 23.225 70.87 3.363 50.303.345z' fill='%237C3AED'/%3E%3Cpath d='M27.79 74.057c1.067.764 2.088 1.07 3.051 1.069 2.478 0 4.577-2.027 6.11-3.509 1.561-1.509 3.175-3.068 5.05-3.416 8.032-1.492 13.19-6.093 15.332-13.675 1.369-4.848.833-9.001-1.592-12.344-4.51-6.213-14.272-7.46-18.797-7.699-1.565-4.041-1.911-8.325-.09-12.101 1.643-3.406 3.988-5.645 6.783-6.473 3.042-.902 6.625-.179 10.359 2.087 11.086 6.727 12.118 26.603 7.958 37.33-2.372 6.116-3.903 9.219-8.611 13.254a2.499 2.499 0 1 0 3.254 3.796c5.739-4.92 7.614-9.041 10.02-15.242 4.789-12.351 3.975-34.917-10.026-43.413-4.972-3.017-9.941-3.92-14.374-2.607-4.183 1.239-7.595 4.384-9.867 9.095-4.492 9.313.493 20.477 7.426 27.41a2.501 2.501 0 0 0 3.536-3.536 30.14 30.14 0 0 1-3.562-4.317c3.907.523 9.417 1.868 11.944 5.351 1.501 2.069 1.771 4.702.826 8.048-1.603 5.677-5.343 8.987-11.432 10.118-3.354.622-5.715 2.903-7.612 4.736-.789.763-2.11 2.039-2.569 2.087 0-.001-.068-.018-.208-.118-.832-.595-1.048-.954.35-3.976.72-1.557 1.465-3.166 1.186-4.864-.898-5.473-.042-6.766.242-7.031.21-.196.776-.21 1.515-.04 1.189.277 1.626.957 1.783 1.479.161.535.032.957-.05 1.046a2.5 2.5 0 0 0 3.272 3.781c1.563-1.351 2.214-3.68 1.657-5.935-.648-2.628-2.716-4.587-5.53-5.242-3.126-.726-5.022.284-6.064 1.26-2.8 2.623-2.411 7.519-1.765 11.421-.009.352-.475 1.358-.784 2.024-1.121 2.427-3.207 6.937 1.279 10.146z' fill='%237C3AED'/%3E%3C/svg%3E") !important;
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

/* Balance & Vestibular Icon */
.tbm-column .tbm-subnav.level-1 > .balance-icon .tbm-link-container::before,
.tbm-item.balance-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M205.08 71.92A50.92 50.92 0 1 1 256 122.84a50.919 50.919 0 0 1-50.92-50.92zm225.579 76.119H81.341a25.277 25.277 0 1 0 0 50.553h112.782v261.47a30.939 30.939 0 0 0 61.877 0v-139.61l42.3 42.3-19.9 19.9a30.938 30.938 0 0 0 43.749 43.748l37.074-37.073a37.665 37.665 0 0 0 0-53.164l-41.346-41.346v-96.225h112.782a25.277 25.277 0 1 0 0-50.553z' fill='%237C3AED'/%3E%3C/svg%3E") !important;
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

/* Sleep Therapy Icon */
.tbm-column .tbm-subnav.level-1 > .sleep-therapy-icon .tbm-link-container::before,
.tbm-item.sleep-therapy-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M34.001 29.023h4a1 1 0 0 1 0 2h-4a1 1 0 0 1 0-2zm23.085 1h-5a1 1 0 0 0-1 1v8h-38v-16a1 1 0 0 0-1-1h-5a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3h38v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-18a1 1 0 0 0-1-1zm-41 8h10a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-10a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1zm19.943-12.046c.701-.117 1.994-3.341 1.994-5s-1.293-4.884-2.005-5c-.702.116-1.995 3.34-1.995 5s1.293 4.883 2.006 5zm-2.708-.322a12.888 12.888 0 0 1-1.235-4.632 5.584 5.584 0 0 1 .058-.71c-1.66-1.09-3.629-1.68-4.016-1.408-.41.582.954 3.78 2.125 4.951a9.922 9.922 0 0 0 3.068 1.799zm8.77-1.802c1.169-1.167 2.534-4.366 2.114-4.957-.385-.276-2.503.379-4.166 1.52a5.344 5.344 0 0 1 .047.607 12.88 12.88 0 0 1-1.272 4.701 10.052 10.052 0 0 0 3.278-1.871z' fill='%237C3AED'/%3E%3C/svg%3E") !important;
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

/* Imaging Solution Icon */
.tbm-column .tbm-subnav.level-1 > .imaging-icon .tbm-link-container::before,
.tbm-item.imaging-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11 1.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 0 1 0V2A1.502 1.502 0 0 0 14 .5h-3a.5.5 0 0 0 0 1zM15 10.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 0 0 1h3a1.502 1.502 0 0 0 1.5-1.5v-3a.5.5 0 0 0-.5-.5zM2 15.5h3a.5.5 0 0 0 0-1H2a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 0-1 0v3A1.502 1.502 0 0 0 2 15.5zM1 5.5a.5.5 0 0 0 .5-.5V2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 0 0-1H2A1.502 1.502 0 0 0 .5 2v3a.5.5 0 0 0 .5.5zM8 11.5A3.5 3.5 0 1 0 4.5 8 3.504 3.504 0 0 0 8 11.5zm0-6A2.5 2.5 0 1 1 5.5 8 2.503 2.503 0 0 1 8 5.5z' fill='%237C3AED'/%3E%3C/svg%3E") !important;
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

.tbm-column .tbm-subnav.level-1 > .healthcare-professionals-icon .tbm-link-container::before,
.tbm-item.healthcare-professionals-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cpath fill='%237C3AED' d='M811.65 916h-623.3a16 16 0 0 1-16-16.56l7.29-207.64a80.22 80.22 0 0 1 56.27-73.69l127.77-39.77a16 16 0 1 1 9.51 30.55l-127.77 39.77a48.18 48.18 0 0 0-33.8 44.26L204.92 884h590.16l-6.7-191.08a48.18 48.18 0 0 0-33.8-44.26l-127.77-39.77a16 16 0 0 1 9.51-30.55l127.77 39.77a80.22 80.22 0 0 1 56.27 73.69l7.29 207.64a16 16 0 0 1-16 16.56z'/%3E%3Cpath fill='%237C3AED' d='M308.23 847.44a56.52 56.52 0 1 1 56.51-56.51 56.57 56.57 0 0 1-56.51 56.51zm0-81a24.52 24.52 0 1 0 24.51 24.52 24.54 24.54 0 0 0-24.51-24.55z'/%3E%3Cpath fill='%237C3AED' d='M308.23 766.41a16 16 0 0 1-16-16V612.35a16 16 0 0 1 32 0v138.06a16 16 0 0 1-16 16zM691.77 736.84a16 16 0 0 1-16-16V612.35a16 16 0 1 1 32 0v108.49a16 16 0 0 1-16 16z'/%3E%3Cpath fill='%237C3AED' d='M737.69 847.44a16 16 0 0 1-16-16v-64.67a29.92 29.92 0 0 0-59.84 0v64.67a16 16 0 0 1-32 0v-64.67a61.92 61.92 0 0 1 123.84 0v64.67a16 16 0 0 1-16 16zM420.18 716.15a16 16 0 0 1-14.39-9L354 600.61a16 16 0 0 1 .74-15.34l47.14-77.14a16 16 0 0 1 13.32-7.65h.34a16 16 0 0 1 13.28 7.08l84.43 125.8a16 16 0 0 1-3.9 21.87l-79.82 57.88a16 16 0 0 1-9.35 3.04zm-33.53-121.66L426.24 676l51.88-37.62-61.91-92.25z'/%3E%3Cpath fill='%237C3AED' d='M579.82 716.15a16 16 0 0 1-9.39-3l-79.82-57.88a16 16 0 0 1-3.9-21.87l84.43-125.8a16 16 0 0 1 26.94.57l47.14 77.14a16 16 0 0 1 .74 15.34l-51.75 106.49a16 16 0 0 1-14.39 9zm-57.94-77.77L573.76 676l39.59-81.51-29.56-48.36z'/%3E%3Cpath fill='%237C3AED' d='M500 916a16 16 0 0 1-16-16V642.28a16 16 0 0 1 32 0V900a16 16 0 0 1-16 16zM500 518.1c-34.83 0-67.38-16.43-91.65-46.27-23.48-28.86-36.41-67-36.41-107.5l-.08-79.5a76.75 76.75 0 0 1 17.94-49.69c1.45-1.71 3-3.39 4.61-5a54.35 54.35 0 0 1 60.72-10.74c15.28 6.82 30.36 10.69 44.84 11.5 14.48-.81 29.57-4.68 44.85-11.5a54.34 54.34 0 0 1 60.72 10.75c1.6 1.57 3.16 3.25 4.62 5a76.75 76.75 0 0 1 17.93 49.68v79.52c0 40.46-12.94 78.64-36.44 107.51-24.28 29.81-56.83 46.24-91.65 46.24zm-96.16-233.3.08 79.52c0 67.16 43.1 121.78 96.06 121.78s96.11-54.62 96.11-121.77v-79.51a44.74 44.74 0 0 0-10.34-29c-.85-1-1.74-2-2.66-2.86a22.54 22.54 0 0 0-25.22-4.33c-19.19 8.57-38.4 13.37-57.09 14.28h-1.61c-18.7-.91-37.9-5.71-57.09-14.28a22.55 22.55 0 0 0-25.24 4.37c-.93.91-1.82 1.87-2.65 2.86a44.71 44.71 0 0 0-10.35 28.94z'/%3E%3Cpath fill='%237C3AED' d='M389.68 405.49a81.2 81.2 0 0 1-30.71-6.7c-21.73-9.67-33.91-28.43-34.29-52.82a56.15 56.15 0 0 0-.79-7.26c-2-12 .93-23.45 8.38-32.24 10.55-12.46 29.32-18.68 55.66-18.55a16 16 0 0 1-.09 32h-.09c-23-.16-29.6 5.5-31.06 7.23-1.28 1.51-1.7 3.61-1.25 6.24v.24a83.31 83.31 0 0 1 1.2 11.86c.18 11.75 4.69 19.08 14.61 23.75a49.64 49.64 0 0 0 18.43 4.25v16l.13 16zM610.32 405.49h-.21l.27-32a49.64 49.64 0 0 0 18.33-4.25c9.92-4.67 14.43-12 14.61-23.77a83.32 83.32 0 0 1 1.2-11.84v-.24c.45-2.63 0-4.73-1.25-6.24-1.46-1.73-8-7.41-31.06-7.23h-.09a16 16 0 0 1-.09-32c26.39-.2 45.11 6.09 55.66 18.55 7.45 8.79 10.42 20.24 8.38 32.24a56.24 56.24 0 0 0-.79 7.24c-.38 24.41-12.56 43.17-34.29 52.84a81.2 81.2 0 0 1-30.67 6.7z'/%3E%3Cpath fill='%237C3AED' d='M351.28 328.35a16 16 0 0 1-15.66-12.79c-12.86-62.83-5.15-115.38 22.91-156.17 39.16-56.93 103.84-69.65 110.18-70.78C528.54 76 557.9 91.69 572 107.09a63.27 63.27 0 0 0 22.2 16c47.5 19.84 73.8 59.67 76 115.18 1.61 39.91-10 73.86-10.49 75.29a16 16 0 0 1-30.24-10.47c.1-.3 10.28-30.37 8.72-64.35-1.94-42.34-20.9-71.31-56.36-86.12a95.08 95.08 0 0 1-33.43-23.92c-6.95-7.59-25.72-18.82-73.34-8.72l-.72.14c-.52.09-57.23 10.28-89.65 57.7-22.77 33.32-28.69 77.5-17.69 131.32A16 16 0 0 1 354.51 328a16.32 16.32 0 0 1-3.23.35zM415.58 532.48a16 16 0 0 1-16-16v-61.54a16 16 0 0 1 32 0v61.54a16 16 0 0 1-16 16zM584.43 532.48a16 16 0 0 1-16-16v-61.56a16 16 0 1 1 32 0v61.56a16 16 0 0 1-16 16z'/%3E%3C/svg%3E");
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

.tbm-column .tbm-subnav.level-1 > .patients-icon .tbm-link-container::before,
.tbm-item.patients-icon .tbm-link-container::before {
  content: '' !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 591.9 591.92'%3E%3Cpath fill='%237C3AED' d='M576.9 462.45H96.16a52.65 52.65 0 0 1-52.59-52.59v-33.55a15 15 0 0 1 30 0v33.55a22.61 22.61 0 0 0 22.59 22.59H576.9a15 15 0 0 1 0 30z'/%3E%3Cpath fill='%237C3AED' d='M576.9 398.4a15 15 0 0 1-15-15v-37.58a22.61 22.61 0 0 0-22.59-22.56H181.65a15 15 0 0 1-10.61-4.39L68.53 216.33a22.581 22.581 0 0 0-31.94 31.93L156.73 368.4h355.45a15 15 0 0 1 0 30H150.51a15 15 0 0 1-10.6-4.39L15.38 269.48a52.58 52.58 0 0 1 74.36-74.36l98.16 98.14h351.41a52.65 52.65 0 0 1 52.59 52.56v37.58a15 15 0 0 1-15 15zM150.51 591.92a54.13 54.13 0 1 1 54.13-54.13 54.19 54.19 0 0 1-54.13 54.13zm0-78.25a24.13 24.13 0 1 0 24.13 24.12 24.15 24.15 0 0 0-24.13-24.12zM480.06 591.92a54.13 54.13 0 1 1 54.13-54.13 54.19 54.19 0 0 1-54.13 54.13zm0-78.25a24.13 24.13 0 1 0 24.13 24.12 24.15 24.15 0 0 0-24.13-24.12zM480.06 263.26a15 15 0 0 1-15-15V30h-66.33v46.47a15 15 0 1 1-30 0V15a15 15 0 0 1 15-15h96.33a15 15 0 0 1 15 15v233.26a15 15 0 0 1-15 15z'/%3E%3Cpath fill='%237C3AED' d='M395.32 192.41h-23.18a34.57 34.57 0 0 1-34.53-34.53V96a34.57 34.57 0 0 1 34.53-34.53h23.18A34.57 34.57 0 0 1 429.9 96v61.88a34.57 34.57 0 0 1-34.58 34.53zM372.14 91.47a4.54 4.54 0 0 0-4.53 4.53v61.88a4.53 4.53 0 0 0 4.53 4.53h23.18a4.53 4.53 0 0 0 4.53-4.53V96a4.54 4.54 0 0 0-4.53-4.53zM181.65 323.26a15 15 0 0 1-10.61-25.6c24.22-24.22 22.48-47.55-5.64-75.66s-51.44-29.85-75.66-5.64a15 15 0 0 1-21.21-21.21c16.65-16.65 34.67-25.28 53.58-25.64 21.59-.44 43.34 10.1 64.51 31.27s31.69 42.85 31.28 64.48c-.36 18.91-9 36.94-25.63 53.58a15 15 0 0 1-10.62 4.42zM150.51 513.67a15 15 0 0 1-15-15v-51.22a15 15 0 1 1 30 0v51.22a15 15 0 0 1-15 15zM480.06 513.67a15 15 0 0 1-15-15v-51.22a15 15 0 0 1 30 0v51.22a15 15 0 0 1-15 15z'/%3E%3Cpath fill='%237C3AED' d='M352.61 263.26a15 15 0 0 1 0-30 16.14 16.14 0 0 0 16.12-16.12v-39.7a15 15 0 0 1 30 0v39.7a46.17 46.17 0 0 1-46.12 46.12z'/%3E%3C/svg%3E") !important;
  background-size: 48px 48px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.tbm-item.highlighted,
.tbm-block.highlighted {
  background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%) !important;
}

.tbm-item.featured {
  background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%) !important;
}

.badge-new {
  display: inline-block !important;
  padding: 4px 12px !important;
  background: #7C3AED !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  margin-left: 8px !important;
  letter-spacing: 0.5px !important;
}

/* ============================================
   FIX ALIGNMENT ISSUES
   ============================================ */

/* Remove default TB Mega Menu spacing */
.tbm-column.span4,
.tbm-column.span12 {
  padding: 0 !important;
  margin: 0 !important;
}

.tbm-column-inner {
  padding: 0 !important;
}

/* Ensure proper list styling */
.tbm-subnav {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

/* Fix link display */
.tbm-link {
  display: block !important;
}

.tbm-link.no-link {
  cursor: pointer !important;
}

/* Ensure blocks fill their containers */
.tbm-block {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.block-inner {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}
