/* ===========================================================================
   BR Project Gallery - filterable portfolio grid (dark + gold)
   =========================================================================== */
.pxl-pg { --pxl-pg-accent: #bd9a5f; position: relative; }
.pxl-pg-wrap { position: relative; }

/* ---------- Header ---------- */
.pxl-pg--header { position: relative; z-index: 1; margin-bottom: 34px; text-align: center; }
.pxl-pg--header > * { margin-left: auto; margin-right: auto; }
.pxl-pg--eyebrow {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    color: var(--pxl-pg-accent); font-size: 13px; font-weight: 600;
    letter-spacing: 2.4px; text-transform: uppercase; margin-bottom: 16px;
}
.pxl-pg--eyebrow-line { display: inline-block; width: 30px; height: 1px; background: var(--pxl-pg-accent); opacity: .8; }
.pxl-pg--title { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; font-weight: 700; margin: 0 0 16px; letter-spacing: -.01em; color: #fff; }
.pxl-pg--intro { margin: 0; font-size: 16px; line-height: 1.8; color: rgba(255, 255, 255, .62); max-width: 620px; }

/* ---------- Filters ---------- */
.pxl-pg--filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 44px; }
.pxl-pg--filter {
    appearance: none; cursor: pointer;
    background: rgba(255, 255, 255, .04) !important; color: rgba(255, 255, 255, .72) !important;
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 40px;
    padding: 10px 22px; font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
    display: inline-flex; line-height: 1;
}
.pxl-pg--filter:hover { border-color: color-mix(in srgb, var(--pxl-pg-accent) 60%, transparent); color: #fff !important; transform: translateY(-1px); }
.pxl-pg--filter.is-active { background: var(--pxl-pg-accent) !important; border-color: var(--pxl-pg-accent); color: #171514 !important; }

/* ---------- Grid ---------- */
.pxl-pg--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pxl-pg--grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pxl-pg--grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pxl-pg--grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Card ---------- */
.pxl-pg-card {
    position: relative; display: block; overflow: hidden; border-radius: 16px;
    aspect-ratio: 4 / 3; background: #151515; text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .5s cubic-bezier(.22,1,.36,1), border-color .4s ease, box-shadow .5s ease;
}
.pxl-pg-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--pxl-pg-accent) 45%, transparent);
    box-shadow: 0 34px 62px -34px rgba(0, 0, 0, .9);
}
.pxl-pg-card.is-hidden { display: none; }

.pxl-pg-card__media { position: absolute; inset: 0; display: block; }
.pxl-pg-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s cubic-bezier(.22,1,.36,1); }
.pxl-pg-card:hover .pxl-pg-card__media img { transform: scale(1.07); }

.pxl-pg-card__shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, .04) 30%, rgba(8, 8, 8, .78) 100%);
    transition: background .4s ease;
}
.pxl-pg-card:hover .pxl-pg-card__shade { background: linear-gradient(180deg, rgba(10, 10, 10, .12) 20%, rgba(8, 8, 8, .88) 100%); }

.pxl-pg-card__cat {
    position: absolute; top: 16px; left: 16px; z-index: 2;
    color: #171514 !important; background: var(--pxl-pg-accent);
    font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
    padding: 6px 12px; border-radius: 30px;
}
.pxl-pg-card__info { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.pxl-pg-card__title { color: #fff !important; font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; transition: color .3s ease; }
.pxl-pg-card:hover .pxl-pg-card__title { color: var(--pxl-pg-accent) !important; }
.pxl-pg-card__loc { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .72) !important; font-size: 13px; font-weight: 500; }
.pxl-pg-card__loc-icon { display: inline-flex; color: var(--pxl-pg-accent); }
.pxl-pg-card__loc-icon svg { width: 14px; height: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .pxl-pg--grid, .pxl-pg--grid.cols-3, .pxl-pg--grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .pxl-pg--grid, .pxl-pg--grid.cols-2, .pxl-pg--grid.cols-3, .pxl-pg--grid.cols-4 { grid-template-columns: 1fr; }
    .pxl-pg--filters { gap: 8px; margin-bottom: 32px; }
    .pxl-pg--filter { padding: 9px 16px; font-size: 12px; }
    .pxl-pg--header { margin-bottom: 26px; }
}

/* ---------- color-mix fallback ---------- */
@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
    .pxl-pg--filter:hover { border-color: rgba(189, 154, 95, .6); }
    .pxl-pg-card:hover { border-color: rgba(189, 154, 95, .45); }
}
