/* YOO Image Slider — estructura y comportamiento.
   Colores, tipografías y tamaños por defecto se inyectan vía Elementor
   (selectors). Aquí solo va el layout. */

.ys-slider {
	width: 100%;
	box-sizing: border-box;
}

.ys-slider *,
.ys-slider *::before,
.ys-slider *::after {
	box-sizing: border-box;
}

/* --- Viewport (recorta el track) --- */
.ys-viewport {
	position: relative;
	width: 100%;
	height: 620px; /* fallback; Elementor sobreescribe con image_height */
	overflow: hidden;
}

/* --- Track --- */
.ys-track {
	display: flex;
	width: 100%;
	height: 100%;
	/* transition la pone el JS según data-speed */
	will-change: transform;
}

/* --- Slide --- */
.ys-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	min-width: 0;
}

.ys-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover; /* Elementor sobreescribe con image_fit */
	user-select: none;
}

.ys-slide-link {
	display: block;
	width: 100%;
	height: 100%;
}

/* --- Efecto FADE: slides apilados, se cruza la opacidad --- */
.ys-effect-fade .ys-track {
	display: block;
	position: relative;
}

.ys-effect-fade .ys-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
	/* transition la pone el JS según data-speed */
}

.ys-effect-fade .ys-slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

/* --- Footer: dots a la izquierda, título + flechas a la derecha --- */
.ys-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
}

/* --- Dots / progress --- */
.ys-dots {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	flex-wrap: wrap;
}

.ys-dot {
	display: inline-block;
	width: 34px;
	height: 3px;
	padding: 0;
	border: 0;
	background-color: #d8d8d8;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ys-dot:hover {
	transform: scaleY(1.6);
}

/* Estilo "punto" (círculos) en vez de líneas */
.ys-dots-dot .ys-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.ys-dots-dot .ys-dot:hover {
	transform: scale(1.25);
}

/* --- Controles (título + flechas) --- */
.ys-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	flex: 0 0 auto;
}

.ys-title {
	margin: 0;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50vw;
}

/* --- Flechas --- */
.ys-arrows {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.ys-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ys-arrow svg {
	display: block;
	width: 20px;
	height: 20px;
}

.ys-arrow[disabled],
.ys-arrow[aria-disabled="true"] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* --- Responsive --- */
@media ( max-width: 767px ) {
	/* Grid en lugar de flex: con flex, al envolverse los dots reclaman su ancho
	   de contenido y el footer manda las flechas a la fila de abajo. El grid fija
	   cada zona, así las flechas SIEMPRE quedan en la fila 1 junto a los dots,
	   y estos se envuelven dentro de su propia celda (sin empujar nada).
	     Fila 1:  [ dots ........... ] [ flechas ]
	     Fila 2:  [ ...... título centrado ...... ] */
	.ys-footer {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"dots arrows"
			"title title";
		align-items: center;
		column-gap: 14px;
		row-gap: 14px;
	}

	/* .ys-controls deja de agrupar: sus hijos (título y flechas) pasan a ser
	   ítems directos del grid para poder colocarlos por zonas sin tocar el HTML. */
	.ys-controls {
		display: contents;
	}

	.ys-dots {
		grid-area: dots;
		justify-content: flex-start;
		min-width: 0; /* permite que la celda 1fr encoja y los dots se envuelvan */
	}

	.ys-arrows {
		grid-area: arrows;
	}

	.ys-title {
		grid-area: title;
		max-width: none;
		text-align: center;
		white-space: normal;
	}
}

/* --- Accesibilidad: respeta "reduce motion" --- */
@media ( prefers-reduced-motion: reduce ) {
	.ys-track,
	.ys-slide,
	.ys-dot,
	.ys-arrow {
		transition: none !important;
	}
}
