.wcag-gallery {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.wcag-gallery__grid {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-snap-stop: always;
	scroll-padding: 12px;
	padding: 0 12px 6px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.wcag-gallery__grid::-webkit-scrollbar {
	display: none;
}

.wcag-gallery__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0 12px;
	min-height: 16px;
}

.wcag-dot {
	display: inline-block;
	border: 0;
	padding: 0;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.28);
	cursor: pointer;
}

.wcag-dot[aria-current="true"] {
	width: 9px;
	height: 9px;
	background: rgba(17, 24, 39, 0.86);
}

.wcag-dot--gap {
	width: 5px;
	height: 5px;
	background: rgba(17, 24, 39, 0.18);
	cursor: default;
}

.wcag-gallery__grid::-webkit-scrollbar {
	height: 8px;
}

.wcag-gallery__grid::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.18);
	border-radius: 999px;
}

@media (max-width: 767px) {
	.wcag-gallery__grid {
		gap: 10px;
		scroll-padding: 16px;
		padding: 0 16px 6px;
	}

	.wcag-gallery__item {
		flex: 0 0 calc(100% - 52px);
		max-width: 620px;
	}
}

.wcag-gallery__item {
	display: block;
	flex: 0 0 86%;
	max-width: 560px;
	height: clamp(240px, 66vw, 440px);
	scroll-snap-align: center;
	border-radius: 14px;
	overflow: hidden;
	background: #f3f4f6 !important;
	position: relative;
}

.wcag-gallery .wcag-gallery__img {
	display: block;
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center;
	transition: transform 240ms ease;
}

.wcag-gallery .wcag-gallery__showall {
	align-self: center;
	border: 0;
	border-radius: 999px;
	padding: 12px 16px;
	margin: 2px auto 0;
	width: calc(100% - 24px);
	max-width: 520px;
	background: rgba(0, 0, 0, 0.72) !important;
	color: #fff !important;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.wcag-gallery__showall:focus-visible {
	outline: 3px solid rgba(59, 130, 246, 0.9);
	outline-offset: 3px;
}

@media (min-width: 768px) {
	.wcag-gallery__grid {
		display: grid;
		grid-template-columns: 2fr 2fr 1fr 1fr;
		grid-template-rows: 1fr 1fr;
		gap: 10px;
		overflow: hidden;
		scroll-snap-type: none;
		padding: 0;
		aspect-ratio: 16 / 9;
		height: auto;
		min-height: 320px;
		max-height: 560px;
	}

	.wcag-gallery__item {
		flex: none;
		border-radius: 14px;
		height: 100%;
	}

	.wcag-gallery__img {
		height: 100%;
		max-height: none;
	}

	.wcag-gallery__item:hover .wcag-gallery__img {
		transform: scale(1.02);
	}

	.wcag-gallery__item--1 {
		grid-column: 1 / span 2;
		grid-row: 1 / span 2;
	}

	.wcag-gallery__item--2 {
		grid-column: 3 / span 1;
		grid-row: 1 / span 1;
	}

	.wcag-gallery__item--3 {
		grid-column: 4 / span 1;
		grid-row: 1 / span 1;
	}

	.wcag-gallery__item--4 {
		grid-column: 3 / span 1;
		grid-row: 2 / span 1;
	}

	.wcag-gallery__item--5 {
		grid-column: 4 / span 1;
		grid-row: 2 / span 1;
	}

	.wcag-gallery__item:not(.wcag-gallery__item--1):not(.wcag-gallery__item--2):not(.wcag-gallery__item--3):not(.wcag-gallery__item--4):not(.wcag-gallery__item--5) {
		display: none;
	}

	.wcag-gallery .wcag-gallery__showall {
		align-self: flex-end;
		width: auto;
		max-width: none;
		margin: 0;
	}

	.wcag-gallery__dots {
		display: none;
	}
}

.wcag-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	overscroll-behavior: contain;
}

html.wcag-lightbox-open,
html.wcag-lightbox-open body {
	overflow: hidden !important;
	height: 100% !important;
}

.wcag-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.86);
}

.wcag-lightbox__dialog {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 16px;
}

.wcag-lightbox__figure {
	margin: 0;
	min-width: 0;
	text-align: center;
	width: min(1200px, 100%);
	position: relative;
}

.wcag-lightbox__img {
	max-width: 100%;
	max-height: calc(100vh - 78px);
	width: 100%;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.wcag-lightbox__caption {
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.9);
	font-weight: 600;
	font-size: 14px;
	display: grid;
	gap: 10px;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin-top: 0;
	padding: 18px 16px 14px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.wcag-lightbox__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 16px;
	pointer-events: auto;
}

.wcag-lightbox__dots .wcag-dot {
	display: inline-block !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	line-height: 0 !important;
	width: 11px !important;
	height: 11px !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.42) !important;
	cursor: pointer !important;
}

.wcag-lightbox__dots .wcag-dot[aria-current="true"] {
	width: 14px !important;
	height: 14px !important;
	background: rgba(255, 255, 255, 0.95) !important;
}

.wcag-lightbox__dots .wcag-dot--gap {
	width: 7px !important;
	height: 7px !important;
	background: rgba(255, 255, 255, 0.16) !important;
	cursor: default !important;
}

.wcag-lightbox__nav,
.wcag-lightbox__close {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(10px);
	color: rgba(255, 255, 255, 0.95);
	cursor: pointer;
	font-size: 36px;
	line-height: 1;
	width: 56px;
	height: 56px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
	-webkit-tap-highlight-color: transparent;
}

.wcag-lightbox .wcag-lightbox__nav,
.wcag-lightbox .wcag-lightbox__close {
	background: rgba(0, 0, 0, 0.62) !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
	color: #fff !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35) !important;
	display: flex !important;
	width: 56px !important;
	height: 56px !important;
	z-index: 3;
}

.wcag-lightbox .wcag-lightbox__close {
	width: 48px !important;
	height: 48px !important;
}

.wcag-icon {
	display: block;
	line-height: 1;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
	font-weight: 700;
	color: #fff;
}

.wcag-icon--prev::before {
	content: "‹";
	font-size: 34px;
	line-height: 1;
}

.wcag-icon--next::before {
	content: "›";
	font-size: 34px;
	line-height: 1;
}

.wcag-icon--close::before {
	content: "×";
	font-size: 28px;
	line-height: 1;
}

.wcag-lightbox__nav:hover,
.wcag-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.28);
}

.wcag-lightbox__nav:active,
.wcag-lightbox__close:active {
	transform: translateY(-50%) scale(0.98);
}

.wcag-lightbox__close:active {
	transform: scale(0.98);
}

.wcag-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.wcag-lightbox__nav--prev {
	left: 14px;
}

.wcag-lightbox__nav--next {
	right: 14px;
}

.wcag-lightbox__close {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 28px;
	font-weight: 700;
	width: 48px;
	height: 48px;
}

.wcag-lightbox__nav:focus-visible,
.wcag-lightbox__close:focus-visible {
	outline: 3px solid rgba(59, 130, 246, 0.9);
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.wcag-lightbox__dialog {
		padding: 12px;
	}

	.wcag-lightbox .wcag-lightbox__nav {
		display: none !important;
	}

	.wcag-lightbox__nav--prev {
		left: 10px;
	}

	.wcag-lightbox__nav--next {
		right: 10px;
	}

	.wcag-lightbox__close {
		top: 10px;
		right: 10px;
	}
}
