.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
  }
  
  .mobile-menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    margin-bottom: 6px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  .mobile-menu-button span:last-child {
    margin-bottom: 0;
  }
  
  /* Mobile menu overlay styles */
  .mobile-menu-overlay {
    position: fixed;
    top: 40px; /* Default position when at the top of the page */
    left: 0;
    width: 100%;
    height: calc(100vh - 40px); /* Adjust height to account for top bar */
    background-color: #181818;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease, top 0.3s ease, height 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  /* Add this new style for when the page is scrolled */
  .mobile-menu-overlay.at-top {
    top: 0; /* Remove the 40px spacing when not at the top */
    height: 100vh; /* Full height when at top */
  }
  
  .mobile-menu-overlay.active {
    transform: translateX(0);
  }
  
  .mobile-menu-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
  }
  
  .mobile-logo {
    height: 20px;
    margin-right: auto; /* Push everything else to the right */
  }
  
  .mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
  }
  
  .mobile-menu-close span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 0;
  }
  
  .mobile-menu-close span:first-child {
    transform: rotate(45deg);
  }
  
  .mobile-menu-close span:last-child {
    transform: rotate(-45deg);
  }
  
  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px; /* Add space between links and social icons */
  }
  
  .mobile-menu-links a {
    color: white;
    text-decoration: none;
    font-family: "Roboto", sans-serif;
    font-size: 24px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .mobile-menu-overlay.active .mobile-menu-links a {
    opacity: 1;
    transform: translateX(0);
  }
  
  .mobile-social-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 0;
    margin-top: 0; /* Remove top margin */
  }
  
  .mobile-social-links .social-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  
  /* Media queries for responsive design */
  nav {
    background-color: #181818;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 40px; /* Default position */
    transition: top 0.3s ease;
    box-sizing: border-box;
  }
  
  nav.at-top {
    top: 0; /* Position when scrolled */
  }
  
  @media (max-width: 768px) {
    .nav-links {
      display: none;
    }
  
    .mobile-menu-button {
      display: block;
      margin-left: auto; /* Push button to the right */
    }
  
    nav {
      padding: 1rem 20px;
      justify-content: flex-start; /* Align items from the start */
      flex-direction: row;
    }
  
    .logo {
      padding-left: 0;
      order: 0; /* Ensure logo stays on left */
    }
  
    .top-navbar .right-links {
      padding-right: 20px;
    }
  }
  
  
  