/* Premium Gallery for Elementor — frontend styles */

.pge-wrapper {
	--pge-cols: 4;
	--pge-gap: 16px;
}

.pge-empty {
	padding: 24px;
	text-align: center;
	border: 1px dashed rgba(0,0,0,0.2);
	border-radius: 8px;
	color: rgba(0,0,0,0.5);
}

/* ---------- Filters ---------- */
.pge-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}
.pge-filters button {
	cursor: pointer;
	border: none;
	font: inherit;
	background: #f2f2f2;
	color: #333;
	padding: 8px 18px;
	border-radius: 30px;
	transition: background-color .25s ease, color .25s ease;
}

/* ---------- Grid layouts ---------- */
.pge-grid {
	display: grid;
	grid-template-columns: repeat(var(--pge-cols), 1fr);
	gap: var(--pge-gap);
}

.pge-layout-masonry {
	display: block;
	position: relative;
}
.pge-layout-masonry .pge-item {
	will-change: transform;
	transition: transform .35s ease;
}

.pge-layout-justified {
	display: flex;
	flex-wrap: wrap;
}
.pge-layout-justified .pge-item {
	flex: 1 1 240px;
}

/* ---------- Item ---------- */
.pge-item {
	position: relative;
	overflow: hidden;
	background: #eee;
}
.pge-item__link { display: block; color: inherit; text-decoration: none; }

.pge-item__media {
	position: relative;
	overflow: hidden;
	width: 100%;
}

/* Aspect ratios (grid/justified layouts) */
.pge-ratio-square .pge-item__media { aspect-ratio: 1 / 1; }
.pge-ratio-landscape .pge-item__media { aspect-ratio: 4 / 3; }
.pge-ratio-wide .pge-item__media { aspect-ratio: 16 / 9; }
.pge-ratio-portrait .pge-item__media { aspect-ratio: 3 / 4; }
.pge-ratio-original .pge-item__media { aspect-ratio: auto; }

.pge-item__media img,
.pge-item__media video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition-property: transform, filter, opacity;
	transition-duration: 400ms;
	transition-timing-function: ease;
}
.pge-layout-masonry .pge-item__media,
.pge-layout-masonry .pge-item__media img { height: auto; aspect-ratio: auto; }

img.pge-lazy { opacity: 0; }
img.pge-loaded { opacity: 1; }

.pge-item__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.45);
	opacity: 0;
	transition-property: opacity;
	transition-duration: 400ms;
	pointer-events: none;
}
.pge-item:hover .pge-item__overlay { opacity: 1; }

/* Hover effects (prefix_class pge-hover-*) */
.pge-hover-zoom .pge-item:hover .pge-item__media img,
.pge-hover-zoom .pge-item:hover .pge-item__media video { transform: scale(1.08); }

.pge-hover-grayscale .pge-item__media img { filter: grayscale(100%); }
.pge-hover-grayscale .pge-item:hover .pge-item__media img { filter: grayscale(0%); }

.pge-hover-blur .pge-item__media img { filter: blur(4px); }
.pge-hover-blur .pge-item:hover .pge-item__media img { filter: blur(0); }

.pge-hover-fade .pge-item__media img { opacity: .7; }
.pge-hover-fade .pge-item:hover .pge-item__media img { opacity: 1; }

.pge-hover-lift .pge-item { transition: transform .3s ease, box-shadow .3s ease; }
.pge-hover-lift .pge-item:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(0,0,0,0.18); }

/* Play icon */
.pge-play-icon {
	position: absolute;
	top: 50%; left: 50%;
	width: 56px; height: 56px;
	transform: translate(-50%, -50%);
	background: rgba(0,0,0,0.55);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	pointer-events: none;
}
.pge-play-icon svg { width: 45%; height: 45%; fill: #fff; margin-left: 3px; }

/* Captions */
.pge-item__caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 16px;
	background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
	color: #fff;
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}
.pge-caption-trigger-always { opacity: 1; }
.pge-item:hover .pge-caption-trigger-hover { opacity: 1; }

.pge-caption-overlay-center {
	top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
	background: rgba(0,0,0,0.5);
}

.pge-item__caption.pge-caption-below {
	position: static;
	background: none;
	color: inherit;
	opacity: 1;
	padding: 10px 4px;
}

.pge-item__caption-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.pge-item__caption-desc { font-size: 13px; opacity: .85; margin-top: 4px; }

/* ---------- Load more / pagination ---------- */
.pge-loadmore-wrap { text-align: center; margin-top: 28px; }
.pge-loadmore-btn {
	cursor: pointer;
	border: none;
	font: inherit;
	background: #6c5ce7;
	color: #fff;
	padding: 12px 32px;
	border-radius: 30px;
	transition: background-color .25s ease;
}

.pge-pagination-wrap { text-align: center; margin-top: 28px; }
.pge-pagination { display: inline-flex; gap: 6px; }
.pge-pagination button {
	cursor: pointer;
	border: 1px solid rgba(0,0,0,0.15);
	background: #fff;
	color: #333;
	width: 36px; height: 36px;
	border-radius: 6px;
	font: inherit;
}
.pge-pagination button.is-active { background: #6c5ce7; color: #fff; border-color: #6c5ce7; }

.pge-infinite-sentinel { height: 1px; }

/* ---------- Lightbox ---------- */
.pge-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	--pge-lb-bg: rgba(10,10,10,0.95);
	--pge-lb-ui: #fff;
	--pge-lb-caption: #fff;
}
.pge-lightbox.is-open { display: flex; }
body.pge-lb-locked { overflow: hidden; }

.pge-lb-backdrop {
	position: absolute;
	inset: 0;
	background: var(--pge-lb-bg);
}

.pge-lb-stage {
	position: relative;
	z-index: 2;
	max-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pge-lb-media { max-width: 100%; max-height: 82vh; display: flex; }
.pge-lb-media img { max-width: 100%; max-height: 82vh; display: block; margin: 0 auto; cursor: zoom-in; transition: transform .3s ease; }
.pge-lb-media img.is-zoomed { transform: scale(1.6); cursor: zoom-out; }
.pge-lb-media video { max-width: 100%; max-height: 82vh; }
.pge-lb-iframe { width: 80vw; height: 45vw; max-width: 1100px; max-height: 62vh; border: 0; }

.pge-lb-close, .pge-lb-prev, .pge-lb-next {
	position: absolute;
	z-index: 3;
	background: transparent;
	border: none;
	color: var(--pge-lb-ui);
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	padding: 10px;
}
.pge-lb-close { top: 16px; right: 20px; font-size: 34px; }
.pge-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.pge-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

.pge-lb-counter {
	position: absolute;
	top: 20px; left: 24px;
	color: var(--pge-lb-caption);
	font-size: 14px;
	z-index: 3;
}

.pge-lb-caption {
	position: absolute;
	bottom: 90px;
	left: 0; right: 0;
	text-align: center;
	color: var(--pge-lb-caption);
	z-index: 3;
	padding: 0 20px;
	font-size: 15px;
}

.pge-lb-actions { position: absolute; top: 16px; right: 70px; z-index: 3; }
.pge-lb-download { color: var(--pge-lb-ui); font-size: 22px; text-decoration: none; }

.pge-lb-thumbs {
	position: absolute;
	bottom: 16px;
	left: 0; right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 3;
	overflow-x: auto;
	padding: 0 20px;
}
.pge-lb-thumbs img {
	width: 56px; height: 56px;
	object-fit: cover;
	border-radius: 4px;
	opacity: .5;
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity .2s ease, border-color .2s ease;
}
.pge-lb-thumbs img.is-active,
.pge-lb-thumbs img:hover { opacity: 1; border-color: var(--pge-lb-ui); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.pge-lb-iframe { width: 90vw; height: 50vw; }
}
@media (max-width: 767px) {
	.pge-lb-thumbs { display: none; }
	.pge-lb-prev, .pge-lb-next { font-size: 22px; padding: 6px; }
}
