/* NINSS gallery page — bento grid with year filters */
.ng-gallery {
	--ng-navy: #273171;
	--ng-navy-deep: #1a2155;
	--ng-red: #c8102e;
	--ng-sky: #6ec1e4;
	--ng-radius: 16px;
	--ng-row: 210px;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	padding: 72px 20px 88px;
	color: var(--ng-navy);
}
.ng-wrap { max-width: 1200px; margin: 0 auto; }

/* Intro */
.ng-intro {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
	margin-bottom: 32px;
}
.ng-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ng-red);
	margin: 0 0 10px;
}
.ng-eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: currentColor;
}
.ng-heading {
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.15;
	font-weight: 800;
	color: var(--ng-navy);
	margin: 0 0 12px;
}
.ng-sub {
	max-width: 560px;
	font-size: 16px;
	line-height: 1.6;
	color: #4a5280;
	margin: 0;
}
.ng-stats {
	display: flex;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ng-stats li {
	background: #fff;
	border-radius: 14px;
	padding: 14px 20px;
	min-width: 104px;
	text-align: center;
	box-shadow: 0 6px 20px rgba(39, 49, 113, .08);
}
.ng-stats strong {
	display: block;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--ng-navy);
}
.ng-stats span {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #6b7299;
}

/* Filters */
.ng-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}
/* !important beats the theme's global button styles */
.ng-gallery .ng-filter {
	appearance: none;
	border: 1.5px solid rgba(39, 49, 113, .2) !important;
	background: rgba(255, 255, 255, .6) !important;
	color: var(--ng-navy) !important;
	line-height: 1.2;
	text-decoration: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.ng-filter small {
	font-size: 12px;
	font-weight: 500;
	opacity: .65;
	margin-left: 4px;
}
.ng-gallery .ng-filter:hover { border-color: var(--ng-navy) !important; transform: translateY(-2px); }
.ng-gallery .ng-filter.is-active {
	background: var(--ng-navy) !important;
	border-color: var(--ng-navy) !important;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(39, 49, 113, .28);
}
.ng-filter:focus-visible { outline: 3px solid var(--ng-sky); outline-offset: 2px; }

/* Bento grid */
.ng-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: var(--ng-row);
	grid-auto-flow: dense;
	gap: 16px;
}
.ng-card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--ng-radius);
	background: var(--ng-navy-deep);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(26, 33, 85, .14);
	isolation: isolate;
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s, opacity .45s;
}
.ng-card.is-wide { grid-column: span 2; }
.ng-card.is-tall { grid-row: span 2; }
.ng-card img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .6s;
	z-index: -2;
}
.ng-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(26, 33, 85, 0) 35%, rgba(26, 33, 85, .55) 65%, rgba(20, 25, 66, .92) 100%);
	transition: opacity .45s;
}
.ng-card:hover,
.ng-card:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 22px 40px rgba(26, 33, 85, .28);
}
.ng-card:hover img,
.ng-card:focus-visible img { transform: scale(1.08); filter: saturate(1.15); }
.ng-card:focus-visible { outline: 3px solid var(--ng-sky); outline-offset: 3px; }

.ng-badges {
	position: absolute;
	top: 14px;
	left: 14px;
	right: 14px;
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.ng-badge {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: var(--ng-navy);
	backdrop-filter: blur(6px);
}
.ng-badge.is-year { background: var(--ng-red); color: #fff; }

.ng-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 20px 20px;
}
.ng-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: #fff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.ng-card.is-wide.is-tall .ng-title { font-size: clamp(20px, 2.2vw, 28px); }
.ng-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #cfe9f7;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .35s, transform .35s;
}
.ng-cta svg { transition: transform .35s; }
.ng-card:hover .ng-cta,
.ng-card:focus-visible .ng-cta { opacity: 1; transform: none; }
.ng-card:hover .ng-cta svg { transform: translateX(4px); }

/* Filter + scroll-in animation states (only when JS is running) */
.ng-js .ng-card { opacity: 0; transform: translateY(28px) scale(.98); }
.ng-js .ng-card.is-in { opacity: 1; transform: none; }
.ng-js .ng-card.is-in:hover,
.ng-js .ng-card.is-in:focus-visible { transform: translateY(-6px); }
.ng-card.is-hidden { display: none; }

/* Call to action */
.ng-join {
	margin-top: 48px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 28px 32px;
	border-radius: 20px;
	background: linear-gradient(120deg, var(--ng-navy-deep), var(--ng-navy) 60%, #34459a);
	color: #fff;
	box-shadow: 0 18px 40px rgba(26, 33, 85, .25);
}
.ng-join h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: #fff; }
.ng-join p { margin: 0; color: #c9cfee; font-size: 15px; }
.ng-join a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 999px;
	background: #fff;
	color: var(--ng-navy);
	font-weight: 700;
	text-decoration: none;
	transition: transform .25s, box-shadow .25s;
}
.ng-join a:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }

/* Responsive */
@media (max-width: 1024px) {
	.ng-grid { grid-template-columns: repeat(3, 1fr); --ng-row: 190px; }
}
@media (max-width: 767px) {
	.ng-gallery { padding: 48px 16px 64px; }
	.ng-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; --ng-row: 160px; }
	.ng-title { font-size: 15px; }
	.ng-body { padding: 14px; }
	.ng-badges { top: 10px; left: 10px; right: 10px; }
	.ng-badge { font-size: 11px; padding: 4px 9px; }
	.ng-cta { display: none; }
	.ng-stats { width: 100%; }
	.ng-stats li { flex: 1; min-width: 0; padding: 12px 8px; }
	.ng-join { padding: 24px; }
}
@media (max-width: 480px) {
	.ng-grid { grid-template-columns: 1fr; --ng-row: 200px; }
	.ng-card.is-wide { grid-column: auto; }
	.ng-card.is-tall { grid-row: auto; }
	.ng-card.is-wide.is-tall { grid-row: span 2; }
	.ng-title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
	.ng-card, .ng-card img, .ng-cta, .ng-filter { transition: none !important; }
	.ng-js .ng-card { opacity: 1; transform: none; }
	.ng-card:hover img { transform: none; }
}
