body {
    font-family: "yu-gothic-pr6n", sans-serif;
    font-weight: normal;
    margin: 0;
    background-color: rgb(241, 241, 241);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
}

.contents{
    display: block;
    text-align: left;
    
    margin-top: -1.5vw;
    margin-left: 18vw;
    margin-right: 18vw;
}
.contents p{
    font-size: 80%;
}
.contents div{
    margin-top: 4vw;
    margin-bottom: 4vw;
}


.title_text p{
    text-align: left;
    display: block;
    font-size: 70%;
    color: black;
    margin-top: -1.5%;
    margin-bottom: -2%;
}
.title_text h2{
    text-align: left;
    font-size: 120%;
    color: black;
    font-weight:100;
}

/* 画像たち */
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -50px !important;  
}

.main-image {
    width: 80%;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

.main-image:hover {
    transform: scale(1.05);
}

/* サムネイル */
.thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 5px !important;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.2);
}

/* モーダル全体 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明の黒背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* キャプションと画像を縦並びに */
    justify-content: flex-start; /* 上部から要素を並べる */
    z-index: 1000;
    overflow: hidden !important; /* ページ全体を覆う */
}

/* キャプション */
.lightbox-caption {
    position: absolute;
    top: 20px; /* 上部の余白 */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の背景 */
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    max-width: 80%; /* キャプションの幅を制限 */
    z-index: 1001;
    box-sizing: border-box;
}

/* 拡大画像 */
.lightbox-image {
    max-width: 80%;
    max-height: 80%;
    margin-top: 60px; /* 画像とキャプションの間隔を確保 */
}

.lightbox.hidden {
    display: none; /* 完全に非表示 */
}

.youtube-frame {
    width: 80%;
    aspect-ratio: 16 / 9; /* アスペクト比を指定 */
    height: auto; /* 自動調整 */
    margin: 20px auto;
    display: block;
    border: none;
}

/* 閉じるボタン */
.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 矢印ボタン */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
}

.nav.prev {
    left: 20px;
}

.nav.next {
    right: 20px;
}

.caption{
    margin-top: -60px !important;
    text-align: left;
}
