/* ═══════════════════════════════════════════════════════════════════════
   FCW — Services Grid  (fcw-sg)
   Mirrors the GhanaLancer homepage Services Grid section exactly.
   Prefix: fcw-sg__*
════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   CSS Custom Properties (defaults)
───────────────────────────────────────── */
.fcw-sg {
	--fcw-sg-accent:     #862780;
	--fcw-sg-green:      #93C241;
	--fcw-sg-bg-top:     #ffffff;
	--fcw-sg-bg-bottom:  #f9fafb;
	--fcw-sg-card-bg:    #ffffff;
	--fcw-sg-text-dark:  #111827;
	--fcw-sg-text-mid:   #374151;
	--fcw-sg-text-light: #6b7280;
	--fcw-sg-shadow:     0 4px 24px rgba(0, 0, 0, 0.08);
	--fcw-sg-shadow-h:   0 24px 64px rgba(0, 0, 0, 0.14);
	--fcw-sg-radius:     16px;
	--fcw-sg-font:       'Inter', 'Helvetica Neue', Arial, sans-serif;

	background: linear-gradient(to bottom, var(--fcw-sg-bg-top), var(--fcw-sg-bg-bottom));
	font-family: var(--fcw-sg-font);
}

/* ─────────────────────────────────────────
   Inner Container
───────────────────────────────────────── */
.fcw-sg__inner {
	max-width: 1280px;
	margin:  0 auto;
	padding: 112px 24px;
}

/* ─────────────────────────────────────────
   Section Header
───────────────────────────────────────── */
.fcw-sg__header {
	text-align: center;
	margin-bottom: 64px;
}

.fcw-sg__heading {
	font-size: clamp(1.875rem, 4vw, 3rem);
	font-weight: 800;
	color: var(--fcw-sg-text-dark);
	line-height: 1.15;
	margin: 0 0 16px;
}

.fcw-sg__subheading {
	font-size: clamp(1rem, 1.8vw, 1.25rem);
	color: var(--fcw-sg-text-light);
	max-width: 720px;
	margin: 0 auto;
	line-height: 1.7;
}

/* ─────────────────────────────────────────
   Grid
───────────────────────────────────────── */
.fcw-sg__grid {
	display: grid;
	gap: 32px;
}

/* 2-column */
.fcw-sg__grid--2col {
	grid-template-columns: repeat(2, 1fr);
}

/* 3-column (default) */
.fcw-sg__grid--3col {
	grid-template-columns: repeat(3, 1fr);
}

/* 4-column */
.fcw-sg__grid--4col {
	grid-template-columns: repeat(4, 1fr);
}

/* Tablet: 2-col for 3-col + 4-col grids */
@media (max-width: 1024px) {
	.fcw-sg__grid--3col,
	.fcw-sg__grid--4col {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: 1-col */
@media (max-width: 640px) {
	.fcw-sg__grid {
		grid-template-columns: 1fr !important;
	}

	.fcw-sg__inner {
		padding: 72px 20px;
	}

	.fcw-sg__header {
		margin-bottom: 40px;
	}
}

/* ─────────────────────────────────────────
   Card Wrapper (animation host)
───────────────────────────────────────── */
.fcw-sg__card-wrap {
	display: flex;
	height: 100%;
}

/* ─────────────────────────────────────────
   Card
───────────────────────────────────────── */
.fcw-sg__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	background: var(--fcw-sg-card-bg);
	border-radius: var(--fcw-sg-radius);
	padding: 32px;
	box-shadow: var(--fcw-sg-shadow);
	text-decoration: none;
	color: inherit;
	transition:
		transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.32s ease;
	position: relative;
	overflow: hidden;
}

/* Subtle top accent line on hover */
.fcw-sg__card::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--fcw-sg-radius);
	border-top: 3px solid transparent;
	transition: border-color 0.3s ease;
	pointer-events: none;
}

.fcw-sg__card:hover {
	transform: translateY(-8px);
	box-shadow: var(--fcw-sg-shadow-h);
}

.fcw-sg__card:hover::before {
	border-color: var(--fcw-sg-accent);
}

/* ─────────────────────────────────────────
   Icon Box
───────────────────────────────────────── */
.fcw-sg__icon-box {
	width: 64px;
	height: 64px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
	flex-shrink: 0;
	transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fcw-sg__card:hover .fcw-sg__icon-box {
	transform: scale(1.12);
}

.fcw-sg__icon-box i {
	font-size: 28px;
	color: #ffffff;
	line-height: 1;
}

/* ─────────────────────────────────────────
   Card Text
───────────────────────────────────────── */
.fcw-sg__card-title {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--fcw-sg-text-dark);
	margin: 0 0 12px;
	line-height: 1.3;
}

.fcw-sg__card-desc {
	font-size: 0.9375rem;
	color: var(--fcw-sg-text-light);
	line-height: 1.7;
	margin: 0;
	flex: 1;
}

/* ─────────────────────────────────────────
   CTA Arrow
───────────────────────────────────────── */
.fcw-sg__cta {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--fcw-sg-accent);
	font-size: 0.9375rem;
	font-weight: 600;
	margin-top: 24px;
	transition: gap 0.25s ease;
}

.fcw-sg__cta-arrow {
	font-size: 1rem;
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fcw-sg__card:hover .fcw-sg__cta {
	gap: 10px;
}

.fcw-sg__card:hover .fcw-sg__cta-arrow {
	transform: translateX(4px);
}

/* ─────────────────────────────────────────
   Scroll Animations
───────────────────────────────────────── */

/* Hidden state (before intersection) */
.fcw-sg--hidden {
	opacity: 0;
	transform: translateY(32px);
	transition:
		opacity 0.55s ease,
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Revealed state */
.fcw-sg--visible {
	opacity: 1 !important;
	transform: translateY(0) !important;
}

/* Disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
	.fcw-sg--hidden {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
