/**
 * Rekhi Manufacturing Process Timeline - Frontend Styles
 *
 * Glassmorphism timeline with staggered animation. All colors
 * are driven by CSS custom properties for theme inheritance.
 * Fully responsive: horizontal on desktop, vertical on mobile.
 *
 * @package RekhiManufacturingProcess
 * @since   1.0.0
 */

/* ==================== CSS Custom Properties (Defaults) ==================== */
.rekhi-mp-container {
	--rekhi-accent: #ff6600;
	--rekhi-bg: #0a0a0a;
	--rekhi-text: #ffffff;
	--rekhi-subtitle: #aaaaaa;
	--rekhi-step-circle-bg: #1a1a1a;
	--rekhi-step-circle-border: #333;
	--rekhi-step-circle-text: #666;
	--rekhi-glass-bg: rgba(255, 255, 255, 0.06);
	--rekhi-glass-border: rgba(255, 102, 0, 0.2);
	--rekhi-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	--rekhi-step-title-color: #eeeeee;
	--rekhi-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Ensure standalone block is centered */
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	text-align: center;
	padding: 40px 20px;
	box-sizing: border-box;
	font-family: var(--rekhi-font-family);
	color: var(--rekhi-text);
}

/* Full-width background option (when not in a constrained container) */
.rekhi-mp-container--fullwidth {
	max-width: none;
	background: var(--rekhi-bg);
}

/* ==================== Header ==================== */
.rekhi-mp-header {
	margin-bottom: 60px;
}

.rekhi-mp-title {
	font-size: 3.2rem;
	font-weight: 700;
	margin: 0 0 12px 0;
	background: linear-gradient(
		90deg,
		var(--rekhi-text),
		var(--rekhi-accent),
		var(--rekhi-text)
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.rekhi-mp-subtitle {
	font-size: 1.25rem;
	color: var(--rekhi-subtitle);
	font-weight: 400;
	margin: 0;
}

/* ==================== Timeline ==================== */
.rekhi-mp-timeline {
	position: relative;
	padding: 60px 0;
}

/* --- Progress Line (Desktop: horizontal) --- */
.rekhi-mp-timeline-line {
	position: absolute;
	top: 88px;
	left: 5%;
	right: 5%;
	height: 6px;
	background: rgba(255, 102, 0, 0.2);
	border-radius: 9999px;
	overflow: hidden;
}

.rekhi-mp-timeline-progress {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: linear-gradient(90deg, var(--rekhi-accent), #ffaa33);
	width: 0%;
	transition: width 4s cubic-bezier(0.25, 0.1, 0.25, 1);
	box-shadow: 0 0 25px var(--rekhi-accent);
}

/* ==================== Steps Container ==================== */
.rekhi-mp-steps {
	display: flex;
	justify-content: space-between;
	position: relative;
	z-index: 2;
	gap: 24px;
}

/* ==================== Individual Step ==================== */
.rekhi-mp-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	opacity: 0;
	transform: translateY(40px);
	transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.rekhi-mp-step.active {
	opacity: 1;
	transform: translateY(0);
}

/* ==================== Glass Card ==================== */
.rekhi-mp-glass-card {
	width: 100%;
	max-width: 220px;
	height: 220px;
	background: var(--rekhi-glass-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--rekhi-glass-border);
	border-radius: 20px;
	padding: 32px 20px;
	box-shadow: var(--rekhi-glass-shadow);
	transition: all 0.4s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-sizing: border-box;
}

.rekhi-mp-step.active .rekhi-mp-glass-card {
	border-color: var(--rekhi-accent);
	box-shadow: 0 0 40px rgba(255, 102, 0, 0.25);
}

/* ==================== Step Circle (Icon Container) ==================== */
.rekhi-mp-step-circle {
	width: 78px;
	height: 78px;
	background: var(--rekhi-step-circle-bg);
	border: 5px solid var(--rekhi-step-circle-border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--rekhi-step-circle-text);
	position: relative;
	z-index: 3;
	transition: all 0.5s ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
	flex-shrink: 0;
	margin-bottom: 24px;
}

.rekhi-mp-step.active .rekhi-mp-step-circle {
	border-color: var(--rekhi-accent);
	color: var(--rekhi-accent);
	box-shadow:
		0 0 0 12px rgba(255, 102, 0, 0.15),
		0 0 35px rgba(255, 102, 0, 0.4);
	background: rgba(255, 102, 0, 0.1);
}

/* ==================== Step Icon ==================== */
.rekhi-mp-step-icon {
	font-size: 2.2rem;
	transition: transform 0.4s ease;
}

.rekhi-mp-step.active .rekhi-mp-step-icon {
	transform: scale(1.15);
	color: var(--rekhi-accent);
}

/* ==================== Step Number Badge ==================== */
.rekhi-mp-step-number {
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	background: #111;
	color: var(--rekhi-accent);
	font-size: 0.95rem;
	font-weight: 700;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid #1a1a1a;
}

/* ==================== Step Title ==================== */
.rekhi-mp-step-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--rekhi-step-title-color);
	line-height: 1.3;
	margin: 0;
}

/* ==================== Step Description (optional, hidden by default on desktop cards) ==================== */
.rekhi-mp-step-description {
	font-size: 0.85rem;
	color: var(--rekhi-subtitle);
	line-height: 1.5;
	margin: 10px 0 0 0;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: all 0.4s ease;
}

.rekhi-mp-step.active .rekhi-mp-step-description {
	opacity: 1;
	max-height: 120px;
}

/* ==================== Glow Pulse Animation ==================== */
.rekhi-mp-step-circle.glow {
	animation: rekhi-mp-pulse-glow 2s infinite alternate;
}

@keyframes rekhi-mp-pulse-glow {
	from {
		box-shadow:
			0 0 20px var(--rekhi-accent),
			0 0 0 12px rgba(255, 102, 0, 0.15);
	}
	to {
		box-shadow:
			0 0 45px var(--rekhi-accent),
			0 0 0 12px rgba(255, 102, 0, 0.15);
	}
}

/* ==================== MOBILE: Vertical Timeline ==================== */
@media (max-width: 992px) {
	.rekhi-mp-container {
		max-width: 100%;
		padding: 30px 16px;
	}

	.rekhi-mp-header {
		margin-bottom: 40px;
	}

	.rekhi-mp-title {
		font-size: 2.4rem;
	}

	.rekhi-mp-subtitle {
		font-size: 1.1rem;
	}

	/* Progress line becomes vertical */
	.rekhi-mp-timeline-line {
		top: 50px;
		left: 48px;
		right: auto;
		width: 6px;
		height: auto;
		bottom: 50px;
	}

	.rekhi-mp-timeline-progress {
		width: 100% !important;
		height: 0%;
		transition: height 4s cubic-bezier(0.25, 0.1, 0.25, 1);
	}

	/* Steps become vertical rows */
	.rekhi-mp-steps {
		flex-direction: column;
		align-items: flex-start;
		gap: 50px;
		padding-left: 70px;
	}

	.rekhi-mp-step {
		flex: none;
		width: 100%;
		flex-direction: row;
		align-items: center;
		gap: 25px;
		opacity: 0;
		transform: translateX(-30px);
	}

	.rekhi-mp-step.active {
		transform: translateX(0);
	}

	/* Glass card becomes horizontal */
	.rekhi-mp-glass-card {
		width: 100%;
		max-width: none;
		height: 180px;
		flex-direction: row;
		text-align: left;
		padding: 20px 24px;
		gap: 20px;
	}

	.rekhi-mp-step-circle {
		margin-bottom: 0;
		flex-shrink: 0;
	}

	.rekhi-mp-step-title {
		font-size: 1.3rem;
	}

	.rekhi-mp-step-description {
		font-size: 0.9rem;
	}

	.rekhi-mp-step.active .rekhi-mp-step-description {
		max-height: 80px;
	}

}

/* ==================== SMALL MOBILE ==================== */
@media (max-width: 600px) {
	.rekhi-mp-title {
		font-size: 1.9rem;
	}

	.rekhi-mp-subtitle {
		font-size: 1rem;
	}

	.rekhi-mp-timeline-line {
		left: 40px;
	}

	.rekhi-mp-steps {
		padding-left: 58px;
		gap: 40px;
	}

	.rekhi-mp-glass-card {
		height: auto;
		min-height: 140px;
		padding: 18px 20px;
		gap: 16px;
	}

	.rekhi-mp-step-circle {
		width: 68px;
		height: 68px;
	}

	.rekhi-mp-step-icon {
		font-size: 1.9rem;
	}

	.rekhi-mp-step-number {
		width: 24px;
		height: 24px;
		font-size: 0.8rem;
		top: -6px;
	}

	.rekhi-mp-step-title {
		font-size: 1.15rem;
	}
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
	.rekhi-mp-step {
		transition: opacity 0.1s ease;
	}

	.rekhi-mp-step.active {
		opacity: 1;
		transform: none;
	}

	.rekhi-mp-timeline-progress {
		transition: none;
	}

	.rekhi-mp-step-circle.glow {
		animation: none;
	}
}
