/* ACF Gallery Carousel Styles */

.acf-gallery-carousel-wrapper {
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.acf-gallery-carousel-container {
	position: relative;
	width: 100%;
	margin-bottom: 20px;
}

/* Main Carousel Image */
.acf-gallery-carousel-main {
	position: relative;
	width: 100%;
	height: 500px;
	overflow: hidden;
	background-color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
}

.acf-gallery-carousel-main img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center;
	cursor: pointer;
	transition: transform 0.3s ease;
	display: block;
}

.acf-gallery-carousel-main img:hover {
	transform: scale(1.02);
}

/* Image Caption */
.acf-gallery-carousel-caption {
	margin-top: 10px;
	font-size: 14px;
	color: #666;
	text-align: center;
	font-style: italic;
}

.acf-gallery-carousel-caption.hidden {
	display: none;
}

/* Navigation Arrows */
.acf-gallery-carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 50px;
	height: 50px;
	border: none;
	background-color: rgba(0, 0, 0, 0.5);
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.3s ease;
	padding: 0;
}

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

.acf-gallery-carousel-nav span {
	display: block;
	line-height: 1;
}

.acf-gallery-carousel-prev {
	left: 15px;
}

.acf-gallery-carousel-next {
	right: 15px;
}

/* Thumbnails Container */
.acf-gallery-carousel-thumbnails {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	padding: 15px 0;
	justify-content: flex-start;
	align-items: center;
	overflow-x: auto;
	overflow-y: visible;
	scroll-behavior: smooth;
	margin-top: 15px;
	border-top: 1px solid #f0f0f0;
}

/* Individual Thumbnail */
.acf-gallery-carousel-thumbnail {
	position: relative;
	max-height: 80px;
	width: auto;
	height: auto;
	border: 3px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.3s ease;
	background-color: transparent;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.acf-gallery-carousel-thumbnail img {
	max-height: 80px;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.acf-gallery-carousel-thumbnail:hover img {
	transform: scale(1.05);
}

.acf-gallery-carousel-thumbnail.active {
	border-color: #3085fe;
	border-width: 3px;
	box-shadow: 0 0 8px rgba(48, 133, 254, 0.3);
}

/* Error Message */
.acf-gallery-carousel-error {
	padding: 20px;
	background-color: #fee;
	border: 1px solid #fcc;
	border-radius: 4px;
	color: #c33;
	text-align: center;
	font-size: 14px;
}

/* Editor Placeholder */
.acf-gallery-carousel-editor-placeholder {
	padding: 40px 20px;
	background-color: #f9f9f9;
	border: 2px dashed #ddd;
	border-radius: 4px;
	text-align: center;
	color: #666;
}

.acf-gallery-carousel-editor-placeholder p {
	margin: 0;
	padding: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.acf-gallery-carousel-nav {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}

	.acf-gallery-carousel-prev {
		left: 10px;
	}

	.acf-gallery-carousel-next {
		right: 10px;
	}

	.acf-gallery-carousel-thumbnail img {
		max-height: 60px;
	}
}

@media (max-width: 480px) {
	.acf-gallery-carousel-main {
		height: 300px;
	}

	.acf-gallery-carousel-nav {
		width: 35px;
		height: 35px;
		font-size: 16px;
	}

	.acf-gallery-carousel-prev {
		left: 5px;
	}

	.acf-gallery-carousel-next {
		right: 5px;
	}

	.acf-gallery-carousel-thumbnail img {
		max-height: 50px;
	}

	.acf-gallery-carousel-thumbnails {
		gap: 8px;
	}
}

/* Lightbox Styles */
.glightbox-container {
	z-index: 9999;
}

.glightbox-slide img {
	max-width: 100%;
	height: auto;
}

/* Loading Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.acf-gallery-carousel-main img {
	animation: fadeIn 0.3s ease;
}
