/* ============================================================
   F9 Infotech — Premium Interactive Mega Menu (Cyber Security)
   ============================================================ */

.cmm-panel {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: calc(100% - 50px);
  max-width: 1500px;
  max-height: calc(100vh - 130px);
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E5EAF2;
  box-shadow: 0 30px 70px rgba(13, 38, 101, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.28s cubic-bezier(0.16,1,0.3,1), transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0.28s;
  z-index: 99999;
}
.nav-item.cmm-active .cmm-panel,
.cmm-panel.cmm-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cmm-grid {
  display: grid;
  grid-template-columns: 26% 52% 22%;
  min-height: 460px;
  max-height: calc(100vh - 130px);
}

/* ---------- Section A: Sidebar categories ---------- */
.cmm-sidebar {
  background: #F3F7FF;
  border-right: 1px solid #E5EAF2;
  padding: 20px 14px;
  overflow-y: auto;
}
.cmm-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: #171C2B;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.18s ease, color 0.18s ease;
  margin-bottom: 4px;
}
.cmm-cat:hover {
  background: #E9F0FE;
}
.cmm-cat.is-active {
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(22, 74, 200, 0.12);
}
.cmm-cat-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #E9F0FE;
  color: #1649D8;
  transition: background 0.18s ease, color 0.18s ease;
}
.cmm-cat.is-active .cmm-cat-icon {
  background: #1649D8;
  color: #FFFFFF;
}
.cmm-cat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.cmm-cat-title {
  flex: 1;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1.3;
}
.cmm-cat.is-active .cmm-cat-title {
  color: #10265F;
  font-weight: 700;
}
.cmm-cat-arrow {
  flex-shrink: 0;
  color: #667085;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.cmm-cat.is-active .cmm-cat-arrow,
.cmm-cat:hover .cmm-cat-arrow {
  opacity: 1;
  transform: translateX(0);
}
.cmm-cat.is-active .cmm-cat-arrow {
  color: #1649D8;
}
.cmm-cat-arrow svg {
  width: 14px;
  height: 14px;
}

/* ---------- Section B: Main content ---------- */
.cmm-content {
  padding: 24px 28px;
  overflow-y: auto;
  border-right: 1px solid #E5EAF2;
}
.cmm-content-panel {
  display: none;
}
.cmm-content-panel.is-active {
  display: block;
  animation: cmmFadeIn 0.2s ease;
}
@keyframes cmmFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cmm-content-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #10265F;
  margin: 0 0 16px 0;
}
.cmm-service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cmm-service-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #E5EAF2;
  background: #FFFFFF;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.cmm-service-card:hover {
  background: #F3F7FF;
  border-color: #2563EB;
  transform: translateY(-2px);
}
.cmm-service-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cmm-service-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #171C2B;
  line-height: 1.35;
}
.cmm-service-card:hover .cmm-service-title {
  color: #1649D8;
}
.cmm-service-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #667085;
  line-height: 1.4;
}
.cmm-service-arrow {
  flex-shrink: 0;
  color: #98A2B3;
  margin-top: 2px;
  transition: color 0.18s ease, transform 0.18s ease;
}
.cmm-service-card:hover .cmm-service-arrow {
  color: #1649D8;
  transform: translateX(2px);
}
.cmm-service-arrow svg {
  width: 14px;
  height: 14px;
}
.cmm-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #1649D8;
  text-decoration: none;
}
.cmm-view-all:hover {
  gap: 10px;
}
.cmm-view-all svg {
  width: 14px;
  height: 14px;
}

/* ---------- Section C: Promo banner ---------- */
.cmm-promo {
  padding: 26px 20px;
  background: linear-gradient(145deg, #10265F 0%, #1649D8 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cmm-promo::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
}
.cmm-promo::after {
  content: '';
  position: absolute;
  right: -10px;
  bottom: -90px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
}
.cmm-promo-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.cmm-promo-icon svg {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF;
}
.cmm-promo-headline {
  font-family: 'Montserrat', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0 0 10px 0;
  position: relative;
  z-index: 1;
}
.cmm-promo-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
  margin: 0 0 22px 0;
  position: relative;
  z-index: 1;
}
.cmm-promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: #FFFFFF;
  color: #10265F;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cmm-promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}
.cmm-promo-cta svg {
  width: 14px;
  height: 14px;
}

/* Keyboard focus visibility */
.cmm-cat:focus-visible,
.cmm-service-card:focus-visible,
.cmm-view-all:focus-visible,
.cmm-promo-cta:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .cmm-grid {
    grid-template-columns: 28% 50% 22%;
  }
}
@media (max-width: 1024px) {
  .cmm-panel { display: none !important; }
}
