/* YUYI 輪播 — 結構樣式
   顏色／字體大小／文字陰影／按鈕樣式等由 Elementor 樣式面板動態產生（scoped 到每個 Widget 實例），不寫在這裡。
   這裡只放版面結構、動畫、手機優先的基礎尺寸。
*/

.yuyi-carousel {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.yuyi-carousel-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.yuyi-carousel-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #222;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.6s ease;
}

.yuyi-carousel-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 1;
}

.yuyi-carousel-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.yuyi-carousel-content {
	position: relative;
	z-index: 2;
	max-width: 90%;
	padding: 20px;
	box-sizing: border-box;
}

.yuyi-carousel-title {
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.25;
}

.yuyi-carousel-desc {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.6;
}

.yuyi-carousel-btn {
	display: inline-block;
	text-decoration: none;
	min-height: 44px;
	line-height: 20px;
	box-sizing: border-box;
	border: 1px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* 左右箭頭：手機優先，預設就是可觸控大小 */
.yuyi-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
}

.yuyi-carousel-arrow svg {
	width: 20px;
	height: 20px;
}

.yuyi-carousel-prev {
	left: 10px;
}

.yuyi-carousel-next {
	right: 10px;
}

/* 下方圓點 */
.yuyi-carousel-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.yuyi-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.yuyi-carousel-dot.is-active {
	transform: scale(1.25);
}

.yuyi-carousel[data-arrows="0"] .yuyi-carousel-arrow {
	display: none;
}

.yuyi-carousel[data-dots="0"] .yuyi-carousel-dots {
	display: none;
}

/* 桌機：箭頭可以再大一點、離邊緣遠一點 */
@media (min-width: 768px) {
	.yuyi-carousel-title {
		font-size: 42px;
	}
	.yuyi-carousel-desc {
		font-size: 18px;
	}
	.yuyi-carousel-content {
		padding: 40px 60px;
	}
	.yuyi-carousel-arrow {
		width: 48px;
		height: 48px;
	}
	.yuyi-carousel-arrow svg {
		width: 24px;
		height: 24px;
	}
	.yuyi-carousel-prev {
		left: 24px;
	}
	.yuyi-carousel-next {
		right: 24px;
	}
}

/* Elementor 編輯器裡的最小高度保險，避免拖進畫布時看起來像空的 */
.elementor-editor-active .yuyi-carousel {
	min-height: 120px;
}
