/* CP Advocacy About Gallery */

.cp-about-page .row {
	--bs-gutter-y: 2rem;
}

.cp-about-gallery {
	width: 100%;
}

.cp-about-gallery__viewer {
	position: relative;
	overflow: hidden;
	background: #f5f5f5;
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.cp-about-gallery__main-link {
	display: block;
	text-decoration: none;
}

.cp-about-gallery__main-image {
	display: block;
	width: 100%;
	height: auto;
}

.cp-about-gallery__caption {
	margin-top: 0.65rem;
	font-size: 0.88rem;
	line-height: 1.4;
	text-align: center;
	color: #555;
}

.cp-about-gallery__thumbs {
	display: flex;
	gap: 10px;
	margin-top: 1rem;
	overflow-x: auto;
	padding: 0 0 0.25rem;
	scrollbar-width: thin;
}

.cp-about-gallery__thumb {
	flex: 0 0 82px;
	width: 82px;
	height: 62px;
	padding: 0;
	border: 2px solid transparent;
	background: #f5f5f5;
	box-shadow: none;
	cursor: pointer;
	opacity: 0.72;
	transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.cp-about-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cp-about-gallery__thumb:hover,
.cp-about-gallery__thumb:focus-visible,
.cp-about-gallery__thumb.is-active {
	opacity: 1;
	transform: translateY(-1px);
}

.cp-about-gallery__thumb.is-active {
	border-color: #0d355f;
}

.cp-about-gallery__thumb:focus-visible,
.cp-about-gallery__main-link:focus-visible,
.cp-about-gallery__nav:focus-visible,
.cp-about-gallery-modal__close:focus-visible,
.cp-about-gallery-modal__prev:focus-visible,
.cp-about-gallery-modal__next:focus-visible {
	outline: 3px solid #0d355f;
	outline-offset: 3px;
}

.cp-about-gallery__nav,
.cp-about-gallery-modal__close,
.cp-about-gallery-modal__prev,
.cp-about-gallery-modal__next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	color: #111;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	line-height: 1;
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.cp-about-gallery__nav:hover,
.cp-about-gallery-modal__close:hover,
.cp-about-gallery-modal__prev:hover,
.cp-about-gallery-modal__next:hover {
	background: #fff;
	color: #000;
	transform: scale(1.04);
}

.cp-about-gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 42px;
	height: 42px;
	font-size: 34px;
	line-height: 1;
	transform: translateY(-50%);
}

.cp-about-gallery__nav:hover {
	transform: translateY(-50%) scale(1.04);
}

.cp-about-gallery__nav--prev {
	left: 14px;
}

.cp-about-gallery__nav--next {
	right: 14px;
}

.cp-about-gallery-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 4rem 5rem;
	background: rgba(0, 0, 0, 0.9);
}

.cp-about-gallery-modal.is-open {
	display: flex;
}

.cp-about-gallery-modal__image {
	display: block;
	max-width: min(1120px, 88vw);
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	background: #fff;
	box-shadow: 0 14px 46px rgba(0, 0, 0, 0.35);
}

.cp-about-gallery-modal__close,
.cp-about-gallery-modal__prev,
.cp-about-gallery-modal__next {
	position: absolute;
}

.cp-about-gallery-modal__close {
	top: 22px;
	right: 22px;
	width: 48px;
	height: 48px;
	font-size: 30px;
}

.cp-about-gallery-modal__prev,
.cp-about-gallery-modal__next {
	top: 50%;
	width: 56px;
	height: 56px;
	font-size: 42px;
	transform: translateY(-50%);
}

.cp-about-gallery-modal__prev:hover,
.cp-about-gallery-modal__next:hover {
	transform: translateY(-50%) scale(1.04);
}

.cp-about-gallery-modal__prev {
	left: 24px;
}

.cp-about-gallery-modal__next {
	right: 24px;
}

.cp-about-gallery-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.cp-about-gallery__thumb {
		flex-basis: 72px;
		width: 72px;
		height: 54px;
	}

	.cp-about-gallery__nav {
		width: 38px;
		height: 38px;
		font-size: 30px;
	}

	.cp-about-gallery__nav--prev {
		left: 10px;
	}

	.cp-about-gallery__nav--next {
		right: 10px;
	}

	.cp-about-gallery-modal {
		padding: 4.5rem 1rem 1rem;
	}

	.cp-about-gallery-modal__image {
		max-width: 94vw;
		max-height: 76vh;
	}

	.cp-about-gallery-modal__close {
		top: 14px;
		right: 14px;
		width: 44px;
		height: 44px;
		font-size: 28px;
	}

	.cp-about-gallery-modal__prev,
	.cp-about-gallery-modal__next {
		width: 44px;
		height: 44px;
		font-size: 34px;
	}

	.cp-about-gallery-modal__prev {
		left: 12px;
	}

	.cp-about-gallery-modal__next {
		right: 12px;
	}
}
