/* ═══════════════════════════════════════════════════════════
   TechMights – Enterprise Mega Menu  v5.0
   4-Column: Categories | Services | Features | Dynamic Locations
═══════════════════════════════════════════════════════════ */

:root {
  --mm-primary:   #6C4DF6;
  --mm-secondary: #8B5CF6;
  --mm-light:     #F7F5FF;
  --mm-text:      #1E1B4B;
  --mm-muted:     #64748b;
  --mm-border:    #e8e4ff;
  --mm-white:     #ffffff;
  --mm-shadow:    0 24px 70px rgba(108,77,246,0.14), 0 4px 20px rgba(0,0,0,0.07);
  --mm-font:      'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ── Trigger ──────────────────────────────────────────────────── */
.mm-solutions-trigger > a {
  color: var(--mm-primary) !important;
  font-weight: 700 !important;
}
.mm-solutions-trigger > a i { transition: transform 0.3s ease; }
.mm-solutions-trigger:hover > a i { transform: rotate(180deg); }

/* ── Container ────────────────────────────────────────────────── */
#tm-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(1380px, 97vw);
  background: var(--mm-white);
  border-radius: 16px;
  box-shadow: var(--mm-shadow);
  border: 1px solid var(--mm-border);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  overflow: hidden;
  font-family: var(--mm-font);
}

#tm-mega-menu.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.tmm-inner { display: flex; flex-direction: column; }

/* ── 4-Column Grid ────────────────────────────────────────────── */
.tmm-cols {
  display: grid;
  grid-template-columns: 248px 228px 290px 1fr;
  height: 560px;
}

/* ── Column scrollbar reset ───────────────────────────────────── */
.tmm-col {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--mm-border) transparent;
}
.tmm-col::-webkit-scrollbar { width: 4px; }
.tmm-col::-webkit-scrollbar-thumb { background: var(--mm-border); border-radius: 4px; }

/* ════════════════════════════════════════════════════════════════
   COL 1 – Categories
════════════════════════════════════════════════════════════════ */
.tmm-col-cats {
  background: var(--mm-light);
  border-right: 1px solid var(--mm-border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tmm-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.18s;
  user-select: none;
}
.tmm-cat-item:hover, .tmm-cat-item.active {
  background: var(--mm-white);
  border-left-color: var(--mm-primary);
}

.tmm-cat-icon {
  width: 32px; height: 32px;
  background: var(--mm-white);
  border: 1px solid var(--mm-border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mm-primary); font-size: 13px;
  flex-shrink: 0; transition: all 0.18s;
}
.tmm-cat-item:hover .tmm-cat-icon,
.tmm-cat-item.active .tmm-cat-icon {
  background: var(--mm-primary); color: #fff; border-color: var(--mm-primary);
}

.tmm-cat-text { flex: 1; min-width: 0; }
.tmm-cat-text strong {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--mm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tmm-cat-text span {
  display: block; font-size: 10.5px; color: var(--mm-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}

.tmm-cat-arrow {
  font-size: 9px; color: var(--mm-border); transition: all 0.18s; flex-shrink: 0;
}
.tmm-cat-item:hover .tmm-cat-arrow,
.tmm-cat-item.active .tmm-cat-arrow { color: var(--mm-primary); transform: translateX(3px); }

.tmm-cat-viewall {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; font-size: 12px; font-weight: 700;
  color: var(--mm-primary); text-decoration: none;
  border-top: 1px solid var(--mm-border); margin-top: auto;
  transition: all 0.18s;
}
.tmm-cat-viewall:hover { background: var(--mm-white); gap: 11px; }

/* ════════════════════════════════════════════════════════════════
   COL 2 – Services
════════════════════════════════════════════════════════════════ */
.tmm-col-svcs {
  border-right: 1px solid var(--mm-border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.tmm-col-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; color: var(--mm-muted);
  text-transform: uppercase; letter-spacing: 0.09em;
  padding: 0 8px 10px; border-bottom: 1px solid var(--mm-border);
  margin-bottom: 8px; flex-shrink: 0;
}
.tmm-col-head i { color: var(--mm-primary); font-size: 12px; }

.tmm-list {
  list-style: none; margin: 0; padding: 0; flex: 1;
  overflow-y: auto;
}
.tmm-list::-webkit-scrollbar { width: 3px; }
.tmm-list::-webkit-scrollbar-thumb { background: var(--mm-border); }

.tmm-svc-item { margin: 0; }

.tmm-svc-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px; border-radius: 7px; text-decoration: none;
  color: #374151; font-size: 12.5px; font-weight: 600; transition: all 0.18s;
}
.tmm-svc-link:hover,
.tmm-svc-item.active .tmm-svc-link {
  background: var(--mm-light); color: var(--mm-primary);
}

.tmm-svc-ico {
  width: 26px; height: 26px; background: var(--mm-light); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mm-primary); font-size: 11px; flex-shrink: 0; transition: all 0.18s;
}
.tmm-svc-link:hover .tmm-svc-ico,
.tmm-svc-item.active .tmm-svc-link .tmm-svc-ico {
  background: var(--mm-primary); color: #fff;
}

.tmm-svc-name { flex: 1; }

.tmm-svc-arr {
  font-size: 8px; color: var(--mm-border); transition: all 0.18s; flex-shrink: 0;
}
.tmm-svc-link:hover .tmm-svc-arr,
.tmm-svc-item.active .tmm-svc-link .tmm-svc-arr { color: var(--mm-primary); transform: translateX(2px); }

.tmm-view-all {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 8px;
  font-size: 11.5px; font-weight: 700; color: var(--mm-primary);
  text-decoration: none; border: 1px solid var(--mm-border);
  border-radius: 7px; transition: all 0.18s; flex-shrink: 0;
}
.tmm-view-all:hover { background: var(--mm-primary); color: #fff; border-color: var(--mm-primary); }

/* ════════════════════════════════════════════════════════════════
   COL 3 – Service Features / Highlights
   KEY FIX: Perfect vertical icon+text alignment using grid
════════════════════════════════════════════════════════════════ */
.tmm-col-features {
  border-right: 1px solid var(--mm-border);
  background: #fdfcff;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.tmm-feat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--mm-text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mm-border);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.tmm-feat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--mm-light);
  border-radius: 8px;
  color: var(--mm-primary);
  font-size: 14px;
  flex-shrink: 0;
}

.tmm-feat-desc {
  margin: 0 0 14px 0;
  font-size: 12.5px;
  color: var(--mm-muted);
  line-height: 1.55;
  flex-shrink: 0;
}

/* ─── CRITICAL: Feature list alignment ─── */
.tmm-feat-list {
  list-style: none;
  margin: 0 0 18px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.tmm-feat-item {
  display: grid;
  grid-template-columns: 20px 1fr;   /* Fixed icon width | flexible text */
  align-items: flex-start;
  gap: 0;
  padding: 6px 0;
  border-bottom: 1px solid #f3f0ff;
}
.tmm-feat-item:last-child { border-bottom: none; }

.tmm-feat-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1px;                  /* Optical alignment with text */
  color: var(--mm-primary);
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.tmm-feat-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--mm-text);
  line-height: 1.4;
  padding-left: 8px;                 /* Gap between icon and text */
}

.tmm-feat-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--mm-primary);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: auto;
}
.tmm-feat-cta:hover { background: var(--mm-secondary); gap: 12px; color: #fff; }

/* ════════════════════════════════════════════════════════════════
   COL 4 – Dynamic Locations
   KEY FIX: Use flex column layout so areas scroll independently
════════════════════════════════════════════════════════════════ */
.tmm-col-locs {
  background: #fcfcff;
  display: block;
  padding: 18px 16px;
  overflow-y: auto;               /* Column scrolls natively */
}

.tmm-locs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--mm-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mm-border);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.tmm-locs-badge {
  background: var(--mm-light);
  color: var(--mm-primary);
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--mm-border);
}

/* Cities top grid */
.tmm-locs-cities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.tmm-loc-city {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--mm-white);
  border: 1px solid var(--mm-border);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mm-text);
  text-decoration: none;
  transition: all 0.15s;
}
.tmm-loc-city:hover { border-color: var(--mm-primary); color: var(--mm-primary); }
.tmm-loc-city span {
  font-size: 9px;
  background: var(--mm-light);
  color: var(--mm-primary);
  padding: 1px 5px; border-radius: 8px; font-weight: 700;
}

/* Divider label */
.tmm-locs-divider {
  font-size: 10px;
  font-weight: 700;
  color: var(--mm-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* ─── All Areas Grid ─── */
.tmm-locs-scroll {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.tmm-loc-area {
  display: block;
  padding: 4px 6px;
  font-size: 11.5px;
  color: #475569;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.13s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tmm-loc-area:hover { background: var(--mm-light); color: var(--mm-primary); }

/* View All button */
.tmm-locs-viewall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--mm-white);
  border: 1.5px solid var(--mm-primary);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mm-primary);
  text-decoration: none;
  transition: all 0.18s;
  flex-shrink: 0;
}
.tmm-locs-viewall:hover { background: var(--mm-primary); color: #fff; }

/* ════════════════════════════════════════════════════════════════
   Badge Bar
════════════════════════════════════════════════════════════════ */
.tmm-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--mm-light);
  border-top: 1px solid var(--mm-border);
  padding: 14px 20px;
  gap: 8px;
}

.tmm-badge {
  display: flex; align-items: center; gap: 10px;
}
.tmm-badge-icon {
  width: 32px; height: 32px;
  background: #fff; border: 1px solid var(--mm-border);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  color: var(--mm-primary); font-size: 14px; flex-shrink: 0;
}
.tmm-badge strong { display: block; font-size: 13px; font-weight: 800; color: var(--mm-text); }
.tmm-badge span { display: block; font-size: 11px; color: var(--mm-muted); }

/* ════════════════════════════════════════════════════════════════
   Mobile Accordion (≤1199px)
════════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  #tm-mega-menu { display: none !important; }
  .mean__menu-wrapper { display: none !important; }
  .main-menu { display: none !important; }

  .tmm-mob-menu { list-style: none; margin: 0; padding: 0; }
  .tmm-mob-menu li { display: block; width: 100%; margin: 0; }
  .tmm-mob-menu a {
    display: block; padding: 11px 16px; color: var(--mm-text);
    font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--mm-border);
    text-decoration: none;
  }

  .tmm-mob-btn {
    width: 100%; text-align: left; background: none; border: none;
    padding: 11px 16px; font-size: 14px; font-weight: 700; color: var(--mm-text);
    cursor: pointer; border-bottom: 1px solid var(--mm-border);
    display: flex; align-items: center; gap: 8px;
  }
  .tmm-mob-btn i:last-child { margin-left: auto; font-size: 11px; }
  .tmm-mob-l2 { font-size: 13.5px; font-weight: 600; padding-left: 28px; background: #fafafa; color: #374151; }

  .tmm-mob-sub { list-style: none; margin: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
  .tmm-mob-sub.open { max-height: 3000px; }
  .tmm-mob-sub li a { padding-left: 40px; font-size: 13px; font-weight: 500; background: #fefefe; color: #475569; }
  .tmm-mob-sub .tmm-mob-sub li a { padding-left: 56px; font-size: 12px; }
}

/* ── Kill old conflicting styles ──────────────────────────────── */
.solutions-wrapper, .smm-pillars, .smm-services,
.solutions-mega-menu, .location-mega-menu, .modern-mega-menu,
.header-mega-menu { display: none !important; }
