/* ================ Nav popup container start ================ */
.desktop-nav {
  width: 100%;
  position: fixed;
  background: rgba(0, 0, 0, 0.8); /* Apply opacity to background only */
  z-index: 99;
  padding: 10px 0;
  transition: background 0.3s ease; /* Add transition for smooth animation */
}

li.topnavdesktop{
  margin-left: 30px;
  margin-right: 30px;
}

.nav-item .nav-link {
  color: white;
}

.nav-item .nav-link:hover {
  color: #fab600;
}

.nav-item {
  position: relative;
  transition: opacity 2s ease-in-out, transform 2s ease-in-out; /* Smooth transition for hover animation */
}

/* Make the navbar relative for dropdown positioning reference */
.navbar {
  position: relative;
}

/* Full width mega menu styling */
.desktop-nav .nav-popup-container {
  background: #2d2d2d; /* Fully black color */
}

.nav-popup-container {
  background: #000000; /* Fully black color */
  position: fixed; /* Change to fixed for full width */
  top: 110px;
  border-top: 4px solid #fab600;
  left: 0;
  right: 0; /* Ensure full width */
  width: 100%; /* Corrected width to 100% */
  z-index: 9999;
  padding-top: 20px;
  margin-top: -20px;
}

/* Container for mega menu content - keeps content aligned with navbar */
.nav-popup-grid {
  max-width: 1200px; /* Match your main container width */
  margin: 0 auto;
  padding: 0 0;
}

/* Create hover bridge */
.menu-link::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

/* Smooth transition */
.nav-popup-container {
  opacity: 0;
  visibility: hidden;
  padding-bottom: 50px;
  /* Quick transition for appearing */
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  /* Prevent flickering during transition */
}

/* Show dropdown on hover */
/* Create the triangle indicator */
.menu-link-expand-option::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fab600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Show triangle on hover of nav-link or nav-popup-container */
.nav-link.menu-link:hover::before,
.nav-item:hover .nav-link.menu-link::before,
.nav-popup-container:hover ~ .nav-link.menu-link::before {
  opacity: 1;
  visibility: visible;
}
/* Ensure relative positioning on parent */
.nav-link.menu-link {
  position: relative;
}
.nav-item:hover .nav-popup-container,
.nav-popup-container:hover {
  opacity: 1;
  visibility: visible;
  /* Add delay when mouse leaves */
  transition-delay: 0s, 0s;
  /* Enable interaction when visible */
}

/* When mouse leaves, delay the fade out */
.nav-popup-container {
  /* Longer delay when hiding */
  transition-delay: 0.2s, 0.2s;
}

/* Optional: Add transition delay for child elements */
.nav-popup-container > * {
  transition: opacity 0.2s ease-in-out;
  transition-delay: 0.1s;
}
/* Ensure container aligns with navbar container */
.nav-popup-grid {
  width: 100%;
  max-width: var(
    --container-width,
    1200px
  ); /* Use CSS variable if you have one */
  margin: 0 auto;
  padding: 0 0;
}

.nav-popup-container > h4 {
  max-width: 90%;
  margin: 10px auto;
  text-align: start;
  color: #fab600;
  font-weight: var(--fw-bold);
}

.nav-popup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 90%;
  margin: 0 auto;
}
.nav-popup-grid div:first-child {
  border-right: 1px solid #707070;
}

.main-nav {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.main-nav > li {
  overflow: visible;
}

.main-nav > li:last-child,
.sub-nav > li:last-child {
}

.main-nav a {
  display: block;
  padding: 10px 20px;
  padding-left: 0;
  text-decoration: none;
  color: white;
  text-align: start;
  text-transform: capitalize;
  border-top: 1px solid #707070;
  transition: background-color 0.3s;
}
.main-nav li:hover > a,
.main-nav a:hover {
  color: #fab600;
}
.nested {
  transition: 0.4s;
  font-size: 22px;
}
.nested:hover {
  color: #fab600;
  transition: 0.4s;
}

.sub-nav {
  display: none;
  position: absolute;
  left: 100%;
  width: 100%;
  z-index: 10;
  visibility: visible;

  /* padding: 10px 20px; */
}
.sub-nav-margin-top{
  margin-top: -56px;
}
.sub-nav li a {
  font-size: 22px;
}
.desktop-sub-nav-container:hover > .sub-nav {
  display: block;
}

.sub-nav li {
  display: block;
}

.sub-nav a {
  padding: 10px 20px;
  text-decoration: none;
  color: white;
}

.pd-container {
  font-family: "Roboto Condensed", sans-serif;
  text-align: start;
  margin-left: 20px;
  padding-bottom: 20px;
  font-weight: lighter;
}

.pd-container > h4 {
  color: #FAB600;
  font-weight: var(--fw-bold);
}

.pd-container > p {
  color: white;
  font-weight: 400;
}
.pd-container img {
  border: 1px solid #ddd;
  margin-top: 15px;
}

.brouse-btn {
  color: white;
  font-size: 28px;
  letter-spacing: 0;
  margin: 0;
  border-bottom: 2px solid #fab600;
}

.active-p {
  display: block;
  color: #fab600;
}

.nav-item:has(.active-p) > a {
  color: #fab600;
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  width: fit-content;
}
.search-icon {
  cursor: pointer;
  font-size: 20px;
  padding: 10px;
}

.search-input {
  width: 0;
  opacity: 0;
  padding: 0;
  margin-right: 42px;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
  overflow: hidden;
  position: absolute;
  right: 0;
}

.search-container:hover .search-input {
  width: 600px;
  opacity: 1;
  padding: 5px 15px;
  margin-left: 10px;
}
.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0px 6px 20px;
  background: transparent;
  color: white;
  z-index: 50;
  transition: all 0.3s ease;
}
.search-container:hover .search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #fab600;
  color: black;
  z-index: 50;
}


li.nav-item a{
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 400;
}

li.nav-item a.topnav{
  font-size: var(--medium-font);
  font-weight: var(--fw-bold);
}

/* ================ Nav popup container end ================ */

/* mobile nav start */
.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-wrapper {
  background: #000000 0% 0% no-repeat padding-box !important;
  opacity: 0.95 !important;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 40px; /* Change from right positioning to left */
  transform: translateX(100%); /* Move it off-screen initially */
  transition: transform 0.3s ease-in-out; /* Change transition property */
  z-index: 1050;
  overflow-y: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  z-index: 2000;
}

.mobile-menu-wrapper.show {
  transform: translateX(0); /* Bring it back on-screen */
}

#home-page .mobile-menu-wrapper{
  /*left: 15px;*/ /* Change from right positioning to left (15px+ for only home page only) */
}

#home-page .mobile-menu-wrapper.show {
  transform: translateX(0); /* Bring it back on-screen */
  /*margin-left: -15px;*/
  width: 104vw;
}

body.mobile-menu-open .mobile-menu-wrapper{
  left: 0px; /* Change from right positioning to left */
}


.mobile-nav-link {
  color: #fff !important;
  padding: 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-sub-menu {
  background-color: black;
  list-style: none;
  padding: 0;
}

.mobile-sub-menu .mobile-nav-link {
  padding-left: 2rem !important;
}

.mobile-power-solutions-submenu {
  background-color: black;
}

.mobile-power-solutions-submenu .mobile-nav-link {
  padding-left: 3rem !important;
}

#mobileMainMenu {
  padding: 0;
  height: calc(100vh - 50px);
  overflow-y: auto;
  /* background: #2d2d2d; */
}

.mobile-menu-item {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
}
.mobile-header {
  background-color: #000;
  opacity: 0.9;
}
.mobile-logo-section {
  background: #000000 0% 0% no-repeat padding-box !important;
  opacity: 0.9 !important;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 1051;
  /* position: fixed; */
  width: 100%;
}

.mobile-logo-section img {
  height: 30px;
}

.mobile-search-icon {
  color: #000;
  font-size: 1.2rem;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
}

.mobile-menu-toggler {
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  color: #000;
}

.mobile-menu-toggler:focus {
  box-shadow: none;
}

.mobile-menu-icon {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease-in-out;
}

.mobile-expand-icon {
  transition: transform 0.3s ease-in-out;
  font-size: 1.2rem;
}

.mobile-nav-link.mobile-menu-item.collapsed {
  transform: rotate(0deg) !important ;
}
.mobile-rotate-icon,
.mobile-nav-link .mobile-menu-item {
  transform: rotate(180deg);
}

/* Scrollbar styling */
#mobileMainMenu::-webkit-scrollbar {
  width: 5px;
}

#mobileMainMenu::-webkit-scrollbar-track {
  background: #333;
}

#mobileMainMenu::-webkit-scrollbar-thumb {
  background: #666;
}

/* Animation for submenu items */
.mobile-collapse {
  transition: all 0.3s ease-out;
}

.mobile-navbar-nav {
  margin: 0px;
  padding: 0px;
}

.mobile-nav-item {
  opacity: 0;

  transform: translateX(20px);
  transition: all 0.3s ease-out;
}

.mobile-menu-wrapper.show .mobile-nav-item {
  opacity: 1;
  transform: translateX(0);
}

.search-area {
  background: #000000;
  opacity: 0.95;
}

.search-area .search-form-control {
  padding: 10px 10px;
  height: 48px;
  font-size: 16px;
  width: 100%;
}
.search-area .search-btn {
  /* padding: 10px 10px; */
  width: 50px;
  height: 50px;
  font-size: 24px;
  background-color: #fab600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-area .search-form-control::placeholder {
  font-size: 18px;
}
/* /* ============================================ */
*/ 


/* ============================================ */
/* Stagger animation for menu items */

.mobile-nav-item:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-nav-item:nth-child(2) {
  transition-delay: 0.2s;
}
.mobile-nav-item:nth-child(3) {
  transition-delay: 0.3s;
}
.mobile-nav-item:nth-child(4) {
  transition-delay: 0.4s;
}
.mobile-nav-item:nth-child(5) {
  transition-delay: 0.5s;
}

/* Active state styling */
.mobile-nav-link[aria-expanded="true"] {
  background-color: rgba(255, 255, 255, 0.1);
  padding-right: 18px;
}
/* mobile nav end */
