/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* ハンバーガーボタン */
.hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-button span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

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

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

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

/* メインコンテンツ */
.main-content {
    margin-top: 80px;
    padding: 2rem;
}

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

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

/* サイドメニュー */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    /* スクロールバーを非表示 */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.side-menu::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

.side-menu.active {
    right: 0;
}

/* メニューヘッダー */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #333;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* メニューコンテンツ */
.menu-content {
    padding: 0;
}

.menu-item {
    border-bottom: 1px solid rgb(190, 200, 210);
}

.menu-toggle,
.submenu-toggle {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.menu-toggle:hover {
    background-color: rgb(65, 100, 150);
}

.submenu-toggle:hover {
    background-color: rgb(180, 195, 215);
}

.menu-toggle {
    font-weight: bold;
    font-size: 1.1rem;
    position: sticky;
    background-color: rgb(70, 105, 155);
    color: white;
    z-index: 10;
    border-bottom: 1px solid rgb(110, 130, 160);
}

.submenu-toggle {
    padding-left: 2rem;
    background-color: rgb(200, 210, 225);
    color: rgb(60, 70, 85);
    border-bottom: 1px solid rgb(185, 195, 210);
    position: sticky;
    z-index: 9;
}

.arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.arrow.rotated {
    transform: rotate(180deg);
}

/* サブメニュー */
.submenu {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

.submenu.active {
    height: auto;
    overflow: visible;
}

.submenu-item {
    border-bottom: 1px solid #f0f0f0;
}

/* リンクリスト */
.link-list {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    background-color: rgb(240, 245, 250);
}

.link-list.active {
    height: auto;
}

.link-item {
    display: block;
    padding: 0.8rem 3rem;
    text-decoration: none;
    color: rgb(70, 75, 85);
    border-bottom: 1px solid rgb(225, 230, 235);
    transition: background-color 0.2s ease;
}

.link-item:hover {
    background-color: rgb(230, 235, 245);
}

.link-item:last-child {
    border-bottom: none;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .side-menu {
        width: 280px;
    }
    
    .header-content {
        padding: 0.8rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 360px) {
    .side-menu {
        width: 100%;
        right: -100%;
    }
    
    .side-menu.active {
        right: 0;
    }
} 