/* ==========================================
   NAVBAR STYLES
   ========================================== */
.mobile-only-wa {
  display: none !important;
}

.navbar {
  position: fixed; /* Upgraded from sticky to fixed */
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-offwhite);
  border-bottom: 1px solid rgba(18, 41, 57, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  z-index: 9999;
  padding: 15px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Image Logo Styling */
.logo-img {
  max-height: 60px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.02);
}

/* --- HAMBURGER ICON (Hidden on Desktop) --- */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-navy);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Navigation Links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links li a:not(.btn) {
  text-decoration: none;
  color: var(--primary-navy);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

/* The Premium Hover & Active Underline Animation */
.nav-links li a:not(.btn)::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  border-radius: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-gold);
  transition: width 0.3s ease;
}

.nav-links li a:not(.btn):hover,
.nav-links li a:not(.btn).active {
  color: var(--primary-navy);
}

.nav-links li a:not(.btn):hover::after,
.nav-links li a:not(.btn).active::after {
  width: 100%;
}

/* Enroll now Button */
.btn {
  padding: 8px 20px;
  border-radius: var(--border-radius);
  font-family: "Work Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex; /* The magic alignment fix */
  align-items: center; /* Locks vertically */
  justify-content: center; /* Locks horizontally */
  gap: 8px;
}

.nav-links .btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--primary-navy);
  color: var(--bg-offwhite);
}

.btn-primary:hover {
  background-color: #1a3c54;
  border-color: #1a3c54;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 6px rgba(18, 41, 57, 0.15);
}

/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 900px) {
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  nav {
    position: absolute;
  }

  .hamburger {
    display: flex;
    z-index: 10002;
    margin-left: auto;
  }

  /* --- The Premium Side Drawer --- */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    visibility: hidden;
    width: 80%;
    max-width: 380px;
    height: 100vh;
    background-color: var(--primary-navy);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 100px 8% 40px 8%;
    gap: 0;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    transition:
      transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      visibility 0.4s;
    z-index: 10001;
  }

  .nav-links.mobile-active {
    transform: translateX(0);
    visibility: visible;
  }

  /* --- Left-Aligned Links with Dividers --- */
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* The very last item is the Enroll Button. Give it space, remove border. */
  .nav-links li:last-child {
    border-bottom: none;
    margin-top: 30px;
  }

  /* Standard Links */
  .nav-links li a:not(.btn) {
    display: block;
    width: 100%;
    padding: 20px 0;
    color: var(--bg-offwhite);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: left;
  }

  .nav-links li a:not(.btn):hover,
  .nav-links li a:not(.btn).active {
    color: var(--secondary-gold);
  }

  /* --- The Gold CTA Button (Perfectly Aligned) --- */
  .nav-links .btn {
    display: flex;
    align-items: center; /* Locks vertically */
    justify-content: center; /* Locks horizontally */
    gap: 10px; /* Perfect spacing between icon and text */

    width: 100%;
    background-color: var(--secondary-gold);
    color: var(
      --primary-navy
    ) !important; /* Overrides any default white link color */
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  /* Ensures the SVG icon itself is sized correctly and doesn't squish */
  .nav-links .btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* The elegant bottom divider and text */
  .nav-links::after {
    content: "IQ Math | Dragon Learning Den";
    display: block;
    width: 100%;
    text-align: center;
    padding-top: 30px;
    margin-top: auto;
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    letter-spacing: 1px;
  }

  /* Hamburger to 'X' Animation */
  .hamburger.toggle span {
    background-color: var(--bg-offwhite);
  }

  .hamburger.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .hamburger.toggle span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}
