/**
 * Feature Cards Grid block
 * Section with title, subtitle (below title), and grid of cards (icon, title, description).
 * Layout: subtitle must always appear below the title; both left-aligned. Light theme.
 * !important used so light theme wins over parent dark backgrounds.
 */

.feature-cards-grid,
.wp-block-acf-feature-cards-grid .feature-cards-grid {
	background-color: #ffffff !important;
	color: #111 !important;
	padding: 4rem 0;
}

/* Remove left/right padding from block wrapper, container, and any parent wrappers */
.main-content > .wp-block-columns:has(.wp-block-acf-feature-cards-grid),
.main-content .wp-block-column:has(.wp-block-acf-feature-cards-grid) {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.wp-block-acf-feature-cards-grid {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.feature-cards-grid .feature-cards-grid__container,
.feature-cards-grid__container {
	max-width: 1280px;
	margin: 0 auto;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.feature-cards-grid__header {
	text-align: left;
	margin-bottom: 3rem;
}

.feature-cards-grid__title {
	font-size: 48px !important;
	font-weight: 900;
	line-height: 1.25;
	color: #111 !important;
	margin: 0 0 0.75rem;
}

.feature-cards-grid__subtitle {
	font-size: 1rem;
	color: #4b5563 !important;
	max-width: 42rem;
	margin: 0.5rem 0 0;
	line-height: 1.6;
	text-align: left;
}

.feature-cards-grid__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.feature-cards-grid__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.feature-cards-grid__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.75rem;
	}

	/* When only 2 cards, use 50/50 instead of leaving space for a third. */
	.feature-cards-grid__grid--2-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

.feature-cards-grid__card {
	background-color: #f3f4f6 !important;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.5rem 1.5rem 1.75rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-cards-grid__card:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-cards-grid__card-icon {
	margin-bottom: 1rem;
	line-height: 0;
	color: #111;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background-color: #e5e7eb;
	flex-shrink: 0;
}

.feature-cards-grid__card-icon img,
.feature-cards-grid__card-icon svg {
	width: auto;
	height: 20px;
	max-width: 24px;
	object-fit: contain;
	display: block;
	vertical-align: top;
}

.feature-cards-grid__card-icon svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: inherit;
}

.feature-cards-grid__card-title {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
	color: #111 !important;
	margin: 0 0 0.5rem;
}

.feature-cards-grid__card-description {
	font-size: 16px;
	line-height: 1.6;
	color: #4b5563 !important;
	margin: 0 0 1.25rem 0;
}

.feature-cards-grid__card-description code,
.feature-cards-grid__card-description kbd {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.9em;
	background-color: #e5e7eb;
	color: #111;
	padding: 0.15em 0.4em;
	border-radius: 4px;
}

.feature-cards-grid__card-description pre {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	line-height: 1.5;
	background-color: #e5e7eb;
	color: #111;
	padding: 1rem;
	border-radius: 8px;
	margin: 0.75rem 0;
	overflow-x: auto;
	white-space: pre;
}

.feature-cards-grid__card-description pre code {
	padding: 0;
	background: none;
	font-size: inherit;
}

.feature-cards-grid__card-link {
	display: inline-block;
	padding-top: 10px;
	margin-top: 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #111;
	text-decoration: none;
}

.feature-cards-grid__card-link:hover {
	text-decoration: underline;
}

.feature-cards-grid__empty {
	text-align: left;
	color: #6b7280;
	padding: 2rem;
	border: 1px dashed #d1d5db;
	border-radius: 8px;
	margin: 0;
}
