@charset "utf-8";
/* CSS Document */


/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ナビゲーション */
#navi {
    width: 100%;
    background-color: #a8518e;
    position: relative;
}

#navi-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

#navi ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

#navi li {
    flex: 1;
    min-width: 150px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#navi li:last-child {
    border-right: none;
}

#navi a {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    color: #fff;
    text-align: center;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#navi a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ハンバーガーメニューボタン */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 15px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    width: 50px;
    height: 50px;
    line-height: 1;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ハンバーガーアイコンのアニメーション */
.menu-toggle span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.menu-toggle.active span {
    transform: rotate(180deg);
}

/* PC/SP表示切り替え */
.pc { display: block; }
.sp { display: none; }

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    /* ハンバーガーボタンを表示 */
    .menu-toggle {
        display: block;
    }
    
    /* PC用ナビを非表示 */
    #navi ul {
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #a8518e;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        z-index: 1000;
        
        /* アニメーション設定 */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    }
    
    /* メニューが開いている時 */
    #navi ul.active {
        max-height: 800px; /* 十分な高さを設定 */
        opacity: 1;
    }
    
    /* ナビゲーションの高さを確保 */
    #navi-inner {
        min-height: 60px;
    }
    
    #navi li {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        flex: none;
        min-width: auto;
        
        /* 各メニュー項目のアニメーション */
        transform: translateX(-20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    /* メニューが開いている時の各項目 */
    #navi ul.active li {
        transform: translateX(0);
        opacity: 1;
    }
    
    /* 順次表示のための遅延 */
    #navi ul.active li:nth-child(1) { transition-delay: 0.05s; }
    #navi ul.active li:nth-child(2) { transition-delay: 0.1s; }
    #navi ul.active li:nth-child(3) { transition-delay: 0.15s; }
    #navi ul.active li:nth-child(4) { transition-delay: 0.2s; }
    #navi ul.active li:nth-child(5) { transition-delay: 0.25s; }
    #navi ul.active li:nth-child(6) { transition-delay: 0.3s; }
    #navi ul.active li:nth-child(7) { transition-delay: 0.35s; }
    #navi ul.active li:nth-child(8) { transition-delay: 0.4s; }
    #navi ul.active li:nth-child(9) { transition-delay: 0.45s; }
    #navi ul.active li:nth-child(10) { transition-delay: 0.5s; }
    #navi ul.active li:nth-child(11) { transition-delay: 0.55s; }
    #navi ul.active li:nth-child(12) { transition-delay: 0.6s; }
    #navi ul.active li:nth-child(13) { transition-delay: 0.65s; }
    #navi ul.active li:nth-child(14) { transition-delay: 0.7s; }
    
    #navi li:last-child {
        border-bottom: none;
    }
    
    #navi a {
        padding: 15px 20px;
        text-align: left;
        font-size: 14px;
        transition: background-color 0.3s ease, padding-left 0.3s ease;
    }
    
    #navi a:hover {
        padding-left: 30px;
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* PC/SP表示切り替え */
    .pc { display: none; }
    .sp { display: block; }
}

@media screen and (max-width: 480px) {
    #navi a {
        font-size: 13px;
        padding: 12px 20px;
    }
    
    .menu-toggle {
        right: 15px;
        font-size: 18px;
    }
}