/* =============================================
   Smart Gallery for Elementor – Frontend CSS
   ============================================= */

/* --- Base Wrapper --- */
.sge-gallery-wrapper {
	width: 100%;
}

/* --- Grid Layout --- */
.sge-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
}

/* --- Masonry Layout --- */
.sge-masonry-grid {
	column-count: 3;
	column-gap: 15px;
}

.sge-masonry-item {
	break-inside: avoid;
	page-break-inside: avoid;
	display: inline-block;
	width: 100%;
}

/* --- Gallery Item --- */
.sge-gallery-item {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: block;
}

/* Masonry item acts as a block */
.sge-masonry-grid .sge-gallery-item {
	margin-bottom: 15px;
	break-inside: avoid;
}

/* --- Item Inner (holds img + overlay) --- */
.sge-item-inner {
	position: relative;
	overflow: hidden;
	display: block;
	width: 100%;
}

/* Grid: fixed height images */
.sge-gallery-grid .sge-item-inner img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

/* Masonry: natural height images */
.sge-masonry-grid .sge-item-inner img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}

/* --- Video Thumbnail --- */
.sge-video-thumb {
	position: relative;
	display: block;
	overflow: hidden;
}

.sge-video-thumb img {
	width: 100%;
	display: block;
	transition: transform 0.4s ease;
}

.sge-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease;
	z-index: 2;
	pointer-events: none;
}

.sge-gallery-item:hover .sge-play-btn {
	transform: translate(-50%, -50%) scale(1.15);
}

/* --- Overlay --- */
.sge-item-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	opacity: 0;
	transition: opacity 0.35s ease;
	z-index: 3;
}

.sge-gallery-item:hover .sge-item-overlay {
	opacity: 1;
}

/* --- Caption --- */
.sge-caption {
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	padding: 8px 12px;
	width: 100%;
	background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
	letter-spacing: 0.02em;
}

/* --- Hover Icon --- */
.sge-overlay-icon {
	color: #fff;
	margin-bottom: auto;
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: rgba(255,255,255,0.15);
	border-radius: 50%;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: 1.5px solid rgba(255,255,255,0.4);
	transition: transform 0.25s ease, background 0.25s ease;
}

.sge-gallery-item:hover .sge-overlay-icon {
	transform: scale(1.1);
	background: rgba(255,255,255,0.25);
}

/* =============================================
   Hover Effects
   ============================================= */

/* Zoom */
.sge-hover-zoom .sge-gallery-item:hover img,
.sge-hover-zoom .sge-gallery-item:hover .sge-video-thumb img {
	transform: scale(1.08);
}

/* Slide Up */
.sge-hover-slide .sge-gallery-item:hover img,
.sge-hover-slide .sge-gallery-item:hover .sge-video-thumb img {
	transform: translateY(-6px) scale(1.03);
}

/* Fade (dim) */
.sge-hover-fade .sge-gallery-item img,
.sge-hover-fade .sge-gallery-item .sge-video-thumb img {
	transition: opacity 0.35s ease;
}
.sge-hover-fade .sge-gallery-item:hover img,
.sge-hover-fade .sge-gallery-item:hover .sge-video-thumb img {
	opacity: 0.7;
}

/* Blur */
.sge-hover-blur .sge-gallery-item img,
.sge-hover-blur .sge-gallery-item .sge-video-thumb img {
	transition: filter 0.35s ease, transform 0.35s ease;
}
.sge-hover-blur .sge-gallery-item:hover img,
.sge-hover-blur .sge-gallery-item:hover .sge-video-thumb img {
	filter: blur(2px);
	transform: scale(1.05);
}

/* =============================================
   Filter Bar
   ============================================= */
.sge-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}

.sge-filter-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	border-radius: 50px;
	border: 1.5px solid #e2e8f0;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
	line-height: 1.4;
}

.sge-filter-btn:hover {
	background-color: #f1f5f9;
	color: #334155;
}

.sge-filter-btn.active {
	background-color: #6366f1;
	border-color: #6366f1;
	color: #ffffff;
}

/* =============================================
   Hidden / Load More
   ============================================= */
.sge-hidden-item {
	display: none !important;
}

.sge-load-more-wrap {
	text-align: center;
	margin-top: 30px;
}

.sge-load-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 36px;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.2s ease;
	letter-spacing: 0.03em;
}

.sge-load-more-btn:hover {
	background: #4f46e5;
	transform: translateY(-2px);
}

.sge-load-more-btn:disabled {
	opacity: 0.55;
	cursor: default;
	transform: none;
}

/* =============================================
   Lightgallery Customizations
   ============================================= */
.lg-backdrop {
	background-color: #0a0a0a;
}

/* =============================================
   Responsive — Tablet
   ============================================= */
@media (max-width: 1024px) {
	.sge-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.sge-masonry-grid {
		column-count: 2;
	}
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 767px) {
	.sge-gallery-grid {
		grid-template-columns: repeat(1, 1fr);
	}
	.sge-masonry-grid {
		column-count: 1;
	}
	.sge-filter-bar {
		flex-wrap: wrap;
		justify-content: center;
	}
}
