/* gallery.css */

/* 전체 페이지 스타일 */
body {
    margin: 0;
    font-family: 'Noto Sans KR', Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

/* 갤러리 컨테이너 */
.gallery-container {
    text-align: center;
    padding: 20px;
}

.gallery-container h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* 갤러리 그리드 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 최소 너비 200px, 최대 1fr */
    gap: 10px; /* 이미지 간격 */
    margin-top: 20px;
}

/* 갤러리 이미지 카드 */
.polaroid {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.polaroid.visible {
    opacity: 1;
    transform: translateY(0);
}


.polaroid img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.polaroid:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .gallery-container h1 {
        font-size: 2rem;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 최대 5개로 고정 */
    }
    .polaroid:hover {
        transform: scale(1.02); /* 모바일에서는 확대 효과 축소 */
    }
}
