/*
 * HWC Portfolio Grid - base layout.
 *
 * Tokens captured from Elementor template #79 "Portfolio" and kit #11
 * (Kit Styles: HWC Hydraulics and Equipment). Values here are the exact
 * originals; the widget's Style controls override them per instance.
 */

.hwc-pf-grid {
	display: grid;
	grid-template-columns: repeat(var(--hwc-pf-cols, 3), minmax(0, 1fr));
	gap: var(--hwc-pf-gap, 30px);
	align-items: stretch;
}

.hwc-pf-card {
	--hwc-pf-bg: #ffffff;
	--hwc-pf-accent: #ba302b;
	--hwc-pf-tri: 3%;
	--hwc-pf-zoom: 1;

	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding-bottom: 25px;

	background-color: var(--hwc-pf-bg);
	background-image: linear-gradient(
		135deg,
		var(--hwc-pf-bg) 0%,
		var(--hwc-pf-bg) calc(100% - var(--hwc-pf-tri)),
		var(--hwc-pf-accent) calc(100% - var(--hwc-pf-tri)),
		var(--hwc-pf-accent) 100%
	);
	border-bottom: 3px solid var(--hwc-pf-accent);
	box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.15);

	color: inherit;
	text-decoration: none;
}

.hwc-pf-card:hover,
.hwc-pf-card:focus-within {
	color: inherit;
}

.hwc-pf-card__media {
	margin: 0;
	overflow: hidden;
}

.hwc-pf-card__img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.hwc-pf-card:hover .hwc-pf-card__img {
	transform: scale(var(--hwc-pf-zoom, 1));
}

.hwc-pf-card__img--empty {
	background-color: #e9e9e9;
}

.hwc-pf-card__body {
	padding: 25px 30px;
}

.hwc-pf-card__title {
	margin: 0 0 10px;
	color: #0f0f0f;
	font-family: Ubuntu, sans-serif;
	font-size: clamp(1.1875rem, 1.0408rem + 0.6522vw, 1.5625rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.hwc-pf-card__desc {
	margin: 0;
	color: #666666;
	font-family: Ubuntu, sans-serif;
	font-size: clamp(0.875rem, 0.8261rem + 0.2174vw, 1rem);
	font-weight: 400;
	line-height: 1.5;
}

.hwc-pf-card__btn-wrap {
	margin-top: auto;
	padding: 0 30px;
}

.hwc-pf-card__btn {
	display: inline-block;
	padding: 12px 30px;

	background-color: #ba302b;
	border: none;
	border-radius: 50px;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);

	color: #ffffff;
	font-family: Ubuntu, sans-serif;
	font-size: clamp(0.8125rem, 0.7636rem + 0.2174vw, 0.9375rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	text-decoration: none;

	transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.hwc-pf-card__btn:hover,
.hwc-pf-card__btn:focus {
	background-color: #b62615;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
	color: #ffffff;
}

.hwc-pf-empty {
	padding: 20px 0;
	color: #666666;
	font-size: 14px;
}
