/* navigation.css */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

nav a {
    color: black;
    text-decoration: none;
    padding: 10px;
}

.menu {
    position: absolute;
    top: 50px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    width: 200px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.menu.active {
    max-height: 400px;
}

.menu a {
    padding: 15px;
    color: white;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
}

.menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.menu a.current:hover {
    background-color: #e5e5e5;
}

.menu.active a {
    opacity: 1;
    transform: translateY(0);
}


.menu a.current {
    background-color: #f5f5f5;
    color: black;
    width: 100%;
}

.hamburger {
    display: block;
    width: 30px;
    height: 30px;
    cursor: pointer;
    position: relative;
}

.hamburger div {
    width: 100%;
    height: 4px;
    background-color: black;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* サブメニュー */
.submenu-wrapper {
    display: flex;
    flex-direction: column;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.85);
    transition: max-height 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.submenu a {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.submenu.active {
    max-height: 300px; /* サブメニューの高さ分 */
}

.submenu.active a {
    opacity: 1;
    transform: translateY(0);
}

.menu a:nth-child(1) { transition-delay: 0.1s; }
.menu a:nth-child(2) { transition-delay: 0.15s; }
.menu a:nth-child(3) { transition-delay: 0.2s; }
.menu.active .submenu-wrapper > a { 
    transition-delay: 0.25s; 
    opacity: 1; transform: translateY(0);
}
.menu a:nth-child(5) { transition-delay: 0.3s; }
.menu a:nth-child(6) { transition-delay: 0.35s; }
