/* ==========================================================================
   Gallery: filter pills + photo grid (opens in the shared lightbox)
   Reference: 410×280 tiles, 30px gaps, gold active pill, 40px below the filter.
   ========================================================================== */
.sv-gallery { padding: 120px 0; }
.sv-gallery__filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.sv-gallery__pill {
	height: 40px; padding: 0 25px; border: 1px solid transparent; border-radius: 3px;
	background: transparent; color: var(--sv-heading); cursor: pointer;
	font-family: var(--sv-body-font); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	transition: background .3s, color .3s, border-color .3s;
}
.sv-gallery__pill:hover { border-color: var(--sv-accent); }
.sv-gallery__pill.is-active { background: var(--sv-accent); border-color: var(--sv-accent); color: #000; }
.sv-gallery__pill:focus-visible { outline: 2px solid var(--sv-accent); outline-offset: 2px; }

.sv-gallery__grid { display: grid; gap: 30px; grid-auto-rows: auto; }
.sv-gallery__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sv-gallery__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sv-gallery__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sv-gallery__item { margin: 0; transition: opacity .35s var(--sv-ease), transform .35s var(--sv-ease); }
.sv-gallery__item.is-hiding { opacity: 0; transform: scale(.92); pointer-events: none; }
.sv-gallery__item[hidden] { display: none; }
.sv-gallery__link { position: relative; display: block; aspect-ratio: 410 / 280; overflow: hidden; border-radius: 5px; background: var(--sv-surface); }
.sv-gallery__link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--sv-ease); }
.sv-gallery__link::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .4s; }
.sv-gallery__zoom {
	position: absolute; z-index: 1; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
	display: grid; place-items: center; border: 1px solid var(--sv-accent); border-radius: 50%; color: var(--sv-accent); font-size: 18px;
	opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s var(--sv-ease);
}
.sv-gallery__zoom .sv-icon { width: 18px; height: 18px; }
.sv-gallery__details { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--sv-ease); }
.sv-gallery__cat { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sv-accent); }
.sv-gallery__caption { display: block; font-size: 15px; color: #fff; }
.sv-gallery__link:hover img, .sv-gallery__link:focus-visible img { transform: scale(1.05); }
.sv-gallery__link:hover::after, .sv-gallery__link:focus-visible::after { opacity: 1; }
.sv-gallery__link:hover .sv-gallery__zoom, .sv-gallery__link:focus-visible .sv-gallery__zoom,
.sv-gallery__link:hover .sv-gallery__details, .sv-gallery__link:focus-visible .sv-gallery__details { opacity: 1; transform: none; }

@media (max-width: 991px) {
	.sv-gallery { padding: 90px 0; }
	.sv-gallery__grid--3, .sv-gallery__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.sv-gallery { padding: 72px 0; }
	.sv-gallery__grid { grid-template-columns: minmax(0, 1fr) !important; gap: 20px; }
	.sv-gallery__pill { height: 36px; padding: 0 16px; }
}

/* Measured against the reference gallery page at 1532px: 70px top, 50px tabs (0 30px, 10px apart, 14px/500,
   1.4px tracking, square), 60px to the grid, 413x300 tiles 30px apart, 130px bottom. */
@media (min-width: 992px) {
	.sv-gallery { padding: 70px 0 130px; }
	.sv-gallery__filter { margin-bottom: 60px; }
	.sv-gallery__pill { height: 50px; padding: 0 30px; border-radius: 0; font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: none; }
	.sv-gallery__link { aspect-ratio: 413 / 300; border-radius: 0; }
}
