/* Menu Styles */
nav.menu {
    background-color: #000;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 2px;
    padding-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: fixed; 
    width: 100%;
    top: 0; /* Align to top */
    left: 0;
    right: 0;
}

nav.menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

nav.menu ul li {
    margin: 5px;
}

nav.menu ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    display: block;
}

nav.menu ul li a:hover,
nav.menu ul li a.active {
    background-color: #555;
}

.search-container {
    display: flex;
    align-items: center;
    width: 40%;
    justify-content: center;
    padding: 8px 0;
}

.search-container input[type="text"] {
    padding: 5px;
    margin-right: 6px;
    border: none;
    border-radius: 4px;
    width: 70%;
    max-width: 400px;
    display: none;
}

.toggle-nav {
    cursor: pointer;
    display: inline-block;
}

.toggle-nav span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px;
    background-color: white; /* Change this to white */
    transition: all 0.3s ease-in-out;
}

.toggle-nav.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.toggle-nav.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

input#searchBar {
    width: 100%;
    padding: 10px;
    margin: 5px;
    color: #000;
}

img.search-icon {
    width: 30px;
    height: 30px;
    padding: 2px;
}

.search-container a#title {
    color: #ff0;
    text-decoration: none;
    margin: 6px;
    width: 80%;
    font-family: Cursive;
    padding: 5px;
}

.search-container button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

.search-container button:hover {}

.switch {
    padding-left: 5px;
    padding-right: 5px;
}

.toggle-nav {
    display: none;
    font-size: 24px;
    cursor: pointer;
    text-align: center;
    color: white;
}

@media (max-width: 768px) {
    .toggle-nav {
        display: block;
        width: 10%;
    }
    
    nav.menu ul {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    nav.menu ul.active {
        display: flex;
    }
    
    .search-container {
        width: 90%;
        order: -1; /* Ensure search box stays at the top */
    }
}
