/* responsive-menu.css */
.main-header {
    width: 100%;
}

.main-nav {
    padding: 1rem;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

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

.nav-item {
    margin-left: 1rem;
}

.nav-item a {
    text-decoration: none;
    color: #333;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    transition: all 0.3s ease-in-out;
}

.submenu {
    width: 100%;
    background-color: #e0e0e0;
    padding: 0.5rem 0;
}

.submenu-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.submenu-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

@media screen and (max-width: 768px) {
    .logo-link {
        display: none; /* Hide logo in mobile view */
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #f8f8f8;
        padding: 1rem;
        text-align: center; /* Center align all menu items */
    }

    .nav-list.active {
        display: flex;
    }

    .nav-item {
        margin: 0.5rem 0;
        width: 100%; /* Full width for all items */
    }

    .nav-item a {
        display: block;
        width: 100%;
        text-align: center; /* Center align text within each item */
    }

    /* Ensure the first item is also centered */
    .nav-item:first-child {
        margin-left: 0;
    }

    .nav-item:first-child a {
        justify-content: center;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

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

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