/* ==========================================================================
   AAS Services Slider - "Our Construction Company Northampton Services".
   Two independently auto-sliding marquee lines (pure CSS, seamless loop,
   no JavaScript): line 1 scrolls left-to-right, line 2 scrolls right-to-
   left. Each card gets a smooth lift + image-zoom hover effect, and the
   whole line pauses on hover/tap so visitors can read and click.
   ========================================================================== */

.aas-services-slider {
	--aas-accent: var(--e-global-color-accent, #FE212A);
	--aas-dark: var(--e-global-color-primary, #0D0D0D);
	--aas-text: var(--e-global-color-text, #666666);
	--aas-white: var(--e-global-color-white, #FFFFFF);
	--aas-light: var(--e-global-color-secondary, #F5F5F5);
	--aas-font-heading: var(--e-global-typography-primary-font-family, "Space Grotesk", sans-serif);
	--aas-font-text: var(--e-global-typography-text-font-family, "DM Sans", sans-serif);
	--aas-svc-card-w: 300px;
	--aas-svc-speed: 35s;

	background: var(--aas-white);
	padding: 70px 0;
	overflow: hidden;
}

/* ---- Header --------------------------------------------------------------- */
.aas-svc-header {
	max-width: 760px;
	margin: 0 auto 40px;
	padding: 0 20px;
	text-align: center;
}
.aas-svc-header .aas-badge {
	justify-content: center;
}
.aas-svc-header .aas-badge-text {
	color: var(--aas-dark) !important;
}
.aas-svc-heading.aas-heading {
	color: var(--aas-dark) !important;
	text-align: center;
	margin: 10px 0 14px;
}
.aas-svc-description {
	font-family: var(--aas-font-text);
	color: var(--aas-text);
	line-height: 1.6em;
	margin: 0;
}

/* ---- Marquee lines ---------------------------------------------------------
   Classic seamless-loop technique: each line duplicates its row once; the
   combined TRACK (not the individual rows) is what animates, by exactly
   -50% of its own width - i.e. exactly one row's width - so row 2 lands
   perfectly where row 1 started, with no visible seam or jump. */
.aas-svc-marquee {
	overflow: hidden;
	margin-bottom: 26px;
}
.aas-svc-marquee:last-child {
	margin-bottom: 0;
}

.aas-svc-track {
	display: flex;
	width: max-content;
	will-change: transform;
}

.aas-svc-row {
	display: flex;
	flex-wrap: nowrap;
	flex-shrink: 0;
	gap: 24px;
	padding-right: 24px;
}

.aas-svc-dir-ltr .aas-svc-track {
	animation: aas-svc-scroll-ltr var(--aas-svc-speed) linear infinite;
}
.aas-svc-dir-rtl .aas-svc-track {
	animation: aas-svc-scroll-rtl var(--aas-svc-speed) linear infinite;
}

@keyframes aas-svc-scroll-ltr {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
@keyframes aas-svc-scroll-rtl {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0); }
}

.aas-svc-pause-on-hover .aas-svc-marquee:hover .aas-svc-track,
.aas-svc-pause-on-hover .aas-svc-marquee:active .aas-svc-track {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.aas-svc-track {
		animation: none !important;
	}
}

/* ---- Cards ------------------------------------------------------------------ */
.aas-svc-card {
	position: relative;
	width: var(--aas-svc-card-w);
	flex-shrink: 0;
	border-radius: 10px;
	overflow: hidden;
	background: var(--aas-dark);
	box-shadow: 0 6px 18px rgba(13,13,13,0.08);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.aas-svc-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 40px rgba(13,13,13,0.22);
}

.aas-svc-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--aas-light);
}
.aas-svc-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.aas-svc-card:hover .aas-svc-image img {
	transform: scale(1.1);
}
.aas-svc-body {
	position: relative;
	padding: 28px 20px 22px;
}

/* Icon badge overlaps the seam between the image and the dark body. */
.aas-svc-icon {
	position: absolute;
	top: -24px;
	left: 20px;
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--aas-accent);
	color: var(--aas-white);
	border-radius: 8px;
	box-shadow: 0 6px 14px rgba(254,33,42,0.35);
	transition: transform 0.3s ease, background 0.3s ease;
}
.aas-svc-icon svg,
.aas-svc-icon i {
	width: 20px;
	height: 20px;
	font-size: 20px;
}
.aas-svc-card:hover .aas-svc-icon {
	transform: rotate(-8deg) scale(1.08);
	background: var(--aas-white);
	color: var(--aas-accent);
}

.aas-svc-title {
	font-family: var(--aas-font-heading);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.25;
	margin: 6px 0 8px;
}
.aas-svc-title a {
	color: var(--aas-white) !important;
	text-decoration: none;
}
.aas-svc-title a:hover {
	color: var(--aas-accent) !important;
}

.aas-svc-desc {
	font-family: var(--aas-font-text);
	font-size: 13.5px;
	line-height: 1.55;
	color: rgba(255,255,255,0.65);
	margin: 0 0 16px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aas-svc-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--aas-font-heading);
	font-weight: 600;
	font-size: 14px;
	color: var(--aas-accent) !important;
	text-decoration: none;
}
.aas-svc-link i {
	transition: transform 0.3s ease;
	font-size: 12px;
}
.aas-svc-card:hover .aas-svc-link i {
	transform: translateX(5px);
}

/* ---- Responsive ------------------------------------------------------------- */
@media (max-width: 767px) {
	.aas-services-slider {
		--aas-svc-card-w: 240px;
		padding: 50px 0;
	}
	.aas-svc-header {
		padding: 0 20px 0;
	}
	.aas-svc-row {
		gap: 16px;
		padding-right: 16px;
	}
	.aas-svc-desc {
		font-size: 13px;
	}
}
