/* custom-navbar.css
   Save at: wp-content/themes/k7academy-new/css/custom-navbar.css
*/

.navbar-toggler {
  box-shadow: none !important;
}
.navbar-toggler:focus {
  box-shadow: none !important;
  outline: none !important;
}
.navbar {
  background: #ffffff !important; /* adjust if your navbar bg is different */
  font-family: 'Nunito Sans', sans-serif;
}

/* Default menu text color */
.navbar .nav-link,
.navbar .dropdown-item {
  color: #707070 !important;
  transition: color 0.2s ease;
}
.dropdown-item {
	padding: 7px 16px !important;
}
/* Hover state */
.navbar .nav-link:hover,
.navbar .dropdown-item:hover {
  color: #EC6A23 !important;
  background-color: transparent;
}

/* Active / current page state */
.navbar .nav-link.active,
.navbar .nav-item.current-menu-item > .nav-link,
.navbar .dropdown-item.active {
  color: #EC6A23 !important;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  white-space: normal !important;
}
.dropdown-item.active, .dropdown-item:active {
	background-color:transparent !important
}

/* ---- Multi-level (nested) dropdown support ---- */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}
/* Make arrow a separate tap target */
.dropdown-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.submenu-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.submenu-toggle-btn::after {
  font-family: "bootstrap-icons";
  content: "\f282"; /* bi-chevron-down */
  font-size: 12px;
  color: inherit;
  transition: transform 0.2s ease;
  display: inline-block;
}


/* Remove ::after from the <a> tag since it's now on the span */
.dropdown-submenu > a::after {
  display: none;
}
/* Desktop hover - only on large screens */
@media (min-width: 992px) {
  /* First level dropdown on hover */
  .navbar .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
  }

  /* Second level submenu on hover */
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }

  .dropdown-submenu:hover > a {
    color: #EC6A23 !important;
  }
	
  .navbar-expand-lg .navbar-nav {
        float: right;
    }
	.dropdown-submenu .dropdown-menu {
    width: 280px;
    white-space: normal;
    word-wrap: break-word;
  }
	 .dropdown-submenu .dropdown-menu .dropdown-item {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    padding: 8px 16px;
  }
}

/* First level dropdown arrow - Bootstrap Icons chevron on all screens */
.navbar .nav-item.dropdown > .nav-link.dropdown-toggle::after {
  font-family: "bootstrap-icons";
  content: "\f282"; /* bi-chevron-right */
  border: none;
  font-size: 12px;
  vertical-align: middle;
  margin-left: 4px;
  display: inline-block;
}

/* Mobile only - rotate on click */
@media (max-width: 991.98px) {
  .navbar .nav-item.dropdown.show > .nav-link.dropdown-toggle::after {
    transform: rotate(90deg);
  }
	.submenu-toggle-btn {
    	transform: none;
   }

}

/* Second level submenu arrow */
.dropdown-submenu > a::after {
  font-family: "bootstrap-icons";
  content: "\f285"; /* bi-chevron-right */
  float: right;
  margin-left: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: inherit;
  border: none;
  width: auto;
  height: auto;
  transition: transform 0.2s ease;
}


/* On small screens, nested dropdowns expand inline instead of flyout */
@media (max-width: 991.98px) {


  /* Background overlay spans full width */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
    z-index: 1050;
    background: #ffffff;
    max-height: calc(100vh - 70px);
    overflow-y: auto !important;
	overflow-x: hidden !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  }

  /* Menu items stay aligned within container gutters */
  .navbar-collapse .navbar-nav {
    max-width: 1140px; /* match your Bootstrap container max-width */
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
  }

  .dropdown-submenu .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    padding-left: 1rem;
	max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
    white-space: normal !important;
  }
  .dropdown-menu .dropdown-item {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: unset !important;
    padding-right: 16px;
    line-height: 1.4;
  }

  /* Shown only when JS adds .show (tap-to-toggle) */
  .dropdown-submenu.show > .dropdown-menu {
    display: block;
  }

  /* Make the whole submenu toggle row tappable and give it room */
  .dropdown-submenu > a,
  .navbar .nav-item.dropdown > .nav-link.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }
}

/* Remove default Bootstrap toggler border/focus ring */
.navbar-toggler {
  border: none;
  box-shadow: none;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}
