/* 基本的なスタイル */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* ヘッダーとフッター */
header, footer {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

footer {
    margin-top: 40px;
    font-size: 0.9em;
}

/* メインコンテンツ */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ギャラリーのレイアウト */
.gallery {
    display: grid;
    /* 画面幅に応じて列数を自動調整 */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像の比率を保ったままボックスにフィットさせる */
    display: block;
    cursor: pointer;
}

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

/* ライトボックスのスタイル */
.lightbox {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #bbb;
}

#caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.1em;
    position: absolute;
    bottom: 5%;
    width: 100%;
}