/**
 * Candlewide Testimonials Gallery Styles
 * 
 * 4-column responsive grid layout for gallery images
 */

.candlewide-testimonials-gallery-page {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	padding: 20px 0;
	width: 100%;
}

.candlewide-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	user-select: none;
	pointer-events: auto;
}

.candlewide-gallery-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.candlewide-gallery-image-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 100%; /* 1:1 aspect ratio */
	background-color: transparent;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.candlewide-gallery-image {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease;
	pointer-events: none;
}

.candlewide-gallery-item:hover .candlewide-gallery-image {
	transform: translate(-50%, -50%) scale(1.05);
}

.candlewide-gallery-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
	display: flex;
	align-items: flex-end;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.3s ease;
	color: white;
	pointer-events: none;
}

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

.candlewide-gallery-info {
	width: 100%;
}

.candlewide-gallery-info h3 {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
}

.candlewide-gallery-info p {
	margin: 0;
	font-size: 12px;
	color: #f0f0f0;
	line-height: 1.4;
}

/* Photo Count Badge */
.candlewide-gallery-photo-count {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	z-index: 10;
	backdrop-filter: blur(4px);
	pointer-events: none;
}

/* Thumbnail Navigation Buttons */
.candlewide-gallery-thumb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: white;
	border: none;
	font-size: 28px;
	width: 40px;
	height: 40px;
	padding: 0;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s ease;
	z-index: 11;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	pointer-events: auto;
}

.candlewide-gallery-thumb-nav:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: translateY(-50%) scale(1.1);
}

.candlewide-gallery-thumb-prev {
	left: 8px;
}

.candlewide-gallery-thumb-next {
	right: 8px;
}

.candlewide-gallery-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 16px;
}

/* Gallery Modal/Slider */
.candlewide-gallery-slider-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	padding: 0;
	margin: 0;
	border: none;
}

.candlewide-gallery-slider-modal.active {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.candlewide-gallery-slider-content {
	position: relative;
	max-width: 90%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.candlewide-gallery-slider-image {
	max-width: 100%;
	max-height: 70vh;
	object-fit: contain;
	border-radius: 8px;
	margin-bottom: 20px;
}

.candlewide-gallery-slider-info {
	text-align: center;
	color: white;
	width: 100%;
}

.candlewide-gallery-slider-info h3 {
	margin: 0 0 10px 0;
	font-size: 20px;
	font-weight: 600;
}

.candlewide-gallery-slider-info p {
	margin: 0;
	font-size: 14px;
	color: #ddd;
	line-height: 1.6;
	max-width: 600px;
	margin: 10px auto 0;
}

.candlewide-gallery-slider-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.3);
	color: white;
	border: none;
	font-size: 24px;
	padding: 15px 20px;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s ease;
	z-index: 10000;
}

.candlewide-gallery-slider-nav:hover {
	background: rgba(255, 255, 255, 0.5);
}

.candlewide-gallery-slider-prev {
	left: 20px;
}

.candlewide-gallery-slider-next {
	right: 20px;
}

.candlewide-gallery-slider-close {
	position: fixed;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.3);
	color: white;
	border: none;
	font-size: 32px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 10001;
}

.candlewide-gallery-slider-close:hover {
	background: rgba(255, 255, 255, 0.5);
}

.candlewide-gallery-slider-counter {
	color: white;
	font-size: 14px;
	margin-top: 15px;
	text-align: center;
}

/* Responsive Grid */
@media (max-width: 1200px) {
	.candlewide-testimonials-gallery-page {
		grid-template-columns: repeat(3, 1fr);
		gap: 15px;
	}
}

@media (max-width: 768px) {
	.candlewide-testimonials-gallery-page {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		padding: 15px 0;
	}

	.candlewide-gallery-slider-nav {
		padding: 10px 15px;
		font-size: 20px;
	}

	.candlewide-gallery-slider-prev {
		left: 10px;
	}

	.candlewide-gallery-slider-next {
		right: 10px;
	}
}

@media (max-width: 480px) {
	.candlewide-testimonials-gallery-page {
		grid-template-columns: repeat(1, 1fr);
		gap: 10px;
	}

	.candlewide-gallery-slider-content {
		max-width: 95%;
	}

	.candlewide-gallery-slider-image {
		max-height: 50vh;
	}

	.candlewide-gallery-info h3 {
		font-size: 14px;
	}

	.candlewide-gallery-info p {
		font-size: 11px;
	}
}
