/* ==========================================================================
   CODE1001 — SERVICES MEGA MENU STYLES
   ========================================================================== */

/* Ensure nav container is positioned for centered mega menu */
.nav-inner {
  position: relative;
}

/* Dropdown Container in Nav */
.nav-item-dropdown {
  position: static;
  display: inline-flex;
  align-items: center;
}

.nav-link-services,
.nav-link-solutions,
.nav-link-company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d4d4d8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 0;
  background: transparent;
  border: none;
  font-family: inherit;
  transition: color 0.2s ease;
}

html[data-theme="light"] .nav-link-services,
html[data-theme="light"] .nav-link-solutions,
html[data-theme="light"] .nav-link-company {
  color: #3a3a40;
}

.nav-link-services:hover,
.nav-link-solutions:hover,
.nav-link-company:hover,
.nav-item-dropdown.is-open .nav-link-services,
.nav-item-dropdown.is-open .nav-link-solutions,
.nav-item-dropdown.is-open .nav-link-company {
  color: var(--text);
}

html[data-theme="light"] .nav-item-dropdown.is-open .nav-link-services,
html[data-theme="light"] .nav-item-dropdown.is-open .nav-link-solutions,
html[data-theme="light"] .nav-item-dropdown.is-open .nav-link-company,
html[data-theme="light"] .nav-link-services:hover,
html[data-theme="light"] .nav-link-solutions:hover,
html[data-theme="light"] .nav-link-company:hover {
  color: #2563eb;
}

/* Dropdown Chevron */
.dropdown-chevron {
  width: 9px;
  height: 9px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.7;
}

.nav-item-dropdown.is-open .dropdown-chevron,
.nav-item-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Invisible Hover Bridge (spans full width under nav bar) */
.services-mega-menu-bridge,
.solutions-mega-menu-bridge,
.company-mega-menu-bridge {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
  display: none;
  z-index: 1000;
}

.nav-item-dropdown:hover .services-mega-menu-bridge,
.nav-item-dropdown.is-open .services-mega-menu-bridge,
.nav-item-dropdown:hover .solutions-mega-menu-bridge,
.nav-item-dropdown.is-open .solutions-mega-menu-bridge,
.nav-item-dropdown:hover .company-mega-menu-bridge,
.nav-item-dropdown.is-open .company-mega-menu-bridge {
  display: block;
}

/* Mega Menu Popover Wrapper (Horizontally Centered) */
.services-mega-menu,
.solutions-mega-menu,
.company-mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 960px;
  max-width: calc(100% - 40px);
  background: #111215;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 88, 233, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px) scale(0.985);
  transform-origin: var(--notch-x, 50%) top;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s ease;
  z-index: 1001;
  pointer-events: none;
}

.company-mega-menu {
  width: 920px;
}

/* Open State */
.nav-item-dropdown:hover .services-mega-menu,
.nav-item-dropdown.is-open .services-mega-menu,
.nav-item-dropdown:hover .solutions-mega-menu,
.nav-item-dropdown.is-open .solutions-mega-menu,
.nav-item-dropdown:hover .company-mega-menu,
.nav-item-dropdown.is-open .company-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Caret Notch Triangles (Aligned directly to trigger) */
.services-mega-menu::before,
.solutions-mega-menu::before,
.company-mega-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--notch-x, 375px) - 6px);
  width: 12px;
  height: 12px;
  background: #111215;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  border-top-left-radius: 3px;
  z-index: 2;
  pointer-events: none;
}

.solutions-mega-menu::before {
  left: calc(var(--notch-x, 530px) - 6px);
}

.company-mega-menu::before {
  left: calc(var(--notch-x, 620px) - 6px);
}

/* Light Theme Mega Menu */
html[data-theme="light"] .services-mega-menu,
html[data-theme="light"] .solutions-mega-menu,
html[data-theme="light"] .company-mega-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.14),
              0 4px 16px -2px rgba(15, 23, 42, 0.04),
              0 0 1px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .services-mega-menu::before,
html[data-theme="light"] .solutions-mega-menu::before,
html[data-theme="light"] .company-mega-menu::before {
  background: #ffffff;
  border-left-color: rgba(0, 0, 0, 0.09);
  border-top-color: rgba(0, 0, 0, 0.09);
}

/* Mega Menu Grid (3 Columns) */
.mm-grid {
  display: grid;
  grid-template-columns: 185px 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* --------------------------------------------------------------------------
   COLUMN 1: FEATURED RADAR PREVIEW
   -------------------------------------------------------------------------- */
.mm-col-featured {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mm-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.2s ease;
  width: fit-content;
}

html[data-theme="light"] .mm-all-link {
  color: #2563eb;
}

.mm-all-link .mm-arrow {
  transition: transform 0.2s ease;
  font-size: 14px;
  line-height: 1;
}

.mm-all-link:hover .mm-arrow {
  transform: translateX(4px);
}

.mm-all-link:hover {
  opacity: 0.85;
}

/* Services Stack Visual Preview Card */
.mm-preview-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 55%, #1e40af 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px -4px rgba(30, 58, 138, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.mm-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mm-stack-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Tier Floating Animations */
.mm-tier {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mm-tier-top {
  animation: mmFloatTop 4s ease-in-out infinite alternate;
}

.mm-tier-mid {
  animation: mmFloatMid 4s ease-in-out infinite alternate 0.4s;
}

.mm-tier-base {
  animation: mmFloatBase 4s ease-in-out infinite alternate 0.8s;
}

@keyframes mmFloatTop {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

@keyframes mmFloatMid {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

@keyframes mmFloatBase {
  0% { transform: translateY(0); }
  100% { transform: translateY(2px); }
}

/* On hover, expand the layers */
.mm-preview-card:hover .mm-tier-top {
  transform: translateY(-8px);
}

.mm-preview-card:hover .mm-tier-mid {
  transform: translateY(-3px);
}

.mm-preview-card:hover .mm-tier-base {
  transform: translateY(5px);
}

/* Animated Data Flow Light Beam */
@keyframes mmDataFlow {
  0% {
    stroke-dashoffset: 60;
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
}

.mm-beam-active {
  stroke-dasharray: 10 14;
  animation: mmDataFlow 2.2s linear infinite;
}

/* Top Pill Chip on Card */
.mm-preview-top-chip {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 9.5px;
  font-weight: 700;
  color: #ffffff;
}

.mm-preview-top-chip .chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: mmBeaconGlow 1.8s infinite;
}

@keyframes mmBeaconGlow {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

.mm-preview-overlay {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mm-preview-badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.mm-preview-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   COLUMNS 2 & 3: SERVICES & SOLUTIONS LIST (4 Items Per Column)
   -------------------------------------------------------------------------- */
.mm-col-services,
.mm-col-solutions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mm-service-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6.5px 8px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.mm-service-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

html[data-theme="light"] .mm-service-card:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.04);
}

/* Service Icon Badge */
.mm-service-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}

.mm-service-icon svg {
  width: 17px;
  height: 17px;
}

html[data-theme="light"] .mm-service-icon {
  background: #f1f5f9;
  color: #334155;
  border-color: rgba(0, 0, 0, 0.05);
}

/* Default Icon Hover Styles */
.mm-service-card:hover .mm-service-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
  transform: scale(1.05);
}

html[data-theme="light"] .mm-service-card:hover .mm-service-icon {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

/* Custom Services Icon Hover Tints (Dark Mode) */
.mm-service-card:hover .icon-srv-design {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.3);
}
.mm-service-card:hover .icon-srv-webdev {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}
.mm-service-card:hover .icon-srv-wp {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}
.mm-service-card:hover .icon-srv-webflow {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}
.mm-service-card:hover .icon-srv-shopify {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}
.mm-service-card:hover .icon-srv-saas {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.mm-service-card:hover .icon-srv-ecom {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}
.mm-service-card:hover .icon-srv-custom {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.3);
}

/* Custom Services Icon Hover Tints (Light Mode) */
html[data-theme="light"] .mm-service-card:hover .icon-srv-design {
  background: #fdf2f8;
  color: #db2777;
  border-color: rgba(219, 39, 119, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-webdev {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-wp {
  background: #ecfeff;
  color: #0891b2;
  border-color: rgba(8, 145, 178, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-webflow {
  background: #eef2ff;
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-shopify {
  background: #ecfdf5;
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-saas {
  background: #fffbeb;
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-ecom {
  background: #ecfdf5;
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-srv-custom {
  background: #fff7ed;
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.2);
}

/* Service Info Text */
.mm-service-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}

.mm-service-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  transition: color 0.18s ease;
}

html[data-theme="light"] .mm-service-title {
  color: #0f172a;
}

.mm-service-card:hover .mm-service-title {
  color: #38bdf8;
}

html[data-theme="light"] .mm-service-card:hover .mm-service-title {
  color: #2563eb;
}

.mm-service-desc {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-theme="light"] .mm-service-desc {
  color: #64748b;
}

/* --------------------------------------------------------------------------
   SOLUTIONS MEGA MENU SPECIFIC PREVIEW & HOVER ACCENTS
   -------------------------------------------------------------------------- */
.mm-grid-solutions {
  grid-template-columns: 185px 1fr 1fr;
}

/* Solutions preview card artwork & colors */
.mm-preview-solutions {
  background: linear-gradient(145deg, #091a2f 0%, #132d4b 50%, #0369a1 100%);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 28px -4px rgba(3, 105, 161, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mm-preview-solutions:hover {
  box-shadow: 0 16px 36px -4px rgba(14, 165, 233, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Individual hover tint accents for solutions */
.mm-service-card:hover .icon-sol-redesign {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.3);
}
.mm-service-card:hover .icon-sol-migration {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}
.mm-service-card:hover .icon-sol-perf {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}
.mm-service-card:hover .icon-sol-cro {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.mm-service-card:hover .icon-sol-saas {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}
.mm-service-card:hover .icon-sol-ai {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}
.mm-service-card:hover .icon-sol-api {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}
.mm-service-card:hover .icon-sol-auto {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.3);
}

/* Light mode icon hover tints */
html[data-theme="light"] .mm-service-card:hover .icon-sol-redesign {
  background: #fdf2f8;
  color: #db2777;
  border-color: rgba(219, 39, 119, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-migration {
  background: #ecfeff;
  color: #0891b2;
  border-color: rgba(8, 145, 178, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-perf {
  background: #ecfdf5;
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-cro {
  background: #fffbeb;
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-saas {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-ai {
  background: #eef2ff;
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-api {
  background: #faf5ff;
  color: #9333ea;
  border-color: rgba(147, 51, 234, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-sol-auto {
  background: #fff7ed;
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.2);
}

/* --------------------------------------------------------------------------
   MACOS-STYLE MOBILE NAVIGATION MENU (Matches Reference Screenshot)
   -------------------------------------------------------------------------- */

/* Backdrop Overlay */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.mobile-menu-backdrop.is-active,
body.mobile-nav-open .mobile-menu-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Menu Drawer Container */
.mobile-menu {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: calc(100% - 24px);
  max-width: 360px;
  background: linear-gradient(180deg, #18181c 0%, #121215 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.38s;
  visibility: hidden;
  pointer-events: none;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Full Width On Very Small Screens */
@media (max-width: 440px) {
  .mobile-menu {
    top: 6px;
    right: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(100% - 12px);
    max-width: 100%;
    border-radius: 16px;
  }
}

/* Hide Mobile Drawer and Hamburger on Large Desktop Screens */
.hamburger,
.nav-right .hamburger,
#hamburgerBtn {
  display: none !important;
}

@media (min-width: 992px) {
  .mobile-menu,
  .mobile-menu-backdrop,
  .hamburger,
  .nav-right .hamburger,
  #hamburgerBtn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Light Theme Support */
html[data-theme="light"] .mobile-menu {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 25px 55px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* 1. Top Header Bar (Branded Logo & Close) */
.mn-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  flex-shrink: 0;
}

.mn-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mn-logo .logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.mn-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mn-close-btn svg {
  width: 16px;
  height: 16px;
}

.mn-close-btn:hover {
  background: var(--card-3);
  color: var(--text);
  border-color: var(--border);
}

/* 2. Search & Home Row */
.mn-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.mn-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 42px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mn-search-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .mn-search-wrap:focus-within {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.mn-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mn-search-icon svg {
  width: 100%;
  height: 100%;
}

/* Hard reset on search input to override global input[type="text"] from style.css */
.mobile-menu input[type="text"].mn-search-input,
.mn-search-wrap input.mn-search-input,
input[type="text"].mn-search-input {
  flex: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 40px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  padding: 0 4px !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.mobile-menu input[type="text"].mn-search-input:focus,
.mn-search-wrap input.mn-search-input:focus,
input[type="text"].mn-search-input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

html[data-theme="light"] .mobile-menu input[type="text"].mn-search-input:focus,
html[data-theme="light"] .mn-search-wrap input.mn-search-input:focus {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.mobile-menu input[type="text"].mn-search-input::placeholder,
.mn-search-wrap input.mn-search-input::placeholder {
  color: var(--text-faint) !important;
  opacity: 1;
}

.mn-search-clear {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.mn-search-clear svg {
  width: 14px;
  height: 14px;
}

.mn-search-clear:hover {
  color: var(--text);
}

.mn-home-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.18s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.mn-home-btn svg {
  width: 18px;
  height: 18px;
}

.mn-home-btn:hover {
  background: var(--card-3);
  color: var(--text);
  border-color: var(--border);
}

/* 3. Scrollable Navigation Body */
.mn-scroll-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Accordion Section Groups */
.mn-section {
  display: flex;
  flex-direction: column;
}

.mn-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
}

.mn-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: inherit;
  transition: color 0.15s ease;
}

.mn-section-toggle:hover {
  color: var(--text);
}

.mn-chevron {
  width: 13px;
  height: 13px;
  color: var(--text-faint);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mn-section.is-collapsed .mn-chevron {
  transform: rotate(-90deg);
}

.mn-section-action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mn-section-action-link:hover {
  color: var(--text);
}

.mn-link-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.mn-section-action-link:hover .mn-link-arrow {
  transform: translateX(2px);
}

/* Sub-items List */
.mn-section-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.25s ease;
}

.mn-section.is-collapsed .mn-section-list {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

.mn-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mn-subitem:hover {
  background: var(--card-2);
}

.mn-subitem-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Subitem Icon Badges (Better-Icons integration) */
.mn-subitem-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mn-subitem-icon svg {
  width: 15px;
  height: 15px;
}

.mn-subitem:hover .mn-subitem-icon {
  background: var(--card-3);
  color: var(--text);
  border-color: var(--border);
  transform: scale(1.06);
}

.mn-subitem-name {
  line-height: 1.3;
}

/* Subtle Right Arrow */
.mn-item-arrow {
  font-size: 12px;
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.mn-subitem:hover .mn-item-arrow {
  opacity: 0.8;
  transform: translateX(0);
  color: var(--text);
}

/* All Services Hub Special Highlight */
.mn-subitem-all {
  margin-top: 4px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}

.mn-subitem-all .mn-subitem-icon {
  background: var(--card-3);
  color: var(--text);
}

/* Search filtering states */
.mn-subitem.is-hidden,
.mn-item.is-hidden {
  display: none !important;
}

.mn-no-results {
  padding: 24px 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* 5. Bottom Action CTA */
.mn-bottom-cta {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-soft);
  background: inherit;
  flex-shrink: 0;
}

.mn-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mn-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
}

.mn-cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.mn-cta-btn:hover .mn-cta-arrow {
  transform: translateX(3px);
}

/* Ensure sticky header stays above page widgets */
header.nav {
  z-index: 999;
}

/* Medium Desktop Responsiveness */
@media (max-width: 1200px) and (min-width: 992px) {
  .services-mega-menu,
  .solutions-mega-menu {
    width: 860px;
    max-width: calc(100% - 32px);
    padding: 20px 22px;
  }
  .mm-grid {
    grid-template-columns: 160px 1fr 1fr;
    gap: 16px;
  }
  .company-mega-menu {
    width: 840px;
    max-width: calc(100% - 32px);
    padding: 20px 22px;
  }
  .mm-service-card {
    gap: 8px;
    padding: 6px 7px;
  }
}

/* Company Mega Menu Specific Styling */
.mm-preview-company {
  background: radial-gradient(circle at 50% 30%, rgba(19, 165, 127, 0.12), rgba(15, 23, 42, 0.8) 75%);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.mm-preview-company .chip-dot {
  background: #13a57f;
  box-shadow: 0 0 6px #13a57f;
}

html[data-theme="light"] .mm-preview-company {
  background: radial-gradient(circle at 50% 30%, rgba(19, 165, 127, 0.12), rgba(241, 245, 249, 0.98) 75%);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 1px 0 inset rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .mm-preview-company:hover {
  border-color: rgba(19, 165, 127, 0.4);
  box-shadow: 0 16px 36px -4px rgba(19, 165, 127, 0.25), 0 1px 0 inset rgba(255, 255, 255, 0.9);
}

/* Light Theme - Top Pill Chip */
html[data-theme="light"] .mm-preview-company .mm-preview-top-chip {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .mm-preview-company .mm-preview-top-chip span {
  color: #0f172a;
  font-weight: 700;
}

html[data-theme="light"] .mm-preview-company .chip-dot {
  background: #13a57f;
  box-shadow: 0 0 6px rgba(19, 165, 127, 0.8);
}

/* Light Theme - Bottom Overlay Typography */
html[data-theme="light"] .mm-preview-company .mm-preview-badge {
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0.07em;
}

html[data-theme="light"] .mm-preview-company .mm-preview-title {
  color: #0f172a;
  font-weight: 800;
}

.mm-company-canvas {
  width: 100%;
  height: 100%;
}

/* Company Mega Menu Canvas Keyframe Animations */
.comp-anim-squircle {
  stroke: rgba(255, 255, 255, 0.12);
  animation: compDashMarquee 20s linear infinite;
}

@keyframes compDashMarquee {
  to {
    stroke-dashoffset: -100;
  }
}

/* Pulsing ambient radial aura */
.comp-anim-inf-glow {
  transform-origin: 92.5px 92.5px;
  animation: compInfGlowPulse 4.5s ease-in-out infinite alternate;
}

@keyframes compInfGlowPulse {
  0% { transform: scale(0.88); opacity: 0.45; }
  100% { transform: scale(1.18); opacity: 0.85; }
}

/* Infinity Symbol Group Floating and breathing */
.comp-anim-infinity-wrap {
  transform-origin: 92.5px 92.5px;
  animation: compInfFloat 4s ease-in-out infinite alternate;
  transition: filter 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes compInfFloat {
  0% {
    transform: translateY(0px) scale(0.98);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    transform: translateY(0px) scale(0.98);
  }
}

/* Primary Fast Flowing Energy Comet Beam */
.comp-inf-flow-1 {
  stroke-dasharray: 24 76;
  animation: compInfFlow1 3.2s linear infinite;
  filter: drop-shadow(0 0 4px #38bdf8);
}

@keyframes compInfFlow1 {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Counter-Balanced Energy Beam 2 */
.comp-inf-flow-2 {
  stroke-dasharray: 12 88;
  animation: compInfFlow2 3.2s linear infinite;
  filter: drop-shadow(0 0 3px #ffffff);
}

@keyframes compInfFlow2 {
  from {
    stroke-dashoffset: 150;
  }
  to {
    stroke-dashoffset: 50;
  }
}

/* Traveling sparkle dots drop shadow */
.comp-inf-sparkle-1 {
  filter: drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 10px #38bdf8);
}

.comp-inf-sparkle-2 {
  filter: drop-shadow(0 0 5px #38bdf8) drop-shadow(0 0 8px #13a57f);
}

/* Interactive Hover Acceleration & Luminous Burst */
.mm-preview-company:hover .comp-anim-infinity-wrap {
  transform: scale(1.08);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 18px rgba(19, 165, 127, 0.6));
}

.mm-preview-company:hover .comp-inf-flow-1 {
  animation-duration: 1.3s;
}

.mm-preview-company:hover .comp-inf-flow-2 {
  animation-duration: 1.3s;
}

/* Light Theme Adjustments */
html[data-theme="light"] .comp-anim-squircle {
  stroke: rgba(15, 23, 42, 0.22);
}

html[data-theme="light"] .comp-anim-inf-glow {
  opacity: 0.45;
}

html[data-theme="light"] .comp-inf-track {
  stroke: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .comp-inf-track-glow {
  stroke: rgba(19, 165, 127, 0.2);
}

html[data-theme="light"] .comp-inf-flow-1 {
  stroke: #0284c7;
  filter: drop-shadow(0 0 4px rgba(2, 132, 199, 0.6));
}

html[data-theme="light"] .comp-inf-flow-2 {
  stroke: #059669;
  filter: drop-shadow(0 0 4px rgba(5, 150, 105, 0.6));
}

html[data-theme="light"] .comp-inf-sparkle-1 {
  fill: #0284c7;
  filter: drop-shadow(0 0 5px #0284c7);
}

html[data-theme="light"] .comp-inf-sparkle-2 {
  fill: #059669;
  filter: drop-shadow(0 0 5px #059669);
}

html[data-theme="light"] .mm-preview-company:hover .comp-anim-infinity-wrap {
  filter: drop-shadow(0 0 8px rgba(2, 132, 199, 0.4)) drop-shadow(0 0 14px rgba(19, 165, 127, 0.35));
}

/* Company Sub-menu Icons: Default resting state inherits .mm-service-icon style (matching Services and Solutions) */
.mm-service-card:hover .icon-comp-about {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}
.mm-service-card:hover .icon-comp-process {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}
.mm-service-card:hover .icon-comp-careers {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
}
.mm-service-card:hover .icon-comp-blog {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}
.mm-service-card:hover .icon-comp-contact {
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.3);
}

html[data-theme="light"] .mm-service-card:hover .icon-comp-about {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-comp-process {
  background: #ecfdf5;
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-comp-careers {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-comp-blog {
  background: #fffbeb;
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}
html[data-theme="light"] .mm-service-card:hover .icon-comp-contact {
  background: #fdf2f8;
  color: #db2777;
  border-color: rgba(219, 39, 119, 0.2);
}

/* Callout box inside Company Mega Menu */
.mm-company-cta-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

html[data-theme="light"] .mm-company-cta-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}

.mm-company-cta-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.mm-company-cta-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mm-company-cta-btn:hover {
  color: #60a5fa;
  transform: translateX(2px);
}

/* Responsive Nav Switch on Tablets and Mobile (<= 991px) */
@media (max-width: 991px) {
  .nav-links {
    display: none !important;
  }
  .hamburger,
  .nav-right .hamburger,
  #hamburgerBtn {
    display: inline-flex !important;
  }
  .services-mega-menu,
  .services-mega-menu-bridge,
  .solutions-mega-menu,
  .solutions-mega-menu-bridge,
  .company-mega-menu,
  .company-mega-menu-bridge {
    display: none !important;
  }
}

