/* style.css */

/*--------------------------------------------------------*/
/*	5. HEADER AND NAVIVATION */
/*--------------------------------------------------------*/

header {
  position: fixed;
  width: 100%;
  padding-block: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.6s ease-in-out;
  z-index: 999;
}

header .container {
  grid-template-columns: 12rem 1fr;
}

.stop-scrolling {
  overflow: hidden;
}

:root {
  --dark-grey: #333333;
  --medium-grey: #636363;
  --light-grey: #eeeeee;
  --ash: #f4f4f4;
  --primary-color: #02c0ca;
  --white: white;
  --border: 1px solid var(--light-grey);
  --shadow: 0px 8px 16px 0px #02c0ca;
  --background: #091e31;
}

ul {
  list-style: none;
}

.icon {
  padding: 0.5rem;
  background-color: var(--light-grey);
  border-radius: 10px;
}

.logo {
  margin-right: 10rem;
}

#nav-menu {
  border-bottom: var(--border);
  background-color: var(--background);
}

.container-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  column-gap: 2rem;
  height: 3.5rem;
  padding: 1.2rem 3rem;
}

.menu {
  position: relative;
}

/* Adjust width of dropdowns on Desktop */
.menu-bar li:first-child .dropdown {
  flex-direction: initial;
  min-width: 15rem;
}

.menu-bar li:last-child .dropdown {
  flex-direction: initial;
  min-width: 10rem;
  left: -1rem;
}

.menu-bar .dropdown-link-title {
  font-weight: 600;
}

.menu-bar .nav-link {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.6px;
  padding: 2rem 0 2rem;
  min-width: 60px;
  margin: 0 0.6rem;
}

.menu-bar .nav-link:hover,
.dropdown-link:hover {
  color: var(--primary-color);
}

body.menu-open {
  overflow: hidden;
}

.nav-start,
.nav-end,
.menu-bar,
.right-container {
  display: flex;
  align-items: center;
}

.dropdown {
  display: flex;
  flex-direction: column;
  min-width: 100%;
  max-width: 1400px;
  background-color: var(--background);
  border-radius: 10px;
  position: absolute;
  top: 84px;
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.97) translateX(-5px);
  transition: 0.1s ease-in-out;
  box-shadow: var(--shadow);
  padding: 3%;
}

@media screen and (max-width: 1101px) {
  .dropdown-btn i {
    pointer-events: none; /* This will ensure the click events pass through the icon */
  }
}

.dropdown.active {
  visibility: visible;
  opacity: 1;
  transform: scale(1) translateX(5px);
}

.dropdown ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.2rem;
  font-size: 0.95rem;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.15rem;
}


.dropdown-link {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-radius: 7px;
  transition: 0.1s ease-in-out;
}

.dropdown-link p {
  font-size: 0.8rem;
}

#hamburger {
  display: none;
  padding: 0.1rem;
  margin-left: 1rem;
  font-size: 1.9rem;
}

@media (max-width: 1100px) {
  #hamburger {
    display: block;
  }

  .container-nav {
    padding: 1.2rem;
  }

  .menu {
    display: none;
    position: absolute;
    top: 87px;
    left: 0;
    width: 100vw;
    background-color: var(--background);
    height: 100vh; /* Set the maximum height for the dropdown menu */
    overflow-y: auto; /* Enable vertical scrolling */
  }
  

  .menu-bar li:first-child ul:nth-child(1) {
    border-right: none;
    border-bottom: var(--border);
  }

  .dropdown {
    display: none;
    min-width: 100%;
    border: none !important;
    border-radius: 5px;
    position: static;
    top: 0;
    left: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }

  .menu.show,
  .dropdown.active {
    display: block;
  }

  .dropdown ul {
    padding-left: 0.3rem;
  }

  .menu-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    row-gap: 1rem;
    padding: 1rem 1rem 14rem 1rem;
  }

  .menu-bar .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
  }

  .menu-bar li:first-child .dropdown {
    min-width: 100%;
  }

  .menu-bar li:last-child .dropdown {
    min-width: 100%;
  }

  .menu-bar > li:not(:last-child) {
    padding-bottom: 0.5rem;
    border-bottom: var(--border);
  }

  .menu-bar li:last-child .dropdown {
    flex-direction: initial;
    min-width: 100%;
  }
  .menu-bar .nav-link {
    padding: 0.4rem 0 0.4rem;

  }
}

.menu-bar li:first-child .site-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  width: 8rem;
}

.menu-bar li:last-child .site-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  width: 10rem;
}

.site-nav img {
  width: 50%; /* Adjust the width of the image inside site-nav */
  max-width: 110px; /* Set a maximum width if necessary */
}

.site-nav span {
  font-size: 1rem;
}

.site-nav p {
  margin-top: 1%;
  font-size: 0.7rem; /* Adjust the font size of the text */
  opacity: 0.3;
}

.site-nav h2 {
  font-size: 1rem;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .site-nav {
    width: 10rem;
  }
  .site-nav img {
    width: 20%;
    max-width: 40px;
  }

  .site-nav h2 {
    font-size: 0.8rem;
  }

  .site-nav span {
    font-size: 0.8rem;
  }

  .site-nav p {
    font-size: 0.6em;
  }

  .menu {
    height: 100vh; /* Set the maximum height for the dropdown menu */
    overflow-y: auto; /* Enable vertical scrolling */
  }
}

.site-nav:hover {
  background-color: rgba(2,192,202,0.3); /* Adjust the background color and opacity */
    border-radius: 5px; /* Adjust the border radius for rounded corners */
    text-decoration: none !important;
}
