/**
 * Feature Cards widget — ported 1:1 from the Next.js reference site's
 * "why choose us" grid (rounded card, expanding corner blob, icon tile).
 */

.fc-cards {
	--fc-cards-cols: 2;
	--fc-cards-gap: 1.25rem;
	--fc-cards-accent: rgba(7, 126, 134, 0.1);
	--fc-cards-mist: #cadfe2;
	--fc-cards-mist-light: #e9f3f4;
	--fc-cards-teal: #077e86;
	--fc-cards-ink: #0b3a3f;
	--fc-cards-text: #475569;

	display: grid;
	grid-template-columns: repeat(var(--fc-cards-cols), minmax(0, 1fr));
	gap: var(--fc-cards-gap);
}

/* Reveal on scroll. The entrance transform lives on the wrapper so the card's
   own hover lift never fights it. */
.fc-cards__item {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-cards.is-visible .fc-cards__item {
	opacity: 1;
	transform: none;
}

.fc-cards__card {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	padding: 1.5rem;
	border: 1px solid var(--fc-cards-mist);
	border-radius: 1rem;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-cards__card:hover,
.fc-cards__card:focus-visible {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	transform: translateY(-8px);
}

/* Corner blob — sits mostly outside the card and grows on hover. */
.fc-cards__blob {
	position: absolute;
	right: 0;
	top: 0;
	width: 5rem;
	height: 5rem;
	border-radius: 9999px;
	background: var(--fc-card-accent, var(--fc-cards-accent));
	transform: translate(2.25rem, -2.25rem);
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.fc-cards__card:hover .fc-cards__blob,
.fc-cards__card:focus-visible .fc-cards__blob {
	transform: translate(2.25rem, -2.25rem) scale(2.2);
}

.fc-cards__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 1rem;
	background: var(--fc-cards-mist-light);
	box-shadow: inset 0 0 0 1px var(--fc-cards-mist);
	color: var(--fc-cards-teal);
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-cards__card:hover .fc-cards__icon,
.fc-cards__card:focus-visible .fc-cards__icon {
	transform: scale(1.05);
}

.fc-cards__icon svg {
	width: 1.75rem;
	height: 1.75rem;
	fill: none;
	stroke: currentColor;
}

/* Font Awesome fallback when an Elementor icon is chosen instead. */
.fc-cards__icon i {
	font-size: 1.5rem;
}

.fc-cards__title {
	position: relative;
	margin: 1.25rem 0 0;
	color: var(--fc-cards-ink);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.4;
	transition: color 0.3s ease;
}

.fc-cards__card:hover .fc-cards__title,
.fc-cards__card:focus-visible .fc-cards__title {
	color: var(--fc-cards-teal);
}

.fc-cards__text {
	position: relative;
	margin: 0.5rem 0 0;
	color: var(--fc-cards-text);
	font-size: 0.875rem;
	line-height: 1.625;
}

@media (min-width: 640px) {
	/* Alternating cards sit lower, the way the reference grid staggers. */
	.fc-cards--stagger .fc-cards__item:nth-child(even) {
		margin-top: 2rem;
	}
}

@media (max-width: 639px) {
	.fc-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fc-cards__item,
	.fc-cards__card,
	.fc-cards__blob,
	.fc-cards__icon {
		transition: none;
	}

	.fc-cards__card:hover {
		transform: none;
	}
}
