/* ==========================================================================
   SERVICE AREAS WIDGET

   Rendered by arm_service_areas_widget() (inc/widget-service-areas.php) and
   the [service_areas] shortcode. Content comes from the "Service Areas
   Section" options page (inc/acf-service-areas-fields.php).

   Big image/title/description "Read More" cards (main service areas) laid
   out on a CSS grid that reflows on its own for any card count (5, 6, 7...),
   followed by a smaller grid of sub-service tiles. Self-contained and
   namespaced (.sa-*) with no ancestor dependencies. Enqueued from
   functions.php (md_theme_scripts()).
   ========================================================================== */

.sa-section {
	padding: 0 0 80px;
	background: #fff;
}

.sa-header {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 45px;
}

.sa-eyebrow {
	font-family: 'Sora', sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #1C3F95;
	margin: 0 0 12px;
}

.sa-title {
	font-family: 'Sora', sans-serif;
	font-size: 42px;
	line-height: 1.2;
	font-weight: 300;
	letter-spacing: -1px;
	color: #222222;
	margin: 0;
}

.sa-intro {
	font-family: 'Sora', sans-serif;
	font-size: 16px;
	line-height: 26px;
	font-weight: 300;
	color: var(--text-muted, #6b7280);
	margin: 16px 0 0;
}

/* ---------- MAIN SERVICES GRID ---------- */
.sa-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 34px;
	margin-bottom: 20px;
}

.sa-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(20, 40, 74, 0.08);
	transition: transform .35s ease, box-shadow .35s ease;
}

.sa-card:hover,
.sa-card:focus-within {
	transform: translateY(-8px);
	box-shadow: 0 22px 40px rgba(20, 40, 74, 0.18);
	text-decoration: none;
}

.sa-card-media {
	position: relative;
	width: 100%;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	background: #eef1f8;
}

.sa-card-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 40, 74, 0) 40%, rgba(20, 40, 74, 0.35) 100%);
	opacity: 0;
	transition: opacity .35s ease;
}

.sa-card:hover .sa-card-media::after {
	opacity: 1;
}

.sa-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

.sa-card:hover .sa-card-media img {
	transform: scale(1.1);
}

.sa-card-media-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #EEF1F8 0%, #D9DCE3 100%);
	color: #1C3F95;
}

.sa-card-media-placeholder i {
	font-size: 46px;
	opacity: .55;
}

.sa-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 26px 24px 0 24px;
}

.sa-card-title {
	font-family: 'Sora', sans-serif;
	font-size: 21px;
	line-height: 27px;
	font-weight: 600;
	color: #0535AC;
	margin: 0 0 10px;
	transition: color .3s ease;
}

.sa-card:hover .sa-card-title {
	color: #1C3F95;
}

.sa-card-text {
	font-family: 'Sora', sans-serif;
	font-size: 15px;
	line-height: 23px;
	font-weight: 300;
	color: #35383E;
	margin: 0 0 16px;
	flex: 1;
}

.sa-card-link {
	font-family: 'Sora', sans-serif;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 1px;
	color: #0535AC;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sa-card-link i {
	transition: transform .3s ease;
}

.sa-card:hover .sa-card-link {
	color: #275EE5;
}

.sa-card:hover .sa-card-link i {
	transform: translateX(5px);
}

/* ---------- SUB-SERVICES GRID ---------- */
.sa-sub-title {
	font-family: 'Sora', sans-serif;
	font-size: 24px;
	line-height: 30px;
	font-weight: 600;
	color: #222222;
	text-align: center;
	margin: 40px 0 30px;
}

.sa-sub-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

a.sa-sub-card {
	display: flex;
	align-items: stretch;
	text-align: left;
	background: #fff;
	border: 1px solid var(--border-color, #e9ebf0);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(20, 40, 74, 0.06);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

a.sa-sub-card:hover,
a.sa-sub-card:focus {
	transform: translateY(-6px);
	box-shadow: 0 18px 32px rgba(20, 40, 74, 0.15);
	border-color: #fff;
	text-decoration: none;
}

.sa-sub-card-media {
	flex: 0 0 215px;
	width: 215px;
	position: relative;
	overflow: hidden;
	background: #eef1f8;
}

.sa-sub-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

a.sa-sub-card:hover .sa-sub-card-media img {
	transform: scale(1.08);
}

.sa-sub-card-media-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #EEF1F8 0%, #D9DCE3 100%);
	color: #1C3F95;
}

.sa-sub-card-media-placeholder i {
	font-size: 30px;
	opacity: .55;
}

.sa-sub-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 20px 24px;
}

.sa-sub-card-title {
	font-family: 'Sora', sans-serif;
	font-size: 18px;
	line-height: 23px;
	font-weight: 700;
	color: #222222;
	margin: 0 0 6px;
}

.sa-sub-card-text {
	font-family: 'Sora', sans-serif;
	font-size: 14px;
	line-height: 21px;
	font-weight: 300;
	color: var(--text-muted, #6b7280);
	margin: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media screen and (min-width: 768px) and (max-width: 991px) {
	.sa-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.sa-sub-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.sa-section {
		padding: 0 0 40px;
	}

	.sa-title {
		font-size: 30px;
		line-height: 1.25;
	}

	.sa-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.sa-sub-grid {
		grid-template-columns: 1fr;
	}

	.sa-sub-card-media {
		flex: 0 0 100px;
		width: 100px;
	}

	.sa-sub-card-body {
		padding: 16px 18px;
	}
}
