/* Escritorio: 3 verticales sin espacios */
.ctw-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin: 0;
	padding: 0;
	width: 100%;
}

.ctw-grid .ctw-item {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 2 / 3;
	margin: 0;
	padding: 0;
	line-height: 0;
	background: #e5e5e5;
	text-decoration: none !important;
	color: #fff !important;
}

.ctw-grid .ctw-item picture {
	display: block;
	width: 100%;
	height: 100%;
}

.ctw-grid .ctw-item img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

/* Degradado para que el texto se lea bien */
.ctw-grid .ctw-item::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 45%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* Nombre + botón en la esquina inferior izquierda */
.ctw-grid .ctw-info {
	position: absolute;
	left: 24px;
	bottom: 24px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	line-height: 1.2;
	text-align: left;
}

.ctw-grid .ctw-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #fff;
}

/* Botón sin contorno */
.ctw-grid .ctw-btn {
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 0.95rem;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ctw-grid .ctw-item:hover .ctw-btn {
	text-decoration-thickness: 2px;
}

/* Móvil: 2 verticales arriba + 1 horizontal debajo */
@media (max-width: 767px) {
	.ctw-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ctw-grid .ctw-item-3 {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
	}

	.ctw-grid .ctw-info {
		left: 14px;
		bottom: 14px;
	}

	.ctw-grid .ctw-title {
		font-size: 1.1rem;
	}

	.ctw-grid .ctw-btn {
		font-size: 0.85rem;
	}
}
