/* Navbar Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500&display=swap');

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white; /* Return to white */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #222;
    z-index: 1000;
    font-size: 16px;
    font-family: "Noto Sans JP", sans-serif;
}

#nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    min-height: 90px;
}

/* Logo */
.msa-logo {
    display: flex;
    align-items: center;
    width: max-content;
    height: auto;
}

.msa-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

/* Navigation Main */
#nav-main {
    display: flex;
    align-items: center;
}

#nav-list-bg {
    display: none;
}

/* Navigation List */
#nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    align-items: center;
}

.nav-list-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 350;
    font-family: inherit;
    transition: color 0.3s ease, font-weight 0.3s ease, background-color 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-link:hover {
    color: #ff6b35;
    font-weight: 600;
}

.nav-link::after {
    display: none;
}

.nav-link:hover::after {
    display: none;
}

/* Active link */
.nav-link.active {
    color: #fff;
    background-color: #d32f2f;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
}

.nav-link.active::after {
    display: none;
}

.nav-link.active:hover {
    color: #fff;
}

/* Mobile Toggle Button - Hidden by default */
#nav-toggle-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    user-select: none;
}

#nav-btn-close {
    display: none !important;
}

#nav-toggle-btn span {
    display: inline-block;
}

#defocus,
#mobile-focus-bg {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #nav-content {
        padding: 0 20px;
        height: 60px;
        min-height: 60px;
    }

    .msa-logo {
        height: auto;
    }

    .msa-logo img {
        height: 45px;
    }

    /* Show mobile toggle button */
    #nav-toggle-btn {
        display: block;
        z-index: 1002;
    }

    #nav-toggle-btn span {
        font-size: 28px;
        line-height: 1;
    }

    /* Hide desktop nav list */
    #nav-main {
        position: relative;
    }

    #nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
    }

    #nav-list.active {
        right: 0;
    }

    #nav-list-bg {
        display: none;
    }

    #mobile-focus-bg {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    #mobile-focus-bg.active {
        display: block;
        opacity: 1;
    }

    #nav-toggle-btn[aria-expanded="true"] #nav-btn-open {
        display: inline-block;
    }

    #nav-toggle-btn[aria-expanded="true"] #nav-btn-close {
        display: none;
    }

    .nav-link::after {
        display: none;
    }
}

@media (max-width: 480px) {
    #nav-content {
        padding: 0 16px;
        height: 56px;
        min-height: 56px;
    }

    .msa-logo img {
        height: 40px;
    }

    #nav-list {
        width: 260px;
        padding: 80px 24px 24px;
        gap: 8px;
    }

    .nav-list-item {
        width: 100%;
    }

    .nav-link {
        font-size: 16px;
        padding: 10px 0;
        display: block;
        width: 100%;
    }

    .nav-link.active {
        padding: 10px 12px;
        font-size: 15px;
    }

    #nav-toggle-btn span {
        font-size: 26px;
    }
}
