/* LÃBERIT · «Tarjeta desplegable» (swl_cpt_laberit, tarjetas.php): las clases las ponen los ajustes de Avanzado ›
   «Tarjeta desplegable (LÃBERIT)» de Elementor. Antes: .fe-bento (Home) y .fe-card (Soluciones) en laberit.css. */

.fe-desplegable-tarjeta {
	position: relative;
	cursor: pointer;
	transition: background-color .3s ease, transform .35s ease, box-shadow .35s ease;
}

/* El texto, oculto hasta abrir la tarjeta (táctil: un toque la abre, swl-tarjetas.js añade .is-open) */
.fe-desplegable-tarjeta .fe-desplegable-texto-yes {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height .5s ease, opacity .4s ease;
}
.fe-desplegable-tarjeta > .fe-desplegable-texto-yes { margin-top: auto; } /* hijo directo: el enlace queda abajo */
.fe-desplegable-tarjeta.is-open .fe-desplegable-texto-yes { max-height: 360px; opacity: 1; }

/* Escritorio con ratón: el texto sale en una capa sobre el título y el icono (del borde de arriba hasta encima del
   enlace; distancias en el control «Dónde sale el texto»), con el fondo de la tarjeta, así la tarjeta no necesita alto
   para título + texto. La capa no recoge clics. Los contenedores de dentro van static para que la capa se mida con la
   tarjeta y heredan su fondo (la capa usa background inherit). */
@media (hover: hover) and (min-width: 1025px) {
	.fe-desplegable-tarjeta:not(.fe-desplegable-fijo-yes) .fe-desplegable-texto-yes {
		position: absolute;
		top: var(--fe-capa-top, 32px);
		right: var(--fe-capa-right, 32px);
		bottom: var(--fe-capa-bottom, 72px);
		left: var(--fe-capa-left, 32px);
		max-height: none;
		z-index: 1;
		pointer-events: none;
		background-color: inherit;
	}
	.fe-desplegable-tarjeta:hover .fe-desplegable-texto-yes { opacity: 1; }
	.fe-desplegable-tarjeta .e-con { position: static; background-color: inherit; }
}
/* Entre 1025 y 1300px Elementor no tiene control de alto: el de «Alto mínimo entre 1025 y 1300px» */
@media (hover: hover) and (min-width: 1025px) and (max-width: 1300px) {
	.e-con.fe-desplegable-tarjeta { min-height: max(var(--min-height, 0px), var(--fe-alto-portatil, 0px)); }
}

/* Texto siempre visible, bajo el título */
.fe-desplegable-tarjeta.fe-desplegable-fijo-yes .fe-desplegable-texto-yes {
	max-height: none;
	opacity: 1;
	background-color: transparent;
	pointer-events: auto;
}

/* Toda la tarjeta enlaza: el enlace de dentro la cubre entera */
.fe-desplegable-enlace-yes a::after { content: ""; position: absolute; inset: 0; }

/* Zoom: la tarjeta crece y las demás del grupo se reducen */
@media (hover: hover) {
	.fe-desplegable-zoom-yes:hover {
		transform: scale(1.015);
		box-shadow: 0 16px 40px rgba(0, 19, 40, .18);
		z-index: 1;
	}
	.fe-desplegable-grupo:has(.fe-desplegable-zoom-yes:hover) .fe-desplegable-zoom-yes:not(:hover) { transform: scale(.97); }
}

/* Grupo en rejilla: en tablet y móvil las filas crecen al abrir una tarjeta (si no, la tarjeta abierta se sale) */
@media (max-width: 1024px) {
	.e-grid.fe-desplegable-grupo,
	.e-grid.fe-desplegable-grupo > .e-con-inner {
		grid-template-rows: none !important;
		grid-auto-rows: auto !important;
		align-items: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fe-desplegable-tarjeta { transition: none; }
	.fe-desplegable-tarjeta,
	.fe-desplegable-tarjeta:hover { transform: none !important; }
}
