/*
Theme Name: BrightHub Child
Description: Child theme for BrightHub
Author: callvix
Template: brighthub
Version: 1.0.0
*/

/* 1. Center the mega menu at 90% width */
.pxl-megamenu > .pxl-mega-menu.sub-menu {
  width: 90vw;
  max-width: 1400px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
}

.pxl-mega-menu-elementor {
  width: 100%;
  overflow: visible !important; /* let the right panel show past the list column */
}

/* 2. The item grid becomes a vertical nav list (left column) */
.pxl-mega-menu-elementor .e-grid.e-con.e-child {
  display: flex !important;
  flex-direction: column;
  position: relative;
  width: 280px;
  border-right: 1px solid #eee;
  padding: 16px 0;
}

/* Each item just needs to hold its label row + hidden panel */
.pxl-mega-menu-elementor .e-grid > .e-con.e-child {
  display: block;
  width: 100%;
}

/* 3. The visible nav row (label only) */
.pxl-mega-menu-elementor .e-grid > .e-con.e-child .pxl-text-editor {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.pxl-mega-menu-elementor .e-grid > .e-con.e-child:hover .pxl-text-editor {
  background: #f5f5f5;
  color: var(--primary-color, #ff6a00); /* swap in your theme's accent color */
}

/* 4. The detail panel (image + buttons) — hidden, positioned to the right */
.pxl-mega-menu-elementor .e-grid > .e-con.e-child .pxl-image-box {
  position: absolute;
  top: 0;
  left: 280px;   /* = nav column width above */
  right: 20px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.pxl-mega-menu-elementor .e-grid > .e-con.e-child .pxl-image-box img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
}

/* Show the matching panel on hover of that row */
.pxl-mega-menu-elementor .e-grid > .e-con.e-child:hover .pxl-image-box {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Show the first item's panel by default so it's never blank on open */
.pxl-mega-menu-elementor .e-grid > .e-con.e-child:first-child .pxl-image-box {
  opacity: 1;
  visibility: visible;
}