/*
 * MLeads Mega Menu – Stylesheet v1.1.0
 * All selectors prefixed with .ml- to avoid theme conflicts.
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Brand – MLeads blue */
  --ml-brand:        #2563EB;
  --ml-brand-dark:   #1d4ed8;
  --ml-brand-light:  #eff6ff;
  --ml-brand-glow:   rgba(37,99,235,0.18);

  /* Colour palette (same system as RFP360 for icon chips) */
  --ml-c-blue:      #3b82f6; --ml-c-blue-bg:    #eff6ff;
  --ml-c-indigo:    #6366f1; --ml-c-indigo-bg:  #eef2ff;
  --ml-c-violet:    #8b5cf6; --ml-c-violet-bg:  #f5f3ff;
  --ml-c-pink:      #ec4899; --ml-c-pink-bg:    #fdf2f8;
  --ml-c-emerald:   #10b981; --ml-c-emerald-bg: #ecfdf5;
  --ml-c-teal:      #14b8a6; --ml-c-teal-bg:    #f0fdfa;
  --ml-c-sky:       #0ea5e9; --ml-c-sky-bg:     #f0f9ff;
  --ml-c-amber:     #f59e0b; --ml-c-amber-bg:   #fffbeb;
  --ml-c-rose:      #f43f5e; --ml-c-rose-bg:    #fff1f2;
  --ml-c-lime:      #65a30d; --ml-c-lime-bg:    #f7fee7;
  --ml-c-orange:    #f97316; --ml-c-orange-bg:  #fff7ed;
  --ml-c-cyan:      #06b6d4; --ml-c-cyan-bg:    #ecfeff;

  --ml-text-primary:   #0f172a;
  --ml-text-secondary: #475569;
  --ml-text-muted:     #94a3b8;
  --ml-bg-white:  #ffffff;
  --ml-bg-soft:   #f8fafc;
  --ml-border:    rgba(15,23,42,0.08);
  --ml-divider:   rgba(15,23,42,0.14);
  --ml-shadow-lg: 0 20px 50px rgba(0,0,0,0.11), 0 6px 18px rgba(0,0,0,0.06);
  --ml-r:    12px;
  --ml-r-sm:  8px;
  --ml-font: 'Plus Jakarta Sans', sans-serif;
  --ml-ease: cubic-bezier(0.4,0,0.2,1);
}

/* ═══════════════════════════════════════════════════════════
   TOP UTILITY BAR
   ═══════════════════════════════════════════════════════════ */
.ml-utility-bar {
  background: #1e3a5f;
  color: #fff;
  font-family: var(--ml-font);
  font-size: 13px;
  position: relative;
  z-index: 102;
}
.ml-utility-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Social icons */
.ml-utility-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ml-social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s, background 0.2s;
}
.ml-social-icon:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.ml-utility-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.2);
  margin: 0 6px;
  flex-shrink: 0;
}

/* App store badges */
.ml-store-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 7px;
  text-decoration: none;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.ml-store-badge:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}
.ml-store-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.ml-gplay-icon { color: #3ddc84; }
.ml-apple-icon { color: #fff; }
.ml-store-text {
  display: flex; flex-direction: column; line-height: 1.2;
}
.ml-store-avail {
  font-size: 8px; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
}
.ml-store-name {
  font-size: 11px; font-weight: 700; color: #fff;
}

/* Right utility links */
.ml-utility-right {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.ml-util-link {
  padding: 4px 9px;
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  border-radius: 5px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.ml-util-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.ml-cart-icon {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  color: #fff; font-size: 12px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}
.ml-cart-icon:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}
.ml-cart-label { font-size: 12px; }

/* ═══════════════════════════════════════════════════════════
   MAIN HEADER
   ═══════════════════════════════════════════════════════════ */
#ml-site-header {
  position: sticky; top: 0; z-index: 100;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: box-shadow 0.3s;
  font-family: var(--ml-font);
  -webkit-font-smoothing: antialiased;
}
#ml-site-header.ml-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.ml-header-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  height: 66px; display: flex; align-items: center; gap: 16px;
}

/* ── Logo ── */
.ml-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.ml-logo-img { height: 50px!important; width: auto; }
.ml-logo-icon { flex-shrink: 0; }
.ml-logo-text {
  font-size: 19px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px;
}
.ml-logo-text span { color: var(--ml-brand); }
.ml-logo-sub {
  font-size: 10px; color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em; line-height: 1;
  display: block; margin-top: 1px;
}

/* ── Desktop Nav ── */
.ml-desktop-nav {
  display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center;
}
.ml-nav-item {
  position: relative; height: 66px; display: flex; align-items: center;
}
.ml-nav-trigger {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: var(--ml-r-sm);
  font-size: 15px; font-weight: 600;
  color: rgba(255,255,255,0.78);
  cursor: pointer; background: none; border: none;
  font-family: var(--ml-font);
  text-decoration: none; white-space: nowrap; line-height: 1;
  transition: color 0.18s, background 0.18s;
}
.ml-nav-trigger:hover {
  color: #fff; background: rgba(255,255,255,0.08);
}
.ml-chev {
  font-size: 9px; color: rgba(255,255,255,0.35);
  transition: transform 0.2s, color 0.18s;
}
.ml-nav-item.ml-open .ml-nav-trigger {
  color: var(--ml-brand); background: rgba(37,99,235,0.12);
}
.ml-nav-item.ml-open .ml-chev {
  transform: rotate(180deg); color: var(--ml-brand);
}

/* ── CTA Buttons ── */
.ml-header-ctas {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto;
}
.ml-btn-gradient {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  min-height: 40px;
  color: #fff;
  background: linear-gradient(325deg, rgba(1,126,228,1) 0%, rgba(184,0,255,1) 100%);
  border-radius: 6px;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13.5px; font-weight: 700; line-height: 1;
  font-family: var(--ml-font);
  transition: transform 0.25s, opacity 0.25s, background 0.3s;
  cursor: pointer;
}
.ml-btn-gradient:hover {
  color: #fff; opacity: 0.92;
  transform: translateY(-1px);
  background: linear-gradient(310deg, rgba(184,0,255,1) 0%, rgba(1,126,228,1) 100%);
}

/* ── Hamburger ── */
.ml-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 38px; height: 38px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--ml-r-sm); transition: background 0.15s;
}
.ml-hamburger:hover { background: rgba(255,255,255,0.1); }
.ml-hamburger span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s var(--ml-ease), opacity 0.3s;
}
.ml-hamburger.ml-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ml-hamburger.ml-open span:nth-child(2) { opacity: 0; }
.ml-hamburger.ml-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   MEGA MENU PANEL (shared base)
   ═══════════════════════════════════════════════════════════ */
.ml-mega-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 3px;
  background: var(--ml-bg-white);
  border: 1px solid var(--ml-divider);
  border-radius: 18px;
  box-shadow: var(--ml-shadow-lg);
  display: none;
  z-index: 999;
  font-family: var(--ml-font);
  -webkit-font-smoothing: antialiased;
  /* cap height → enable independent scroll */
  max-height: calc(100vh - 120px);
  overflow: hidden;
}
.ml-mega-menu.ml-visible {
  display: flex;
  flex-direction: column;
  animation: mlMenuPop 0.17s var(--ml-ease) forwards;
}
@keyframes mlMenuPop {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Features panel – wide category grid */
#ml-menu-features {
  width: 1120px;
  max-width: 97vw;
}

/* Reports panel – medium card grid */
#ml-menu-reports {
  width: 760px;
  max-width: 96vw;
}

/* Resources panel – narrower single layout */
#ml-menu-resources {
  width: 660px;
  max-width: 96vw;
}

/* Scrollable inner */
.ml-bsm-wrap {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px 30px 28px;
  flex: 1;
}
.ml-bsm-wrap::-webkit-scrollbar { width: 5px; }
.ml-bsm-wrap::-webkit-scrollbar-track { background: transparent; }
.ml-bsm-wrap::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,0.14); border-radius: 10px;
}
.ml-bsm-wrap::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,0.28); }

/* Section label */
.ml-bsm-header { margin-bottom: 16px; }
.ml-bsm-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ml-brand);
}
.ml-bsm-label i { font-size: 12px; }

/* ── Two-column grid (Features) ── */
.ml-bsm-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  align-items: start;
}
.ml-bsm-col {
  display: flex; flex-direction: column; gap: 4px;
  padding: 0 22px;
}
.ml-bsm-col:first-child { padding-left: 0; }
.ml-bsm-col:last-child  { padding-right: 0; }
.ml-bsm-col-divider {
  width: 1px; align-self: stretch;
  background: linear-gradient(to bottom, transparent, rgba(15,23,42,0.12) 20%, rgba(15,23,42,0.12) 80%, transparent);
}

/* ── Menu row card (inside mega) ── */
.ml-pm-row-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  cursor: pointer;
}
.ml-pm-row-card:hover {
  background: var(--ml-bg-soft);
  border-color: var(--ml-border);
  transform: translateY(-1px);
}
.ml-pm-card-active {
  background: var(--ml-brand-light);
  border-color: rgba(37,99,235,0.18);
}
.ml-pm-row-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: box-shadow 0.15s;
}
.ml-pm-row-card:hover .ml-pm-row-icon { box-shadow: 0 4px 10px rgba(0,0,0,0.12); }
.ml-pm-row-body { flex: 1; min-width: 0; }
.ml-pm-row-title {
  font-size: 13px; font-weight: 700;
  color: var(--ml-text-primary); line-height: 1.3;
  margin-bottom: 2px; display: flex; align-items: center; gap: 7px;
}
.ml-pm-row-desc {
  font-size: 11.5px; color: var(--ml-text-muted); line-height: 1.45;
}
.ml-pm-row-arrow {
  font-size: 11px; color: var(--ml-text-muted); flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.ml-pm-row-card:hover .ml-pm-row-arrow {
  transform: translateX(3px); color: var(--ml-brand);
}

/* Coming-soon card dimming */
.ml-coming-soon-card { opacity: 0.7; }
.ml-coming-soon-card:hover { opacity: 1; }
.ml-badge-soon {
  display: inline-block;
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: 99px;
  background: var(--ml-c-amber-bg); color: var(--ml-c-amber);
  vertical-align: middle;
}

/* ── Category grid (Features) ── */
.ml-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 26px;
  row-gap: 22px;
  align-items: start;
}
.ml-cat-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ml-cat-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 800;
  color: var(--ml-text-primary);
  padding-bottom: 9px; margin-bottom: 6px;
  border-bottom: 1px solid var(--ml-border);
}
.ml-cat-head-ico {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.ml-cat-links {
  display: flex; flex-direction: column; gap: 1px;
}
.ml-cat-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.ml-cat-link:hover {
  background: var(--ml-bg-soft);
  border-color: var(--ml-border);
  transform: translateX(2px);
}
.ml-cat-ico {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px;
  transition: box-shadow 0.15s;
}
.ml-cat-link:hover .ml-cat-ico { box-shadow: 0 3px 8px rgba(0,0,0,0.12); }
.ml-cat-title {
  font-size: 12.5px; font-weight: 600;
  color: var(--ml-text-secondary); line-height: 1.35;
}
.ml-cat-link:hover .ml-cat-title { color: var(--ml-text-primary); }

/* ── Resources 2×2 grid ── */
.ml-res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ml-res-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--ml-border);
  text-decoration: none;
  background: #fff;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.ml-res-card:hover {
  border-color: var(--ml-brand);
  background: var(--ml-brand-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.1);
}
.ml-res-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  transition: box-shadow 0.15s;
}
.ml-res-card:hover .ml-res-icon { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.ml-res-body { flex: 1; min-width: 0; }
.ml-res-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--ml-text-primary); margin-bottom: 4px;
}
.ml-res-desc {
  font-size: 12px; color: var(--ml-text-muted); line-height: 1.45;
}
.ml-res-arrow {
  font-size: 11px; color: var(--ml-text-muted); flex-shrink: 0;
  margin-top: 4px;
  transition: transform 0.15s, color 0.15s;
}
.ml-res-card:hover .ml-res-arrow { transform: translateX(3px); color: var(--ml-brand); }

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════ */
.ml-mobile-menu {
  display: none; position: fixed;
  top: 110px; left: 0; right: 0; bottom: 0;
  background: var(--ml-bg-white); z-index: 98;
  overflow-y: auto; padding: 12px 20px 40px;
  font-family: var(--ml-font);
}
.ml-mobile-menu.ml-open { display: block; }

.ml-mobile-direct {
  display: block; padding: 13px 4px;
  font-size: 15px; font-weight: 700;
  color: var(--ml-text-primary);
  border-bottom: 1px solid var(--ml-border);
  text-decoration: none;
}
.ml-mobile-direct:hover { color: var(--ml-brand); }

.ml-mobile-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px; font-size: 15px; font-weight: 700;
  color: var(--ml-text-primary);
  border-bottom: 1px solid var(--ml-border);
  cursor: pointer; background: none;
  border-top: none; border-left: none; border-right: none;
  width: 100%; font-family: var(--ml-font); text-align: left;
}
.ml-chev-m {
  font-size: 10px; color: var(--ml-text-muted); transition: transform 0.2s;
}
.ml-mobile-trigger.ml-open .ml-chev-m { transform: rotate(180deg); color: var(--ml-brand); }

.ml-mobile-sub { display: none; padding: 8px 0 14px 4px; }
.ml-mobile-sub.ml-open { display: block; }
.ml-mobile-sub ul { list-style: none; padding: 0; margin: 0; }
.ml-mobile-sub ul li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
  font-size: 13.5px; font-weight: 500;
  color: var(--ml-text-secondary); text-decoration: none;
  border-radius: var(--ml-r-sm);
  transition: color 0.15s, background 0.15s;
}
.ml-mobile-sub ul li a:hover { color: var(--ml-brand); background: var(--ml-brand-light); }
.ml-m-cat {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ml-brand);
  padding: 12px 4px 4px;
}
.ml-m-cat:first-child { padding-top: 4px; }
.ml-m-icon {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.ml-mobile-ctas {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--ml-border);
}
.ml-mobile-ctas .ml-btn-gradient { width: 100%; justify-content: center; padding: 12px; }

/* ═══════════════════════════════════════════════════════════
   BOTTOM ANNOUNCEMENT BAR
   ═══════════════════════════════════════════════════════════ */
.ml-bottom-bar {
  background: #0f172a;
  color: rgba(255,255,255,0.82);
  text-align: center;
  padding: 10px 20px;
  font-family: var(--ml-font);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  z-index: 99;
}
.ml-bottom-bar-sep { color: rgba(255,255,255,0.3); margin: 0 2px; }
.ml-bottom-bar-link {
  color: var(--ml-brand);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s;
}
.ml-bottom-bar-link:hover { color: #60a5fa; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ml-desktop-nav { gap: 0; }
  .ml-nav-trigger { font-size: 13.5px; padding: 7px 9px; }
  .ml-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .ml-desktop-nav { display: none; }
  .ml-hamburger { display: flex; }
  .ml-header-ctas .ml-btn-gradient { display: none; }
  .ml-header-ctas .ml-btn-gradient:last-of-type { display: inline-flex; } /* keep Login */
}

@media (max-width: 860px) {
  .ml-mega-menu { width: 97vw !important; }
  .ml-bsm-grid { grid-template-columns: 1fr; }
  .ml-bsm-col-divider { display: none; }
  .ml-bsm-col { padding: 0; }
  .ml-cat-grid { grid-template-columns: 1fr; }
  .ml-res-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .ml-utility-inner { height: auto; padding: 6px 14px; flex-wrap: wrap; gap: 8px; }
  .ml-utility-left { flex-wrap: wrap; gap: 4px; }
  .ml-store-badge { display: none; }
  .ml-util-link { font-size: 11.5px; padding: 3px 7px; }
}

@media (max-width: 480px) {
  .ml-utility-right { display: none; }
}
