/* Funlab Work Grid - Estilos de la tarjeta individual.
   El layout (cuántas van por fila, anchos, orden) lo armas tú a mano en
   Elementor con Contenedores. Este widget solo dibuja UNA tarjeta. */

.fwg-single-item {
	display: block;
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #1a1a1a;
	text-decoration: none;
}

/* Con proporción fija (1:1, 4:3, 2:3, etc): la foto SIEMPRE llena el 100%
   del cuadro completo, recortando lo que sobre (object-fit: cover).
   Así nunca queda espacio vacío abajo, sin importar el tamaño real
   de la imagen que subiste. */
.fwg-single-item.fwg-has-ratio .fwg-single-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* "Automática": el cuadro se ajusta al tamaño real de la imagen,
   no al revés - por eso aquí SÍ debe ser flujo normal (no absolute). */
.fwg-single-item.fwg-auto-ratio .fwg-single-img {
	position: relative;
	width: 100%;
	height: auto;
	display: block;
}

.fwg-single-item:hover .fwg-single-img {
	transform: scale(1.03);
	transition: transform 0.4s ease;
}

.fwg-caption {
	position: absolute;
	bottom: 15px;
	left: 15px;
	z-index: 2;
	font-size: 13px;
	line-height: 1.4;
	background-color: rgba(0, 0, 0, 0.45);
	padding: 8px 14px;
	border-radius: 4px;
	max-width: calc(100% - 30px);
}

.fwg-caption-title {
	font-weight: 600;
	color: #ffffff;
	white-space: nowrap;
}

.fwg-caption-tags {
	font-weight: 400;
	font-size: 12px;
	white-space: nowrap;
}

.fwg-empty {
	padding: 30px;
	text-align: center;
	color: #999;
	border: 1px dashed #444;
	border-radius: 4px;
}

/* Alto de la tarjeta con proporción: relleno porcentual (funciona en todos los
   navegadores, incluido Safari/iOS). El valor llega en --fwg-pt desde el widget. */
.fwg-single-item.fwg-has-ratio::before{
	content:"";
	display:block;
	width:100%;
	padding-top:var(--fwg-pt,75%);
}

/* Celular: el pie puede partirse en varias líneas y la tarjeta nunca se colapsa */
@media (max-width: 767px) {
	.fwg-caption{bottom:10px;left:10px;padding:6px 10px;max-width:calc(100% - 20px)}
	.fwg-caption-title,.fwg-caption-tags{white-space:normal}
	.fwg-caption-tags{display:inline-block}
}

/* El contenedor flex de Elementor nunca debe encoger la tarjeta */
.elementor-widget-fwg_single_project{flex-shrink:0}
.elementor-widget-fwg_single_project .elementor-widget-container{height:auto}
