/**
 * Smiles Motion – Casos de Éxito · Front end
 */

.sce-root {
	--sce-primary: #7b1226;
	--sce-accent: #17462f;
	--sce-card-bg: #ffffff;
	--sce-nav-white: 255, 255, 255;
	--sce-nav-opacity: 0.75;
	--sce-radius: 14px;
	--sce-gap: 28px;
	--sce-ratio: 16/10;
	--sce-title-size: 36px;
	--sce-text-size: 14px;
	--sce-nav-size: 32px;
	--sce-nav-gap: 12px;
	--sce-title-font: "Rubik", "Poppins", Helvetica, Arial, sans-serif;
	--sce-text-font: "Roboto", Helvetica, Arial, sans-serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.sce-root *,
.sce-root *::before,
.sce-root *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Stage */

.sce-stage-wrap {
	position: relative;
	transition: opacity 0.25s ease;
}

.sce-stage-wrap.is-loading {
	opacity: 0.3;
	pointer-events: none;
}

.sce-stage {
	display: grid;
	grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
	gap: var(--sce-gap);
	align-items: start;
}

/* --------------------------------------------------------------- Slider */

.sce-slider {
	position: relative;
	width: 100%;
}

.sce-slider__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 4px;
	background: #000;
	aspect-ratio: var(--sce-ratio);
	touch-action: pan-y;
}

.sce-slider__track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.45s cubic-bezier(0.6, 0.05, 0.2, 1);
	will-change: transform;
}

.sce-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.sce-slide--empty {
	background: #f1f1f1;
}

.sce-media {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	margin: 0;
}

/* Horizontales: recortan y llenan el marco. */
.sce-media--image {
	object-fit: cover;
	object-position: center;
}

/* Verticales: se ven completas, a toda la altura, con negro a los costados
   (igual que los videos). */
.sce-media--portrait,
.sce-slide--video .sce-media,
.sce-root--fit-contain .sce-media--image {
	object-fit: contain;
	background: #000;
}

/* Forzar recorte en todas las imágenes con fit="cover". */
.sce-root--fit-cover .sce-media--image {
	object-fit: cover;
}

.sce-embed {
	position: relative;
	width: 100%;
	height: 100%;
}

.sce-media--embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ------------------------------------------------------------- Controles */

.sce-slider__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
}

.sce-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sce-accent);
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	line-height: 0;
	flex: 0 0 auto;
}

.sce-arrow:hover,
.sce-arrow:focus-visible {
	transform: scale(1.08);
	opacity: 1;
	outline: none;
}

.sce-arrow svg {
	width: 15px;
	height: 15px;
}

.sce-dots {
	display: flex;
	align-items: center;
	gap: 9px;
}

.sce-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(23, 70, 47, 0.32);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sce-dot:hover {
	background: rgba(23, 70, 47, 0.6);
}

.sce-dot.is-active {
	background: var(--sce-accent);
	transform: scale(1.15);
}

/* -------------------------------------------------------------- Contenido */

.sce-card {
	background: var(--sce-card-bg);
	border-radius: var(--sce-radius);
	padding: 34px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.sce-card__title {
	margin: 0 0 20px;
	padding: 0;
	color: var(--sce-primary);
	font-family: var(--sce-title-font);
	font-size: var(--sce-title-size);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-transform: none;
}

.sce-card__text {
	font-family: var(--sce-text-font);
	font-size: var(--sce-text-size);
	font-weight: 500;
	line-height: 1.65;
	color: #2b2b2b;
}

.sce-card__text p {
	margin: 0 0 1.15em;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.sce-card__text p:last-child {
	margin-bottom: 0;
}

/* Blindaje contra los párrafos vacíos que deja el editor. */
.sce-card__text p:empty,
.sce-card__text p > br:only-child {
	display: none;
}

.sce-card__text br + br {
	display: none;
}

.sce-card__text ul,
.sce-card__text ol {
	margin: 0 0 1.15em 1.2em;
	padding: 0;
}

.sce-card__text li {
	margin-bottom: 0.4em;
}

.sce-card__text strong,
.sce-card__text b {
	font-weight: 700;
}

.sce-card__text a {
	color: var(--sce-primary);
	text-decoration: underline;
}

/* ------------------------------------------------------------ Navegación */

.sce-nav {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 16px;
	margin-top: var(--sce-nav-gap);
}

/* Navegación arriba del bloque. */
.sce-root--nav-above .sce-nav {
	margin-top: 0;
	margin-bottom: var(--sce-nav-gap);
}

.sce-nav__btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	flex: 0 1 auto;
	min-width: 240px;
	max-width: 46%;
	padding: 15px 30px;
	border: 0;
	border-radius: 8px;
	color: var(--sce-primary);
	font-family: var(--sce-title-font);
	font-style: italic;
	font-weight: 400;
	font-size: var(--sce-nav-size);
	line-height: 1.2;
	text-decoration: none;
	transition: transform 0.2s ease, filter 0.2s ease;
}

/* Degradado blanco 75% → transparente, arrancando del lado del botón. */
.sce-nav__btn--prev {
	justify-content: flex-start;
	background-image: linear-gradient(
		to right,
		rgba(var(--sce-nav-white), var(--sce-nav-opacity)) 0%,
		rgba(var(--sce-nav-white), 0) 100%
	);
}

.sce-nav__btn--next {
	justify-content: flex-end;
	background-image: linear-gradient(
		to left,
		rgba(var(--sce-nav-white), var(--sce-nav-opacity)) 0%,
		rgba(var(--sce-nav-white), 0) 100%
	);
}

.sce-nav__btn:hover,
.sce-nav__btn:focus-visible {
	color: var(--sce-primary);
	text-decoration: none;
	outline: none;
	filter: saturate(1.05);
}

.sce-nav__btn--prev:hover .sce-nav__arrow {
	transform: translateX(-4px);
}

.sce-nav__btn--next:hover .sce-nav__arrow {
	transform: translateX(4px);
}

.sce-nav__arrow {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.sce-nav__arrow svg {
	width: 32px;
	height: 16px;
}

.sce-nav__label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sce-root--single .sce-single-media {
	max-width: 900px;
	margin: 0 auto 34px;
}

.sce-notice {
	padding: 18px 22px;
	border-left: 4px solid var(--sce-primary);
	background: #fbf5f6;
	font-family: var(--sce-text-font);
	font-size: 14px;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1200px) {
	.sce-root {
		--sce-title-size: 30px;
		--sce-nav-size: 26px;
	}
}

@media (max-width: 980px) {
	.sce-stage {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.sce-card {
		padding: 26px 24px;
	}
}

@media (max-width: 600px) {
	.sce-root {
		--sce-ratio: 4/3;
		--sce-title-size: 26px;
		--sce-nav-size: 18px;
	}

	.sce-nav {
		gap: 10px;
	}

	.sce-nav__btn {
		min-width: 0;
		max-width: 48%;
		padding: 12px 16px;
		gap: 8px;
	}

	.sce-nav__arrow svg {
		width: 22px;
		height: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sce-slider__track,
	.sce-stage-wrap,
	.sce-arrow,
	.sce-nav__btn,
	.sce-nav__arrow {
		transition: none !important;
	}
}
