/* common.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

#head {
    background: #000;
    padding: 10px 0;
    border-bottom: 1px solid #e7e7e7;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000; /* 追加 */
}

#head_space {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

#head_space_left {
    flex: 1;
    padding-right: 50px;
}

#head_space_right {
    position: relative;
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.hamburger {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
    display: inline-block;
    z-index: 1001; /* 追加 */
}

#nav_menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #000;
    padding: 10px;
    z-index: 1001; /* 追加 */
    width: 200px; /* デフォルト幅 */
}

#nav_menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#nav_menu ul li {
    margin: 10px 0;
}

#nav_menu ul li a button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: white; /* 文字色を白に設定 */
}

/* ハンバーガーメニュー表示用 */
.hidden {
    display: none;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
    #nav_menu {
        display: block !important;
        position: static;
        background: none;
        padding: 0;
        width: auto; /* 幅をリセット */
    }
    #nav_menu ul {
        display: flex;
        flex-wrap: wrap;
    }
    #nav_menu ul li {
        margin: 0 10px;
    }
}

#top_image {
    position: relative;
    text-align: center;
    color: white;
    margin-top: 60px; /* ヘッダーの高さ分調整 */
}

#top_image video {
    width: 100%;
    height: auto;
}

#top_image h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: #ffffff;
    margin: 0;
    padding: 0 20px;
    /*background: rgba(0, 0, 0, 0.5);*/
    border-radius: 10px;
}

#main {
    padding: 20px;
}

#contents_area {
    max-width: 1200px;
    margin: 0 auto;
}

.sub_content_full, .sub_content_left, .sub_content_right, .sub_content_left2, .sub_content_right2 {
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 20px;
}

.sub_content_full {
    width: 100%;
    text-align: center;
}

.sub_content_left, .sub_content_right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sub_content_left2, .sub_content_right2 {
    width: 100%;
}

.sub_content_left img, .sub_content_right img, .sub_content_left2 img, .sub_content_right2 img {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

@media (min-width: 768px) {
    #head_space {
        padding: 0 40px;
    }

    .sub_content_left, .sub_content_right {
        width: 48%;
    }

    .sub_content_left2, .sub_content_right2 {
        width: 48%;
    }

    .sub_content_left, .sub_content_right, .sub_content_left2, .sub_content_right2 {
        display: inline-block;
        vertical-align: top;
    }
}

#footer {
    background: #000;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    width: 100%;
    bottom: 0;
}
footer .contents p {
    margin: 0;
}

@media (max-width: 768px) {
    #head_space {
        flex-direction: row;
    }

    #head_space_left {
        display: flex;
        justify-content: flex-start;
    }

    #head_space_right {
        display: flex;
        justify-content: flex-end;
    }

    #nav_menu {
        width: 100%; /* 幅を倍に */
    }

    #head_space_right nav ul {
        flex-direction: column;
    }

    #head_space_right nav ul li {
        margin: 0.5rem 0;
    }

    #main {
        padding: 1rem;
    }

    .sub_content_right, .sub_content_left, .sub_content_right2, .sub_content_left2 {
        width: 100%;
        float: none;
    }

    #top_image {
        margin-top: 60px; /* 小さい画面の場合にヘッダーの高さに合わせて調整 */
    }
}

.mySlides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;    /* 初期状態を透明に */
    transition: opacity 1.5s ease-in-out;
}

.mySlides.show {
    opacity: 1;
}

.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    height: auto;  /* 高さを自動にして画像の高さに合わせる */
}
#scrollTopBtn {
    display: none; /* スクロールした時のみ表示 */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(128, 128, 128, 0.8); /* グレーで透過 */
    color: white;
    cursor: pointer;
    border-radius: 50%; /* 正円 */
    width: 60px;
    height: 60px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#scrollTopBtn:hover {
    background-color: rgba(128, 128, 128, 1); /* ホバー時は透過なし */
}

/* 新しいスタイルを追加 */
@media (max-width: 768px) {
    #nav_menu ul {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-left: 0;
        margin-left: 0;
    }

    #nav_menu ul li {
        margin: 0 5px;
    }
}
