/* ── Filter Bar ────────────────────────────────────── */

.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 2px solid #e4e6ef;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-filter-btn:hover {
    border-color: #ffd300;
    color: #111;
}

.gallery-filter-btn.active {
    background: #111;
    color: #ffd300;
    border-color: #111;
}

.gallery-filter-btn .sp-icon {
    flex-shrink: 0;
}

.gallery-count {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 28px;
    font-weight: 500;
}

/* ── Masonry Grid ─────────────────────────────────── */

.masonry-grid {
    column-count: 3;
    column-gap: 1.25rem;
    padding: 0;
}

@media (max-width: 992px)  { .masonry-grid { column-count: 2; } }
@media (max-width: 576px)  { .masonry-grid { column-count: 1; } }

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #0f1015;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateZ(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Hover Overlay ────────────────────────────────── */

.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,16,21,0.9) 0%, rgba(15,16,21,0.15) 50%, rgba(15,16,21,0.7) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    transition: opacity 0.3s ease;
}

.masonry-item:hover img          { transform: scale(1.05); }
.masonry-item:hover .item-overlay { opacity: 1; }

.overlay-badge {
    align-self: flex-start;
    background: #ffd300;
    color: #0f1015;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zoom-icon {
    align-self: center;
    margin-top: auto;
    width: 36px;
    height: 36px;
    color: white;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.masonry-item:hover .zoom-icon { transform: scale(1); }

/* ── Lightbox ─────────────────────────────────────── */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 88vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.active .lightbox-img { transform: scale(1); }

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}

.lightbox-close:hover { color: #ffd300; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255,211,0,0.15);
    border-color: #ffd300;
    color: #ffd300;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 768px) {
    .lightbox-nav { width: 40px; height: 40px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 12px; right: 16px; }
}

/* ── SVG Icon Defaults ────────────────────────────── */

.sp-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.sp-icon.text-primary {
    color: #ffd300;
}
