/* Default (desktop) styles */

/* Make sure main menu is visible and horizontal on desktop */
.main-menu {
    display: flex;            /* Show menu on desktop */
    flex-direction: row;      /* Horizontal menu */
    position: static;         /* Normal flow */
    background-color: transparent;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    padding: 10px;
    z-index: 1001; /* above nav */
}

/* Hamburger bars style */
.hamburger span {
    width: 25px;
    height: 3px;
    background: #EFBF04;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animate hamburger to X when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Styles */
@media screen and (max-width: 768px) {

    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }

    nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Menu hidden by default */
    .main-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;       /* Adjust based on your nav height */
        right: 0;
        background-color: #222;
        margin: 0;
        padding: 0;
        z-index: 1000;
    }

    /* Show menu when active */
    .main-menu.active {
        display: flex;
    }

    .main-menu li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #444;
    }

    .main-menu a {
        width: 100%;
        background-color: #333;
        color: #EFBF04;
        display: block;
        padding: 10px;
        text-decoration: none;
    }

    /* Hide submenus by default on mobile */
    .submenu {
        display: none;
        position: static;
    }

    /* Show submenu on click or hover as needed (optional) */
    .main-menu li:hover .submenu {
        display: block;
    }

    /* Logo spacing */
    .logo {
        margin-bottom: 10px;
    }
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}
@media screen and (max-width: 768px) {
  /* give the menu its own fixed layer that can scroll */
  .main-menu {
    position: fixed;     /* stick to the viewport instead of the page flow */
    top: 70px;           /* just below your nav bar */
    right: 0;
    bottom: 0;           /* fill to bottom */
    width: 100%;
    background: #222;
    display: none;       /* stays hidden until .active is added */
    flex-direction: column;
    overflow-y: auto;    /* lets you scroll to Contact */
    padding-bottom: 100px; /* prevents overlap with footer animation */
    z-index: 1500;       /* above background, below header */
  }

  .main-menu.active {
    display: flex;
  }

  /* optional: keep the dogs/footers behind the menu */
  footer, #dog-animation, .robot-dogs {
    z-index: 500;
  }
}
