/* ===== RESET BÁSICO ===== */
html {
	margin: 0;
	padding: 0;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
}

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

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

a {
	text-decoration: none;
	color: inherit;
}

/* ===== HOME PÚBLICO ===== */
body.public-landing {
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 24px;
}

/* ===== CONTENEDOR ===== */
.container {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 22px;
	padding: 0;
}

.block {
	width: 100%;
	min-width: 0;
}

/* ===== TARJETA ===== */
.square {
	position: relative;
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.25),
		0 4px 12px rgba(0, 0, 0, 0.18);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	will-change: transform;
}

.square:hover {
	transform: translateY(-4px);
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.35),
		0 8px 20px rgba(0, 0, 0, 0.25);
}

.square::before {
	content: "";
	display: block;
	padding-top: 100%;
}

/* importante: crear contexto absoluto */
.square-content {
	position: absolute;
	inset: 0;
}

/* ===== IMAGEN ===== */
.square-content a.image-link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	border-radius: 16px;
	overflow: hidden;

	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;

	transform: scale(1);
	-webkit-transform: scale(1);
	transition:
		transform 0.35s ease,
		-webkit-transform 0.35s ease,
		filter 0.35s ease;
	will-change: transform;
}

/* overlay sutil */
.square-content a.image-link::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.28),
		rgba(0, 0, 0, 0.08),
		transparent
	);
	opacity: 0.9;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.square-content a.image-link:hover {
	transform: scale(1.05);
	-webkit-transform: scale(1.05);
	filter: brightness(1.04);
}

.square-content a.image-link:hover::after {
	opacity: 0.7;
}

/* ===== TEXTO OPCIONAL ===== */
.text-link {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 14px;
	z-index: 2;

	text-align: center;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;

	padding: 10px 14px;
	border-radius: 10px;

	background: rgba(0, 0, 0, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);

	color: #fff;
	transition: background 0.25s ease;
}

.text-link:hover {
	background: rgba(0, 0, 0, 0.65);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
	.container {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	body.public-landing {
		padding: 16px 12px 32px;
	}

	.container {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.square:hover {
		transform: none;
	}

	.square-content a.image-link:hover {
		transform: none;
		-webkit-transform: none;
	}
}