/* ═══════════════════════════════════════════════════════════
   Datagist — Shared Nav + Footer Styles
   /components/nav-footer.css
═══════════════════════════════════════════════════════════ */

/* ── NAV BASE ─────────────────────────────────────────── */
nav#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(5,18,49,0.10);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.nav-logo img { height: 36px; width: auto; display: block; }

/* ── NAV LINKS ────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-link-plain {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-mid);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link-plain:hover { color: var(--blue-primary); background: rgba(36,81,245,0.05); }

/* ── MEGA TRIGGER BUTTON ──────────────────────────────── */
.mega-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-mid);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.mega-trigger:hover { color: var(--blue-primary); background: rgba(36,81,245,0.05); }
.has-mega.open .mega-trigger { color: var(--blue-primary); background: rgba(36,81,245,0.07); }
.mega-chevron { font-size: 11px; transition: transform 0.25s ease; }
.has-mega.open .mega-chevron { transform: rotate(180deg); }
.has-mega.active-parent .mega-trigger { color: var(--blue-primary); }

/* ── MEGA PANEL ───────────────────────────────────────── */
.has-mega { position: relative; }

.mega-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 740px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(5,18,49,0.14);
  padding: 8px;
  z-index: 1100;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
/* Arrow */
.mega-panel::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--white);
  border-left: 1.5px solid var(--border);
  border-top: 1.5px solid var(--border);
}
.has-mega.open .mega-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 200px;
  gap: 0;
}

/* ── MEGA COLUMNS ─────────────────────────────────────── */
.mega-col {
  padding: 20px 16px;
}
.mega-col + .mega-col {
  border-left: 1px solid var(--border);
}
.mega-col--cta {
  background: var(--off-white);
  border-radius: 0 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
}

.mega-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}
.mega-group-label i { font-size: 12px; color: var(--blue-primary); }

/* ── MEGA ITEMS ───────────────────────────────────────── */
.mega-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--navy);
  transition: background 0.15s;
  margin-bottom: 2px;
}
.mega-item:hover { background: rgba(36,81,245,0.05); }
.mega-item.active { background: rgba(36,81,245,0.07); }
.mega-item.active .mega-icon { transform: scale(1.05); }

.mega-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.mega-item:hover .mega-icon { transform: scale(1.08); }

/* Icon colour variants */
.mega-icon--blue   { background: rgba(36,81,245,0.12);  color: #2451F5; }
.mega-icon--indigo { background: rgba(99,102,241,0.12); color: #6366F1; }
.mega-icon--teal   { background: rgba(20,184,166,0.12); color: #14B8A6; }
.mega-icon--orange { background: rgba(249,115,22,0.12); color: #F97316; }
.mega-icon--purple { background: rgba(168,85,247,0.12); color: #A855F7; }
.mega-icon--green  { background: rgba(34,197,94,0.12);  color: #22C55E; }
.mega-icon--pink   { background: rgba(236,72,153,0.12); color: #EC4899; }
.mega-icon--red    { background: rgba(239,68,68,0.12);  color: #EF4444; }

.mega-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 2px;
}
.mega-text span {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.4;
}

/* ── MEGA CTA CARD ────────────────────────────────────── */
.mega-cta-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 12px;
  padding: 18px;
  color: white;
}
.mega-cta-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}
.mega-cta-card h4 {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}
.mega-cta-card p {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin-bottom: 12px;
}
.mega-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-primary);
  color: white;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, gap 0.2s;
}
.mega-cta-btn:hover { background: var(--blue-deep); gap: 8px; }

.mega-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--navy-mid);
}
.mega-stat i { color: var(--blue-primary); font-size: 14px; flex-shrink: 0; }
.mega-stat strong { color: var(--navy); }

/* ── NAV CTA BUTTONS ──────────────────────────────────── */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ── HAMBURGER ────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(36,81,245,0.07); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE OVERLAY ───────────────────────────────────── */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,18,49,0.4);
  z-index: 998;
  backdrop-filter: blur(2px);
}
.mob-overlay.visible { display: block; }

/* ── MOBILE NAV DRAWER ────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  bottom: 0;
  background: white;
  z-index: 999;
  overflow-y: auto;
  padding: 16px 20px 32px;
  flex-direction: column;
  gap: 0;
  animation: slideDown 0.25s ease forwards;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mob-section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mob-section--links { border-bottom: none; }
.mob-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  padding: 4px 8px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mob-label i { color: var(--blue-primary); }
.mob-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-mid);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mob-item i { font-size: 15px; color: var(--blue-primary); width: 18px; text-align: center; }
.mob-item:hover { background: rgba(36,81,245,0.06); color: var(--blue-primary); }
.mob-item.active { background: rgba(36,81,245,0.08); color: var(--blue-primary); font-weight: 600; }
.mob-plain {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}
.mob-plain i { color: var(--blue-primary); width: 18px; text-align: center; }
.mob-plain:hover { background: rgba(36,81,245,0.06); }
.mob-cta {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── FOOTER ───────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand img { height: 32px; width: auto; margin-bottom: 16px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact a,
.footer-contact span {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact a:hover { color: white; }
.footer-contact i { color: var(--blue-bright); font-size: 13px; }

.footer-col h5 {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer-col h5 i { color: var(--blue-bright); font-size: 13px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}
.footer-col ul li a i {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: white; }
.footer-col ul li a:hover i { color: var(--blue-bright); }

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding: 7px 12px;
  background: rgba(36,81,245,0.15);
  border: 1px solid rgba(36,81,245,0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #7FA5FF;
}
.footer-badge i { font-size: 13px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal a:hover { color: white; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
