:root {
  /* --header-bg and --menu-bg removed to allow fallback to --bg */
  --shadow-lg: 0 10px 15px -3px rgba(255, 202, 40, 0.2), 0 4px 6px -4px rgba(255, 202, 40, 0.1);
}

.mega-header-root {
  display: block;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

:where(.mega-header-root) header {
  background: var(--header-bg, var(--bg, rgba(255, 255, 255, 0.98)));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.05);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  min-width: fit-content;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(from 225deg, #4f46e5, #818cf8, #c7d2fe, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

.mega-header-root nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  background: #F1F3F4;
  color: var(--accent);
}

.nav-trigger span {
  transition: transform 0.2s ease;
  font-size: 0.6em;
  margin-left: 4px;
  opacity: 0.7;
}

.nav-trigger.active span {
  transform: rotate(180deg);
}

/* Mega Menu - Premium Floating Pane */
.mega-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--menu-bg, var(--bg, rgba(255, 255, 255, 0.98)));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  overflow: hidden;
  z-index: 1001;
}

.mega-scroll-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.mega-menu.active {
  opacity: 1;
  visibility: visible;
}

.mega-header-root.disintegrating .mega-menu {
  pointer-events: none;
  transition: none !important;
  mask-image: radial-gradient(circle at center,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 1) var(--mask-pos, 100%),
      rgba(0, 0, 0, 0) calc(var(--mask-pos, 100%) + 10%));
  -webkit-mask-image: radial-gradient(circle at center,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 1) var(--mask-pos, 100%),
      rgba(0, 0, 0, 0) calc(var(--mask-pos, 100%) + 10%));
  opacity: 1;
}

.mega-header-root.disintegrating .menu-card {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1020;
}

.mega-container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 0;
}

/* Menu Card Styling */
.menu-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  margin: 0 -1px -1px 0;
  padding: 40px 24px;
  text-decoration: none;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
}

.mega-menu.active .menu-card {
  opacity: 1;
  transform: translateY(0);
}

.menu-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
  transform: translateY(-2px);
  z-index: 10;
}

.menu-card.span-col-2 {
  grid-column: span 2;
  background: #F8FAFC;
}

.menu-card.span-both {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
  border-color: #FFE082;
}

/* Contextual Industry Gradients */
.cat-govtech {
  background: linear-gradient(135deg, #039BE5 0%, #01579B 100%) !important;
  border-color: #0288D1 !important;
}

.cat-govtech .menu-title,
.cat-govtech .menu-desc {
  color: white !important;
}

.cat-govtech .menu-tag {
  background: #FFCA28 !important;
  color: #B26B00 !important;
}

.cat-govtech .tech-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.cat-govtech .menu-icon {
  color: #FFCA28 !important;
}

.cat-fintech {
  background: linear-gradient(135deg, #00897B 0%, #004D40 100%) !important;
  border-color: #00695C !important;
}

.cat-fintech .menu-title,
.cat-fintech .menu-desc {
  color: white !important;
}

.cat-fintech .menu-tag {
  background: #80CBC4 !important;
  color: #004D40 !important;
}

.cat-fintech .tech-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.cat-media {
  background: linear-gradient(135deg, #673AB7 0%, #4527A0 100%) !important;
  border-color: #512DA8 !important;
}

.cat-media .menu-title,
.cat-media .menu-desc {
  color: white !important;
}

.cat-media .menu-tag {
  background: #B39DDB !important;
  color: #311B92 !important;
}

.cat-media .tech-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.cat-eng {
  background: linear-gradient(135deg, #455A64 0%, #263238 100%) !important;
  border-color: #37474F !important;
}

.cat-eng .menu-title,
.cat-eng .menu-desc {
  color: white !important;
}

.cat-eng .menu-tag {
  background: #90A4AE !important;
  color: #263238 !important;
}

.cat-eng .tech-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.cat-specialist {
  background: linear-gradient(135deg, #546E7A 0%, #37474F 100%) !important;
  border-color: #455A64 !important;
}

.cat-specialist .menu-title,
.cat-specialist .menu-desc {
  color: white !important;
}

.cat-specialist .menu-tag {
  background: #CFD8DC !important;
  color: #37474F !important;
}

.cat-specialist .tech-tag {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.menu-card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}

.menu-icon {
  font-size: 18px;
}

.menu-tag {
  font-size: 10px;
  text-transform: uppercase;
  background: #FFF9E6;
  color: #B26B00;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.menu-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.2;
}

.tech-stack-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

/* Premium CTA Filler Flavors */
.cta-card {
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cta-card .menu-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.cta-card .menu-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: white;
  opacity: 0.95;
  font-weight: 600;
}

/* Base reset for CTA cards, allowing specific flavors to override */
.cta-card.card,
.cta-card.menu-card {
  /* No forced background removal */
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-mini-btn {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: all 0.2s;
}

.cta-card:hover .cta-mini-btn {
  background: white;
  color: #0F172A;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Premium Flavors 2.0 */
/* Premium Flavors 2.0 - Vibrant & Attractive */
/* Premium Flavors 3.0 - Cyberpunk & Aurora Gradients */
.cta-cyber {
  background: linear-gradient(135deg, #00f2ff 0%, #7000ff 50%, #ff00ea 100%) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 242, 255, 0.6) !important;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.cta-cyber::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 242, 255, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.cta-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #0d9488 100%) !important;
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cta-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #9f1239 100%) !important;
  /* High visibility Cyber Rose */
  box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cta-purple {
  background: linear-gradient(135deg, #a855f7 0%, #db2777 50%, #c026d3 100%) !important;
  box-shadow: 0 10px 30px -5px rgba(168, 85, 247, 0.6) !important;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cta-purple::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(167, 139, 250, 0.1) 50%, transparent 60%);
  animation: sweep 4s infinite linear;
}

.cta-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 50%, #d97706 100%) !important;
  box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.close-menu-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
  color: var(--text-muted);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.close-menu-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(90deg) scale(1.1);
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.close-menu-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .mega-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .menu-card {
    grid-column: auto !important;
    grid-row: auto !important;
    padding: 40px 24px;
    border-left: none;
    border-right: none;
    border-top: none;
    margin: 0;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .mega-menu {
    top: 0;
    height: 100vh;
    height: 100dvh;
    padding: 0 !important;
    overflow: hidden;
    background: #1e1e1e !important;
    backdrop-filter: none !important;
  }

  .mega-scroll-view {
    padding: 0 !important;
  }

  .mega-container {
    padding: 0 !important;
    margin: 0 !important;
  }

  .close-menu-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }
}

/* Global Premium CTA System */
.cta-banner {
  margin: 80px 0;
  padding: 60px;
  background: linear-gradient(135deg, #00f2ff 0%, #7000ff 50%, #ff00ea 100%);
  border-radius: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: center;
  box-shadow: 0 20px 50px -10px rgba(112, 0, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: ctaFloat 6s ease-in-out infinite;
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 1;
}

@keyframes ctaFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: ctaPulse 10s infinite ease-in-out;
}

@keyframes ctaPulse {

  0%,
  100% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.1) translate(-5%, -5%);
  }
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.cta-text {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  max-width: 600px;
}

.cta-action {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.cta-btn {
  background: white;
  color: #7000ff;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  position: relative;
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  background: linear-gradient(90deg, #00f2ff, #ff00ea, #00f2ff);
  background-size: 200% 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: borderRotate 2s linear infinite;
}

@keyframes borderRotate {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
  background: #fafafa;
}

.cta-secondary-link {
  color: white;
  font-size: 13px;
  text-decoration: underline;
  text-align: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.cta-secondary-link:hover {
  opacity: 1;
}

.cta-insight-card {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.cta-insight-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.cta-insight-content h4 {
  color: white;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  font-size: 18px;
}

.cta-insight-content p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-insight-btn {
  margin-left: auto;
  background: white;
  color: #059669;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cta-insight-btn:hover {
  transform: scale(1.05);
  background: #f0fdf4;
}

.cta-mini-card {
  margin: 80px auto 40px;
  max-width: 800px;
  padding: 40px;
  background: linear-gradient(135deg, #f43f5e 0%, #9f1239 100%);
  border-radius: 20px;
  text-align: center;
  color: white;
  box-shadow: 0 20px 40px -10px rgba(244, 63, 94, 0.4);
}

.cta-mini-card h3 {
  color: white;
  margin-top: 0;
}

.cta-mini-card .cta-btn {
  margin-top: 24px;
  color: #9f1239;
}

@media (max-width: 850px) {
  .cta-banner {
    grid-template-columns: 1fr;
    padding: 40px;
    text-align: center;
  }

  .cta-text {
    margin: 0 auto;
  }

  .cta-action {
    max-width: 300px;
    margin: 0 auto;
  }

  .cta-insight-card {
    flex-direction: column;
    text-align: center;
  }

  .cta-insight-btn {
    margin: 16px 0 0 0;
  }
}