/* ============================================================
   SocialBar — Gallery page
   ============================================================ */

.sb-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 clamp(28px, 4vw, 44px);
}

.sb-gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 9999px;
    border: 1px solid var(--sb-border);
    background: var(--sb-surface);
    color: var(--sb-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}

.sb-gallery-filter__icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
}

.sb-gallery-filter:hover {
    border-color: var(--sb-accent);
    color: var(--sb-text-primary);
    transform: translateY(-1px);
}

.sb-gallery-filter.is-active {
    background: var(--sb-accent);
    border-color: var(--sb-accent);
    color: #fff;
}

.sb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.sb-gallery-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 4 / 3;
    border-radius: var(--sb-radius-sm, 16px);
    border: 1px solid var(--sb-border);
    background: linear-gradient(160deg, var(--sb-surface-2), var(--sb-surface-3));
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.sb-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-gallery-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-gallery-tile__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .25);
    color: #fff;
    font-size: 22px;
}

.sb-gallery-tile__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(to top, rgba(15,23,42,.82), transparent);
}

/* Empty / placeholder state */
.sb-gallery-tile--empty {
    padding: 24px;
}

.sb-gallery-tile__glow {
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, .16), transparent 60%);
    pointer-events: none;
}

.sb-gallery-tile__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--sb-shadow-sm);
    position: relative;
}

.sb-gallery-tile__label {
    position: relative;
    font-weight: 700;
    font-size: 15px;
    color: var(--sb-text-primary);
}

.sb-gallery-tile__note {
    position: relative;
    font-size: 12px;
    color: var(--sb-text-muted);
    text-align: center;
}

.sb-gallery-empty-note {
    max-width: 640px;
    margin: 28px auto 0;
    text-align: center;
    color: var(--sb-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.sb-gallery-empty-note a {
    color: var(--sb-accent);
    font-weight: 600;
    text-decoration: none;
}

.sb-gallery-empty-note a:hover {
    text-decoration: underline;
}

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