@charset "utf-8";


footer{
    position: static;
}
main{
    padding: 160px var(--size-gap-half);
    color: #fff;
}

/* ギャラリーのスタイル */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* スマホ表示では2列 */
    gap: 3px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* 正方形にするための設定 */
    width: 100%;
    padding-top: 100%; /* 正方形にするために縦横比を1:1に設定 */
}

.gallery-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像がサムネイルに収まるように調整 */
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
}

/* モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0; /* 初期状態では透明 */
    transform: scale(0.8); /* 初期状態では小さく表示 */
    transition: opacity 0.3s ease, transform 0.3s ease; /* アニメーションを追加 */
    flex-direction: column; /* 画像とキャプションを縦に並べる */
}

.modal.show {
    display: flex;
    opacity: 1; /* 表示時に完全に不透明 */
    transform: scale(1); /* 表示時に元のサイズに */
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    /* pointer-events: none; */
}


.modal-caption {
    color: white;
    font-size: .9rem;
    padding: 15px;
    text-align: center;
    /* background-color: rgba(0, 0, 0, 0.7); */
    margin-top: 10px;
    line-height: 1.5;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* .fade-in {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.loaded {
  opacity: 1;
} */

/* pc */
@media screen and (min-width:1024px) {
.gallery {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
}

/* ipad */
@media screen and (min-width:768px) and ( max-width:1024px) {
.gallery {
    grid-template-columns: repeat(3, 1fr);
}
}