/* Avanza Fullscreen Slider — Lic. Pedro Duarte */

.afs-slider {
	position: relative;
	width: 100%;
	height: 80vh;
	overflow: hidden;
	background: #111;
	--afs-speed: 900ms;
	--afs-delay: 6000ms;
	--afs-header-h: 0px;
}

.afs-slider.afs-h-full {
	height: 100vh;
	height: 100svh;
}

/* Rompe el contenedor de Elementor y ocupa toda la ventana */
.afs-slider.afs-fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

html.afs-has-fullwidth,
html.afs-has-fullwidth body {
	overflow-x: clip;
}

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

.afs-slides {
	position: absolute;
	inset: 0;
}

/* ---------- Slide ---------- */
.afs-slide {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	z-index: 1;
}

.afs-slider.afs-offset .afs-slide {
	padding-top: var(--afs-header-h, 0px);
}

.afs-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	will-change: transform;
}

.afs-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, .5);
	pointer-events: none;
}

.afs-inner {
	position: relative;
	z-index: 3;
	flex: 1 1 auto;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 130px;
}

.afs-content {
	width: 100%;
	max-width: 1300px;
	text-align: center;
	color: #fff;
}

.afs-subtitle,
.afs-title,
.afs-desc {
	margin-top: 0;
	color: #fff;
}

.afs-title {
	margin-bottom: 30px;
	line-height: 1.15;
}

.afs-divider {
	display: block;
	width: 220px;
	height: 3px;
	background: #fff;
	margin-left: var(--afs-ml, auto);
	margin-right: var(--afs-mr, auto);
	margin-bottom: 28px;
}

.afs-btn {
	display: inline-block;
	text-decoration: none;
	line-height: 1.2;
	background: #C0183B;
	color: #fff;
	padding: 14px 50px;
	transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}

.afs-btn:hover,
.afs-btn:focus {
	text-decoration: none;
	transform: translateY(-2px);
}

/* ---------- Efecto FADE ---------- */
.afs-effect-fade .afs-slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--afs-speed) ease, visibility 0s linear var(--afs-speed);
}

.afs-effect-fade .afs-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
	transition: opacity var(--afs-speed) ease, visibility 0s linear 0s;
}

/* ---------- Efecto SLIDE ---------- */
.afs-effect-slide .afs-slide {
	transform: translateX(100%);
	transition: transform var(--afs-speed) cubic-bezier(.65, 0, .35, 1);
}

.afs-effect-slide .afs-slide.is-active {
	transform: translateX(0);
	z-index: 2;
}

/* ---------- Ken Burns ---------- */
.afs-kenburns .afs-slide.is-active .afs-bg {
	animation: afsKenBurns calc(var(--afs-delay) + var(--afs-speed) + 2000ms) ease-out forwards;
}

@keyframes afsKenBurns {
	from { transform: scale(1); }
	to   { transform: scale(1.12); }
}

/* ---------- Animación del contenido ---------- */
.afs-animate .afs-anim {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .8s ease, transform .8s ease;
}

.afs-animate .afs-slide.is-active .afs-anim {
	opacity: 1;
	transform: none;
}

.afs-animate .afs-slide.is-active .afs-anim:nth-child(1) { transition-delay: calc(var(--afs-speed) * .35); }
.afs-animate .afs-slide.is-active .afs-anim:nth-child(2) { transition-delay: calc(var(--afs-speed) * .35 + 150ms); }
.afs-animate .afs-slide.is-active .afs-anim:nth-child(3) { transition-delay: calc(var(--afs-speed) * .35 + 300ms); }
.afs-animate .afs-slide.is-active .afs-anim:nth-child(4) { transition-delay: calc(var(--afs-speed) * .35 + 450ms); }
.afs-animate .afs-slide.is-active .afs-anim:nth-child(5) { transition-delay: calc(var(--afs-speed) * .35 + 600ms); }

/* ---------- Flechas ---------- */
.afs-arrow {
	position: absolute;
	top: 50%;
	z-index: 10;
	width: 78px;
	height: 78px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background-color: rgba(255, 255, 255, .35);
	color: rgba(255, 255, 255, .85);
	transform: translateY(-50%);
	transition: background-color .3s ease, color .3s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}

.afs-slider.afs-offset .afs-arrow {
	top: calc(50% + var(--afs-header-h, 0px) / 2);
}

.afs-arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.afs-arrow svg {
	width: 30px;
	height: 30px;
	display: block;
	pointer-events: none;
}

.afs-prev { left: 30px; }
.afs-next { right: 30px; }

/* ---------- Puntos ---------- */
.afs-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 30px;
	z-index: 10;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.afs-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background-color: rgba(255, 255, 255, .5);
	transition: background-color .3s ease, transform .3s ease;
}

.afs-dot.is-active {
	background-color: #C0183B;
	transform: scale(1.2);
}

/* ---------- Header superpuesto (lo aplica el JS) ---------- */
.afs-header-overlay {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 999;
}

.afs-header-transparent,
.afs-header-transparent > .elementor > .e-con,
.afs-header-transparent > .elementor > .elementor-section,
.afs-header-transparent > .elementor > .elementor-section-wrap > .elementor-section,
.afs-header-transparent > .elementor > .elementor-element:not(.elementor-sticky--effects) {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.afs-hide-arrows-mobile-yes .afs-arrow {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.afs-slide,
	.afs-animate .afs-anim,
	.afs-kenburns .afs-slide.is-active .afs-bg {
		transition: none !important;
		animation: none !important;
	}
}
