/* ベーススタイル */
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: transparent;
    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;
}

/* メインコンテンツスタイル */
main {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* スライダースタイル */
.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;  /* 上方向の位置を固定 */
    left: 50%;  /* 左右方向の中央に配置 */
    transform: translateX(-50%);  /* 水平方向の中央に揃える */
    overflow: hidden;
    z-index: 0;
}

.slider::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 130px;
    height: 100%;
    background: linear-gradient(to right, white 110px, rgba(255, 255, 255, 0) 140px);
    z-index: 1;
}

.slides {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slides img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slides img.active {
    opacity: 1;
}

/* フッタースタイル */
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;
    }

    body {
        overflow-x: auto;
    }

    .container {
        width: 1600px;
        margin: 0 auto;
        height: calc(100vh - 160px);
        overflow-y: auto;
        margin: 80px 0 0 0px;
    }
}

/* スマホ表示時のスタイル */
@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: ;
        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;
    }

    /* 左のグラデーションを非表示にする */
    .slider::before {
        display: none;
    }
}
