header * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

/* @font-face {
  font-family: 'Montserrat';
  src: url(Montserrat/Montserrat-VariableFont_wght.ttf);
} */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

html, body {
  width: 100%;
  height: 100%;
}

nav {
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #34373F;
  position: fixed; /* changed from relative */
  top: 0;           /* added */
  left: 0;          /* added */
  right: 0;         /* added */
  height: 70px;
  z-index: 999;     /* added to stay on top */
}

@media (min-width: 601px) {
  nav {
    padding: 10px 60px;
  }
}

nav ul {
  display: flex;
  gap: 30px;
  margin-left: auto;
}

nav ul li {
  list-style-type: none;
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  position: relative;
  padding: 5px 0;
  transition: transform 0.2s ease;
}

/* Hover underline and scale */
nav ul li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a:hover {
  transform: scale(1.05);
}

/* Click animation */
nav ul li a:active {
  transform: scale(0.95);
}

#head-logo {
  width: 150px;
  height: auto;
}

.menu-icon i {
  color: #fff;
  font-size: 20px;
  display: none;
  transition: transform 0.3s ease;
}

.menu-icon:active i {
  transform: scale(0.9);
}

.menu-icon {
  display: block;
}

.down-icon {
  color: #fff;
  font-size: 15px;
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  background: #34373F;
  top: 100%;
  left: 0;
  z-index: 99;
  flex-direction: column;
  min-width: 180px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 10px;
  text-align: left;
}

.dropdown-menu li a {
  color: #fff;
  display: block;
  transition: background 0.3s ease;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Nav */
@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    text-align: center;
    background: #34373F;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav ul li {
    padding: 20px;
  }

  nav ul.show {
    max-height: 1000px;
  }

  .menu-icon i {
    display: block;
  }

  .dropdown-menu {
    position: static;
    display: none;
    background: #2d2f36;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dropdown.open .dropdown-menu {
    display: flex;
  }

  .dropdown-menu li {
    padding: 10px 0;
  }

  .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}