/* ══════════════════════════════════════════════════
   Shared Site Header — mega-dropdown navigation
   ══════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(10,20,40,.08);
}

.header-container {
  max-width: 1420px;
  width: calc(100% - 48px);
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header .brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #060914;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.06em;
  min-width: 220px;
}

.site-header .brand strong {
  color: #2754ff;
}

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 28px;
}

.site-header .nav > a,
.site-header .nav .nav-trigger {
  color: #060914;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
  transition: color .15s;
}

.site-header .nav > a:hover,
.site-header .nav .nav-trigger:hover {
  color: #2754ff;
}

/* ── Dropdown wrapper ── */
.nav-dropdown {
  position: relative;
}

/* ── Mega dropdown panel ── */
.dropdown-mega {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px 28px;
  min-width: 280px;
  box-shadow: 0 20px 50px rgba(15,23,42,.14);
  z-index: 200;
}

.dropdown-mega.wide {
  min-width: 520px;
  display: none;
}

.dropdown-mega.extra-wide {
  min-width: 640px;
  display: none;
}

.nav-dropdown:hover .dropdown-mega {
  display: block;
}

/* invisible bridge so hover doesn't break */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

/* ── Column layout for mega ── */
.mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mega-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.mega-col h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

/* ── Links in dropdown ── */
.mega-link {
  display: block;
  padding: 8px 12px;
  color: #111827;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}

.mega-link:hover {
  background: #f5f7fb;
  color: #2754ff;
}

.mega-link small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
  margin-top: 2px;
}

.mega-link-sub {
  display: block;
  padding: 5px 12px 5px 20px;
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s, color .15s;
}

.mega-link-sub:hover {
  background: #f5f7fb;
  color: #2754ff;
}

/* ── Dropdown heading (non-column) ── */
.dropdown-mega > h4 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: none;
}

/* ── Divider ── */
.mega-divider {
  border: none;
  border-top: 1px solid #f0f1f4;
  margin: 10px 0 8px;
}

/* ── Ecosystem CTA link ── */
.mega-cta {
  display: block;
  text-align: center;
  padding: 10px 12px;
  color: #2754ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  transition: background .15s;
}

.mega-cta:hover {
  background: #eef2ff;
}

/* ── Simple dropdown (single column) ── */
.dropdown-simple {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 8px;
  min-width: 240px;
  box-shadow: 0 16px 40px rgba(15,23,42,.12);
  z-index: 200;
}

.nav-dropdown:hover .dropdown-simple {
  display: block;
}

/* ── Actions ── */
.header-actions {
  display: flex;
  gap: 16px;
  min-width: 180px;
  justify-content: flex-end;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2657ff, #3b37ff);
  box-shadow: 0 8px 20px rgba(39,84,255,.2);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(39,84,255,.3);
}

/* ── Mobile ── */
@media (max-width: 1100px) {
  .header-container { gap: 16px; }
  .site-header .nav { gap: 18px; }
  .site-header .brand { min-width: auto; font-size: 22px; }
  .header-actions { min-width: auto; }
  .dropdown-mega.wide,
  .dropdown-mega.extra-wide { min-width: 380px; }
  .mega-cols { grid-template-columns: 1fr; }
  .mega-cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header .nav { display: none; }
  .header-container { justify-content: space-between; }
}
