/* ================= GALLERY PAGE ================= */

/* Filter Buttons */
.filter-buttons {
    text-align: center;
    margin-bottom: 40px;
}
.filter-btn {
    background: var(--white);
    border: 1px solid var(--gold);
    color: var(--dark);
    padding: 10px 20px;
    margin: 5px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--gold);
    color: var(--white);
}

/* Masonry Grid */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}
.gallery-item {
    margin-bottom: 20px;
    break-inside: avoid;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.gallery-item img,
.gallery-item video {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 0;
}
.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}
.gallery-item {
    cursor: pointer;
}
.gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(5,31,32,0.55);
    color: #DAF1DE;
    pointer-events: none;
    transition: background 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover .gallery-play-icon {
    background: var(--gold);
    transform: translate(-50%, -50%) scale(1.08);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}
.lightbox .close {
    position: absolute;
    top: 20px; right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
#caption {
    margin: 20px auto;
    text-align: center;
    color: var(--white);
    font-size: 1.2rem;
}

/* ================= EXPLORE BY CATEGORY (museum-style showcase) ================= */
.kg-gallery-cats { padding: 90px 0 40px; background: var(--kaaya-ivory, #DAF1DE); }
.kg-gallery-cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
}
.kg-gallery-cat { display: flex; flex-direction: column; }
.kg-gallery-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(5, 31, 32, 0.18);
}
.kg-gallery-cat-head h3 {
    font-family: var(--kg-heading-font, 'Cormorant Garamond', serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--kaaya-black, #051F20);
    margin: 0;
}
.kg-gallery-cat-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    flex-shrink: 0;
    border: 1px solid var(--kaaya-black, #051F20);
    border-radius: 0;
    color: var(--kaaya-black, #051F20);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.kg-gallery-cat-head a svg { width: 14px; height: 14px; }
.kg-gallery-cat-head a:hover { background: var(--kaaya-olive, #235347); border-color: var(--kaaya-olive, #235347); color: var(--kaaya-white, #DAF1DE); transform: translateX(2px); }
.kg-gallery-cat-media { width: 100%; aspect-ratio: 4/3; overflow: hidden; margin-bottom: 24px; }
.kg-gallery-cat-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--kg-ease, ease); }
.kg-gallery-cat:hover .kg-gallery-cat-media img { transform: scale(1.05); }
.kg-gallery-cat-list { list-style: none; margin: 0; padding: 0; }
.kg-gallery-cat-list li { border-bottom: 1px solid rgba(5, 31, 32, 0.12); }
.kg-gallery-cat-list li:first-child { border-top: 1px solid rgba(5, 31, 32, 0.12); }
.kg-gallery-cat-list a {
    display: block;
    padding: 13px 2px;
    font-family: var(--kg-body-font, 'Inter', sans-serif);
    font-size: 15px;
    color: var(--kaaya-charcoal, #0B2B26);
    text-decoration: none;
    transition: color 0.25s ease, padding-left 0.25s ease;
}
.kg-gallery-cat-list a:hover { color: var(--kaaya-olive, #235347); padding-left: 8px; }

@media (max-width: 900px) {
    .kg-gallery-cats-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* ================= THE COLLECTION (gallery grid header + captions) ================= */
.kg-gallery-collection { background: var(--kaaya-ivory, #DAF1DE); }
.kg-gallery-collection-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(5, 31, 32, 0.18);
}
.kg-gallery-collection-head .kg-heading { margin-bottom: 0; }
.kg-gallery-collection-head .kg-eyebrow { margin-bottom: 10px; }
.kg-gallery-collection-head .kg-link-cta { flex-shrink: 0; }
@media (max-width: 700px) {
    .kg-gallery-collection-head { flex-direction: column; align-items: flex-start; }
}

.kg-gallery-item-caption {
    margin: 14px 2px 0;
    font-family: var(--kg-body-font, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--kaaya-black, #051F20);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.kg-gallery-item-caption span {
    font-weight: 400;
    font-size: 12.5px;
    color: var(--kaaya-charcoal, #0B2B26);
    opacity: 0.7;
}

.kg-gallery-more { display: none; }

.kg-gallery-loadmore-wrap { display: flex; justify-content: center; margin-top: 44px; }
