/* ============================================================
   RE Project Stats – Elementor Widget
   
   HOW RESPONSIVE COLUMNS WORK:
   PHP / JS template writes these CSS custom properties directly
   on the .re-stats-wrapper element via inline style:
     --re-col-d  (desktop)
     --re-col-t  (tablet ≤ 1024px)
     --re-col-m  (mobile ≤ 767px)
   
   Each media query below reads the matching var().
   Because the properties live on the element itself, var()
   resolves correctly even inside @media blocks.
   ============================================================ */

/* ── Base layout ── */
.re-stats-wrapper {
	display: grid;
	grid-template-columns: repeat( var(--re-col-d, 3), minmax(0, 1fr) );
	gap: 20px;
	background-color: #f5f0e8;
	padding: 40px 30px;
	box-sizing: border-box;
	width: 100%;
}

/* ── Tablet ── */
@media (max-width: 1024px) {
	.re-stats-wrapper {
		grid-template-columns: repeat( var(--re-col-t, 2), minmax(0, 1fr) );
	}
}

/* ── Mobile ── */
@media (max-width: 767px) {
	.re-stats-wrapper {
		grid-template-columns: repeat( var(--re-col-m, 1), minmax(0, 1fr) );
		padding: 24px 16px;
		gap: 14px;
	}
}

/* ── Card ── */
.re-stats-card {
	display: flex;
	align-items: stretch;
	background-color: #ffffff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
	transition: transform .25s ease, box-shadow .25s ease;
	min-width: 0; /* prevents grid blowout */
}

.re-stats-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

/* ── Rotated sidebar label ── */
.re-stats-label {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: rotate(180deg);
	background-color: #9a7b3f;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	padding: 18px 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	flex-shrink: 0;
	white-space: nowrap;
}

/* ── Card content area ── */
.re-stats-body {
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

/* ── Stat row (number + unit on same line) ── */
.re-stats-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.re-stat-number {
	font-size: 56px;
	font-weight: 700;
	color: #9a7b3f;
	line-height: 1;
	letter-spacing: -.02em;
}

.re-stat-unit {
	font-size: 16px;
	font-weight: 400;
	color: #333333;
	line-height: 1.3;
}

/* ── Description text ── */
.re-stats-desc {
	font-size: 14px;
	color: #555555;
	line-height: 1.5;
	margin-top: 4px;
}

/* ── Mobile type scaling ── */
@media (max-width: 767px) {
	.re-stat-number { font-size: clamp(28px, 8vw, 40px); }
	.re-stats-label { font-size: 11px; min-width: 36px; padding: 14px 8px; }
	.re-stats-body  { padding: 16px 18px; }
}
