/* ------------------------------------------------------
   COMPLETE NAVBAR DESIGN - KHAROTI GLOBAL ORGANIZATION
   FINAL COLOR PALETTE IMPLEMENTED
   SMOOTH ANIMATIONS VERSION
-------------------------------------------------------*/

/* MAIN NAVBAR CONTAINER */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  padding: 10px 5%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 70px;
  z-index: 1000;
  border-bottom: 1px solid rgba(218, 192, 163, 0.3);
}

/* LOGO */
.logo img {
  height: 60px;
  transition: transform 0.3s ease;
  display: block;
}

.logo img:hover {
  transform: scale(1.05);
}

/* ========== DESKTOP NAVIGATION ========== */
/* ========== DESKTOP NAVIGATION ========== */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 5px;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  display: block;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: #DAC0A3;
  color: #FFFFFF;
}

/* MAIN DROPDOWN MENU */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 230px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(218, 192, 163, 0.3);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu li a {
  padding: 12px 20px;
  font-size: 14px;
  color: #000000;
  display: block;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(218, 192, 163, 0.1);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu li a:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  padding-left: 25px;
}

/* SUB-DROPDOWN (Provincial Leadership) - FIXED */
.dropdown-sub {
  position: relative;
}

.dropdown-sub > a {
  padding-right: 30px !important;
  position: relative;
}

.dropdown-sub > a::after {
  content: " ▸";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  transition: transform 0.3s ease;
}

.dropdown-sub:hover > a::after {
  transform: translateY(-50%) rotate(90deg);
}

/* SUB-MENU POSITIONING - CRITICAL FIX */
.dropdown-sub .sub-menu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 200px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(218, 192, 163, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
}

.dropdown-sub:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Fix for sub-menu items */
.dropdown-sub .sub-menu li a {
  padding: 12px 20px;
  font-size: 14px;
  color: #000000;
  transition: all 0.2s ease;
}

.dropdown-sub .sub-menu li a:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  padding-left: 25px;
}

/* ========== HAMBURGER MENU ========== */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 24px;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1002;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000000;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1003;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(218, 192, 163, 0.3);
  background: #FFFFFF;
}

.mobile-logo img {
  height: 50px;
  transition: transform 0.3s ease;
}

.close-btn {
  font-size: 24px;
  cursor: pointer;
  color: #000000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  transform: rotate(90deg);
}

/* Mobile Menu Content */
.mobile-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  color: #000000;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(218, 192, 163, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  padding-left: 30px;
}

.mobile-nav-link .dropdown-icon {
  font-size: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Dropdown Animation */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  background: rgba(218, 192, 163, 0.1);
  list-style: none;
  padding: 0;
  margin: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown.open > .mobile-submenu {
  max-height: 1000px;
}

.mobile-submenu li a {
  display: block;
  padding: 12px 25px 12px 35px;
  color: #000000;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid rgba(218, 192, 163, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateX(-10px);
  animation: slideIn 0.3s ease forwards;
  animation-delay: calc(var(--item-index) * 0.05s);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-submenu li a:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  padding-left: 40px;
}

/* Nested Mobile Submenu */
.mobile-submenu.nested {
  max-height: 0;
  background: rgba(218, 192, 163, 0.05);
}

.mobile-dropdown.open > .mobile-submenu.nested {
  max-height: 500px;
}

.mobile-submenu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 25px 12px 35px;
  color: #000000;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid rgba(218, 192, 163, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu-link:hover {
  background: #DAC0A3;
  color: #FFFFFF;
}

.mobile-submenu-link .dropdown-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* LOGIN ICON */
.login-icon {
  margin-left: 10px;
}

.login-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-icon a:hover {
  background: #DAC0A3;
  color: #FFFFFF;
  transform: scale(1.1);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
  .nav-links {
    gap: 3px;
  }
  
  .nav-links a {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .logo img {
    height: 50px;
  }
  
  .login-icon {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .navbar {
    padding: 8px 4%;
  }
  
  .mobile-menu {
    width: 280px;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 65px;
  }
  
  .navbar {
    padding: 8px 3%;
    min-height: 65px;
  }
  
  .logo img {
    height: 45px;
  }
  
  .mobile-menu {
    width: 85%;
    max-width: 320px;
  }
  
  .mobile-nav-link {
    font-size: 15px;
    padding: 14px 20px;
  }
  
  .mobile-submenu li a {
    font-size: 14px;
    padding: 10px 20px 10px 30px;
  }
}

/* Active state for mobile dropdown */
.mobile-dropdown.open > .mobile-nav-link .dropdown-icon {
  transform: rotate(180deg);
}

/* Staggered animation for dropdown items */
.mobile-submenu li {
  --item-index: 0;
}

.mobile-submenu li:nth-child(1) { --item-index: 1; }
.mobile-submenu li:nth-child(2) { --item-index: 2; }
.mobile-submenu li:nth-child(3) { --item-index: 3; }
.mobile-submenu li:nth-child(4) { --item-index: 4; }
.mobile-submenu li:nth-child(5) { --item-index: 5; }
.mobile-submenu li:nth-child(6) { --item-index: 6; }

/* Smooth hover effects */
.dropdown-menu li a,
.mobile-submenu li a {
  position: relative;
  overflow: hidden;
}

.dropdown-menu li a::before,
.mobile-submenu li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: #DAC0A3;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.dropdown-menu li a:hover::before,
.mobile-submenu li a:hover::before {
  transform: scaleY(1);
}