.congpa-portfolio-filters {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
}

.congpa-portfolio-filters button {
	border: 1px solid #d0d0d0;
	background: #fff;
	padding: 6px 14px;
	border-radius: 20px;
	cursor: pointer;
}

.congpa-portfolio-filters button.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

.congpa-portfolio-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 991px) {
	.congpa-portfolio-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.congpa-portfolio-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
}

.congpa-portfolio-card.is-hidden {
	display: none;
}

.congpa-portfolio-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	overflow: hidden;
}

.congpa-portfolio-media {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.congpa-portfolio-media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.congpa-portfolio-play-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	pointer-events: none;
}

.congpa-portfolio-play-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
	margin-left: 2px;
}

.congpa-portfolio-badge {
	position: absolute;
	right: 10px;
	bottom: 10px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 12px;
}

.congpa-portfolio-title {
	margin: 0;
	padding: 12px;
	font-size: 15px;
	line-height: 1.4;
}

.congpa-portfolio-modal[hidden] {
	display: none;
}

.congpa-portfolio-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.congpa-portfolio-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
}

.congpa-portfolio-modal-dialog {
	position: relative;
	width: min(960px, calc(100vw - 30px));
	max-height: calc(100vh - 30px);
	overflow: auto;
	margin: 15px auto;
	background: #111;
	color: #fff;
	border-radius: 12px;
	padding: 30px 20px 20px;
}

.congpa-portfolio-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
}

.congpa-portfolio-modal-content iframe,
.congpa-portfolio-modal-content video,
.congpa-portfolio-modal-content img {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}

.congpa-modal-gallery-wrap {
	position: relative;
}

.congpa-portfolio-gallery-controls {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 12px;
}

.congpa-portfolio-gallery-controls button {
	border: 1px solid #444;
	background: #222;
	color: #fff;
	padding: 6px 12px;
	cursor: pointer;
}

.congpa-video-fallback {
	padding: 24px 12px;
	text-align: center;
}

.congpa-video-fallback .button {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	border-radius: 4px;
	padding: 8px 14px;
	text-decoration: none;
}

.congpa-portfolio-single .entry-header {
	margin-bottom: 14px;
}

.congpa-single-media {
	margin-bottom: 18px;
}

.congpa-single-video iframe,
.congpa-single-video video {
	width: 100%;
	max-width: 100%;
	display: block;
}

.congpa-single-gallery {
	position: relative;
	background: #111;
	border-radius: 10px;
	overflow: hidden;
}

.congpa-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.48);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
}

.congpa-gallery-arrow svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.congpa-gallery-arrow-prev {
	left: 10px;
}

.congpa-gallery-arrow-next {
	right: 10px;
}

.congpa-single-gallery-img {
	display: none;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background: #111;
}

.congpa-single-gallery-img.is-active {
	display: block;
}

.congpa-single-gallery-thumbs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.congpa-single-gallery-thumb {
	padding: 0;
	border: 1px solid #d0d0d0;
	background: #fff;
	border-radius: 6px;
	cursor: pointer;
	overflow: hidden;
	width: 62px;
	height: 62px;
}

.congpa-single-gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.congpa-single-gallery-thumb.is-active {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1 inset;
}

@media (max-width: 767px) {
	.congpa-portfolio-play-icon {
		width: 46px;
		height: 46px;
	}
	.congpa-portfolio-play-icon svg {
		width: 24px;
		height: 24px;
	}
	.congpa-gallery-arrow {
		width: 34px;
		height: 34px;
	}
	.congpa-gallery-arrow svg {
		width: 18px;
		height: 18px;
	}
}
