/* About Us - scroll-driven stepper (Elementor build).
   This Elementor (a) drops custom classes on CONTAINERS and (b) collapses
   single-child container nesting, so structural nth-child chains are unreliable.
   Instead we anchor off the WIDGET classes that survive (.step, .mob-step) using
   :has(), and off #stepper-section. Font "Sofia Pro" is loaded globally by
   Elementor. Behaviour: about-stepper.js (toggles .is-active on the panels). */

#stepper-section { --text-dark:#1F2023; --text-gray:#606876; --font-main:"Sofia Pro",sans-serif; }

/* The theme sets html/body{overflow:hidden auto} which makes them scroll containers
   and kills position:sticky (the stepper pin). `clip` still clips horizontal overflow
   but does NOT create a scroll container, so sticky works again. !important + both
   elements to beat the theme rule. This CSS only loads on about-us-elementor → scoped. */
html, body { overflow-x: clip !important; overflow-y: visible !important; }

/* ===== layout mechanics ===== */
/* WRAPPER = section's container child: tall scroll track */
#stepper-section > .e-con { min-height: 300vh; }
/* INNER = pinned while scrolling the track */
#stepper-section > .e-con > .e-con { position: sticky; top: 0; padding-top: 100px; min-height: fit-content; }

/* GRID = container holding rail + right (rail has direct .step children) */
#stepper-section .e-con:has(> .e-con > .step) { display: grid; grid-template-columns: 1fr 3fr; gap: 0; }
/* CONTENT-WRAPPER = container holding the panels (panels have direct .mob-step) */
#stepper-section .e-con:has(> .e-con > .mob-step) { position: relative; padding-left: 16px; }
/* PANELS = each content container (direct .mob-step child); stacked, one visible */
#stepper-section .e-con:has(> .mob-step) {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	opacity: 0;
	transform: translateY(15px);
	transition: 0.4s ease;
}
#stepper-section .e-con:has(> .mob-step).is-active {
	position: relative;
	opacity: 1;
	transform: translateY(0);
}

/* ===== typography =====
   Heading/Text widgets wrap their text in .elementor-heading-title / a <p>, which
   the Elementor kit styles directly - so text props must target the INNER element,
   not the .elementor-element wrapper (where the custom classes live). */
#stepper-section .stepper-title .elementor-heading-title {
	font-weight: 600; font-size: 48px; line-height: 120%;
	letter-spacing: -0.05em; color: var(--text-dark); margin-bottom: 8px;
}
#stepper-section .stepper-subtitle .elementor-heading-title {
	max-width: 726px; font-weight: 400; font-size: 18px;
	line-height: 30px; letter-spacing: -0.01em; color: var(--text-gray); margin: 0 0 100px;
}
/* badge: container styling is dropped by Elementor, so style the heading itself as the pill */
#stepper-section .stepper-badge .elementor-heading-title {
	display: inline-flex; align-items: center; width: fit-content;
	background: #F9FAFB; border: 1px solid #1F202314; border-radius: 58px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.05); padding: 8px 16px; margin-bottom: 12px;
	font-weight: 400; font-size: 18px; line-height: 100%;
	letter-spacing: -0.03em; color: var(--text-dark);
}

/* rail steps - layout on the wrapper, text on the inner heading title */
#stepper-section .step { position: relative; padding-left: 26px; padding-bottom: 54px; }
#stepper-section .step .elementor-heading-title {
	font-weight: 400; font-size: 18px; line-height: 30px;
	letter-spacing: -0.01em; color: var(--text-dark);
}
#stepper-section .step::before {
	content: ""; position: absolute; left: -10px; top: 6px; width: 20px; height: 20px;
	border-radius: 50%; background: #fff; border: 1px solid #1F202333;
}
#stepper-section .step::after {
	content: ""; position: absolute; top: 26px; left: 0; height: calc(100% - 19px);
	border-left: 1px dashed rgba(213, 220, 233, 0.7);
}
#stepper-section .step:last-child::after { display: none; }
#stepper-section .step.is-active .elementor-heading-title { font-weight: 600; }
#stepper-section .step.is-active::before { background: #1F2023; box-shadow: inset 0 0 0 3px #fff; }
#stepper-section .step.special::after { border-left: 1px solid #1F2023; }

#stepper-section .mob-step .elementor-heading-title {
	font-weight: 600; font-size: 18px; line-height: 30px;
	letter-spacing: -0.01em; color: var(--text-dark); margin-bottom: 12px;
}
#stepper-section .mobile-view-only { display: none; }

#stepper-section h4 {
	max-width: 625px; font-weight: 600; font-size: 40px;
	line-height: 120%; letter-spacing: -0.05em; color: var(--text-dark); margin-bottom: 12px;
}
#stepper-section .elementor-widget-text-editor p {
	margin: 0; max-width: 545px; font-weight: 400; font-size: 18px;
	line-height: 30px; letter-spacing: -0.01em; color: var(--text-gray);
}
#stepper-section .elementor-widget-text-editor p strong { font-weight: 600; color: var(--text-dark); }

/* avatar group = the nested container inside a panel */
#stepper-section .e-con:has(> .mob-step) .e-con { display: flex; flex-direction: row; margin-bottom: 24px; }
#stepper-section .e-con:has(> .mob-step) .e-con .elementor-widget-image { width: 40px; margin-left: -17px; }
#stepper-section .e-con:has(> .mob-step) .e-con .elementor-widget-image:first-child { margin-left: 0; }
#stepper-section .e-con:has(> .mob-step) .e-con img {
	width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #fff;
	box-shadow: 0 1.48px 5.93px 0 #1F202314; display: block;
}

/* ===== tablet ===== */
@media (max-width: 1016px) {
	#stepper-section .step { padding-left: 36px; }
	#stepper-section .step::before { left: 0; }
	#stepper-section .step::after { left: 10px; }
}

/* ===== mobile: drop rail + scroll-pin, stack panels ===== */
@media (max-width: 768px) {
	#stepper-section .mobile-view-only { display: inline-block; }
	#stepper-section > .e-con { min-height: unset; padding: 0 20px; }
	#stepper-section > .e-con > .e-con { position: static; padding-top: 0; }
	#stepper-section .e-con:has(> .e-con > .step) { display: block; }
	#stepper-section .e-con:has(> .step) { display: none; }              /* hide rail */
	#stepper-section .e-con:has(> .e-con > .mob-step) { padding: 0; }
	#stepper-section .e-con:has(> .mob-step) {
		position: relative; top: auto; left: auto; right: auto; opacity: 1; transform: none; margin-bottom: 48px;
	}
	#stepper-section .stepper-title { font-size: 36px; line-height: 40px; }
	#stepper-section .stepper-subtitle { margin-bottom: 48px; }
	#stepper-section h4 { font-size: 28px; }
}
