@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Slab:wght@100..900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}
body {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  background-color: aliceblue;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  background-color: #161616;
}
nav h1 {
  font-size: 40px;
  color: #fefefe;
  padding: 20px;
}
.menubar {
  left: 100%;
}
.menubar.active {
  left: 0;
}
ul {
  display: flex;
  padding: 20px;
  transition: all ease 0.5s;
}
nav ul li {
  font-size: 25px;
  color: #fefefe;
  margin: 15px;
  display: flex;
  list-style: none;
}
ul li a {
  padding: 10px;
  border-radius: 20px;
  color: #fefefe;
  text-decoration: none;
  transition: 0.8s;
}

/* ===== LOCK SCROLL WHEN MENU IS OPEN ===== */
body.menu-open {
  overflow: hidden;
}

/* ===== MOBILE MENU FULL OVERLAY ===== */
@media (max-width: 1100px) {
  .menubar {
    position: fixed;
    top: 80px;
    left: 100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: #333;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.4s ease;
    z-index: 9999; /* 🔥 ensure it stays above everything */
  }

  .menubar.active {
    left: 0;
  }
}

/* ===== REMOVE DEFAULT / OLD HOVER ===== */
nav ul li a {
  position: relative;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
}

/* ===== ADVANCED TAB HOVER EFFECT ===== */
nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #00ffd5;
  transition: all 0.35s ease;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(0, 255, 213, 0.6);
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a:hover {
  color: #00ffd5;
}

/* ===== MOBILE SAFETY (NO HOVER EFFECT) ===== */
@media (max-width: 768px) {
  nav ul li a::after {
    display: none;
  }
}

.opnmenu {
  color: #fefefe;
  padding: 20px;
  align-items: center;
  display: none;
}
.opnmenu img {
  width: 40px; /* Adjust the width as needed */
  height: 40px; /* Adjust the height as needed */
  align-items: center;
  margin-right: -20px;
}

/* MOBILEFRIENDLY NAVBAR CSS  */

@media (max-width: 1100px) {
  nav {
    padding: 0 20px;
  }
  .menubar {
    position: fixed;
    top: 80px;
    left: 100%;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background-color: #333;
    width: 100%;
    height: 100%;
    align-items: center;
  }
  .opnmenu {
    display: block;
    height: auto;
    width: auto;
    align-items: center;
    font-size: 25px;
  }
  nav h1 {
    font-size: 30px;
    padding: 0;
  }
}

/* HOME PAGE CSS */

#Home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
  height: 100vh;
  box-sizing: border-box;
  animation: fadeIn 1.5s ease-in-out;
}

.content {
  flex: 1;
  max-width: 600px;
  padding: 20px;
  animation: slideInLeft 1.5s ease-out;
}

.content h1 {
  font-size: 3em;
}

.content p {
  font-size: 1.2em;
  line-height: 1.5;
}

.image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  animation: slideInRight 1.5s ease-out;
}

.image img {
  width: 100%;
  height: auto;
  max-width: 500px;
  border-radius: 10px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  #Home {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .content h1 {
    font-size: 2.1em;
  }

  .content p {
    font-size: 1em;
  }

  .image img {
    max-width: 400px;
  }
}
