/* ============================================================
   Flex Before/After Gallery — matches "See the Difference" design
   ============================================================ */
.flex-ba-wrap {
	--flex-grad-start: #7B2FF7;
	--flex-grad-end: #9D4EDD;
	background-color: transparent;
	padding: 0;
	overflow: hidden;
}

.flex-ba-inner {
	max-width: 1140px;
	margin: 0 auto;
}

/* ---------- Header ---------- */
.flex-ba-header {
	text-align: center;
	margin-bottom: 34px;
}

.flex-ba-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	background: linear-gradient(90deg, var(--flex-grad-start), var(--flex-grad-end));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--flex-grad-end);
	margin-bottom: 10px;
}

.flex-ba-heading {
	font-size: 38px;
	font-weight: 800;
	line-height: 1.15;
	margin: 0;
	letter-spacing: 1px;
}

.flex-ba-heading .normal { color: #ffffff; }

.flex-ba-heading .gradient {
	background: linear-gradient(90deg, var(--flex-grad-start), var(--flex-grad-end));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.flex-ba-heading-deco {
	display: block;
	width: 70px;
	height: 3px;
	margin: 14px auto 18px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--flex-grad-start), var(--flex-grad-end));
	position: relative;
}
.flex-ba-heading-deco::before,
.flex-ba-heading-deco::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--flex-grad-end);
	transform: translateY(-50%);
}
.flex-ba-heading-deco::before { left: -14px; }
.flex-ba-heading-deco::after  { right: -14px; }

.flex-ba-subtitle {
	max-width: 480px;
	margin: 0 auto;
	color: #A9B4CC;
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- Filters ---------- */
.flex-ba-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 38px;
}

.flex-ba-filter {
	border: 1px solid rgba(255,255,255,0.12);
	background: rgba(255,255,255,0.03);
	color: #C9D2E3;
	font-size: 14px;
	font-weight: 500;
	padding: 9px 22px;
	border-radius: 999px;
	cursor: pointer;
	transition: all .25s ease;
	line-height: 1;
}

.flex-ba-filter:hover {
	border-color: var(--flex-grad-end);
	color: #fff;
}

.flex-ba-filter.is-active {
	border-color: transparent;
	color: #fff;
	box-shadow: 0 6px 18px rgba(123,47,247,0.35);
}

.flex-ba-filter-gradient .flex-ba-filter.is-active {
	background: linear-gradient(90deg, var(--flex-grad-start), var(--flex-grad-end));
}

/* ---------- Grid ---------- */
.flex-ba-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.flex-ba-card {
	background: #0A1530;
	border: 1px solid #284D52;
	border-radius: 14px;
	overflow: hidden;
	transition: transform .3s ease, box-shadow .3s ease, opacity .3s ease;
}
.flex-ba-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(0,0,0,0.4);
}

/* Filter hide animation */
.flex-ba-card.is-hidden {
	display: none;
}

/* ---------- Compare slider ---------- */
.flex-ba-compare {
	--flex-pane: 50%;
	position: relative;
	width: 100%;
	height: 320px;
	min-height: 120px;
	overflow: hidden;
	user-select: none;
	touch-action: none;
	background: #0A1530;
}

/* Override theme/Elementor `img { height: auto }` which would collapse the
   image to its aspect ratio and cause uneven card heights. */
.flex-ba-compare .flex-ba-img {
	display: block;
	position: absolute;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: center center;
}

/* AFTER image is the base layer (right side shows through). */
.flex-ba-img-after {
	z-index: 1;
}

/* BEFORE image sits on top and is clipped to the left of the handle.
   Using clip-path (not width) means the image is NEVER scaled or squashed —
   both layers are the exact same size, so there is no haze or mismatch. */
.flex-ba-before-pane {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	clip-path: inset(0 calc(100% - var(--flex-pane)) 0 0);
	-webkit-clip-path: inset(0 calc(100% - var(--flex-pane)) 0 0);
}

/* Badges */
.flex-ba-badge {
	position: absolute;
	top: 12px;
	z-index: 4;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	padding: 5px 12px;
	border-radius: 999px;
	color: #fff;
}
.flex-ba-badge-before {
	left: 12px;
	background: rgba(10, 16, 32, 0.85);
	border: 1px solid rgba(255,255,255,0.15);
}
.flex-ba-badge-after {
	right: 12px;
	background: #7B2FF7;
}
.flex-ba-badge-gradient .flex-ba-badge-after {
	background: linear-gradient(90deg, var(--flex-grad-start), var(--flex-grad-end));
}

/* Handle */
.flex-ba-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--flex-pane);
	width: 2px;
	background: rgba(255,255,255,0.9);
	transform: translateX(-50%);
	z-index: 5;
	cursor: ew-resize;
}
.flex-ba-handle-arrows {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #fff;
	color: #0A1530;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

/* ---------- Card footer ---------- */
.flex-ba-card-footer {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
}
.flex-ba-card-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(157,78,221,0.12);
	border: 1px solid rgba(157,78,221,0.4);
	color: var(--flex-grad-end);
	font-size: 18px;
	line-height: 1;
}
.flex-ba-card-icon i,
.flex-ba-card-icon svg {
	width: 20px;
	height: 20px;
	font-size: 18px;
	color: var(--flex-grad-end);
	fill: var(--flex-grad-end);
}
.flex-ba-card-text { display: flex; flex-direction: column; }
.flex-ba-card-title {
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
}
.flex-ba-card-sub {
	color: #A9B4CC;
	font-size: 13px;
	margin-top: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.flex-ba-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.flex-ba-grid { grid-template-columns: 1fr; }
	.flex-ba-heading { font-size: 30px; }
}
