/* BlueWave Pillars Grid — scoped under .bw-pillars */

/* ---- Section (no default background — set via Elementor section/container) ---- */
.bw-pillars {
	padding: 0;
	position: relative;
}

.bw-pillars__inner {
	position: relative;
}

/* ---- Grid — standard (CSS grid, fills every column) ---- */
.bw-pillars__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr); /* overridden by inline style from PHP */
	gap: 18px;
}

/* ---- Grid — centred mode (flex, orphan cards centre on last row) ---- */
.bw-pillars__grid--center {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--bw-pillar-gap, 18px);
}

/*
 * In centred mode each card targets the same width as one grid track:
 * width = (100% - (N-1)*gap) / N
 * We can't compute this exactly in pure CSS without knowing N at the
 * property level, so we use the --bw-pillars-per-row custom property
 * (set inline from PHP) as a workaround.
 */
.bw-pillars__grid--center .bw-pillar {
	flex: 0 1 calc(
		(100% - (var(--bw-pillars-per-row, 5) - 1) * var(--bw-pillar-gap, 18px))
		/ var(--bw-pillars-per-row, 5)
	);
	min-width: 160px; /* never shrink to nothing */
}

/* ---- Pillar card ---- */
.bw-pillar {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.10);
	border-radius: 18px;
	padding: 28px 22px 26px;
	transition: transform .2s ease, background .2s ease;
	box-sizing: border-box;
}

.bw-pillar:hover {
	transform: translateY(-3px);
	background: rgba(255,255,255,0.10);
}

.bw-pillar__num {
	font-weight: 800;
	font-size: 36px;
	color: #f1c286;
	letter-spacing: -0.02em;
	line-height: 1;
	margin-bottom: 18px;
}

/* Icon variant — replaces the number */
.bw-pillar__num--icon {
	display: flex;
	align-items: center;
	font-size: 36px; /* overridden by Elementor icon_size selector */
	letter-spacing: 0;
	font-weight: normal;
}

.bw-pillar__num--icon i,
.bw-pillar__num--icon svg {
	width: 1em;
	height: 1em;
	color: inherit;
	fill: currentColor;
	flex-shrink: 0;
}

.bw-pillar__title {
	color: #ffffff;
	font-size: 17px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.3;
}

.bw-pillar__desc {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255,255,255,0.78);
	margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
	.bw-pillars {
		padding-left: 15px;
		padding-right: 15px;
	}
	.bw-pillars__grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
	.bw-pillars__grid--center .bw-pillar {
		flex-basis: calc(50% - var(--bw-pillar-gap, 18px) / 2);
	}
}

@media (max-width: 600px) {
	.bw-pillars__grid {
		grid-template-columns: 1fr;
	}
	.bw-pillars__grid--center .bw-pillar {
		flex-basis: 100%;
	}
}
