/**
 * ACF Carousel Elementor Widget Styles
 * 
 * Basic carousel styling and layout
 */


/**
 * 1.0 Carousel Wrapper and Container
 */
.acf-carousel-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: visible;
	margin: 0 auto;
	padding: 20px 0 80px 0;
	display: flex;
	align-items: flex-start;
	gap: 30px;
}

.acf-carousel {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	padding: 0;
	position: relative;
	flex: 1;
}


/**
 * 2.0 Swiper Structure
 */
.acf-carousel .swiper-wrapper {
	display: flex;
	align-items: stretch;
	width: 100%;
}

.acf-carousel .swiper-slide {
	height: auto;
	display: flex;
	flex-direction: column;
	width: auto;
	flex-shrink: 0;
}


/**
 * 3.0 Carousel Items
 */
.acf-carousel-item {
	position: relative;
	padding: 25px;
	background: #fff;
	border-radius: 1em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin: 0;
	height: auto;
	width: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	flex-shrink: 0;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.acf-carousel-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/**
 * 4.0 Featured Images and General Images
 */
.acf-carousel-featured-image img,
.acf-image {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
	margin: 10px 0;
}

.acf-field-value img {
	max-width: 100%;
	height: auto;
	display: block;
}

.acf-carousel-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.acf-carousel-featured-image {
	width: 100%;
	margin-bottom: 15px;
	text-align: center;
}

.acf-carousel-featured-image img {
	width: 100%;
	object-fit: cover;
	border-radius: 4px;
}


/**
 * 5.0 Image Alignment
 */
/* Center alignment for images */
.acf-field-item[style*="text-align: center"] .acf-field-value img,
.acf-external-item[style*="text-align: center"] .acf-external-value img {
	margin: 0 auto;
	display: block;
}

/* Right alignment for images */
.acf-field-item[style*="text-align: right"] .acf-field-value img,
.acf-external-item[style*="text-align: right"] .acf-external-value img {
	margin-left: auto;
	margin-right: 0;
	display: block;
}

/* Left alignment for images (default) */
.acf-field-item[style*="text-align: left"] .acf-field-value img,
.acf-external-item[style*="text-align: left"] .acf-external-value img {
	margin-left: 0;
	margin-right: auto;
	display: block;
}


/**
 * 6.0 ACF Field Items
 */
.acf-field-item {
	margin-bottom: 15px;
	flex-grow: 0;
	flex-shrink: 0;
}

.acf-field-item:last-child {
	margin-top: auto;
}

.acf-field-title h3 {
	margin: 0 0 10px 0;
	font-size: 1.3em;
	color: #333;
	text-align: center;
	line-height: 1.3;
}

.acf-field-value {
	word-wrap: break-word;
	line-height: 1.4;
}

.acf-field-label {
	font-weight: 600;
	margin-bottom: 5px;
	color: #555;
	font-size: 0.9em;
}


/**
 * 7.0 External ACF Fields
 */
.acf-external-fields {
	flex: 0 0 450px;
	padding: 20px;
	background: transparent;
	order: -1;
}

.acf-external-content {
	display: none;
}

.acf-external-content.active {
	display: block;
}

.acf-external-item {
	margin-bottom: 15px;
}

.acf-external-item:last-child {
	margin-bottom: 0;
}

.acf-external-label {
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
	font-size: 0.9em;
}

.acf-external-value {
	line-height: 1.4;
	color: #555;
}

.acf-external-value img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}


/**
 * 8.0 Swiper Navigation
 */
.acf-carousel .swiper-button-next,
.acf-carousel .swiper-button-prev {
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	transition: background 0.3s ease;
	position: absolute;
	top: auto;
	bottom: 20px;
	margin-top: 0;
	z-index: 10;
}

.acf-carousel .swiper-button-prev {
	right: auto;
}

.acf-carousel .swiper-button-next {
	left: 60px;
	right: auto;
}

.acf-carousel .swiper-button-next:hover,
.acf-carousel .swiper-button-prev:hover {
	background: rgba(0, 0, 0, 0.8);
}

.acf-carousel .swiper-button-next:after,
.acf-carousel .swiper-button-prev:after {
	font-size: 20px;
}


/**
 * 9.0 Swiper Pagination
 */
.acf-carousel .swiper-pagination {
	position: relative;
	margin-top: 45px;
}

.acf-carousel .swiper-pagination-bullet {
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	margin: 0 2px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid rgba(255, 255, 255, 0.8);
	position: relative;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.acf-carousel .swiper-pagination-bullet::after {
	content: '';
	position: absolute;
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 2px;
	background: rgba(255, 255, 255, 0.8);
}

.acf-carousel .swiper-pagination-bullet:last-child::after {
	display: none;
}

.acf-carousel .swiper-pagination-bullet-active {
	background: rgba(255, 255, 255, 0.95);
	color: #333;
	border-color: #fff;
	transform: scale(1.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}


/**
 * 10.0 Dynamic Background Transition
 */
.acf-carousel-bg-transition {
	transition: opacity 500ms ease-in-out;
	-webkit-transition: opacity 500ms ease-in-out;
	-moz-transition: opacity 500ms ease-in-out;
	-o-transition: opacity 500ms ease-in-out;
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	background-attachment: fixed !important;
}

/* Ensure smooth background changes */
body.acf-carousel-bg-transition,
.acf-carousel-bg-transition {
	will-change: opacity;
}


/**
 * 11.0 Responsive Layout Adjustments
 */
@media (max-width: 1024px) {
	.acf-carousel-wrapper {
		padding: 15px 0 80px 0;
	}
	
	.acf-carousel-item {
		padding: 1.5em;
	}
	
	.acf-field-title h3 {
		font-size: 1.3em;
	}
	
	.acf-carousel .swiper-button-prev {
		left: calc(50% - 50px);
	}
	
	.acf-carousel .swiper-button-next {
		left: calc(50% + 10px);
	}
}

@media (max-width: 768px) {
	.hide-mobile {
		display: none !important;
	}
	
	.acf-carousel-wrapper {
		padding: 10px 0 60px 0;
		flex-direction: column;
		gap: 20px;
	}
	
	.acf-carousel-item {
		padding: 1em;
	}
	
	.acf-field-title h3 {
		font-size: 1.2em;
	}
	
	.acf-external-fields {
		flex: none;
		order: 0;
		padding: 15px;
	}
	
	/* Position navigation below single card on mobile */
	.acf-carousel .swiper-button-next,
	.acf-carousel .swiper-button-prev {
		bottom: 10px;
		width: 35px;
		height: 35px;
	}
	
	.acf-carousel .swiper-button-prev {
		left: calc(50% - 40px);
	}
	
	.acf-carousel .swiper-button-next {
		left: calc(50% + 5px);
	}
	
	/* Remove fixed attachment on mobile for better performance */
	.acf-carousel-bg-transition {
		background-attachment: scroll !important;
	}
}

@media (max-width: 480px) {
	.acf-carousel-item {
		padding: 1em;
	}
}

@media (min-width: 769px) {
	.hide-desktop {
		display: none !important;
	}
}


/**
 * 12.0 Elementor Specific Styles
 */
/* Ensure carousel container properly constrains content */
.elementor-widget-acf-carousel {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.elementor-widget-acf-carousel .elementor-widget-container {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

/* Editor Specific Styles - Match Frontend */
.elementor-editor-active .acf-carousel-wrapper {
	min-height: auto;
}

.elementor-editor-active .acf-carousel-item {
	height: auto;
	padding: 2em;
	margin: 0;
	width: 100%;
	background: #fff;
	border-radius: 1em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fix for Elementor Editor */
.elementor-editor-active .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
}

.elementor-editor-active .swiper-slide {
	flex-shrink: 0;
	width: auto;
	height: auto;
	display: flex;
	flex-direction: column;
} 