/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    height: 70px; /* Ensure consistent height */
    display: flex;
    align-items: center;
}

/* Final mobile dropdown overrides */
@media (max-width: 992px) {
  /* Hide desktop arrow indicator on mobile to avoid stray shapes/bars */
  .nav-menu .dropdown-menu::before { display: none !important; }

  /* Ensure submenu is hidden by default and shown when parent is active */
  .nav-menu .dropdown-menu {
    display: none !important;
    position: static !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .nav-menu .dropdown.active > .dropdown-menu { 
    display: block !important; 
    height: auto !important;
    max-height: none !important;
  }

  /* Submenu items */
  .nav-menu .dropdown-menu li { list-style: none; }
  .nav-menu .dropdown-item {
    display: block;
    padding: 12px 16px 12px 28px !important;
    color: #111 !important;
    background: transparent !important;
  }
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: #2d3748;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.logo-text span {
    color: #4f46e5;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-item {
    position: relative;
    margin: 0 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

.nav-link:hover,
.nav-link.active {
    color: #4f46e5;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    /* Prevent accidental hiding from other stylesheets */
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    outline: none;
}

.dropdown-icon {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(79, 70, 229, 0.04);
    color: #4f46e5;
    border-radius: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
    background: rgba(79, 70, 229, 0.04);
    color: #4f46e5;
    transform: translateX(2px);
}

.dropdown-item:hover::before {
    transform: translateY(-50%) scaleY(1);
    height: 50%;
    opacity: 1;
}

.dropdown-item:active {
    background: rgba(79, 70, 229, 0.1);
    transition-duration: 0.1s;
}

.dropdown-item:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: -2px;
}

.dropdown.active .dropdown-toggle {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.dropdown.active .dropdown-toggle .dropdown-icon {
    transform: rotate(180deg);
    color: #4f46e5;
}

.dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Add a small arrow on top of dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

/* Mobile Menu */
.hamburger {
    display: none; /* Will be shown on mobile via media query */
    flex-direction: column;
    justify-content: space-around;
width: 30px;
height: 21px;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
z-index: 1001;
position: relative;
}

.hamburger:focus {
outline: 2px solid #4d90fe;
outline-offset: 2px;
}

.hamburger-line {
display: block;
width: 100%;
height: 3px;
background-color: #333;
border-radius: 3px;
transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger.active .hamburger-line {
background-color: #333;
}

.hamburger.active .hamburger-line:nth-child(1) {
transform: translateY(9px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
opacity: 0;
transform: translateX(-10px);
}

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

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    display: none; /* Will be shown via JS when menu opens */
width: 100%;
height: 100%;
backdrop-filter: blur(2px);
z-index: 999;
opacity: 0;
transition: opacity 0.3s ease, visibility 0.3s ease;
visibility: hidden;
}

.menu-overlay.active {
display: block;
opacity: 1;
visibility: visible;
}

/* Nav menu container - desktop defaults */
.nav-menu-container {
    position: static;
    right: auto;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    z-index: auto;
    transition: none;
    padding: 0;
    overflow: visible;
    -webkit-overflow-scrolling: auto;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: flex !important;
    align-items: center;
}

/* Mobile Menu Container (only on mobile) */
@media (max-width: 992px) {
  .nav-menu-container {
      position: fixed;
      top: 0;
      right: -100%;
      width: 85%;
      max-width: 320px;
      height: 100vh;
      background: #fff;
      z-index: 1001;
      transition: right 0.3s ease-in-out, opacity 0.3s ease, visibility 0.3s ease;
      padding: 80px 25px 40px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
      opacity: 1;
      visibility: visible;
      display: block !important;
  }

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

  /* Ensure menu items render inside the sliding panel without hidden transforms */
  .nav-menu {
      position: static !important;
      top: auto !important;
      right: auto !important;
      left: auto !important;
      background: transparent !important;
      transform: none !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      padding: 0 !important;
      margin: 0 !important;
      max-height: none !important;
      box-shadow: none !important;
    }
}

/* Mobile Menu Styles */
@media (max-width: 992px) {
.hamburger {
display: flex;
}

.nav-menu {
flex-direction: column;
align-items: flex-start;
padding: 0;
margin: 0;
width: 100%;
}

.nav-item {
width: 100%;
margin: 0;
padding: 0;
border-bottom: 1px solid #eee;
}

.nav-link, .dropdown-toggle {
width: 100%;
padding: 15px 0;
justify-content: space-between;
}

.dropdown-menu {
position: static;
width: 100%;
box-shadow: none;
padding: 0;
margin: 0;
opacity: 1;
visibility: visible;
display: none;
transform: none;
border: none;
background-color: #f9f9f9;
}

.dropdown.active .dropdown-menu {
display: block;
}

.dropdown-item {
padding: 12px 25px;
color: #555;
}

.dropdown-toggle::after {
display: inline-block;
margin-left: auto;
transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle::after {
transform: rotate(180deg);
}

.nav-cta {
margin-top: 20px;
padding: 15px 0;
text-align: center;
}

.nav-cta .btn {
width: 100%;
}

}

.nav-cta .btn {
padding: 0.5rem 1.1rem;
font-size: 0.92rem;
font-weight: 500;
border-radius: 6px;
margin-left: 0.5rem;
transition: all 0.3s ease;
white-space: nowrap;
    white-space: nowrap;
}

.nav-cta .btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Responsive Styles */
/* Mobile styles */
/* Mobile Styles */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 1.25rem;
    }
    
    .nav-item {
        margin-left: 1rem;
    }
    
    .dropdown-toggle {
        padding: 0.6rem 0.75rem;
    }
}

@media (max-width: 992px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
        z-index: 1002; /* Above the menu */
    }
    
    /* Ensure menu overlay is block on mobile */
    .menu-overlay {
        display: block;
    }
    
    /* Show mobile menu when active */
    .nav-menu.mobile-visible {
        display: flex;
        flex-direction: column;
        padding: 1rem 0;
    }
    
    /* Hamburger Button Styles */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        z-index: 1002; /* Above the menu */
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        position: relative;
        transition: all 0.3s ease;
        margin-left: auto; /* Push to the right */
        order: 2; /* Ensure it's after the logo */
    }
    
    .hamburger:focus {
        outline: 2px solid #4f46e5;
        outline-offset: 2px;
    }
    
    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background: #2d3748;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Mobile Menu Styles */
    .nav-menu-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        padding: 6rem 1.5rem 2rem;
        margin: 0;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .nav-menu-container.active {
        right: 0;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu.active {
        right: 0;
        opacity: 1;
        visibility: visible;
    }
    
    
    /* Mobile Menu Items */
    .nav-item {
        margin: 0;
        padding: 0.5rem 0;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }
    
    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Add staggered animation for menu items */
    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.3s; }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
        background: rgba(0, 0, 0, 0.02);
        border-radius: 0 0 8px 8px;
        width: 100%;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 1000px;
        padding: 0.5rem 0;
        margin: 0.5rem 0 0 0;
        border-left: 3px solid #4f46e5;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-toggle .dropdown-icon {
        transition: transform 0.3s ease;
        margin-left: 0.5rem;
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        color: currentColor;
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    /* Ensure the list itself is not a sliding panel; container handles sliding */
    .nav-menu {
        position: static;
        background: transparent;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: none;
        overflow: visible;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        transition: none;
    }
    
    .nav-menu .nav-link {
        color: #000000 !important;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .nav-menu .dropdown-toggle {
        color: #000000 !important;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        width: 100%;
        text-align: left;
    }
    
    .nav-menu .dropdown-item {
        color: #000000;
        padding: 0.8rem 2.5rem;
        font-size: 1rem;
        display: block;
        text-decoration: none;
        transition: all 0.2s ease;
        position: relative;
    }
    
    .nav-menu .dropdown-item:before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background: #4f46e5;
        transition: all 0.2s ease;
    }
    
    .nav-menu .dropdown-item:hover,
    .nav-menu .dropdown-item.active {
        background: rgba(79, 70, 229, 0.05);
        padding-left: 3rem;
    }
    
    .nav-menu .dropdown-item:hover:before,
    .nav-menu .dropdown-item.active:before {
        height: 60%;
    }
    
    /* Active state handled by container; keep no-op for safety */
    .nav-menu.active {
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-item {
        margin: 0 0 0.5rem 0;
        padding: 0.5rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-item:last-child {
        border-bottom: none;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px; /* Adjust based on your content */
        padding: 0.5rem 0 0.5rem 1rem;
    }
    
    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .dropdown-toggle .dropdown-icon {
        transition: transform 0.3s ease;
        margin-left: 0.5rem;
    }
    
    .dropdown.active .dropdown-toggle .dropdown-icon {
        transform: rotate(180deg);
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Neutralize duplicate sliding panel rules for the list */
    .nav-menu {
        position: static;
        right: auto;
        width: 100%;
        max-width: none;
        height: auto;
        background: transparent;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        transition: none;
        z-index: auto;
        overflow: visible;
    }

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

    .nav-item {
        margin: 0 0 1.5rem 0;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        display: block;
    }

        .dropdown-toggle {
            width: 100%;
            justify-content: space-between;
        }

        .dropdown-menu {
            position: static;
            width: 100%;
            box-shadow: none;
            padding: 0.5rem 0 0 1rem;
            opacity: 1;
            visibility: visible;
            transform: none;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .dropdown.active .dropdown-menu {
            max-height: 500px;
            margin-top: 0.5rem;
        }

        .dropdown-item {
            padding: 0.5rem 0;
        }

        .nav-cta {
            margin-top: 1rem;
            width: 100%;
        }
    .nav-cta {
        margin-top: 1rem;
        width: 100%;
    }

    .nav-cta .btn-primary {
        display: block;
        text-align: center;
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 1.05rem;
    }
}
