/* ============================================================
 * Enspire Category Loop Widget — Styles
 * ============================================================ */

.enspire-category-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 20px;
	row-gap: 32px;
}

.enspire-category-item {
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.enspire-category-link-wrapper {
	text-decoration: none;
	color: inherit;
	display: block;
}

/* ----- Image wrap (padding-bottom aspect ratio trick) ----- */
.enspire-category-image-wrap {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 100%; /* Default square */
	overflow: hidden;
	background-color: #f5f5f5;
}

.enspire-category-image-wrap img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.enspire-category-item:hover .enspire-category-image-wrap img {
	transform: scale(1.08);
}

/* ----- Info area ----- */
.enspire-category-info {
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
}

.enspire-category-title {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	transition: color 0.3s ease;
	display: block; /* Ensure it respects text-align */
}

/* ----- CTA Button ----- */
.enspire-category-cta {
	display: inline-block; /* Inline-block respects text-align of parent */
	padding: 12px 24px;
	background-color: #1a1a1a;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
	vertical-align: middle;
}

.enspire-category-item:hover .enspire-category-cta {
	background-color: #333333;
}

/* ============================================================
 * Responsive
 * ============================================================ */

@media (max-width: 1024px) {
	.enspire-category-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.enspire-category-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}
