/* ======= NAVBAR & HEADER STYLES ======= */

#header {
    height: 80px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    background: rgba(20, 12, 80, 0.1); /* Light transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: visible;
  }
  
  #header.header-scrolled {
    background: rgba(20, 12, 80, 0.95); /* Darker, more solid with blur */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 70px;
    box-shadow: 0 4px 20px rgba(20, 12, 80, 0.3);
    border-bottom: 1px solid rgba(67, 156, 239, 0.2);
  }
  
  
  #header.header-transparent {
    background: rgba(20, 12, 80, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  /* Scrollbar color changes on scroll */
  #header.header-scrolled::-webkit-scrollbar-thumb {
    background-color: rgba(67, 156, 239, 0.8);
  }
  #header.header-transparent::-webkit-scrollbar-thumb {
    background-color: rgba(67, 156, 239, 0.3);
  }
  
  /* For Firefox */
  @supports selector(scrollbar-color) {
    #header.header-scrolled {
      scrollbar-color: rgba(67, 156, 239, 0.8) transparent;
    }
    #header.header-transparent {
      scrollbar-color: rgba(67, 156, 239, 0.3) transparent;
    }
  }
  
  #header .container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 100vw;
    overflow: visible;
  }
  
  /* Logo */
  #header .logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
  }
  
  #header .logo:hover {
    transform: translateY(-1px);
  }
  
  #header .logo img {
    height: 40px;
    max-height: 40px;
    width: auto;
    display: block;
    margin-right: 12px;
    transition: filter 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(67, 156, 239, 0.3));
  }
  
  #header.header-scrolled .logo img {
    height: 36px;
    max-height: 36px;
  }
  
  #header .logo span {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none;
    white-space: nowrap;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a2cce3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
  }
  
  #header.header-scrolled .logo span {
    font-size: 24px;
  }
  
  /* Desktop Navigation */
  .navbar {
    padding: 0;
    position: relative;
    z-index: 1001;
  }
  
  .navbar ul,
  .navbar-nav {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
    gap: 8px;
  }
  
  .navbar li,
  .nav-item {
    position: relative;
  }
  
  .navbar a,
  .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 20px !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #fff !important;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    border-radius: 12px;
    position: relative;
    letter-spacing: 0.01em;
  }
  
  .navbar a:hover,
  .nav-link:hover {
    color: #4fa8d8 !important;
    background: rgba(79, 168, 216, 0.15) !important;
    backdrop-filter: blur(10px);
    transform: translateY(-1px);
  }
  
  .nav-link.active {
    color: #4fa8d8 !important;
    background: rgba(79, 168, 216, 0.12) !important;
  }
  
  /* Dropdown */
  .dropdown-toggle::after {
    display: none !important;
  }
  
  .dropdown-toggle .bi-chevron-down {
    margin-left: 6px;
    transition: transform 0.3s ease;
    font-size: 12px;
    color: inherit;
  }
  
  .nav-item.dropdown:hover .dropdown-toggle .bi-chevron-down {
    transform: rotate(180deg);
  }
  
  .navbar .dropdown {
    position: relative !important;
  }
  
  .dropdown-menu {
    display: none !important;
    position: absolute !important;
    left: 0 !important;
    top: 100% !important;
    margin: 0 !important;
    min-width: 240px;
    padding: 12px;
    background: linear-gradient(145deg,
      rgba(28, 45, 94, 0.98) 0%,
      rgba(20, 35, 75, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px !important;
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.25),
      0 8px 16px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(79, 168, 216, 0.1),
      0 0 0 1px rgba(79, 168, 216, 0.15) !important;
    border: 1px solid rgba(79, 168, 216, 0.2) !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  .nav-item.dropdown:hover .dropdown-menu,
  .nav-item.dropdown .dropdown-menu:hover {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  
  /* Mobile nav toggle */
  .mobile-nav-toggle {
    color: #fff !important;
    font-size: 24px;
    cursor: pointer;
    display: none;
    line-height: 0;
    padding: 8px;
    border-radius: 8px;
    background: rgba(67, 156, 239, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(67, 156, 239, 0.2);
    position: relative;
    z-index: 1002;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-toggle:hover {
    background: rgba(67, 156, 239, 0.2);
    transform: scale(1.05);
  }
  
  .mobile-nav-toggle i {
    transition: opacity 0.2s ease, transform 0.3s ease;
  }
  
  .mobile-nav-toggle .icon-hamburger {
    display: inline-block;
  }
  
  .mobile-nav-toggle .icon-close {
    display: none;
  }
  
  .mobile-nav-toggle.active .icon-hamburger {
    display: none;
  }
  
  .mobile-nav-toggle.active .icon-close {
    display: inline-block;
  }
  
  /* Mobile nav overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(20, 12, 80, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile nav container */
  .mobile-nav-container {
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  
  .mobile-nav-overlay.active .mobile-nav-container {
    transform: scale(1) translateY(0);
  }
  
  /* Mobile close button */
  .mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1003;
  }
  
  .mobile-nav-close:hover {
    background: rgba(255, 69, 69, 0.2);
    border-color: rgba(255, 69, 69, 0.3);
    transform: scale(1.1);
  }
  
  .mobile-nav-close i {
    color: #fff;
    font-size: 18px;
  }
  
  /* Mobile navigation list */
  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .mobile-nav-list li a {
    display: block;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .mobile-nav-list li a:hover,
  .mobile-nav-list li a.active {
    background: rgba(67, 156, 239, 0.2);
    color: #fff;
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(67, 156, 239, 0.3);
  }
  
  /* Mobile dropdown toggle */
  .mobile-nav-list .dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .mobile-nav-list .dropdown > a i {
    transition: transform 0.3s ease;
    font-size: 14px;
  }
  
  .mobile-nav-list .dropdown.active > a i {
    transform: rotate(180deg);
  }
  
  .mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 8px 0 0 0;
    padding-left: 0;
  }
  
  .mobile-dropdown-menu.active {
    max-height: 200px;
    padding: 8px 0;
  }
  
  .mobile-dropdown-menu li a {
    padding: 12px 24px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
  }
  
  /* ======= RESPONSIVE ======= */
  @media (max-width: 991.98px) {
    #navbar {
      display: none !important;
    }
    .mobile-nav-toggle {
      display: block !important;
    }
  }
  
  @media (min-width: 992px) {
    #navbar {
      display: block !important;
    }
    .mobile-nav-toggle,
    .mobile-nav-overlay {
      display: none !important;
    }
  }