.pyramid-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.pyramid-gallery-card {
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	overflow: hidden;
	height: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pyramid-gallery-item-card,
.e-loop-item.type-pyramid_gallery,
.elementor-post.type-pyramid_gallery {
	cursor: pointer;
}

.pyramid-gallery-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pyramid-gallery-card-link {
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
}

.pyramid-gallery-card-image {
	aspect-ratio: 16 / 9;
	background: #f7f9f7;
	overflow: hidden;
}

.pyramid-gallery-card-image img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.pyramid-gallery-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 24px;
}

.pyramid-gallery-eyebrow {
	color: #0066FF	;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.pyramid-gallery-card h3 {
	color: #1a1a1a;
	font-size: 24px;
	line-height: 32px;
	margin: 0 0 14px;
}

.pyramid-gallery-card p {
	color: #3e3e3e;
	font-size: 16px;
	line-height: 26px;
	margin: 0 0 20px;
}

.pyramid-gallery-card .link_more {
	color: #0066FF;
	font-weight: 700;
	margin-top: auto;
}

.pyramid-gallery-modal {
	align-items: center;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 30px;
	position: fixed;
	z-index: 99999;
}

.pyramid-gallery-video-modal {
	align-items: center;
	display: none;
	inset: 0;
	justify-content: center;
	padding: 30px;
	position: fixed;
	z-index: 100000;
}

.pyramid-gallery-video-modal.is-open {
	display: flex;
}

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

.pyramid-gallery-modal-backdrop {
	background: rgba(0, 0, 0, 0.72);
	inset: 0;
	position: absolute;
}

.pyramid-gallery-video-backdrop {
	background: rgba(0, 0, 0, 0.82);
	inset: 0;
	position: absolute;
}

.pyramid-gallery-modal-dialog {
	background: transparent;
	box-shadow: none;
	max-height: calc(100vh - 60px);
	max-width: 920px;
	overflow: visible;
	position: relative;
	width: 100%;
}

.pyramid-gallery-video-dialog {
	background: #000;
	border-radius: 5px;
	box-shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
	max-width: 1120px;
	position: relative;
	width: 100%;
}

.pyramid-gallery-modal-close {
	align-items: center;
	background: #1a1a1a;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	font-size: 14px;
	font-weight: 700;
	height: 36px;
	justify-content: center;
	position: absolute;
	right: 18px;
	top: 18px;
	width: 36px;
	z-index: 2;
}

.pyramid-gallery-wistia {
	aspect-ratio: 16 / 9;
	background: #f7f9f7;
	border-radius: 5px;
	overflow: hidden;
	width: 100%;
}

.pyramid-gallery-wistia wistia-player {
	display: block;
	height: 100%;
	width: 100%;
}

#gallery-modal {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
	max-height: calc(100vh - 60px);
	overflow: auto;
	padding: 28px;
	position: relative;
	width: 100%;
}

#gallery-modal-close {
	align-items: center;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	color: #1a1a1a;
	cursor: pointer;
	display: flex;
	font-size: 22px;
	font-weight: 700;
	height: 40px;
	justify-content: center;
	position: absolute;
	right: 18px;
	top: 18px;
	width: 40px;
	z-index: 2;
}

#gallery-modal-close div {
	line-height: 1;
}

#gallery-modal-img {
	aspect-ratio: 16 / 9;
	background: #f7f9f7;
	border-radius: 12px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

#gallery-modal-title {
	color: #1a1a1a;
	font-size: 36px;
	line-height: 44px;
	margin: 28px 0 16px;
	padding-right: 44px;
}

#gallery-modal-description {
	color: #3e3e3e;
	font-size: 17px;
	line-height: 28px;
	margin-bottom: 24px;
}

#gallery-modal-description p {
	margin: 0 0 16px;
}

#gallery-modal-description h3 {
	color: #1a1a1a;
	font-size: 20px;
	line-height: 28px;
	margin: 22px 0 8px;
}

.gallery-card-link {
	background: #0066FF;
	border: 0;
	border-radius: 4px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	margin: 0 12px 12px 0;
	padding: 8px 16px;
	text-decoration: none;
}

.gallery-card-link:hover,
.gallery-card-link:focus {
	color: #fff;
	text-decoration: none;
}

#mn,
#mx {
	align-items: center;
	background: #fff;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	color: #1a1a1a;
	cursor: pointer;
	display: flex;
	font-size: 34px;
	height: 44px;
	justify-content: center;
	line-height: 1;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
}

#mn {
	left: -22px;
}

#mx {
	right: -22px;
}

.pyramid-gallery-video-content {
	padding: 0;
}

body.pyramid-gallery-modal-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.pyramid-gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.pyramid-gallery-grid {
		grid-template-columns: 1fr;
	}

	.pyramid-gallery-modal {
		padding: 14px;
	}

	.pyramid-gallery-video-modal {
		padding: 14px;
	}

	.pyramid-gallery-modal-dialog {
		max-height: calc(100vh - 28px);
		overflow: auto;
	}

	#gallery-modal {
		max-height: calc(100vh - 28px);
		padding: 18px;
	}

	#gallery-modal-title {
		font-size: 30px;
		line-height: 38px;
	}

	.gallery-card-link {
		text-align: center;
		width: 100%;
	}

	#mn,
	#mx {
		bottom: 10px;
		top: auto;
		transform: none;
	}

	#mn {
		left: 18px;
	}

	#mx {
		right: 18px;
	}
}
