/**
 * Styles for the reusable [services_grid] component — Story US-006.
 *
 * Mobile-first responsive service cards:
 *   • single-column stack on mobile
 *   • 2 columns on tablet (>=576px)
 *   • 3 columns on desktop (>=992px)
 *
 * Cards are equal-height with consistent spacing and readable text at every
 * breakpoint. Uses the shared --mytheme-* design tokens from responsive.css.
 */

.services-grid-section {
	margin: clamp(2rem, 1.2rem + 4vw, 3.5rem) 0;
}

.services-grid-section__heading {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
	line-height: 1.2;
	color: var(--mytheme-ink);
}

.services-grid-section__intro {
	margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.25rem);
	color: var(--mytheme-muted);
	font-size: 1.05rem;
	line-height: 1.55;
	max-width: 60ch;
}

/* Grid: mobile-first single column. */
.services-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1rem, 0.6rem + 1.5vw, 1.75rem);
}

/* Tablet: 2 columns. */
@media (min-width: 576px) {
	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop: 3 columns. */
@media (min-width: 992px) {
	.services-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Each card is a flex column so content aligns and cards share equal height. */
.service-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	background: var(--mytheme-surface);
	border: 1px solid var(--mytheme-border);
	border-radius: var(--mytheme-radius);
	box-shadow: var(--mytheme-shadow);
	transition: transform var(--mytheme-duration) var(--mytheme-ease),
		box-shadow var(--mytheme-duration) var(--mytheme-ease);
}

.service-card:hover,
.service-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--mytheme-shadow-lg);
}

.service-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: 1rem;
	border-radius: var(--mytheme-radius-sm);
	background: rgba(200, 40, 30, 0.1);
	color: var(--mytheme-accent);
	flex: 0 0 auto;
}

.service-card__icon svg {
	width: 1.6rem;
	height: 1.6rem;
	fill: currentColor;
}

.service-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--mytheme-ink);
}

.service-card__text {
	margin: 0;
	color: var(--mytheme-muted);
	font-size: 1rem;
	line-height: 1.55;
	/* Push any trailing content down so cards read cleanly at equal height. */
	flex: 1 1 auto;
}

@media (prefers-reduced-motion: reduce) {
	.service-card {
		transition: none;
	}
	.service-card:hover,
	.service-card:focus-within {
		transform: none;
	}
}
