/* Elementor CPT Slider */

.ecs-slider {
	--ecs-bg: #fff;
	--ecs-text-col: 50%;
	--ecs-media-height: 360px;
	--ecs-transition: 500ms;
	--ecs-ctrl: #b3b3b3;
	--ecs-ctrl-active: #1f3a52;
	--ecs-focus: #005fcc;

	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--ecs-bg);
}

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

/* ------------------------------ Faixa ---------------------------------- */

.ecs-viewport {
	overflow: hidden;
	width: 100%;
}

.ecs-track {
	display: flex;
	width: 100%;
	transition: transform var(--ecs-transition) ease;
	will-change: transform;
}

.ecs-slide {
	flex: 0 0 100%;
	min-width: 0;
	display: flex;
	flex-direction: column; /* tablet / mobile: imagem em cima, texto em baixo */
	background: var(--ecs-bg);
}

/* ------------------------------ Texto ---------------------------------- */

.ecs-text {
	order: 2;
	display: flex;
	align-items: center;      /* centrado verticalmente */
	justify-content: center;  /* bloco centrado horizontalmente */
	background: var(--ecs-bg);
}

.ecs-text__inner {
	width: 100%;
	margin-inline: auto;
}

.ecs-title {
	font-weight: 700;
	line-height: 1.15;
}

.ecs-desc > :first-child { margin-top: 0; }
.ecs-desc > :last-child  { margin-bottom: 0; }

.ecs-button {
	display: inline-block;
	text-decoration: none;
	border-bottom: 2px solid currentColor;
	font-weight: 500;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.ecs-button:focus-visible,
.ecs-btn:focus-visible,
.ecs-page:focus-visible {
	outline: 3px solid var(--ecs-focus);
	outline-offset: 3px;
}

/* ------------------------------ Imagem --------------------------------- */

.ecs-media {
	order: 1;
	position: relative;
	height: var(--ecs-media-height);
	overflow: hidden;
}

.ecs-media__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;          /* preenchida */
	object-position: center;    /* ao centro */
	display: block;
}

/* Apenas imagem / apenas texto: 1 coluna */
.ecs-slide--image-only .ecs-media { width: 100%; }
.ecs-slide--text-only .ecs-text  { width: 100%; }

/* ------------------------------ Desktop -------------------------------- */

@media (min-width: 1025px) {
	.ecs-slide--two-columns {
		display: grid;
		grid-template-columns: var(--ecs-text-col) 1fr;
		flex-direction: unset;
	}

	.ecs-slide--two-columns .ecs-text  { order: 0; grid-column: 1; }
	.ecs-slide--two-columns .ecs-media { order: 0; grid-column: 2; height: auto; min-height: 100%; }

	.ecs-slide--image-only .ecs-media,
	.ecs-slide--text-only .ecs-text {
		flex: 1 1 auto;
	}

	.ecs-slide--image-only .ecs-media { height: auto; min-height: inherit; }
}

/* ----------------------------- Controlos ------------------------------- */

.ecs-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	background: var(--ecs-bg);
}

.ecs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ecs-ctrl-active);
	cursor: pointer;
	line-height: 1;
}

.ecs-btn:hover { background: rgba(0, 0, 0, .07); }
.ecs-btn[disabled] { opacity: .35; cursor: default; }
.ecs-btn[hidden], .ecs-icon[hidden] { display: none; }

.ecs-icon { display: inline-flex; }

.ecs-pagination {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ecs-page {
	position: relative;
	padding: 0;
	margin: 0;
	border: 0;
	cursor: pointer;
	background: var(--ecs-ctrl);
	transition: background-color .25s ease;
}

.ecs-page.is-active { background: var(--ecs-ctrl-active); }

/* barras (como no desenho) */
.ecs-pagination--bars .ecs-page {
	width: 40px;
	height: 5px;
	border-radius: 0;
}
/* área clicável maior sem alterar o visual */
.ecs-pagination--bars .ecs-page::after,
.ecs-pagination--dots .ecs-page::after {
	content: "";
	position: absolute;
	inset: -12px -2px;
}

/* bolinhas */
.ecs-pagination--dots .ecs-page {
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.ecs-fraction {
	min-width: 3.5em;
	text-align: center;
	font-variant-numeric: tabular-nums;
	color: var(--ecs-ctrl-active);
	font-weight: 600;
}

.ecs-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------- Mobile pequeno ---------------------------- */

@media (max-width: 480px) {
	.ecs-pagination--bars .ecs-page { width: 26px; }
}

/* ---------------------- Movimento reduzido ----------------------------- */

@media (prefers-reduced-motion: reduce) {
	.ecs-track,
	.ecs-page,
	.ecs-button { transition: none; }
}
