.gallery-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #f0f0f0;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* モーダル表示用のスタイル */
.image-modal {
    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;
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-caption {
    text-align: center;
    padding: 1rem;
    color: #333;
    font-size: 1.1rem;
}

/* スマートフォン表示時はモーダルを無効化 */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        aspect-ratio: 3/2;
    }

    .gallery-item {
        cursor: default;
    }
} 