/* === GENERAL === */

.mlx-flipbox-wrapper.layout-carousel {
	position: relative;
}

.custom-flip-slider-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 0 60px;
	box-sizing: border-box;
	overflow: hidden;
}

.custom-flip-slider.slick-carousel {
	width: 100%;
	padding: 40px 20px;
	z-index: 1;
}

.mlx-slick-slide {
	height: auto;
	padding: 0 15px;
	box-sizing: border-box;
}

.mlx-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #00E3A9;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 9999;
	transition: all 0.3s ease;
	user-select: none;
}

.mlx-nav-btn:hover {
	background: #00e3a9;
	transform: translateY(-50%) scale(1.1);
}

.mlx-nav-btn:hover svg path {
	stroke: #fff;
}

.mlx-prev {
	left: 5px;
}

.mlx-next {
	right: 5px;
}

.slick-prev:before,
.slick-next:before {
	content: none !important;
}

.slick-prev,
.slick-next {
	display: none !important;
}

/* Slick-ove tačke */
.slick-dots {
	display: none !important;
}

@media (max-width: 768px) {
	.custom-flip-slider-wrapper {
		padding: 0;
	}

	.custom-flip-slider.slick-carousel {
		padding: 40px 45px !important;
	}

	.mlx-nav-btn, .mlx-btn-prev {
		width: 38px;
		height: 38px;
	}

	.mlx-prev {
		left: 13px;
	}

	.mlx-next {
		right: 15px;
	}

	.slick-track {
		padding: 30px 0 !important;
	}
}

/* === 3D STILOVI (Zadržani) === */
.slick-list {
	padding: 50px 0 !important;
}

.mlx-custom-flipbox * {
	backface-visibility: hidden;
	transform-style: preserve-3d;
}

.mlx-custom-flipbox .elementor-widget-container {
	transform: none !important;
	perspective: none !important;
}

.mlx-flip-box {
	width: 100%;
	height: 350px;
	position: relative;
	cursor: pointer;
	transform-style: preserve-3d !important;
	perspective: 1200px !important;
}

.mlx-box-container {
	height: 100%;
	width: 100%;
	position: relative;
	transform-style: preserve-3d !important;
}

.mlx-box-holder {
	height: 100%;
	width: 100%;
	padding: 18px 10px;
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	text-align: center;
	border-radius: 18px;
	background: #fff;
	box-shadow: 2px 4px 15px 3px rgba(0, 0, 0, 0.13) !important;
	border: 1px solid transparent !important;
	-webkit-font-smoothing: antialiased;
	transform-style: preserve-3d !important;
	backface-visibility: hidden !important;
	transition: all 0.8s cubic-bezier(0.4, 0.25, 0.6, 0.94) !important;
}

.mlx-box-content {
	transform: translateZ(60px) scale(0.9) !important;
	transform-style: preserve-3d !important;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
}

.mlx-front {
	transform: rotateY(0deg);
	z-index: 2;
}

.mlx-back {
	transform: rotateY(180deg);
	z-index: 1;
	background: #333;
}

.mlx-flip-box.mlx-flip-show .mlx-front {
	transform: rotateY(-180deg) !important;
}

.mlx-flip-box.mlx-flip-show .mlx-back {
	transform: rotateY(0deg) !important;
	z-index: 3;
}

.mlx-icon-back {
	width: 90px;
	height: auto;
	margin-bottom: 20px;
	display: inline-block;
	transform: translateZ(50px) rotateX(0deg) rotateY(-5deg);
	transition: transform 0.3s ease-out;
	filter: drop-shadow(0 15px 10px rgba(0, 0, 0, 0.9));
	box-shadow: drop-shadow(0 15px 10px rgba(0, 227, 169, 0.5)) !important;
}

.mlx-icon {
	width: 100%;
	height: auto;
	margin-bottom: 20px;
	display: inline-block;
}

.elementor-widget-shortcode, .elementor-shortcode {
	overflow: visible !important;
}

/* =========================================
   FIX: Elementor kills Slick transitions
========================================= */

.elementor .custom-flip-slider .slick-track {
	transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1) !important;
	will-change: transform;
}

.elementor .custom-flip-slider .slick-slide {
	transition: opacity 300ms ease !important;
}

/* prevent Elementor transform stacking context issues */
.elementor .mlx-flipbox-wrapper {
	transform: none !important;
}

.mlx-back h4 {
	color: #00e3a9 !important;
	font-size: 26px;

	font-weight: 600;
}

.mlx-back p {
	color: #fff !important;
	font-size: 20px;
	line-height: 25px;
	font-weight: 600;
}

.mlx-btn {
	margin-top: 20px;
	background: #000;
	color: #fff;
	padding: 12px 22px;
	border-radius: 8px;
	text-decoration: none;
	display: inline-block;
	transition: background 0.3s;
}

.mlx-btn:hover {
	background: #333;
}

.mlx-box-holder.mlx-front {
	background-color: #B5F7E6 !important;
}

.mlx-front .mlx-desc {
	font-size: 20px;
	color: #000 !important;
	font-weight: 600;
	line-height: 25px;
}

.mlx-front .mlx-title {
	font-size: 26px;
	color: #000 !important;
	font-weight: 600;
}

.mlx-flip-box.mlx-3d .mlx-icon, .mlx-flip-box.mlx-6d .mlx-icon {
	max-width: 150px !important;
}

/* GRID LAYOUT */
.mlx-flipbox-grid {
	display: grid;
	grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
	gap: 24px;
}

/* Responsive */
@media (max-width: 1200px) {
	.mlx-flipbox-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.mlx-flipbox-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.mlx-flipbox-grid {
		grid-template-columns: 1fr;
	}
}

#certificates .mlx-flip-box .mlx-front {
	transition: 0.3s ease-in-out !important;
}

#certificates .mlx-flip-box.mlx-flip-show .mlx-front {
	transform: none !important;
	background: #333 !important;
	opacity: 1 !important;
}

#certificates .mlx-flip-box.mlx-flip-show .mlx-front .mlx-title {
	color: #00e3a9 !important;
}

#certificates .mlx-flip-box.mlx-flip-show .mlx-front .mlx-desc {
	color: #fff !important;
}

#certificates .mlx-flip-box.mlx-flip-show .mlx-back {
	transform: none !important;
	z-index: 3;
	background: transparent !Important;
}

#certificates .mlx-flip-box .mlx-back {
	opacity: 0 !important;
}

#certificates .mlx-back {
	transform: none !important;
	display: none;
}

.mlx-custom-flipbox a {
	height: 100% !important;
}