/* Horizontal scroll — desktop: content-height panels | mobile: vertical stack + nav */
/* Section width matches Themify boxed .row_inner */
/* Sticky height = tallest panel content height (--h-scroll-panel-h) */

:root {
	--h-scroll-nav-h: 0px;
	--h-scroll-panel-w: 100%;
	--h-scroll-panel-h: auto;
}

/* Same as Themify .row_inner */
.h-scroll-section.h-scroll-ready {
	position: relative;
	margin: 0 auto;
	width: min(1160px, 100%);
	box-sizing: border-box;
}

@media (max-width: 1260px) {
	.h-scroll-section.h-scroll-ready {
		max-width: 94%;
	}
}

@media (max-width: 760px) {
	.h-scroll-section.h-scroll-ready {
		max-width: 90%;
	}
}

.h-scroll-section .h-scroll-sticky {
	position: sticky;
	top: var(--h-scroll-sticky-top, 0px);
	width: 100%;
	overflow: hidden;
	z-index: 1;
	box-sizing: border-box;
}

.h-scroll-section .h-scroll-track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	max-width: none;
	will-change: transform;
}

.h-scroll-section .module_row.h-scroll-panel {
	flex: 0 0 var(--h-scroll-panel-w);
	width: var(--h-scroll-panel-w) !important;
	max-width: var(--h-scroll-panel-w) !important;
	margin: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	left: auto !important;
	right: auto !important;
	transform: none;
	box-sizing: border-box;
}

/* Desktop (>680px) — height from content; sticky uses max panel height */
@media (min-width: 681px) {
	.h-scroll-section.h-scroll-mode-desktop .h-scroll-sticky {
		height: var(--h-scroll-panel-h);
	}

	.h-scroll-section.h-scroll-mode-desktop .h-scroll-track {
		align-items: flex-start;
		height: 100%;
	}

	.h-scroll-section.h-scroll-mode-desktop .module_row.h-scroll-panel {
		height: auto !important;
		min-height: 0 !important;
		max-height: none;
		overflow: visible;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		/* Force top alignment (override Themify col_align_middle / center) */
		--align_content: start;
		--align_items: start;
		--auto_height: start;
	}

	.h-scroll-section.h-scroll-mode-desktop .module_row.h-scroll-panel > .row_inner {
		flex: 0 1 auto;
		width: 100%;
		max-width: 100%;
		min-height: 0;
		height: auto;
		align-content: start;
		align-items: start;
		justify-content: start;
	}

	.h-scroll-section.h-scroll-mode-desktop .module_row.h-scroll-panel .module_column {
		align-content: start;
		align-items: start;
	}
}

/* Mobile nav — hidden above 680px */
.h-scroll-nav-anchor {
	position: relative;
}

.h-scroll-mobile-nav {
	display: none;
}

.h-scroll-mobile-nav-spacer {
	display: block;
	height: 0;
	pointer-events: none;
}

.h-scroll-mobile-nav[hidden] {
	display: none !important;
}

/* Mobile (≤680px) — vertical stack + nav only */
@media (max-width: 680px) {
	.h-scroll-mobile-nav:not([hidden]) {
		display: block;
		position: relative;
		z-index: 100;
		background: #fff;
		border-bottom: 1px solid #e5e5e5;
		padding: 12px 0;
		margin-bottom: 0;
	}

	.h-scroll-mobile-nav.is-pinned {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
	}

	.h-scroll-section.h-scroll-mode-mobile {
		height: auto !important;
	}

	.h-scroll-section.h-scroll-mode-mobile .h-scroll-sticky {
		position: static;
		height: auto;
		overflow: visible;
	}

	.h-scroll-section.h-scroll-mode-mobile .h-scroll-track {
		display: block;
		width: 100% !important;
		transform: none !important;
		will-change: auto;
	}

	.h-scroll-section.h-scroll-mode-mobile .module_row.h-scroll-panel {
		flex: none;
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: visible;
		display: block;
		scroll-margin-top: calc(var(--h-scroll-nav-h, 0px) + 8px);
	}

	.h-scroll-section.h-scroll-mode-mobile .module_row.h-scroll-panel > .row_inner {
		width: 100%;
		max-width: 100%;
		transform: none !important;
		will-change: auto;
	}

	.h-scroll-mobile-nav__track {
		display: flex;
		flex-wrap: nowrap;
		gap: 10px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		padding: 0 16px;
		scrollbar-width: none;
	}

	.h-scroll-mobile-nav__track::-webkit-scrollbar {
		display: none;
	}

	.h-scroll-mobile-nav__btn {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 12px 18px;
		font-family: Montserrat, sans-serif;
		font-size: 13px;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		text-decoration: none !important;
		text-align: center;
		white-space: nowrap;
		border: 1px solid #d0d0d0;
		border-radius: 0;
		background: #fff;
		color: #333 !important;
		scroll-snap-align: start;
		transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	}

	.h-scroll-mobile-nav__btn.is-active,
	.h-scroll-mobile-nav__btn:hover {
		background: #B8002F;
		border-color: #B8002F;
		color: #fff !important;
	}
}
