/* ==========================================================================
   NAVBAR
   ========================================================================== */
   .navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: clamp(48px, 8vh, 64px);
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 5;
  }
  
  /* Logo (placed in the first navbar) */
  .logo img {
    position: absolute;
    max-height: clamp(80px, 15vw, 150px);
    width: auto;
    height: auto;
    z-index: 10;
  }
  
  /* ==========================================================================
     HAMBURGER BUTTON
     ========================================================================== */
  .hamburger {
    position: fixed;
    top: clamp(2rem, 4vw, 5rem);
    right: clamp(1.5rem, 4vw, 5rem);
    width: clamp(30px, 6vw, 50px);
    height: clamp(20px, 4vw, 30px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 30;
  }
  
  /* Base state for hamburger bars */
  .hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background-color: black;  /* Base color (non-hero pages or scrolled/active state) */
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    backface-visibility: hidden;
    transform-origin: center;  /* Ensure rotation occurs around the center */
  }
  
  /* For hero pages, if not scrolled or active, show white bars */
  .navbar.has-hero .hamburger:not(.dark):not(.active) .bar {
    background-color: white;
  }

  /* When the hamburger is active (menu open), force black */
  .hamburger.active .bar {
    background-color: black;
  }
  
  /* Transformations to form the "X" when active */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(12.5px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-12.5px) rotate(-45deg);
  }
  
  /* ==========================================================================
     NAV MENU (SLIDE-OUT)
     ========================================================================== */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 380px;
    height: 100%;
    background-color: white;
    color: #333;
    font-family: sans-serif;
    font-weight: 300;
    font-size: 2rem;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 20;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  /* ==========================================================================
     NAV MENU LOGO
     ========================================================================== */
  .nav-menu-logo {
    position: absolute;
    top: 6.5rem;  /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .nav-menu-logo img {
    max-width: 150px;
    height: auto;
  }
  
  /* ==========================================================================
     NAV MENU LINKS
     ========================================================================== */
  .nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 18rem 0 0;
    display: flex;
    flex-direction: column;
  }
  
  .nav-menu li {
    margin: 0;
    padding: 0;
  }
  
  .nav-menu li a {
    display: block;
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1.2rem);
    background: white;
    color: #333;
    text-align: center;
    text-decoration: none;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .nav-menu li a:hover {
    background-color: #f7f7f7;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  }
  
  /* Media Queries */
  @media screen and (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .logo img {
        max-height: 100px;
    }

    .hamburger {
        top: 2rem;
        right: 2rem;
        width: 40px;
        height: 25px;
    }

    .nav-menu {
        width: 100%;
        max-width: none;
    }

    .nav-menu-logo {
        top: 4rem;
    }

    .nav-menu-logo img {
        max-width: 120px;
    }
  }