.nas-gallery { max-width: 1440px; margin: 0 auto; }
.nas-gallery__filters { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.nas-gallery__filters input, .nas-gallery__filters select, .nas-gallery__filters button { box-sizing: border-box; min-height: 44px; padding: .5rem .75rem; }
.nas-gallery__filters input { min-width: min(100%, 20rem); }
.nas-gallery__gallery-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.nas-gallery__gallery-list a { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: .35rem .65rem; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; }
.nas-gallery__gallery-list a[aria-current="page"] { color: #fff; background: #d63638; border-color: #d63638; }
.nas-gallery__result-count { margin: 0 0 1rem; font-size: .9375rem; }
.nas-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.nas-gallery__card { min-width: 0; }
.nas-gallery__open { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.nas-gallery__open:focus-visible, .nas-gallery a:focus-visible, .nas-lightbox button:focus-visible { outline: 3px solid #2271b1; outline-offset: 3px; }
.nas-gallery__open img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.nas-gallery__card h2 { font-size: 1rem; margin: .75rem 0 .25rem; }
.nas-gallery__gallery { margin: 0 0 .5rem; color: #666; font-size: .875rem; }
.nas-gallery__description { font-size: .9375rem; }
.nas-gallery .pagination { margin: 2rem 0; }
.nas-gallery .page-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.nas-gallery .page-numbers li { display: block; margin: 0; padding: 0; list-style: none; }
.nas-gallery .page-numbers a, .nas-gallery .page-numbers .current { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2.5rem; padding: .35rem .6rem; border: 1px solid currentColor; border-radius: .25rem; text-decoration: none; }
.nas-gallery .page-numbers .current { font-weight: 700; }
.nas-lightbox { width: min(96vw, 1100px); max-height: 94vh; padding: 1rem; border: 0; background: #111; color: #fff; }
.nas-lightbox::backdrop { background: rgba(0, 0, 0, .82); }
.nas-lightbox figure { margin: 0; text-align: center; }
.nas-lightbox img { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; }
.nas-lightbox button { margin: .75rem .25rem; padding: .5rem .75rem; }
.nas-lightbox__close { float: right; }
.nas-lightbox.is-zoomed figure { height: 65vh; max-height: 65vh; overflow: auto; cursor: grab; touch-action: pan-x pan-y; overscroll-behavior: contain; }
.nas-lightbox.is-zoomed img { width: 175%; max-width: none; max-height: none; cursor: zoom-out; }
@media (max-width: 1024px) { .nas-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
	.nas-gallery { width: 100%; }
	.nas-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
	.nas-gallery__filters { display: grid; grid-template-columns: 1fr; gap: .6rem; }
	.nas-gallery__filters label, .nas-gallery__filters input, .nas-gallery__filters select, .nas-gallery__filters button { min-width: 0; width: 100%; }
	.nas-gallery__gallery-list { flex-wrap: nowrap; overflow-x: auto; padding: 0 0 .35rem; margin-bottom: 1.25rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
	.nas-gallery__gallery-list a { flex: 0 0 auto; white-space: nowrap; }
	.nas-gallery__card h2 { margin-top: .5rem; font-size: .9375rem; line-height: 1.25; }
	.nas-gallery__gallery, .nas-gallery__description { font-size: .875rem; }
	.nas-gallery .pagination { overflow-x: auto; padding-bottom: .35rem; }
	.nas-gallery .page-numbers { flex-wrap: nowrap; width: max-content; gap: .35rem; }
	.nas-gallery .page-numbers a, .nas-gallery .page-numbers .current { min-width: 2.75rem; min-height: 2.75rem; }
	.nas-lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; box-sizing: border-box; padding: .75rem; }
	.nas-lightbox figure { clear: both; display: grid; gap: .5rem; }
	.nas-lightbox img { width: 100%; max-height: 56dvh; object-fit: contain; }
	.nas-lightbox.is-zoomed figure { width: 100%; height: 56dvh; max-height: 56dvh; }
	.nas-lightbox.is-zoomed img { width: 190%; max-width: none; max-height: none; object-fit: initial; }
	.nas-lightbox button { min-height: 44px; margin: .4rem .15rem; }
	.nas-lightbox figcaption { max-height: 24dvh; overflow-y: auto; text-align: left; }
}
@media (max-width: 340px) { .nas-gallery__grid { grid-template-columns: 1fr; } }
