/**
 * Rescue Hero for Elementor
 * Todos los valores clave son variables CSS: los controles del widget las sobreescriben.
 */

.rsh-hero {
	--rsh-accent: #e2001a;
	--rsh-dark: #111111;
	--rsh-head-bg: #ffffff;
	--rsh-overlay-top: rgba(0, 0, 0, 0.15);
	--rsh-overlay-mid: rgba(0, 0, 0, 0.45);
	--rsh-overlay-bottom: rgba(0, 0, 0, 0.92);
	--rsh-media-h: 620px;
	--rsh-max-w: 1240px;
	--rsh-pad-x: 24px;
	--rsh-cols: 3;
	--rsh-cards-gap: 40px;
	--rsh-icon-size: 44px;
	--rsh-icon-color: #ffffff;
	--rsh-img-w: 72px;
	--rsh-line-1: var(--rsh-accent);
	--rsh-line-2: rgba(255, 255, 255, 0.55);
	--rsh-line-split: 22%;
	--rsh-head-align: center;
	--rsh-hotline-radius: 0px;
	--rsh-panel-bg: var(--rsh-accent);
	--rsh-panel-shift: 28px;
	--rsh-panel-dur: 400ms;
	--rsh-line-1-h: #111111;
	--rsh-line-2-h: #ffffff;
	--rsh-swap-dur: 600ms;

	position: relative;
	overflow: hidden;
}

.rsh-hero *,
.rsh-hotline * {
	box-sizing: border-box;
}

.rsh-hero__inner {
	max-width: var(--rsh-max-w);
	margin: 0 auto;
	padding-left: var(--rsh-pad-x);
	padding-right: var(--rsh-pad-x);
}

/* ------------------------------------------------------------- Titular */
.rsh-hero__head {
	position: relative;
	z-index: 2;
	background-color: var(--rsh-head-bg);
	padding: 60px 0 44px;
	text-align: var(--rsh-head-align);
}

.rsh-hero__title {
	margin: 0 0 18px;
	font-size: clamp(30px, 4.6vw, 60px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #111111;
}

.rsh-hero__subtitle {
	margin: 0 auto;
	max-width: 720px;
	font-size: clamp(16px, 1.5vw, 21px);
	line-height: 1.5;
	color: #333333;
}

.rsh-hero__subtitle p {
	margin: 0 0 6px;
}

.rsh-hero__subtitle p:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------- Zona imagen */
.rsh-hero__media {
	position: relative;
	background-color: #1a1a1a;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

/* Difuminado suave entre el bloque del titular y la fotografía */
.rsh-hero__media::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 150px;
	z-index: 2;
	pointer-events: none;
	background-image: linear-gradient(to bottom, var(--rsh-head-bg) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Capas de imagen que se intercambian al hacer hover en cada tarjeta */
.rsh-hero__layers {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.rsh-hero__layer {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0;
	transform: scale(1);
	transition: opacity var(--rsh-swap-dur) ease, transform calc(var(--rsh-swap-dur) * 2) ease;
	will-change: opacity, transform;
}

.rsh-hero__layer.is-active {
	opacity: 1;
}

.rsh-hero--swap-zoom .rsh-hero__layer.is-active {
	transform: scale(1.06);
}

.rsh-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: linear-gradient(
		180deg,
		var(--rsh-overlay-top) 0%,
		var(--rsh-overlay-mid) 55%,
		var(--rsh-overlay-bottom) 100%
	);
}

.rsh-hero__body {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 48px;
	min-height: var(--rsh-media-h);
	padding: 46px 0 52px;
}

/* ------------------------------------------------------------- Tarjetas */
.rsh-cards {
	display: grid;
	grid-template-columns: repeat(var(--rsh-cols), minmax(0, 1fr));
	gap: var(--rsh-cards-gap);
	align-items: start;
}

.rsh-card {
	position: relative;
	display: block;
	text-decoration: none;
	color: inherit;
	z-index: 1;
}

.rsh-card:hover {
	z-index: 3;
}

/* Panel de color: fade in + up */
.rsh-card__panel {
	position: absolute;
	top: -40px;
	right: -26px;
	bottom: -44px;
	left: -26px;
	z-index: 0;
	display: block;
	background-color: var(--rsh-panel-bg);
	opacity: 0;
	transform: translateY(var(--rsh-panel-shift));
	transition: opacity var(--rsh-panel-dur) ease, transform var(--rsh-panel-dur) cubic-bezier(0.22, 0.61, 0.36, 1);
	pointer-events: none;
	will-change: opacity, transform;
}

.rsh-card:hover .rsh-card__panel,
.rsh-card:focus-visible .rsh-card__panel,
.rsh-card.is-active .rsh-card__panel {
	opacity: 1;
	transform: translateY(0);
}

/* El contenido siempre por encima del panel */
.rsh-card__icon,
.rsh-card__line,
.rsh-card__title,
.rsh-card__text {
	position: relative;
	z-index: 1;
}

.rsh-card:hover .rsh-card__line {
	background-image: linear-gradient(
		to right,
		var(--rsh-line-1-h) var(--rsh-line-split),
		var(--rsh-line-2-h) var(--rsh-line-split)
	);
}

@media (prefers-reduced-motion: reduce) {
	.rsh-card__panel,
	.rsh-hero__layer {
		transition-duration: 0.01ms;
		transform: none !important;
	}
}

.rsh-card:hover,
.rsh-card:focus {
	text-decoration: none;
}

.rsh-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	min-height: var(--rsh-icon-size);
	font-size: var(--rsh-icon-size);
	line-height: 1;
	color: var(--rsh-icon-color);
	transition: color 0.25s ease;
}

.rsh-card__icon svg {
	width: var(--rsh-icon-size);
	height: var(--rsh-icon-size);
	fill: currentColor;
}

/* Icono en formato imagen */
.rsh-card__icon--img {
	display: block;
	min-height: 0;
	font-size: 0;
	line-height: 0;
}

.rsh-card__img {
	display: block;
	width: var(--rsh-img-w);
	height: auto;
	max-width: 100%;
	transition: transform var(--rsh-panel-dur) ease;
}

.rsh-card:hover .rsh-card__img {
	transform: translateY(-2px);
}

.rsh-card__line {
	display: block;
	height: 2px;
	margin: 26px 0 20px;
	background-image: linear-gradient(
		to right,
		var(--rsh-line-1) var(--rsh-line-split),
		var(--rsh-line-2) var(--rsh-line-split)
	);
}

.rsh-hero--no-divider .rsh-card__icon {
	margin-bottom: 22px;
}

.rsh-card__title {
	margin: 0 0 12px;
	font-size: clamp(20px, 1.8vw, 27px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #ffffff;
	text-transform: uppercase;
	transition: color var(--rsh-panel-dur) ease;
}

.rsh-card__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
	transition: color var(--rsh-panel-dur) ease;
}

.rsh-hero--lift .rsh-card {
	transition: transform 0.3s ease;
}

.rsh-hero--lift a.rsh-card:hover {
	transform: translateY(-6px);
}

/* Fallback sin JavaScript: navegadores con soporte de :has() (Chrome/Edge 105+, Safari 15.4+, Firefox 121+) */
@supports selector(:has(*)) {
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="0"]:hover) .rsh-hero__layer[data-rsh-index="0"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="0"]:focus-within) .rsh-hero__layer[data-rsh-index="0"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="1"]:hover) .rsh-hero__layer[data-rsh-index="1"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="1"]:focus-within) .rsh-hero__layer[data-rsh-index="1"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="2"]:hover) .rsh-hero__layer[data-rsh-index="2"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="2"]:focus-within) .rsh-hero__layer[data-rsh-index="2"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="3"]:hover) .rsh-hero__layer[data-rsh-index="3"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="3"]:focus-within) .rsh-hero__layer[data-rsh-index="3"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="4"]:hover) .rsh-hero__layer[data-rsh-index="4"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="4"]:focus-within) .rsh-hero__layer[data-rsh-index="4"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="5"]:hover) .rsh-hero__layer[data-rsh-index="5"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="5"]:focus-within) .rsh-hero__layer[data-rsh-index="5"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="6"]:hover) .rsh-hero__layer[data-rsh-index="6"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="6"]:focus-within) .rsh-hero__layer[data-rsh-index="6"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="7"]:hover) .rsh-hero__layer[data-rsh-index="7"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="7"]:focus-within) .rsh-hero__layer[data-rsh-index="7"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="8"]:hover) .rsh-hero__layer[data-rsh-index="8"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="8"]:focus-within) .rsh-hero__layer[data-rsh-index="8"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="9"]:hover) .rsh-hero__layer[data-rsh-index="9"],
	.rsh-hero--swap:has(.rsh-card[data-rsh-index="9"]:focus-within) .rsh-hero__layer[data-rsh-index="9"] {
		opacity: 1;
	}

	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="0"]:hover) .rsh-hero__layer[data-rsh-index="0"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="0"]:focus-within) .rsh-hero__layer[data-rsh-index="0"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="1"]:hover) .rsh-hero__layer[data-rsh-index="1"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="1"]:focus-within) .rsh-hero__layer[data-rsh-index="1"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="2"]:hover) .rsh-hero__layer[data-rsh-index="2"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="2"]:focus-within) .rsh-hero__layer[data-rsh-index="2"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="3"]:hover) .rsh-hero__layer[data-rsh-index="3"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="3"]:focus-within) .rsh-hero__layer[data-rsh-index="3"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="4"]:hover) .rsh-hero__layer[data-rsh-index="4"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="4"]:focus-within) .rsh-hero__layer[data-rsh-index="4"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="5"]:hover) .rsh-hero__layer[data-rsh-index="5"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="5"]:focus-within) .rsh-hero__layer[data-rsh-index="5"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="6"]:hover) .rsh-hero__layer[data-rsh-index="6"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="6"]:focus-within) .rsh-hero__layer[data-rsh-index="6"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="7"]:hover) .rsh-hero__layer[data-rsh-index="7"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="7"]:focus-within) .rsh-hero__layer[data-rsh-index="7"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="8"]:hover) .rsh-hero__layer[data-rsh-index="8"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="8"]:focus-within) .rsh-hero__layer[data-rsh-index="8"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="9"]:hover) .rsh-hero__layer[data-rsh-index="9"],
	.rsh-hero--swap-zoom:has(.rsh-card[data-rsh-index="9"]:focus-within) .rsh-hero__layer[data-rsh-index="9"] {
		transform: scale(1.06);
	}
}

/* -------------------------------------------------- Barra de emergencia */
.rsh-hotline {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border-radius: var(--rsh-hotline-radius, 0);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.rsh-hotline--inline {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 6;
}

.rsh-hotline--fixed {
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: 9998;
}

.rsh-hotline--standalone.rsh-hotline--inline {
	position: relative;
	display: inline-flex;
}

.rsh-hotline__main {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 14px 28px;
	background-color: var(--rsh-accent, #e2001a);
}

.rsh-hotline__label {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #ffffff;
}

.rsh-hotline__phone {
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: #ffffff;
	text-decoration: none;
}

.rsh-hotline__phone:hover {
	text-decoration: none;
	opacity: 0.9;
}

.rsh-hotline__chat {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 66px;
	padding: 0 16px;
	font-size: 24px;
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.16);
	text-decoration: none;
	transition: background-color 0.25s ease;
}

.rsh-hotline__chat:hover {
	background-color: rgba(255, 255, 255, 0.3);
	text-decoration: none;
}

.rsh-hotline__chat svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
	.rsh-hero__body {
		gap: 40px;
		padding: 40px 0 44px;
	}

	.rsh-hotline__phone {
		font-size: 23px;
	}
}

@media (max-width: 767px) {
	.rsh-hero__head {
		padding: 44px 0 34px;
	}

	.rsh-hero__media::before {
		height: 90px;
	}

	.rsh-hero__body {
		gap: 34px;
		padding: 34px 0 34px;
	}

	.rsh-card__line {
		margin: 18px 0 14px;
	}

	.rsh-hotline--inline {
		position: static;
		width: 100%;
		margin-top: 6px;
		box-shadow: none;
	}

	.rsh-hotline--inline .rsh-hotline__main {
		flex: 1 1 auto;
	}

	.rsh-hotline--hide-mobile {
		display: none !important;
	}
}

/* Ajustes dentro del editor de Elementor */
.elementor-editor-active .rsh-hotline--fixed {
	position: absolute;
}
