/* ベーススタイル */
body {
    font-family: "Times New Roman", serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダースタイル */
header {
    padding: 20px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    font-family: Arial, sans-serif;
}

header h1 .home-link {
    text-decoration: none;
    color: inherit;
}

/* ハンバーガーメニューのスタイル */
.hamburger {
    display: none; /* PC表示時は非表示 */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 30;
    position: fixed;
    top: 25px;
    right: 25px;
}

.hamburger span {
    display: block;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
}

/* コンテナスタイル */
.container {
    display: flex;
    flex: 1;
    margin-top: 80px;
    position: relative;
}

/* ナビゲーションスタイル */
nav {
    padding: 20px;
    width: 250px;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 10;
}

nav ul li {
    margin: 20px 0;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 1.2em;
}

/* サブメニューのスタイル */
nav ul .submenu {
    display: none;
    padding-left: 20px;
}

nav ul li:hover > .submenu {
    display: block; /* PC表示時にホバーでサブメニューを表示 */
}

.submenu li {
    margin: 10px 0;
}

.submenu li a {
    font-size: 1em;
    color: #333;
}

/* About SANDBOX のスタイル */
.about-heading {
    margin: 150px 0 0 140px; /* PC表示時の位置を調整 */
}

/* メインコンテンツのスタイル */
.about-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* 左揃え */
    margin: 50px 0 0 140px; /* PC表示時の位置を調整 */
    align-items: flex-start;
}

/* 各コンテナのスタイル */
.about-block {
    width: 300px;
    margin: 20px;
    text-align: left; /* 左揃え */
}

/* Studio SANDBOX のスタイル */
.studio-info {
    margin: 50px 0 0 140px; /* 上下左右のマージンを調整 */
    text-align: left; /* 左揃え */
}

/* H2とH3のスタイル */
h2, h3 {
    margin: 0;
    padding: 0;
    text-align: ce; /* 左揃え */
}

/* フッタースタイル */
footer {
    padding: 10px;
    text-align: center; /* フッターは中央揃えのまま */
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
    z-index: 10;
}

/* PC表示時のレイアウト */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    .container {
        margin-top: 80px;
    }

    .about-heading {
        text-align: center; /* 左揃え */
        margin: 150px 0 0 140px;
    }

    .about-container {
        flex-wrap: wrap;
        justify-content: ; /* 左揃え */
        margin: 50px 0 0 140px;
    }

    .about-block {
        width: 500px;
        margin: 20px;
    }

    .studio-info {
        text-align: center; /* 左揃え */
        margin: 50px 0 0 140px;
    }
}

/* スマホ表示時のレイアウト */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* ナビゲーションを非表示にする */
    nav {
        display: none;
    }

    /* ハンバーガーメニューが開いたときのスタイル */
    nav {
        display: block;
        position: fixed;
        top: -100vh; /* 修正: 画面の高さ分上に移動 */
        left: 0;
        width: 100%;
        background-color: #fff;
        padding-top: 550px; /* ヘッダーの高さ分余白を追加 */
        z-index: 10;
        overflow-y: auto; /* コンテンツが多い場合はスクロール */
        transition: top 0.5s ease; /* アニメーションを追加 */
    }

    /* メニューが開いたときの位置 */
    nav.open {
        top: 0;
    }

    nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 20px 0;
        text-align: center;
    }

    nav ul li a {
        font-size: 1.5em;
        color: #333;
        text-decoration: none;
    }

    /* サブメニューの開閉 */
    nav ul .submenu {
        display: none;
    }

    nav ul li.open > .submenu {
        display: block;
    }

    /* サブメニューのリンクスタイル */
    .submenu li a {
        font-size: 1em;
        padding: 10px;
        display: block;
        color: #333;
    }

    /* About SANDBOX のスタイル */
    .about-heading {
        margin: 150px 0px 0px 0px; /* スマホ表示時の位置を調整 */
        width: 90%;
        text-align: center; /* 左揃え */
    }

    /* メインコンテンツのレイアウト調整 */
    .about-container {
        flex-direction: column;
        align-items: flex-start; /* 左揃え */
        width: 90%;
        margin: 60px auto 0 auto;
    }

    .about-block {
        width: 100%;
        margin: 20px 0;
        text-align: left; /* 左揃え */
    }

    /* Studio SANDBOX のスタイルを調整 */
    .studio-info {
        margin: 20px 20px 0 20px;
        width: 90%;
        text-align: center; /* 左揃え */
    }
}
