/* ================================
   Header Styles
================================== */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 1000;
}

/* Container */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.logo {
  font-family: "Poppins", sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  color: #111;
  flex-shrink: 0;
}

.logo .highlight {
  color: green;
}

/* Navbar Center (Desktop) */
nav#navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

nav#navbar a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav#navbar a:hover,
nav#navbar a.active {
  background-color: rgba(0, 123, 255, 0.8);
  color: #fff;
}

/* Right Side */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* CTA Button */
.cta-button {
  background-color: #007bff;
  color: #fff;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.cta-button:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

/* Typing quote */
.quote {
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  width: 28ch;
  border-right: 2px solid #555;
  animation: typing 5s steps(28) 1, blink 0.7s step-end infinite alternate;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 28ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
  transition: 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================
   Mobile Styles
================================== */
@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
  }

  nav#navbar {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 58%;
    width: 100vw;
    background-color: #ffffff;
    padding: 0.5rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid #e0e0e0;
    z-index: 999;
  }

  nav#navbar.open {
    display: flex !important;
  }

  nav#navbar a {
    width: 100%;
    text-align: center;
    padding: 0.9rem;
    font-size: 1rem;
    color: #222;
    background-color: #fff;
    border-bottom: 1px solid #f1f1f1;
  }

  .nav-right {
    justify-content: flex-end;
    flex: 1;
  }

  .cta-button {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .hamburger {
    display: flex;
  }

  .quote {
    display: none;
  }
}

@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
    position: relative;
  }

  /* ✅ Hamburger dropdown aligned right under icon */
  nav#navbar {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    /* 🔥 Ensures it opens right under hamburger */
    width: 180px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0.3rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  nav#navbar.open {
    display: flex;
  }

  nav#navbar a {
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    color: #222;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  nav#navbar a:hover {
    background-color: #f8f9fa;
    color: #000;
  }

  nav#navbar a.active {
    background-color: #007bff;
    color: #fff;
  }

  .nav-right {
    justify-content: flex-end;
    flex: 1;
    position: relative;
  }

  .cta-button {
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
  }

  .hamburger {
    display: flex;
    z-index: 1000;
  }

  .quote {
    display: none;
  }
}