/* ハンバーガーメニュー用CSS */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.hamburger-menu.active .hamburger-line:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* サイドバーオーバーレイ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* モバイルサイドバー */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.mobile-sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.mobile-sidebar-content .widget {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.mobile-sidebar-content .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.mobile-sidebar-content .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-content .widget li {
    margin-bottom: 10px;
}

.mobile-sidebar-content .widget a {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.mobile-sidebar-content .widget a:hover {
    background: #fff;
    color: #667eea;
    text-decoration: none;
    transform: translateX(5px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }
    
    .col-md-3 {
        display: none !important;
    }
    
    .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .site-main {
        padding-left: 0 !important;
        margin-top: 80px; /* ハンバーガーメニュー分の余白 */
    }
}

@media (max-width: 480px) {
    .mobile-sidebar {
        width: 280px;
        left: -300px;
    }
    
    .hamburger-menu {
        top: 15px;
        right: 15px;
    }
    
    .mobile-sidebar-content .widget {
        padding: 15px;
    }
}

/* アニメーション効果 */
.mobile-sidebar-content .widget {
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* フォーカス対応 */
.hamburger-btn:focus,
.mobile-sidebar-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* スクロールロック（モーダル開時） */
body.sidebar-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    .hamburger-menu,
    .sidebar-overlay,
    .mobile-sidebar {
        display: none !important;
    }
}