/* =========================================================
   gallery.html — 갤러리
   ========================================================= */

.page-header {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4e1 100%);
    padding: var(--gap-lg) 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.4rem;
    color: var(--text-main);
    margin: var(--gap-sm) 0;
}

.hero-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-strawberry);
    color: white;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* ---------- 필터 ---------- */
.gallery-filter {
    display: flex;
    gap: var(--gap-sm);
    justify-content: center;
    margin-bottom: var(--gap-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 2px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent-strawberry);
    color: var(--accent-strawberry);
}

.filter-btn.active {
    background: var(--accent-strawberry);
    border-color: var(--accent-strawberry);
    color: white;
}

/* ---------- 카테고리 타이틀 ---------- */
.gallery-section-title {
    margin: var(--gap-lg) 0 var(--gap-md);
    padding-bottom: var(--gap-sm);
    border-bottom: 2px solid var(--accent-strawberry);
    display: inline-block;
}

.gallery-section-title:first-of-type {
    margin-top: 0;
}

/* ---------- 그리드 ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.gallery-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s;
    cursor: pointer;
    margin: 0;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.gallery-item.hidden {
    display: none;
}

.img-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #fce4ec, #f3e5d8);
}

/* 이미지 + fallback 그라데이션 (img/*/*.png 덮어쓰면 자동 적용) */
.thumb-maewon { background: url('../img/char/maewon.png') center/cover no-repeat, linear-gradient(135deg, #e84393, #2d3436); }
.thumb-mio { background: url('../img/char/mio.png') center/cover no-repeat, linear-gradient(135deg, #fdcb9e, #fab1a0); }
.thumb-sulhwa { background: url('../img/char/sulhwa.png') center/cover no-repeat, linear-gradient(135deg, #ffeaa7, #fab1a0); }
.thumb-luna { background: url('../img/char/luna.png') center/cover no-repeat, linear-gradient(135deg, #a29bfe, #2d3436); }
.thumb-puding { background: url('../img/char/puding.png') center/cover no-repeat, linear-gradient(135deg, #ffeaa7, #d4a574); }
.thumb-kotone { background: url('../img/char/kotone.png') center/cover no-repeat, linear-gradient(135deg, #c44569, #2c2c54); }
.thumb-jiyeong { background: url('../img/char/jiyeong.png') center/cover no-repeat, linear-gradient(135deg, #f9c5a0, #d4a574); }
.thumb-carmilla { background: url('../img/char/carmilla.png') center/cover no-repeat, linear-gradient(135deg, #8e3a5e, #2c1e2a); }

.thumb-dabang { background: url('../img/place/maewon_dabang.png') center/cover no-repeat, linear-gradient(135deg, #d4a574, #7a4f3d); }
.thumb-maid { background: url('../img/place/katsuragi.png') center/cover no-repeat, linear-gradient(135deg, #ff8fa3, #ffd1dc); }
.thumb-book { background: url('../img/place/bunko.png') center/cover no-repeat, linear-gradient(135deg, #a8c69f, #5a7a4f); }
.thumb-dessert { background: url('../img/place/dessert.png') center/cover no-repeat, linear-gradient(135deg, #ffeaa7, #d4a574); }
.thumb-market { background: url('../img/place/market.png') center/cover no-repeat, linear-gradient(135deg, #f9e5d2, #8aa9d6); }
.thumb-night { background: url('../img/place/yashi.png') center/cover no-repeat, linear-gradient(135deg, #8aa9d6, #3d2e2e); }

.scene-1 { background: url('../img/scene/street_day.png') center/cover no-repeat, linear-gradient(135deg, #ffd6e0, #c8e6d0); }
.scene-2 { background: url('../img/scene/street_night.png') center/cover no-repeat, linear-gradient(135deg, #6c5ce7, #a29bfe); }
.scene-3 { background: url('../img/scene/downtown.png') center/cover no-repeat, linear-gradient(135deg, #d4a574, #7a4f3d); }
.scene-4 { background: url('../img/scene/multi.png') center/cover no-repeat, linear-gradient(135deg, #f9e5d2, #ff8fa3); }
.scene-5 { background: url('../img/scene/night_market.png') center/cover no-repeat, linear-gradient(135deg, #c44569, #f9e5d2); }
.scene-6 { background: url('../img/scene/villa.png') center/cover no-repeat, linear-gradient(135deg, #a8c69f, #f9e5d2); }

.gallery-item figcaption {
    padding: var(--gap-sm);
    text-align: center;
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- 라이트박스 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gap-md);
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 15, 15, 0.85);
}

.lightbox-content {
    position: relative;
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: -42px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-soft);
    cursor: pointer;
}

.lightbox-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f9e5d2;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    color: white;
    margin-top: var(--gap-sm);
    font-size: 1rem;
}
