/**
 * Widget "CUME Hero".
 *
 * Portada con fondo de color, imagen, carrusel de imágenes, vídeo o carrusel de
 * vídeos. Las diapositivas se apilan una encima de otra y se alternan por
 * opacidad; sólo la activa se ve.
 */

.cume-hero {
	--cume-hero-alto: 80vh;
	--cume-hero-ancho: 720px;
	--cume-hero-justify: flex-start;
	--cume-hero-vertical: center;

	--cume-hero-bg: #1a1636;
	--cume-hero-overlay: rgba(10, 8, 24, 0.6);

	--cume-hero-btn-radius: 6px;
	--cume-hero-btn-borde: 1px;
	--cume-hero-btn-primario-bg: #ffa800;
	--cume-hero-btn-primario-color: #ffffff;
	--cume-hero-btn-secundario-bg: #ffffff;
	--cume-hero-btn-secundario-color: #1a1636;
	--cume-hero-btn-contorno-bg: transparent;
	--cume-hero-btn-contorno-color: #ffffff;
	--cume-hero-btn-contorno-border: #ffa800;

	--cume-hero-btn-primario-bg-hover: #e09200;
	--cume-hero-btn-primario-color-hover: #ffffff;
	--cume-hero-btn-secundario-bg-hover: #ece9ff;
	--cume-hero-btn-secundario-color-hover: #1a1636;
	--cume-hero-btn-contorno-bg-hover: #ffa800;
	--cume-hero-btn-contorno-color-hover: #1a1636;
	--cume-hero-btn-contorno-border-hover: #ffa800;

	--cume-hero-transicion: 900ms;

	position: relative;
	display: flex;
	align-items: var(--cume-hero-vertical);
	min-height: var(--cume-hero-alto);
	overflow: hidden;
	background-color: var(--cume-hero-bg);
	isolation: isolate;
}

/* Salida del contenedor: estira el hero a todo el ancho de la ventana aunque
 * viva dentro de una caja limitada. La clase la inyecta Elementor en el wrapper
 * del widget (prefix_class). */
.cume-hero-full-yes .cume-hero {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
}

/* --- Fondo --- */
.cume-hero__bg,
.cume-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.cume-hero__overlay {
	background: var(--cume-hero-overlay);
}

.cume-hero__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	transition: opacity var(--cume-hero-transicion) ease;
}

.cume-hero__slide.is-active {
	opacity: 1;
}

/* Cualificado con la etiqueta: `.elementor video` y las reglas del tema suelen
 * imponer altura automática y romperían el encuadre. */
.cume-hero video.cume-hero__video {
	object-fit: cover;
	object-position: center;
}

/* --- Contenido --- */
.cume-hero__inner {
	position: relative;
	width: 100%;
}

/* La alineación (text-align, márgenes y --cume-hero-justify) la escribe el
 * control de Elementor sobre este mismo elemento. */
.cume-hero__content {
	max-width: var(--cume-hero-ancho);
	text-align: left;
	margin-right: auto;
}

.cume-hero__eyebrow {
	margin: 0 0 14px;
	color: #ffa800;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.2;
}

.cume-hero__title {
	margin: 0 0 20px;
	color: #ffffff;
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 800;
	line-height: 1.1;
}

/* La parte del título entre **asteriscos**. Hereda todo salvo el color, para
 * que siga siendo la misma frase y no un trozo pegado. */
.cume-hero__title-hl {
	color: #a99cff;
}

.cume-hero__text {
	margin: 0 0 32px;
	color: #d8d8e4;
	font-size: 1.1rem;
	line-height: 1.6;
}

/* --- Botones --- */
.cume-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: var(--cume-hero-justify, flex-start);
}

.cume-hero a.cume-hero__btn,
.cume-hero button.cume-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 30px;
	border: var(--cume-hero-btn-borde) solid transparent;
	border-radius: var(--cume-hero-btn-radius);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.cume-hero a.cume-hero__btn:hover,
.cume-hero button.cume-hero__btn:hover,
.cume-hero a.cume-hero__btn:focus-visible,
.cume-hero button.cume-hero__btn:focus-visible {
	transform: translateY(-2px);
}

/* El borde va aparte del texto en los tres estilos: sin color asignado queda
 * transparente y el botón se ve plano, que es lo normal en los rellenos. */
.cume-hero a.cume-hero__btn--primario,
.cume-hero button.cume-hero__btn--primario {
	background: var(--cume-hero-btn-primario-bg);
	border-color: var(--cume-hero-btn-primario-border, transparent);
	color: var(--cume-hero-btn-primario-color);
}

.cume-hero a.cume-hero__btn--secundario,
.cume-hero button.cume-hero__btn--secundario {
	background: var(--cume-hero-btn-secundario-bg);
	border-color: var(--cume-hero-btn-secundario-border, transparent);
	color: var(--cume-hero-btn-secundario-color);
}

.cume-hero a.cume-hero__btn--contorno,
.cume-hero button.cume-hero__btn--contorno {
	background: var(--cume-hero-btn-contorno-bg);
	border-color: var(--cume-hero-btn-contorno-border, currentColor);
	color: var(--cume-hero-btn-contorno-color);
}

/* Estado con el ratón encima. Cada color cae de vuelta al de reposo si no se
 * define, así que quitar un valor no deja el botón a medias. */
.cume-hero a.cume-hero__btn--primario:hover,
.cume-hero button.cume-hero__btn--primario:hover,
.cume-hero a.cume-hero__btn--primario:focus-visible,
.cume-hero button.cume-hero__btn--primario:focus-visible {
	background: var(--cume-hero-btn-primario-bg-hover, var(--cume-hero-btn-primario-bg));
	border-color: var(--cume-hero-btn-primario-border-hover, var(--cume-hero-btn-primario-border, transparent));
	color: var(--cume-hero-btn-primario-color-hover, var(--cume-hero-btn-primario-color));
}

.cume-hero a.cume-hero__btn--secundario:hover,
.cume-hero button.cume-hero__btn--secundario:hover,
.cume-hero a.cume-hero__btn--secundario:focus-visible,
.cume-hero button.cume-hero__btn--secundario:focus-visible {
	background: var(--cume-hero-btn-secundario-bg-hover, var(--cume-hero-btn-secundario-bg));
	border-color: var(--cume-hero-btn-secundario-border-hover, var(--cume-hero-btn-secundario-border, transparent));
	color: var(--cume-hero-btn-secundario-color-hover, var(--cume-hero-btn-secundario-color));
}

.cume-hero a.cume-hero__btn--contorno:hover,
.cume-hero button.cume-hero__btn--contorno:hover,
.cume-hero a.cume-hero__btn--contorno:focus-visible,
.cume-hero button.cume-hero__btn--contorno:focus-visible {
	background: var(--cume-hero-btn-contorno-bg-hover, var(--cume-hero-btn-contorno-bg));
	border-color: var(--cume-hero-btn-contorno-border-hover, var(--cume-hero-btn-contorno-border, currentColor));
	color: var(--cume-hero-btn-contorno-color-hover, var(--cume-hero-btn-contorno-color));
}

.cume-hero__btn-icon {
	display: inline-flex;
	align-items: center;
}

.cume-hero__btn-icon i,
.cume-hero__btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	color: currentColor;
}

/* --- Responsive --- */
@media (max-width: 767px) {
	.cume-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}
}

/* Quien pide menos movimiento no recibe transiciones entre diapositivas; el
 * carrusel sigue avanzando, pero sin desvanecido. */
@media (prefers-reduced-motion: reduce) {
	.cume-hero__slide,
	.cume-hero a.cume-hero__btn,
	.cume-hero button.cume-hero__btn {
		transition: none;
	}

	.cume-hero a.cume-hero__btn:hover,
	.cume-hero button.cume-hero__btn:hover {
		transform: none;
	}
}
