/* Make the navbar sticky with transparent background initially */
nav {
  height: 100px;
  position: fixed; /* Sticks the navbar to the top */
  top: 0;
  width: 100%;
  display: flex;
  padding-left: 40px;
  padding-right: 40px;
  align-items: center;
  justify-content: center;
  background-color: transparent; /* Initially transparent */
  transition: background-color 0.3s ease;
  z-index: 1000;
}

/* Change navbar background when scrolled */
nav.scrolled {
  background-color: #0a0a0b;
}

/* Other existing styles */
nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .mobile-nav-section {
    display: none;
  }
}

nav a {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: white !important;
}

nav > ul > li {
  position: relative;
  float: left;
}

.mega-drop-inner ul li {
  color: white;
}

nav > ul > li > a {
  position: relative;
  line-height: 50px;
  padding: 0 20px;
  color: white;
  display: inline;
  font-size: 20px;
}

nav > ul > li > a:hover {
  color: #d31a42;
}

nav > ul > li.mega-drop > a::after,
.unique-dropdown > a::after {
  content: "\f078"; /* Unicode for Font Awesome 'chevron-down' */
  font-family: "Font Awesome 5 Free"; /* Make sure Font Awesome is loaded */
  margin-left: 10px;
  font-weight: 900; /* Bold Font Awesome icons */
  font-size: 14px;
  transition: transform 300ms ease-in-out;
}

nav > ul > li.mega-drop.open > a::after,
.unique-dropdown.open > a::after {
  content: "\f077"; /* Unicode for Font Awesome 'chevron-right' */
  transform: rotate(90deg); /* Rotate to show the dropdown opened */
}

/* Mega Drop Down */
nav > ul > li.mega-drop,
.unique-dropdown {
  position: static;
}

nav > ul > li.mega-drop .mega-drop-inner,
.unique-dropdown-menu {
  position: absolute;
  opacity: 0;
  top: -20px; /* Start just above */
  left: 0;
  width: 100%;
  background-color: #0a0a0b;
  visibility: hidden;
  transition: opacity 500ms ease-in-out, top 500ms ease-in-out;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  z-index: 1;
  height: 450px;
}

nav > ul > li.mega-drop .mega-drop-inner ul,
.unique-dropdown-menu {
  width: 23%;
  margin: 20px 1%;
  line-height: 1.9;
}
nav.mega-dropdown-open {
  background-color: #0a0a0b;
  transition: background-color 0.3s ease;
}

nav.courses-dropdown-open {
  background-color: #0a0a0b;
  transition: background-color 0.3s ease;
}

nav > ul > li.mega-drop .mega-drop-inner ul li a,
.unique-dropdown-link {
  display: block;
  padding: 10px;
  text-transform: uppercase;
  color: #ffffff;
}

nav > ul > li.mega-drop .mega-drop-inner ul h3,
.unique-dropdown-link {
  color: white;
  font-size: 18px;
  padding: 0;
}

nav > ul > li.mega-drop.open .mega-drop-inner,
.unique-dropdown.open .unique-dropdown-menu {
  padding-right: 40px;
  padding-left: 40px;
  opacity: 1;
  top: 100%; /* Slide down */
  visibility: visible;
}

/* Default styles for <li> elements */
.mega-drop-inner li {
  transition: color 0.3s, background 0.3s; /* Smooth transition for background and color changes */
}

/* Default styles for <h3> elements */
.mega-drop-inner h3 a {
  transition: color 0.3s, background 0.3s; /* Smooth transition for background and color changes */
  cursor: pointer; /* Change cursor to pointer for better UX */
  background: linear-gradient(to right, #d31a42, #c5529e); /* Gradient background */
  -webkit-background-clip: text; /* Apply gradient to text */
  color: transparent; /* Hide actual text color to show gradient */
}

/* Apply gradient text background to <h3> and <li> when hovered */
.mega-drop-inner h3 a.hovered,
.mega-drop-inner li.hovered {
  background: linear-gradient(to right, #d31a42, #c5529e); /* Gradient background */
  -webkit-background-clip: text; /* Apply gradient to text */
  color: transparent; /* Hide actual text color to show gradient */
}

/* Unique Dropdown */
.unique-dropdown {
  position: relative;
  display: inline-block;
}

.unique-dropdown-menu {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 200px;

  z-index: 1;
  top: 85px;
  transition: opacity 500ms ease-in-out, top 500ms ease-in-out;
}

.unique-dropdown-item {
  float: none;
}

.unique-dropdown-link {
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  display: block;
  text-align: center;
  background-color: #1a1a1a;
  height: 50px;
  text-transform: none;
  width: 220px;
}
.unique-dropdown-link:hover {
  color: #d31a42;
}
.unique-dropdown.open .unique-dropdown-menu {
  display: block;
  opacity: 1;
  top: 100%; /* Slide down */
  background-color: #1a1a1a;
  height: 180px;
  width: max-content;
}

/* Style for the Logo */
.nav-logo img {
  width: 150px; /* Set the width as needed */
  height: auto; /* Maintain aspect ratio */
  margin-right: 20px; /* Add some space to the right of the logo */
}

/* Style for the Contact Button */
.contact-button {
  margin-right: 20px; /* Add some space to the right of the button */
}

.contact-button button {
  background-color: #f9f9f9; /* Light background color */
  color: black; /* Text color */
  border: none; /* Remove border */
  padding: 8px 16px;
  font-size: 20px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.3s; /* Smooth transition */
}

.contact-button button:hover {
  background-color: #ddd; /* Change background on hover */
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

/* Hide the navigation bar on mobile devices */
@media screen and (max-width: 768px) {
  nav {
    display: none; /* Hide the entire nav */
  }
}

:root {
  --clr-bg-header: #1a1a1a;
  --clr-btn: #1a1a1a;
  --clr-dropdown: #1a1a1a;
  --clr-nav-hover: #1a1a1a;
  --clr-dropdown-hov: #1a1a1a;
  --clr-dropdown-link-hov: #1a1a1a;
  --clr-light: #fafafa;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

header {
  position: sticky;
  top: 0px;
  width: 100%;
  z-index: 1000;
}

.mobile-nav-container {
  max-width: 65rem;
  padding: 0 2rem;
  background-color: #1a1a1a;
  margin: 20px auto;
  display: flex;
  position: relative;
}

.mobile-nav-logo-container {
  flex: 1;

  display: flex;
  align-items: center;
}

.mobile-nav-nav-btn {
  flex: 3;
  display: flex;
}

.mobile-nav-nav-links {
  flex: 2;
}

.mobile-nav-log-sign {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.mobile-nav-logo {
  color: var(--clr-light);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 3rem;
}

.mobile-nav-logo span {
  font-weight: 300;
}

.mobile-nav-btn {
  display: inline-block;
  padding: 0.5rem 1.3rem;
  font-size: 0.8rem;
  border: 2px solid var(--clr-light);
  border-radius: 2rem;
  line-height: 1;
  margin: 0 0.2rem;
  transition: 0.3s;
  text-transform: uppercase;
}

.mobile-nav-btn.mobile-nav-solid,
.mobile-nav-btn.mobile-nav-transparent:hover {
  background-color: var(--clr-light);
  color: var(--clr-btn);
}

.mobile-nav-btn.mobile-nav-transparent,
.mobile-nav-btn.mobile-nav-solid:hover {
  background-color: transparent;
  color: var(--clr-light);
}

.mobile-nav-nav-links > ul {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-nav-nav-link {
  position: relative;
}

.mobile-nav-nav-link > a {
  line-height: 3rem;
  color: var(--clr-light);
  padding: 0 0.8rem;
  letter-spacing: 1px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: 0.5s;
}

.mobile-nav-nav-link > a > i {
  margin-left: 0.2rem;
}

.mobile-nav-nav-link:hover > a {
  transform: scale(1.1);
}

.mobile-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 10rem;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: 0.5s;
}

.mobile-nav-dropdown ul {
  position: relative;
}

.mobile-nav-dropdown-link > a {
  display: flex;
  background-color: var(--clr-light);
  color: var(--clr-dropdown);
  padding: 0.5rem 1rem;
  font-size: 16px;
  align-items: center;
  justify-content: space-between;
  transition: 0.3s;
}

.mobile-nav-dropdown-link:hover > a {
  background-color: var(--clr-dropdown);
  color: var(--clr-light);
}

.mobile-nav-dropdown-link:not(:nth-last-child(2)) {
  border-bottom: 1px solid var(--clr-light);
}

.mobile-nav-dropdown-link i {
  transform: rotate(-90deg);
}

.mobile-nav-arrow {
  position: absolute;
  width: 11px;
  height: 11px;
  top: -5.5px;
  left: 32px;
  background-color: var(--clr-light);
  transform: rotate(45deg);
  cursor: pointer;
  transition: 0.3s;
  z-index: -1;
}

.mobile-nav-dropdown-link:first-child:hover ~ .arrow {
  background-color: var(--clr-dropdown);
}

.mobile-nav-dropdown-link {
  position: relative;
}

.mobile-nav-dropdown.second {
  top: 0;
  left: 100%;
  padding-left: 0.8rem;
  cursor: pointer;
  transform: translateX(10px);
}

.mobile-nav-dropdown.second .arrow {
  top: 10px;
  left: -5.5px;
}

.mobile-nav-nav-link:hover > .mobile-nav-dropdown,
.mobile-nav-dropdown-link:hover > .mobile-nav-dropdown {
  transform: translate(0, 0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-hamburger-menu-container {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: flex-end;
}

.mobile-nav-hamburger-menu {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobile-nav-hamburger-menu div {
  width: 1.6rem;
  height: 3px;
  border-radius: 3px;
  background-color: var(--clr-light);
  position: relative;
  z-index: 1001;
  transition: 0.5s;
}

.mobile-nav-hamburger-menu div:before,
.mobile-nav-hamburger-menu div:after {
  content: "";
  position: absolute;
  width: inherit;
  height: inherit;
  background-color: var(--clr-light);
  border-radius: 3px;
  transition: 0.5s;
}

.mobile-nav-hamburger-menu div:before {
  transform: translateY(-7px);
}

.mobile-nav-hamburger-menu div:after {
  transform: translateY(7px);
}

#check {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  z-index: 90000;
  cursor: pointer;
  opacity: 0;
  display: none;
}

#check:checked ~ .mobile-nav-hamburger-menu-container .mobile-nav-hamburger-menu div {
  background-color: transparent;
}

#check:checked ~ .mobile-nav-hamburger-menu-container .mobile-nav-hamburger-menu div:before {
  transform: translateY(0) rotate(-45deg);
}

#check:checked ~ .mobile-nav-hamburger-menu-container .mobile-nav-hamburger-menu div:after {
  transform: translateY(0) rotate(45deg);
}

@keyframes animation {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

@media (max-width: 920px) {
  .mobile-nav-hamburger-menu-container {
    display: flex;
  }

  #check {
    display: block;
  }

  .mobile-nav-nav-btn {
    position: fixed;
    height: calc(100vh - 3rem);
    top: 5rem;
    left: 0;
    width: 100%;
    color: white;
    background-color: #1a1a1a;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(100%);
    transition: 0.65s;
  }

  #check:checked ~ .mobile-nav-nav-btn {
    transform: translateX(0);
  }

  #check:checked ~ .mobile-nav-nav-btn .mobile-nav-nav-link,
  #check:checked ~ .mobile-nav-nav-btn .mobile-nav-log-sign {
    animation: animation 0.5s ease forwards var(--i);
  }

  .mobile-nav-nav-links {
    flex: initial;
    width: 100%;
  }

  .mobile-nav-nav-links > ul {
    flex-direction: column;
  }

  .mobile-nav-nav-link {
    width: 100%;
    opacity: 0;
    transform: translateY(15px);
  }

  .mobile-nav-nav-link > a {
    line-height: 1;
    padding: 1.6rem 2rem;
  }

  .mobile-nav-nav-link:hover > a {
    transform: scale(1);
    background-color: var(--clr-nav-hover);
  }

  .mobile-nav-dropdown,
  .mobile-nav-dropdown.mobile-nav-second {
    position: initial;
    top: initial;
    left: initial;
    transform: initial;
    opacity: 1;
    pointer-events: auto;
    width: 100%;
    padding: 0;
    background-color: var(--clr-dropdown-hov);
    display: none;
  }

  .mobile-nav-nav-link:hover > .mobile-nav-dropdown,
  .mobile-nav-dropdown-link:hover > .mobile-nav-dropdown {
    display: block;
  }

  .mobile-nav-nav-link:hover > a > i,
  .mobile-nav-dropdown-link:hover > a > i {
    transform: rotate(360deg);
  }

  .mobile-nav-dropdown-link > a {
    background-color: transparent;
    color: var(--clr-light);
    padding: 1.2rem 2rem;
    line-height: 1;
  }

  .mobile-nav-dropdown.second .mobile-nav-dropdown-link > a {
    padding: 1.2rem 2rem 1.2rem 3rem;
  }

  .mobile-nav-dropdown.second .mobile-nav-dropdown.second .mobile-nav-dropdown-link > a {
    padding: 1.2rem 2rem 1.2rem 4rem;
  }

  .mobile-nav-dropdown-link:not(:nth-last-child(2)) {
    border-bottom: none;
  }

  .mobile-nav-arrow {
    z-index: 1;
    background-color: var(--clr-btn);
    left: 10%;
    transform: scale(1.1) rotate(45deg);
    transition: 0.5s;
  }

  .mobile-nav-nav-link:hover .mobile-nav-arrow {
    background-color: var(--clr-nav-hover);
  }

  .mobile-nav-dropdown .mobile-nav-dropdown .mobile-nav-arrow {
    display: none;
  }

  .mobile-nav-dropdown-link:hover > a {
    background-color: var(--clr-dropdown-link-hov);
  }

  .mobile-nav-dropdown-link:first-child:hover ~ .mobile-nav-arrow {
    background-color: var(--clr-nav-hover);
  }

  .mobile-nav-nav-link > a > i {
    font-size: 1.1rem;
    transform: rotate(0deg); /* Default downward chevron */
    transition: transform 0.7s ease-in-out; /* Smooth transition */
  }

  /* When dropdown is open, rotate the chevron upwards */
  .mobile-nav-nav-link.open > a > i {
    transform: rotate(180deg); /* Rotate upwards */
  }

  .mobile-nav-dropdown i {
    font-size: 1rem;
    transition: 0.7s;
  }

  .mobile-nav-log-sign {
    flex: initial;
    width: 100%;
    padding: 1.5rem 1.9rem;
    justify-content: flex-start;
    opacity: 0;
    transform: translateY(15px);
  }
}

.mobile-nav-logo-img {
  width: 90px; /* adjust as needed */
  height: auto; /* maintain aspect ratio */
  display: block;
}

/* Hide mobile menu on larger screens */
@media (min-width: 921px) {
  .mobile-nav-container {
    display: none;
  }
}

/* Hide dropdowns initially */
.mobile-nav-dropdown {
  display: none;
}
.mobile-nav-dropdown.show {
  display: block;
}
