/**
 * Bearsify Services Scroll
 * Sticky left main service + scrolling right sub-service cards.
 */

:root {
	--bss-red: #e30613;
	--bss-red-hover: #c10510;
	--bss-text: #111111;
	--bss-muted: #9a9a9a;
	--bss-bg: transparent;
	--bss-gap: 1.25rem;
	--bss-radius: 0;
	--bss-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--bss-sticky-top: 6rem;
	--bss-card-height: auto;
}

.bss-services {
	--bss-col-gap: clamp(1rem, 2.5vw, 2rem);
	position: relative;
	z-index: auto;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem);
	box-sizing: border-box;
	background: var(--bss-bg);
	font-family: var(--bss-font);
	color: var(--bss-text);
	overflow: visible;
}

/* Keep Elementor wrappers from clipping / stacking this section behind the next one */
.elementor-element:has(.bss-services),
.elementor-widget:has(.bss-services),
.elementor-widget-container:has(.bss-services),
.elementor-shortcode:has(.bss-services) {
	overflow: visible !important;
	height: auto !important;
	min-height: 0 !important;
	z-index: 2 !important;
	position: relative !important;
}

.bss-services *,
.bss-services *::before,
.bss-services *::after {
	box-sizing: border-box;
}

.bss-services__header {
	text-align: center;
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.bss-services__title {
	margin: 0;
	font-size: clamp(1.75rem, 4.5vw, 3rem);
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.1;
}

.bss-services__list {
	display: flex;
	flex-direction: column;
	gap: 0;
	overflow: visible;
}

/* Each main service block: sticky left + stacked right cards */
.bss-service {
	position: relative;
	z-index: 0;
	overflow: visible;
}

.bss-service__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--bss-col-gap);
	align-items: start;
}

.bss-service__main-wrap {
	position: sticky;
	top: var(--bss-sticky-top);
	align-self: start;
	z-index: 1;
}

.bss-service__main {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	max-height: calc(100vh - var(--bss-sticky-top) - 2rem);
	overflow: hidden;
	background: #1a1a1a;
}

.bss-service__main-media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.6s ease;
}

.bss-service__main:hover .bss-service__main-media {
	transform: scale(1.03);
}

.bss-service__main-media--placeholder,
.bss-sub__media--placeholder {
	background: linear-gradient(145deg, #2a2a2a, #111);
}

.bss-service__main-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 4.5rem;
	padding: 0.75rem 1rem;
	background: #000000;
}

.bss-service__main-name {
	font-family: "Bebas Neue", sans-serif !important;
	color: #ffffff !important;
	font-size: 46px !important;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.2;
}

.bss-service__subs {
	display: flex;
	flex-direction: column;
	gap: var(--bss-gap);
	min-width: 0;
	padding-bottom: 0;
	overflow: visible;
}

.bss-service__empty {
	margin: 0;
	color: var(--bss-muted);
	font-size: 0.95rem;
}

/* Sub-service / project cards — same height as left main box */
.bss-sub {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	height: var(--bss-card-height, auto);
	max-height: calc(100vh - var(--bss-sticky-top) - 2rem);
	min-height: 0;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}

.bss-sub--pending {
	opacity: 0;
	transform: translateY(28px);
}

.bss-sub--in {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.bss-sub__media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.65s ease;
	z-index: 0;
}

.bss-sub:hover .bss-sub__media {
	transform: scale(1.04);
}

.bss-sub__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.72) 0%,
		rgba(0, 0, 0, 0.28) 42%,
		rgba(0, 0, 0, 0.08) 100%
	);
	pointer-events: none;
}

.bss-sub__content {
	position: absolute;
	left: clamp(1rem, 2.5vw, 1.75rem);
	bottom: clamp(1rem, 2.5vw, 1.75rem);
	right: 4.5rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	pointer-events: none;
}

.bss-sub__label {
	font-size: clamp(0.7rem, 1.2vw, 0.85rem);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 1;
	line-height: 1.3;
	color: #ffffff !important;
}

.bss-sub__title {
	font-family: "Bebas Neue", sans-serif !important;
	font-size: 46px !important;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
	color: #ffffff !important;
}

.bss-sub__arrow {
	position: absolute;
	right: clamp(0.85rem, 2vw, 1.25rem);
	bottom: clamp(0.85rem, 2vw, 1.25rem);
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: #000000;
	color: #fff;
	transition: background 0.25s ease, transform 0.25s ease;
}

.bss-sub:hover .bss-sub__arrow {
	background: #1a1a1a;
	transform: translateX(2px);
}

/* Space between service groups so sticky releases cleanly into the next */
.bss-service + .bss-service {
	margin-top: clamp(2rem, 5vw, 4rem);
}

/* Mobile: stack, restore normal gaps, no sticky, no reveal animation */
@media (max-width: 900px) {
	:root {
		--bss-sticky-top: 1rem;
		--bss-card-height: auto;
		--bss-gap: 1rem;
	}

	.bss-services {
		padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem);
		overflow: visible !important;
		z-index: 2;
		position: relative;
		transform: none !important;
		isolation: auto !important;
	}

	.elementor-element:has(.bss-services),
	.elementor-widget:has(.bss-services),
	.elementor-widget-container:has(.bss-services),
	.elementor-shortcode:has(.bss-services),
	.elementor-column:has(.bss-services),
	.elementor-section:has(.bss-services) {
		overflow: visible !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		z-index: 2 !important;
		position: relative !important;
		transform: none !important;
	}

	.bss-service,
	.bss-services__list,
	.bss-service__grid,
	.bss-service__subs {
		overflow: visible !important;
		height: auto !important;
		transform: none !important;
	}

	.bss-service__grid {
		grid-template-columns: 1fr;
		gap: var(--bss-gap);
	}

	.bss-service__main-wrap {
		position: static !important;
		top: auto !important;
		z-index: auto !important;
		transform: none !important;
	}

	.bss-service__main,
	.bss-sub {
		aspect-ratio: 1 / 1;
		max-height: none !important;
		height: auto !important;
		position: relative;
	}

	.bss-service__main-name {
		font-size: clamp(28px, 8vw, 46px) !important;
	}

	.bss-sub__title {
		font-size: clamp(28px, 8vw, 46px) !important;
	}

	.bss-service__subs {
		gap: var(--bss-gap);
		padding-bottom: 0;
	}

	.bss-sub--pending,
	.bss-sub--in {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.bss-service__main-media,
	.bss-sub__media,
	.bss-sub__arrow {
		transition: none !important;
	}

	.bss-service__main:hover .bss-service__main-media,
	.bss-sub:hover .bss-sub__media {
		transform: none !important;
	}

	.bss-sub:hover .bss-sub__arrow {
		transform: none !important;
	}

	.bss-service + .bss-service {
		margin-top: 2rem;
		padding-top: 0;
		border-top: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bss-service__main-media,
	.bss-sub__media,
	.bss-sub__arrow,
	.bss-sub--in {
		transition: none;
	}

	.bss-sub--pending {
		opacity: 1;
		transform: none;
	}

	.bss-service__main:hover .bss-service__main-media,
	.bss-sub:hover .bss-sub__media {
		transform: none;
	}
}
