/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* Navigation Styles */
.main-navigation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 15px 0;
  background: transparent;
}

/* Floating navbar when scrolling */
.main-navigation.floating {
  position: fixed;
  top: -100px;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
}

/* Show floating navbar on scroll up */
.main-navigation.floating.show {
  top: 0;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    top: -100px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

.main-navigation.scrolled {
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* Logo */
.brand-logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand-logo .logo {
  width: 160px;
  height: auto;
  transition: all 0.3s ease;
}

.main-navigation.scrolled .brand-logo .logo {
  width: 140px;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  padding: 5px 0;
  position: relative;
}

.nav-menu li a:hover {
  color: #e67a27;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #833a89;
  transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
  width: 100%;
}

#syllabusBtn {
  background: #e67a27 !important;
  color: #fff !important;
  width: 100% !important;
  padding: 14px 15px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

#syllabusBtn:hover {
  background: #833a89 !important;
  transform: translateY(-2px) !important;
}

#syllabusBtn i {
  font-size: 16px !important;
}

/* Mobile Menu Toggle - Animated Hamburger */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle:hover .hamburger-line {
  background: #833a89;
}

/* Hamburger Animation when Active */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Popup Styles */
.contact-popup-form, .syllabus-popup-overlay {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.contact-popup-content, .syllabus-popup-box {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.contact-popup-content.small-popup,
.syllabus-popup-box.small-popup {
  max-width: 500px;
  z-index: 10004;
}

.contact-close-btn, .syllabus-close-btn {
  position: absolute;
  top: 10px; 
  right: 12px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  color: #555;
}

.contact-form .form-group { 
  margin-bottom: 15px; 
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.contact-form button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #e67a27;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  position: relative;
}

.contact-form button:hover { 
  background: #833a89; 
}

#syllabusProgressBar {
  position: absolute;
  left: 0; 
  bottom: 0;
  height: 3px; 
  width: 0%;
  background: #fff;
  transition: width 0.4s ease;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  /* Force white background on mobile */
  .main-navigation {
     background: rgb(255, 255, 255) !important;
  }

  .main-navigation.scrolled,
  .main-navigation.floating,
  .main-navigation.floating.show {
    background: rgb(255, 255, 255) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.12) !important;
    padding: 8px 0 !important;
  }

  .nav-container {
    padding: 0 15px;
    height: 50px;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .brand-logo .logo {
    width: 100px !important;
    height: auto;
  }

  .main-navigation.scrolled .brand-logo .logo {
    width: 95px !important;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 30px 30px;
    gap: 0;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
    opacity: 0;
    transform: translateX(50px);
    animation: slideIn 0.4s ease forwards;
  }

  .nav-menu.active li:nth-child(1) { animation-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { animation-delay: 0.15s; }
  .nav-menu.active li:nth-child(3) { animation-delay: 0.2s; }
  .nav-menu.active li:nth-child(4) { animation-delay: 0.25s; }
  .nav-menu.active li:nth-child(5) { animation-delay: 0.3s; }
  .nav-menu.active li:nth-child(6) { animation-delay: 0.35s; }

  @keyframes slideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-menu li a {
    font-size: 17px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    display: block;
    color: #333;
  }

  .nav-menu li:last-child {
    margin-top: 15px;
  }

  #syllabusBtn {
    padding: 14px 20px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }
}

@media screen and (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
    height: 50px;
  }

  .brand-logo .logo {
    width: 90px !important;
  }

  .main-navigation.scrolled .brand-logo .logo {
    width: 85px !important;
  }

  .nav-menu {
    width: 260px;
    padding: 70px 25px 25px;
  }

  .nav-menu li a {
    font-size: 16px;
    padding: 14px 0;
  }

  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
  }

  .hamburger-line {
    width: 24px;
    height: 2.5px;
  }
}