/* ==========================================================================
   Toscano – Soluciones (energía y agua)
   Home › "Soluciones específicas para energía y agua". Prefijo .tsl.
   ========================================================================== */

.tsl {
	--tsl-bg: #ffffff;
	--tsl-accent: var(--toscano-brand-teal, #009a9d);
	--tsl-accent-2: #2fc4c7;
	--tsl-deep: var(--toscano-brand-deep, #032d35);
	--tsl-title: var(--tsl-deep);
	--tsl-highlight: var(--tsl-accent);
	--tsl-text: #6f6f6f;
	--tsl-eyebrow: #6f6f6f;
	--tsl-card: #fbfdfd;
	--tsl-border: #e3ecee;
	--tsl-line: #e8eef0;

	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 110px 0;
	overflow: hidden;
	background:
		linear-gradient(rgba(3, 45, 53, .035) 1px, transparent 1px) 0 0 / 48px 48px,
		linear-gradient(90deg, rgba(3, 45, 53, .035) 1px, transparent 1px) 0 0 / 48px 48px,
		var(--tsl-bg);
	color: var(--tsl-text);
	font-family: "Inter", sans-serif;
	-webkit-font-smoothing: antialiased;
	word-break: break-word;
}

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

.tsl .tsl__inner {
	max-width: 1248px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Encabezado ---------- */

.tsl .tsl__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 44px;
}

.tsl .tsl__intro {
	max-width: 600px;
}

.tsl .tsl__eyebrow {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tsl-eyebrow);
}

.tsl .tsl__title {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-size: 39px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tsl-title);
}

.tsl .tsl__hl {
	color: var(--tsl-highlight);
}

.tsl .tsl__text {
	margin: 16px 0 0;
	font-size: 16px;
	line-height: 1.59;
	color: var(--tsl-text);
}

.tsl .tsl__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
	flex: 0 0 auto;
}

.tsl a.tsl__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tsl-accent);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	text-decoration: none;
}

.tsl a.tsl__link span {
	transition: transform .25s ease;
}

.tsl a.tsl__link:hover span {
	transform: translateX(4px);
}

.tsl a.tsl__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 26px;
	border: 1px solid var(--tsl-accent);
	border-radius: 4px;
	background: transparent;
	color: var(--tsl-accent);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.tsl a.tsl__btn:hover,
.tsl a.tsl__btn:focus-visible {
	background: var(--tsl-accent);
	color: #ffffff;
	box-shadow: 0 8px 22px color-mix(in srgb, var(--tsl-accent) 30%, transparent);
}

.tsl a:focus-visible {
	outline: 2px solid var(--tsl-accent);
	outline-offset: 3px;
}

/* ---------- Tarjetas ---------- */

.tsl .tsl__grid {
	display: grid;
	grid-template-columns: repeat(var(--tsl-cols, 2), minmax(0, 1fr));
	gap: 24px;
}

.tsl .tsl__card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	padding: 32px 30px 18px;
	overflow: hidden;
	border: 1px solid var(--tsl-border);
	border-radius: 16px;
	background: var(--tsl-card);
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease, border-color .45s ease;
}

.tsl .tsl__card:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--tsl-accent) 35%, var(--tsl-border));
	box-shadow: 0 24px 48px -18px rgba(3, 45, 53, .22);
}

/* Filo superior animado: corriente en Energía, ondulación en Agua */
.tsl .tsl__edge {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 2;
	background: linear-gradient(90deg, var(--tsl-accent), var(--tsl-accent-2), #ffffff, var(--tsl-accent-2), var(--tsl-accent));
	background-size: 300% 100%;
	animation: tsl-edge 4s linear infinite;
}

.tsl .tsl__card--agua .tsl__edge {
	animation-duration: 7s;
}

@keyframes tsl-edge {
	to { background-position: -300% 0; }
}

/* Foco de luz que sigue al ratón (--mx/--my las pone el JS) */
.tsl .tsl__spot {
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tsl-accent) 11%, transparent), transparent 70%);
	transition: opacity .4s ease;
	pointer-events: none;
}

.tsl .tsl__card:hover .tsl__spot {
	opacity: 1;
}

/* Ilustración de la esquina */
.tsl .tsl__vis {
	position: absolute;
	top: 0;
	right: 0;
	z-index: -1;
	width: 240px;
	height: 150px;
	opacity: .55;
	pointer-events: none;
	transition: opacity .5s ease;
	-webkit-mask-image: linear-gradient(225deg, #000 30%, transparent 85%);
	mask-image: linear-gradient(225deg, #000 30%, transparent 85%);
}

.tsl .tsl__card:hover .tsl__vis {
	opacity: .9;
}

.tsl .tsl__vis * {
	transform-box: fill-box;
	transform-origin: center;
}

/* Energía: rayo que se dibuja, chispas y pulso por el circuito */
.tsl .tsl__vis--energia .tsl__trace {
	fill: none;
	stroke: color-mix(in srgb, var(--tsl-accent) 40%, transparent);
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tsl .tsl__vis--energia .tsl__bolt {
	fill: color-mix(in srgb, var(--tsl-accent) 10%, transparent);
	stroke: var(--tsl-accent);
	stroke-width: 1.6;
	stroke-linejoin: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: tsl-draw 3.6s ease-in-out infinite;
}

@keyframes tsl-draw {
	0% { stroke-dashoffset: 1; fill-opacity: 0; }
	40% { stroke-dashoffset: 0; fill-opacity: 0; }
	50% { fill-opacity: 1; filter: drop-shadow(0 0 6px var(--tsl-accent-2)); }
	80% { stroke-dashoffset: 0; fill-opacity: 1; }
	100% { stroke-dashoffset: -1; fill-opacity: 0; }
}

.tsl .tsl__vis--energia .tsl__spark {
	fill: none;
	stroke: var(--tsl-accent-2);
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0;
	animation: tsl-spark 3.6s steps(1) infinite;
}

.tsl .tsl__spark--2 { animation-delay: .12s; }
.tsl .tsl__spark--3 { animation-delay: .24s; }

@keyframes tsl-spark {
	0%, 44% { opacity: 0; }
	46% { opacity: 1; }
	48% { opacity: .2; }
	50% { opacity: 1; }
	56%, 100% { opacity: 0; }
}

.tsl .tsl__vis--energia .tsl__pulse {
	fill: #ffffff;
	stroke: var(--tsl-accent-2);
	stroke-width: 2;
	filter: drop-shadow(0 0 4px var(--tsl-accent-2));
	offset-path: path("M0 118 H96 L112 102 H150 L164 116 H220");
	offset-rotate: 0deg;
	animation: tsl-run 2.8s linear infinite;
}

@keyframes tsl-run {
	0% { offset-distance: 0%; opacity: 0; }
	8% { opacity: 1; }
	92% { opacity: 1; }
	100% { offset-distance: 100%; opacity: 0; }
}

/* Agua: olas que fluyen y burbujas que suben */
.tsl .tsl__vis--agua .tsl__wave {
	fill: color-mix(in srgb, var(--tsl-accent) 12%, transparent);
	stroke: color-mix(in srgb, var(--tsl-accent) 45%, transparent);
	stroke-width: 1.2;
	transform-box: view-box;
	transform-origin: 0 0;
	animation: tsl-flow 6s linear infinite;
}

.tsl .tsl__wave--2 { animation-duration: 9s; fill: color-mix(in srgb, var(--tsl-accent) 9%, transparent); }
.tsl .tsl__wave--3 { animation-duration: 13s; fill: color-mix(in srgb, var(--tsl-accent) 7%, transparent); }

@keyframes tsl-flow {
	to { transform: translateX(-220px); }
}

.tsl .tsl__vis--agua .tsl__bubble {
	fill: none;
	stroke: var(--tsl-accent);
	stroke-width: 1.2;
	opacity: 0;
	animation: tsl-rise 4.5s ease-in infinite;
}

.tsl .tsl__bubble--2 { animation-delay: 1.4s; }
.tsl .tsl__bubble--3 { animation-delay: 2.8s; }

@keyframes tsl-rise {
	0% { opacity: 0; transform: translateY(0) scale(.6); }
	15% { opacity: .9; }
	100% { opacity: 0; transform: translateY(-110px) scale(1.2); }
}

/* Cabecera de la tarjeta */
.tsl .tsl__card-head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.tsl .tsl__chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #e0f4f4;
	color: var(--tsl-accent);
}

.tsl .tsl__chip::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 1px solid color-mix(in srgb, var(--tsl-accent) 35%, transparent);
	border-radius: 15px;
	opacity: 0;
	transform: scale(.9);
	transition: opacity .35s ease, transform .35s ease;
}

.tsl .tsl__card:hover .tsl__chip::after {
	opacity: 1;
	transform: scale(1);
}

.tsl .tsl__ico {
	display: block;
	width: 26px;
	height: 26px;
	overflow: visible;
}

.tsl .tsl__ico-shape {
	fill: currentColor;
	fill-opacity: .18;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linejoin: round;
}

.tsl .tsl__ico-wave {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
}

/* Al pasar por la tarjeta: el rayo "descarga" y la gota ondula */
.tsl .tsl__card--energia:hover .tsl__ico-shape {
	animation: tsl-zap .7s ease;
}

@keyframes tsl-zap {
	0%, 100% { fill-opacity: .18; }
	20%, 60% { fill-opacity: 1; filter: drop-shadow(0 0 5px var(--tsl-accent-2)); }
	40% { fill-opacity: .3; }
}

.tsl .tsl__card--agua:hover .tsl__ico-wave {
	animation: tsl-bob 1.2s ease-in-out infinite;
}

@keyframes tsl-bob {
	50% { transform: translateY(-1.5px); }
}

.tsl .tsl__card-title {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tsl-title);
}

.tsl .tsl__card-title a {
	color: inherit;
	text-decoration: none;
}

.tsl .tsl__count {
	margin-left: auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: inset 0 0 0 1px var(--tsl-border);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--tsl-accent);
}

.tsl .tsl__card-text {
	max-width: 440px;
	margin: 18px 0 20px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--tsl-text);
}

/* ---------- Filas de soluciones ---------- */

.tsl .tsl__list {
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.tsl .tsl__row {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--tsl-line);
}

.tsl .tsl__row-in {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	margin: 0 -12px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--tsl-title);
	text-decoration: none;
	transition: background-color .3s ease, color .3s ease;
}

/* Barra lateral que se ilumina y línea de corriente que se dibuja bajo la fila */
.tsl .tsl__row-in::before {
	content: "";
	position: absolute;
	top: 12px;
	bottom: 12px;
	left: 0;
	width: 3px;
	border-radius: 3px;
	background: var(--tsl-accent);
	box-shadow: 0 0 8px var(--tsl-accent-2);
	transform: scaleY(0);
	transition: transform .3s ease;
}

.tsl .tsl__row-in::after {
	content: "";
	position: absolute;
	right: 12px;
	bottom: -1px;
	left: 12px;
	height: 1px;
	background: linear-gradient(90deg, var(--tsl-accent), var(--tsl-accent-2));
	box-shadow: 0 0 6px var(--tsl-accent-2);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

a.tsl__row-in:hover,
a.tsl__row-in:focus-visible {
	background: color-mix(in srgb, var(--tsl-accent) 6%, transparent);
	color: var(--tsl-accent);
}

a.tsl__row-in:hover::before,
a.tsl__row-in:focus-visible::before {
	transform: scaleY(1);
}

a.tsl__row-in:hover::after,
a.tsl__row-in:focus-visible::after {
	transform: scaleX(1);
}

.tsl .tsl__row-ico {
	display: inline-flex;
	flex: 0 0 14px;
	color: color-mix(in srgb, var(--tsl-accent) 45%, transparent);
	transition: color .3s ease, transform .3s ease, filter .3s ease;
}

.tsl a.tsl__row-in:hover .tsl__row-ico {
	color: var(--tsl-accent);
	transform: scale(1.2);
	filter: drop-shadow(0 0 4px var(--tsl-accent-2));
}

.tsl .tsl__row-text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.tsl .tsl__brand {
	flex: 0 0 auto;
	padding: 5px 9px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: var(--bb, #eef3f4);
	color: var(--b, var(--tsl-text));
	font-family: "Inter", sans-serif;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: none;
	white-space: nowrap;
}

/* Estilo de las etiquetas (Estilo › Etiquetas de marca; clase en el contenedor del widget) */
.tsl-brands--outline .tsl .tsl__brand {
	border-color: var(--b, var(--tsl-border));
	background: transparent;
}

.tsl-brands--text .tsl .tsl__brand {
	padding-left: 0;
	padding-right: 0;
	background: transparent;
}

.tsl .tsl__go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: var(--tsl-title);
	transition: background-color .3s ease, color .3s ease, transform .3s ease;
}

.tsl a.tsl__row-in:hover .tsl__go {
	background: var(--tsl-accent);
	color: #ffffff;
	transform: translateX(3px);
}

/* ---------- Entrada (JS: .tsl--js y, al verse, .is-in) ---------- */

.tsl.tsl--js .tsl__head > *,
.tsl.tsl--js .tsl__card,
.tsl.tsl--js .tsl__row {
	opacity: 0;
	transform: translateY(24px);
}

.tsl.tsl--js.is-in .tsl__head > *,
.tsl.tsl--js.is-in .tsl__card,
.tsl.tsl--js.is-in .tsl__row {
	opacity: 1;
	transform: none;
	transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}

.tsl.tsl--js.is-in .tsl__head > :nth-child(2) { transition-delay: .1s; }
.tsl.tsl--js.is-in .tsl__card { transition-delay: calc(.15s + var(--i, 0) * .12s); }
.tsl.tsl--js.is-in .tsl__row { transition-delay: calc(.45s + var(--i, 0) * .12s + var(--r, 0) * .06s); }

.tsl:not(.tsl--anim) .tsl__vis *,
.tsl:not(.tsl--anim) .tsl__edge {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.tsl .tsl__vis *,
	.tsl .tsl__edge,
	.tsl .tsl__ico-shape,
	.tsl .tsl__ico-wave {
		animation: none !important;
	}

	.tsl .tsl__vis--energia .tsl__bolt {
		stroke-dashoffset: 0;
	}
}

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

@media (max-width: 1024px) {
	.tsl .tsl__head {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 900px) {
	.tsl .tsl__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.tsl {
		padding: 72px 0;
	}

	.tsl .tsl__inner {
		padding: 0 16px;
	}

	.tsl .tsl__head {
		margin-bottom: 32px;
	}

	.tsl .tsl__title {
		font-size: 30px;
	}

	.tsl .tsl__text {
		font-size: 15px;
	}

	.tsl .tsl__actions {
		width: 100%;
		gap: 16px;
	}

	.tsl a.tsl__btn {
		flex: 1 1 100%;
		justify-content: center;
	}

	.tsl .tsl__card {
		padding: 26px 20px 12px;
	}

	/* En móvil la ilustración se queda en la esquina, sin meterse bajo el texto */
	.tsl .tsl__vis {
		width: 150px;
		height: 92px;
		opacity: .4;
	}

	.tsl .tsl__card-title {
		font-size: 22px;
	}

	.tsl .tsl__row-in {
		gap: 10px;
		margin: 0 -8px;
		padding: 10px 8px;
	}

	.tsl .tsl__row-text {
		font-size: 14px;
	}

	.tsl .tsl__brand {
		font-size: 10px;
		padding: 4px 7px;
	}

	.tsl .tsl__go {
		flex-basis: 26px;
		width: 26px;
		height: 26px;
	}
}
