/*
 * Visualise - Work page grid with filters (17 Nov 2026). Loaded on /work only (inc/visualise-work.php).
 * The cards keep the theme's own classes (work-item, content, bg-img, workdesc, deliverables) so they
 * look as before; this file adds the filters, the picture inside .bg-img and a flex grid (the theme's
 * float grid clears every odd card, which breaks rows once cards are hidden).
 * No fixed gold here (brand rule: gold is the moving foil, snippet 11258).
 */

/* ---------- the grid ---------- */
.vwk .vwk-grid { display: flex; flex-wrap: wrap; align-items: flex-start; }
.vwk .vwk-grid > .vwk-item { float: none; clear: none !important; }
.vwk .vwk-item.is-hidden, .js .vwk .vwk-item.is-more { display: none; }
.vwk .vwk-item .bg-img picture { display: block; position: absolute; inset: 0; border-radius: inherit; }
.vwk .vwk-item .bg-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: inherit; display: block; }
.vwk .vwk-item .bg-img { background: #1c1c1c; overflow: hidden; }
.vwk .vwk-item a.work-link { display: block; text-decoration: none; }
.vwk .vwk-item.is-new { animation: vwk-in .45s ease both; }
@keyframes vwk-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vwk .vwk-item.is-new { animation: none; } }

/* ---------- filter labels and buttons (shared) ---------- */
.vwk .vwk-k { display: block; margin: 0 0 12px; font: 500 12px/1.4 Raleway, sans-serif; letter-spacing: .26em; text-transform: uppercase; color: rgba(242, 242, 242, .62); }
.vwk .vwk-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.vwk button.vwk-chip { display: inline-flex; align-items: baseline; gap: 7px; margin: 0; padding: 9px 16px 8px; border: 1px solid rgba(242, 242, 242, .28); border-radius: 999px; background: transparent; color: #F2F2F2; font: 400 14px/1.3 Raleway, sans-serif; letter-spacing: .01em; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; -webkit-appearance: none; appearance: none; }
.vwk button.vwk-chip:hover { border-color: rgba(242, 242, 242, .85); }
.vwk button.vwk-chip:focus-visible { outline: 2px solid #F2F2F2; outline-offset: 2px; }
.vwk button.vwk-chip.is-on { border-color: #F2F2F2; background: #F2F2F2; color: #111; }
.vwk button.vwk-chip .vwk-n { font-size: 12px; opacity: .55; }
.vwk button.vwk-chip.is-empty { opacity: .35; }
.vwk button.vwk-chip.is-empty:not(.is-on) { cursor: default; }

/* status line: "12 of 113 projects" + Clear filters */
.vwk .vwk-status { display: flex; align-items: baseline; gap: 22px; margin: 0 0 26px; }
.vwk p.vwk-count { margin: 0; font: 300 15px/1.5 Raleway, sans-serif; color: rgba(242, 242, 242, .7); }
.vwk button.vwk-reset, .vwk button.vwk-reset-inline { margin: 0; padding: 0; border: 0; background: none; color: #F2F2F2; font: 400 15px/1.5 Raleway, sans-serif; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.vwk button.vwk-reset[hidden] { display: none; }
.vwk p.vwk-empty { margin: 10px 0 60px; font: 300 18px/1.6 Raleway, sans-serif; color: rgba(242, 242, 242, .8); }
.vwk p.vwk-empty[hidden] { display: none; }
.vwk .vwk-more-wrap { margin: 10px 0 80px; }
.vwk button.vwk-more { min-width: 220px; }
.vwk button.vwk-more[hidden] { display: none; }

/* ---------- a: two rows of buttons ---------- */
.vwk--a .vwk-bar, .vwk--b .vwk-bar { display: flex; flex-direction: column; gap: 26px; margin-top: 10px; margin-bottom: 44px; }

/* ---------- b: one row of buttons + a menu ---------- */
.vwk--b .vwk-bar { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; }
.vwk--b .vwk-group[data-dim="type"] { flex: 1 1 560px; }
.vwk--b .vwk-group--select { flex: 0 0 auto; min-width: 280px; }
.vwk .vwk-select { position: relative; display: block; }
.vwk .vwk-select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1px solid #F2F2F2; border-bottom: 1px solid #F2F2F2; transform: rotate(45deg); pointer-events: none; }
.vwk .vwk-select select { width: 100%; margin: 0; padding: 10px 46px 9px 18px; border: 1px solid rgba(242, 242, 242, .28); border-radius: 999px; background: transparent; color: #F2F2F2; font: 400 14px/1.3 Raleway, sans-serif; cursor: pointer; -webkit-appearance: none; appearance: none; }
.vwk .vwk-select select:hover, .vwk .vwk-select select:focus { border-color: rgba(242, 242, 242, .85); outline: none; }
.vwk .vwk-select select.is-on { border-color: #F2F2F2; }
.vwk .vwk-select option { color: #111; background: #fff; }

/* ---------- c: list down the left ---------- */
.vwk--c .vwk-body { display: flex; align-items: flex-start; gap: 0 48px; margin-top: 10px; }
.vwk--c .vwk-rail { flex: 0 0 230px; position: sticky; top: 100px; margin-top: 4px; display: flex; flex-direction: column; gap: 34px; }
.vwk--c .vwk-main { flex: 1 1 auto; min-width: 0; }
.vwk--c .vwk-rail .vwk-chips { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.vwk--c .vwk-rail button.vwk-chip { justify-content: flex-start; width: 100%; padding: 7px 0; border: 0; border-radius: 0; background: none; color: rgba(242, 242, 242, .72); font-size: 16px; text-align: left; }
.vwk--c .vwk-rail button.vwk-chip:hover { color: #F2F2F2; }
.vwk--c .vwk-rail button.vwk-chip.is-on { background: none; color: #F2F2F2; font-weight: 500; }
.vwk .vwk-slash { display: none; }
.vwk--c .vwk-rail button.vwk-chip.is-on .vwk-slash { display: inline-block; margin: 0 2px 0 0; font-weight: 300; }
.vwk--c .vwk-rail button.vwk-chip .vwk-n { margin-left: auto; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
	.vwk--c .vwk-body { display: block; }
	.vwk--c .vwk-rail { position: static; gap: 22px; margin: 0 0 36px; }
	.vwk--c .vwk-rail .vwk-chips { flex-direction: row; flex-wrap: wrap; gap: 10px; }
	.vwk--c .vwk-rail button.vwk-chip { width: auto; padding: 9px 16px 8px; border: 1px solid rgba(242, 242, 242, .28); border-radius: 999px; font-size: 14px; }
	.vwk--c .vwk-rail button.vwk-chip.is-on { border-color: #F2F2F2; background: #F2F2F2; color: #111; font-weight: 400; }
	.vwk--c .vwk-rail button.vwk-chip.is-on .vwk-slash { display: none; }
	.vwk--c .vwk-rail button.vwk-chip .vwk-n { margin-left: 0; }
}
@media (max-width: 767px) {
	.vwk .vwk-bar { margin-bottom: 30px; }
	/* buttons scroll sideways in one line on phones rather than stacking into a wall */
	.vwk .vwk-chips, .vwk--c .vwk-rail .vwk-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -30px; padding: 2px 30px 6px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.vwk .vwk-chips::-webkit-scrollbar { display: none; }
	.vwk button.vwk-chip { flex: 0 0 auto; white-space: nowrap; }
	.vwk--b .vwk-group--select { min-width: 0; width: 100%; }
	.vwk .vwk-grid > .vwk-item { width: 100%; }
	.vwk .vwk-status { margin-bottom: 18px; }
}
