/* ============================================================
   Servizi offerti - trascrizione di components.css
   (.cards-grid, .cards-grid.bento, .card, .card-icon)
   dell'HTML di riferimento.
   ============================================================ */

.cards-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border-line);
	border-radius: var(--wp--custom--radius-lg);
	padding: 32px 28px;
}

.card-icon {
	font-size: 2rem;
	margin-bottom: 16px;
}

.card-icon svg {
	width: 30px;
	height: 30px;
	color: var(--wp--preset--color--secondary);
	display: block;
}

.card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 10px;
}

.card p {
	font-size: .92rem;
	color: var(--wp--preset--color--text-muted);
	line-height: 1.65;
}

/* ─── Bento (Servizi in home) ────────────────────────── */
.cards-grid.bento {
	grid-template-columns: repeat(4, 1fr);
}

.cards-grid.bento .card {
	transition: border-color var(--wp--custom--transition);
}

.cards-grid.bento .card:hover {
	border-color: var(--wp--preset--color--text-base);
}

.cards-grid.bento .card:nth-child(1) { grid-column: span 2; }
.cards-grid.bento .card:nth-child(4) { grid-column: span 2; }
.cards-grid.bento .card:nth-child(5) { grid-column: span 2; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 960px) {
	.cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* .bento ha specificita' maggiore di .cards-grid: va sovrascritto
	   esplicitamente, e vanno azzerati anche gli span sugli stessi
	   :nth-child(), altrimenti restano attivi. */
	.cards-grid.bento {
		grid-template-columns: repeat(2, 1fr);
	}

	.cards-grid.bento .card:nth-child(1),
	.cards-grid.bento .card:nth-child(4),
	.cards-grid.bento .card:nth-child(5) {
		grid-column: auto;
	}

	/* la quinta card resterebbe orfana a meta' riga */
	.cards-grid.bento .card:last-child {
		grid-column: span 2;
	}
}

@media (max-width: 720px) {
	.cards-grid {
		grid-template-columns: 1fr;
	}

	.cards-grid.bento {
		grid-template-columns: 1fr;
	}

	.cards-grid.bento .card:nth-child(1),
	.cards-grid.bento .card:nth-child(4),
	.cards-grid.bento .card:nth-child(5),
	.cards-grid.bento .card:last-child {
		grid-column: auto;
	}
}
