/**
 * スマホ用スティッキーメニューボタン
 * 768px以下でスクロール時に右下に固定表示
 */

/* スティッキーメニューボタン */
.sticky-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.sticky-menu-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sticky-menu-btn:hover {
    background-color: #555;
    transform: scale(1.05);
}

.sticky-menu-btn:active {
    transform: scale(0.95);
}

/* ハンバーガーアイコン */
.sticky-menu-btn .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
}

.sticky-menu-btn .menu-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* スマホ表示のみ */
@media screen and (max-width: 768px) {
    .sticky-menu-btn {
        display: flex;
    }

    /* ヘッダーのナビゲーションを非表示（スティッキーメニューを使用） */
    .main-navigation {
        display: none !important;
    }
}

/* オーバーレイメニュー */
.sticky-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sticky-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sticky-menu-overlay .menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 300px;
}

.sticky-menu-overlay .menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-menu-overlay .menu-content li {
    margin: 12px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.sticky-menu-overlay.active .menu-content li {
    opacity: 1;
    transform: translateY(0);
}

.sticky-menu-overlay.active .menu-content li:nth-child(1) { transition-delay: 0.1s; }
.sticky-menu-overlay.active .menu-content li:nth-child(2) { transition-delay: 0.15s; }
.sticky-menu-overlay.active .menu-content li:nth-child(3) { transition-delay: 0.2s; }
.sticky-menu-overlay.active .menu-content li:nth-child(4) { transition-delay: 0.25s; }
.sticky-menu-overlay.active .menu-content li:nth-child(5) { transition-delay: 0.3s; }
.sticky-menu-overlay.active .menu-content li:nth-child(6) { transition-delay: 0.35s; }
.sticky-menu-overlay.active .menu-content li:nth-child(7) { transition-delay: 0.4s; }

.sticky-menu-overlay .menu-content a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 12px 24px;
    display: block;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.sticky-menu-overlay .menu-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 閉じるボタン */
.sticky-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
}

.sticky-menu-close::before,
.sticky-menu-close::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: #fff;
    top: 50%;
    left: 50%;
}

.sticky-menu-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sticky-menu-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sticky-menu-close:hover::before,
.sticky-menu-close:hover::after {
    background-color: #ccc;
}
