@charset UTF-8;
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700&display=swap');

/* ── 全体ラッパー ── */
.gallery_all {
    width: 85%;
    margin: 60px auto 120px;
    min-height: 300px;
}

/* ── ローディング ── */
.gallery_loading {
    text-align: center;
    padding: 80px 0;
    font-size: 18px;
    color: #797979;
}
.gallery_loading .fa-spinner {
    color: #CB0606;
    margin-right: 8px;
}

/* ── エラー ── */
.gallery_error {
    text-align: center;
    padding: 80px 0;
    font-size: 16px;
    color: #797979;
}

/* ── 空メッセージ ── */
.gallery_empty {
    text-align: center;
    padding: 80px 0;
    font-size: 16px;
    color: #797979;
}

/* ── グリッド ── */
.gallery_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── カード ── */
.gallery_card {
    background: #fff;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}
.gallery_card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}
.gallery_card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.gallery_card:hover img {
    opacity: 0.9;
}
.gallery_card_caption {
    padding: 10px 14px;
    font-size: 13px;
    color: #3e3d3d;
    line-height: 1.5;
}

/* ── ライトボックス ── */
.gallery_lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.gallery_lightbox.active {
    display: flex;
}
.gallery_lightbox_overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
.gallery_lightbox_content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gallery_lightbox_content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}
.gallery_lightbox_caption {
    margin-top: 12px;
    color: #fff;
    font-size: 14px;
}
.gallery_lightbox_close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity .2s;
}
.gallery_lightbox_close:hover {
    opacity: 0.7;
}

/* ── レスポンシブ ── */
@media screen and (max-width: 992px) {
    .gallery_all {
        width: 95%;
        margin: 40px auto 60px;
    }
    .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery_card img {
        height: 160px;
    }
}

@media screen and (max-width: 480px) {
    .gallery_grid {
        grid-template-columns: 1fr;
    }
    .gallery_card img {
        height: 200px;
    }
}
