/* TDE Smile Gallery — before/after slider + home preview */
.tde-ba {
	--pos: 50%;
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #d9d2c4;
	cursor: ew-resize;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}
/* The after image stays in normal flow (native 3:2 from its width/height attributes) and gives the
   box its height: aspect-ratio / padding-ratio boxes collapse to 0 inside JetEngine's mobile flex grid. */
.tde-ba .tde-ba__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	pointer-events: none;
	border-radius: 0;
}
.tde-ba__before .tde-ba__img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
}
.tde-ba__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.tde-ba__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 2px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 6px rgba(0, 0, 0, .25);
	pointer-events: none;
}
.tde-ba__knob {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border-radius: 50%;
	background: rgba(237, 231, 219, .94);
	color: var(--e-global-color-primary, #2a201a);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	transition: transform .2s ease;
}
.tde-ba.is-dragging .tde-ba__knob {
	transform: scale(1.08);
}
.tde-ba:has(.tde-ba__range:focus-visible) .tde-ba__knob {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
.tde-ba__label {
	position: absolute;
	bottom: 18px;
	color: #fff;
	font-family: var(--e-global-typography-text-font-family, "Newsreader Local"), serif;
	font-size: 17px;
	line-height: 1;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
	pointer-events: none;
	transition: opacity .2s ease;
}
.tde-ba__label--before { left: 20px; }
.tde-ba__label--after { right: 20px; }
.tde-ba.is-near-start .tde-ba__label--before,
.tde-ba.is-near-end .tde-ba__label--after {
	opacity: 0;
}
.tde-ba__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

/* Home page preview */
.tde-sgp {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
.tde-sgp__card {
	margin: 0;
}
.tde-sgp__cap {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 18px;
}
/* captions use the header nav style: Newsreader Local 16px, regular weight */
.tde-sgp__type,
.tde-sgp__title {
	font-family: "Newsreader Local", serif;
	font-weight: 400;
	letter-spacing: .6px;
	line-height: 1.25;
}
.tde-sgp__type {
	color: var(--e-global-color-accent, #908e7a);
	font-size: 15px;
}
.tde-sgp__title {
	color: var(--e-global-color-primary, #2a201a);
	font-size: 16px;
	text-transform: uppercase;
}
@media (max-width: 1024px) {
	.tde-sgp { gap: 16px; }
}
@media (max-width: 767px) {
	.tde-sgp {
		display: flex;
		gap: 14px;
		margin-right: -20px;
		padding-right: 20px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.tde-sgp::-webkit-scrollbar { display: none; }
	.tde-sgp__card {
		flex: 0 0 84%;
		scroll-snap-align: start;
	}
}
