/* ====== メインコンテンツ ====== */
.main-content{
    position: relative;
    
    display: flex;
    flex-direction: column; 
    align-items: center;

    width: 100%;
    background-color: #EFC22B;
}
#gallery-text{
    margin-top: 60px;
    margin-bottom: 20px;
}

.group1{
    margin: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列にする */
    gap: 20px;
}

.group1 li{
    list-style-type: none;
    min-width: 150px;
    max-width: 300px;
    margin-bottom: 20px;
}
#pic-text{
    padding: 6px;
}
.img-container {
    width: 100%; /* min-width, max-width を削除し、親要素の幅いっぱいに */
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    display: flex; /* 画像を中でぴったりフィットさせる */
    align-items: center;
    justify-content: center;
}
.img-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}
.group1 li:nth-of-type(1) .img-container img {
    object-position: 36% 20%; /* ✅ 1番目の画像だけ上寄せ */
}
.group1 li:hover .img-container img {
    transform: scale(1.2); /* 画像を1.2倍に拡大 */
    filter: brightness(1.05)
}

/* ====== ポップアップ ====== */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

/* ✅ 画像をクリックしたときに表示 */
:target {
    display: flex;
}

/* ✅ ポップアップ内の画像 */
.popup-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
}

.popup-close {
    position: absolute;
    z-index: 1001;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* ✅ 画面全体をクリック範囲に */
    cursor: pointer;
}
.popup-img {
    display: block;
    margin: auto;
}
/* ✅ 「×」マークのデザイン */
.popup-x {
    position: absolute;
    z-index: 1000;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}