/* ===== SHARED HEADER — Include this on ALL pages =====
   Single source of truth for desktop header + megamenu styling.
   Edit THIS file and all pages update automatically.
   ===================================================== */

/* ============================================
   DESKTOP HEADER — floating glass pill
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 40px;
  display: flex;
  justify-content: center;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 960px;
  background: rgba(6, 12, 28, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 8px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   STICKY STATE
   ============================================ */
.header.is-sticky {
  padding: 8px 40px;
}

.header.is-sticky .header-inner {
  max-width: 780px;
  padding: 5px 22px;
  background: rgba(6, 12, 28, 0.65);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header.is-sticky .header-logo-img {
  height: 32px;
}

.header.is-sticky .header-nav a {
  font-size: 12px;
}

.header.is-sticky .btn {
  padding: 7px 8px 7px 16px;
  font-size: 13px;
}

.header.is-sticky .btn .btn-icon {
  width: 26px;
  height: 26px;
}

/* ============================================
   LOGO
   ============================================ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  z-index: 10;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.header-logo-img {
  height: 37px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo svg {
  width: 32px;
  height: 32px;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s, font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.header-nav a:hover {
  color: #fff;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.header-nav a:hover::after {
  width: 100%;
}

/* ============================================
   MEGAMENU — Animations
   ============================================ */
@keyframes megaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes megaOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(20px, -15px) scale(1.2); opacity: 1; }
}
@keyframes megaOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-15px, 10px) scale(1.15); opacity: 0.8; }
}

/* ============================================
   MEGAMENU — Dropdown Container
   ============================================ */
.nav-has-dropdown {
  position: relative;
}

.nav-has-dropdown > a::after {
  /* override underline for dropdown triggers */
}

.mega-dropdown {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 660px;
  background: rgba(6, 12, 28, 0.96);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid rgba(147, 197, 253, 0.07);
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.03) inset,
              0 1px 0 rgba(255, 255, 255, 0.06) inset;
  display: flex;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
  z-index: 100;
  pointer-events: none;
}

/* Invisible bridge to prevent flicker */
.mega-dropdown::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
}

.nav-has-dropdown.is-open .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0s;
  pointer-events: auto;
}

/* ============================================
   MEGAMENU — Left Column (nav items)
   ============================================ */
.mega-left {
  width: 250px;
  min-width: 250px;
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.mega-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.2s ease;
  position: relative;
  cursor: pointer;
}

.mega-nav-item + .mega-nav-item {
  margin-top: 4px;
}

.mega-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #1730bc;
  border-radius: 0 3px 3px 0;
  transition: height 0.2s ease;
}

.mega-nav-item.active {
  background: rgba(23, 48, 188, 0.08);
}

.mega-nav-item.active::before {
  height: 28px;
}

.mega-nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
}

.mega-nav-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: rgba(23, 48, 188, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mega-nav-item.active .mega-nav-icon {
  background: rgba(23, 48, 188, 0.25);
}

.mega-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: #93c5fd;
  stroke-width: 1.5;
  fill: none;
}

.mega-nav-item.active .mega-nav-icon svg {
  stroke: #bdd5fe;
}

.mega-nav-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.mega-nav-item.active .mega-nav-title {
  color: #fff;
}

.mega-nav-desc {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.3;
  margin-top: 3px;
}

.mega-nav-item.active .mega-nav-desc {
  color: rgba(255, 255, 255, 0.5);
}

.mega-left-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mega-all-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  padding: 10px 16px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mega-all-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.mega-all-link::after {
  display: none;
}

.mega-all-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============================================
   MEGAMENU — Right Column (preview panel)
   ============================================ */
.mega-right {
  flex: 1;
  padding: 16px;
  position: relative;
  min-height: 340px;
}

.mega-preview {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mega-preview.active {
  opacity: 1;
  pointer-events: auto;
}

.mega-preview-visual {
  height: 160px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated floating orbs inside preview */
.mega-preview-visual::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(25px);
  top: 10%;
  left: 10%;
  animation: megaOrb1 6s ease-in-out infinite;
}

.mega-preview-visual::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(20px);
  bottom: 10%;
  right: 15%;
  animation: megaOrb2 8s ease-in-out infinite;
}

.mega-preview-visual svg {
  width: 52px;
  height: 52px;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.5;
  fill: none;
  position: relative;
  z-index: 1;
  animation: megaFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.25));
}

/* Gradient backgrounds for preview panels */
.mega-grad-blue-cyan { background: linear-gradient(135deg, #1730bc 0%, #06b6d4 100%); }
.mega-grad-blue-orange { background: linear-gradient(135deg, #1730bc 0%, #f97316 100%); }
.mega-grad-blue-violet { background: linear-gradient(135deg, #1730bc 0%, #818cf8 100%); }
.mega-grad-cyan-blue { background: linear-gradient(135deg, #06b6d4 0%, #1730bc 100%); }
.mega-grad-blue-lime { background: linear-gradient(135deg, #1730bc 0%, #a3e635 100%); }

.mega-preview h4 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin: 20px 8px 0;
  letter-spacing: -0.02em;
}

.mega-preview p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin: 8px 8px 0;
}

.mega-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #93c5fd;
  margin: auto 8px 0;
  padding-top: 16px;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.mega-cta:hover {
  color: #bdd5fe;
  gap: 10px;
}

.mega-cta::after {
  display: none;
}

.mega-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============================================
   HEADER CTA
   ============================================ */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   BUTTONS — shared across header + page CTAs
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-dark {
  background: linear-gradient(135deg, #1730bc 0%, #1730bc 50%, #0d1552 100%);
  color: #fff;
  padding: 10px 10px 10px 22px;
  box-shadow: 0 4px 15px rgba(23, 48, 188, 0.3);
}

.btn-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(13, 21, 82, 0.5);
}

.btn-dark .btn-icon {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
  flex-shrink: 0;
}

.btn-dark .btn-icon svg {
  width: 14px;
  height: 14px;
  stroke: #1730bc;
  fill: none;
  stroke-width: 2.5;
}

.btn-dark:hover .btn-icon {
  transform: rotate(180deg);
}

.btn-light {
  background: #fff;
  color: #0f172a;
  padding: 10px 10px 10px 22px;
  border: 1px solid #e5e5e5;
}

.btn-light:hover {
  background: #f5f5f5;
  border-color: #1730bc;
  color: #1730bc;
  transform: translateY(-3px);
}

.btn-light .btn-icon {
  width: 30px;
  height: 30px;
  background: #1730bc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.btn-light .btn-icon svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

.btn-light:hover .btn-icon {
  background: #1730bc;
  transform: rotate(180deg);
}

.btn-outline {
  background: transparent;
  color: #fff;
  padding: 10px 10px 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

.btn-outline .btn-icon {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.btn-outline .btn-icon svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

.btn-outline:hover .btn-icon {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(180deg);
}

/* ============================================
   RESPONSIVE — Hide megamenu on mobile
   ============================================ */
@media (max-width: 768px) {
  .header { display: none !important; }
  .mega-dropdown { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mega-preview-visual svg,
  .mega-preview-visual::before,
  .mega-preview-visual::after { animation: none; }
}
