/* ハンバーガーボタンはPCでは隠す */
.menu-toggle {
    display: none;
}
/* リセットCSS（基本設定） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Shippori Mincho", "Yu Mincho", "YuMincho", serif; /* 明朝体 */
    color: #333;
    background-color: #fff;
    font-size: 15px;
    letter-spacing: 0.05em; /* 文字間を少し開ける */
    line-height: 1.8;
}
a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
a:hover { opacity: 0.6; }
ul { list-style: none; }

/* レイアウト全体 */
.container {
    display: flex;
    min-height: 100vh;
}

/* 左サイドバー */
.sidebar {
    width: 260px; /* サイドバーの幅 */
    padding: 60px 40px;
    position: fixed; /* 左に固定 */
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    z-index: 10;
}

.logo h1 {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
}

.sidebar nav ul li {
    margin-bottom: 12px;
}

.sidebar nav ul li a {
    font-size: 13px;
    display: block;
}

.copyright {
    margin-top: 60px;
    font-size: 10px;
    color: #aaa;
}

/* 右メインコンテンツ */
.content {
    margin-left: 260px; /* サイドバーの分だけ空ける */
    padding: 60px 80px;
    width: 100%;
}

/* ギャラリー（作品一覧） */
.gallery {
    display: grid;
    /* 画面幅に合わせて列数を自動調整（最低300px） */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 60px; /* 画像と画像の間隔 */
    margin-bottom: 100px;
}

.work-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.caption h2 {
    font-size: 14px;
    font-weight: normal;
}
.caption p {
    font-size: 12px;
    color: #888;
}

/* スマホ対応（画面が狭い時） */
/* ---- スマホ対応（ハンバーガーメニュー版） ---- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

/* ヘッダー全体 */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        z-index: 100;
        
        /* ▼▼▼ この1行を必ず追加してください！ ▼▼▼ */
        overflow: visible; 
    }

    /* ロゴとボタンを横並びにする内側の箱 */
    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        position: relative;
        z-index: 101; /* メニュー背景より手前に */
        background: #fff;
    }

    .logo h1 {
        margin-bottom: 0; /* PC用の余白をリセット */
        font-size: 16px;
    }

    /* --- ハンバーガーボタンの見た目 --- */
    .menu-toggle {
        display: block; /* スマホで表示 */
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 20px;
        position: relative;
    }

    /* 三本線のスタイル */
    .bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #333; /* 線の色 */
        position: absolute;
        left: 0;
        transition: all 0.3s; /* 動きをなめらかに */
    }
    /* 線の位置 */
    .bar:nth-child(1) { top: 0; }
    .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
    .bar:nth-child(3) { bottom: 0; }

    /* --- メニューが開いた時のボタンの変化（×印になる） --- */
    .menu-toggle.is-active .bar:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0; /* 真ん中の線を消す */
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }


    /* --- メニューリスト（開閉する部分） --- */
    .global-nav {
        position: absolute;
        top: 100%; /* ヘッダーのすぐ下 */
        left: 0;
        width: 100%;
        background: #fff;
        padding: 30px 0;
        border-bottom: 1px solid #eee;
        
        /* 隠すための設定（ここが重要） */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px); /* 少し上にずらしておく */
        transition: all 0.3s ease-in-out; /* フワッと出す */
    }

    /* メニューが開いた時（is-activeがついた時） */
    .global-nav.is-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0); /* 元の位置に戻す */
    }

    .global-nav ul li {
        margin-bottom: 20px;
        text-align: center;
    }

    .copyright {
        display: none; /* スマホではコピーライトを隠す */
    }

    /* 本文エリア */
    .content {
        margin-left: 0;
        padding: 40px 20px;
    }
    .gallery {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    /* ---- YouTube動画のレスポンシブ対応 ---- */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 の比率を維持するための魔法の数字 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
}