/*Hamburger*/
.hamburger {
    position: fixed;
    top: 5em;
    right: 5%;
    margin-left: -2em;
    margin-top: -45px;
    width: 2em;
    height: 45px;
    z-index: 5;
}
.hamburger div {
    position: relative;
    width: 3em;
    height: 7px;
    border-radius: 3px;
    margin-top: 8px;
    transition: all 0.3s ease-in-out;
    background-color: #ffffff;
}

/* Nav Styles */
.nav {
    position: fixed;
    width: 100%;
    height: 100%;
    top: -100%; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    transform: scale(0);
    background-color: rgb(5, 58, 79);
}
.nav-wrapper {
    position: relative;
    overflow: hidden;
    overflow-x: hidden;
    height: 100%;
}
nav {
    text-align: left;
    margin-left: 25%;
}
nav a {
    position: relative;
    text-decoration: none;
    font-size: 2em;
    display: inline-block;
    margin-top: 1.25em;
    transition: color 0.2s ease-in-out;
    letter-spacing: 1px;
    padding: 20px; /* Adjust the padding for elements */
    width: auto; /* Adjust the width of the rectangles */
    height: 10pt; /* Adjust the height of the rectangles */
    color: #fff;
}
nav a:before {
    content: '';
    height: 0;
    position: absolute;
    width: 0.25em;
    background-color: white;
    left: -0.5em;
    transition: all 0.2s ease-in-out;
}
nav a:hover {
    color: white;
}
nav a:hover:before {
    height: 100%;
    overflow-x: hidden;
}
/* Parent Links */
.nav-link {
    position: relative;
}

/* Submenu Styles */
.portfolio, .about, .work, .contact {
    position: relative;
}
.submenu {
    display: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: absolute; /* Absolute positioning to the parent */
    top: 100%; /* Position directly below the parent link */
    left: 0;
    z-index: 1000; /* Ensure submenu is above other elements */
    width: 250px; /* Adjust the width of the submenu */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, display 0s 0.3s; /* Add transition for display */
}
.submenu-visible {
    display: block; /* Ensure display is block when visible */
    opacity: 1 !important;
    transition: opacity 0.3s ease-in-out; /* Add transition for opacity */
}
.submenu li a {
    padding: 10px; /* Adjust the padding of the submenu items */
    display: block;
    color: #053A4F;
    width: 200px; /* Adjust the width of the submenu links */
    height: 70px; /* Adjust the height of the submenu links */
    margin-top: 0; /* Add margin to create space above the submenu items */
    font-size: 30px;
}

/* Hover effect to show submenu */
.nav-link:hover + .submenu,
.submenu:hover {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease-in-out; /* Add transition for opacity */
}

/* Animations */
#toggle:checked + .hamburger .top-bun {
    transform: rotate(-45deg);
    margin-top: 25px;
}
#toggle:checked + .hamburger .bottom-bun {
    opacity: 0;
    transform: rotate(45deg);
}
#toggle:checked + .hamburger .meat {
    transform: rotate(45deg);
    margin-top: -7px;
}
#toggle:checked + .hamburger + .nav {
    top: 0;
    transform: scale(1);
}
