/* 
 * Medical Journey Timeline CSS 
 * Premium Responsive Styling 
 */

:root {
	--mj-primary-color: #0f223f;    /* Deep Navy Blue */
	--mj-accent-color: #c95b32;     /* Burnt Orange/Rust */
	--mj-bg-cream: #faf8f5;         /* Elegant Cream Background */
	--mj-bg-white: #ffffff;
	--mj-border-color: #e5e0d8;     /* Light Gray Border */
	--mj-text-dark: #0f223f;
	--mj-text-muted: #627285;
	--mj-dot-size: 48px;
	
	--mj-font-heading: 'Playfair Display', Georgia, serif;
	--mj-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Core Container Wrapper */
.mj-timeline-wrapper {
	font-family: var(--mj-font-body);
	color: var(--mj-text-dark);
	max-width: 1100px;
	margin: 40px auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.mj-timeline-wrapper *, 
.mj-timeline-wrapper *::before, 
.mj-timeline-wrapper *::after {
	box-sizing: border-box;
}

/* 1. Header Navigation and Dots */
.mj-timeline-header {
	width: 100%;
	margin-bottom: 50px;
	position: relative;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.mj-timeline-header::-webkit-scrollbar {
	display: none;
}

.mj-timeline-dots-track {
	position: relative;
	width: 100%;
	min-width: 900px;
	padding: 20px 0 40px 0;
}

/* Adjust tracking lines */
.mj-timeline-line-bg {
	position: absolute;
	top: 44px;
	left: 4%;
	right: 4%;
	height: 1px;
	background-color: var(--mj-border-color);
	z-index: 1;
}

.mj-timeline-line-active {
	position: absolute;
	top: 44px;
	left: 4%;
	height: 1px;
	background-color: var(--mj-primary-color);
	z-index: 1;
	width: 0;
	transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mj-timeline-dots {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	width: 100%;
}

/* Interactive step buttons */
.mj-timeline-step-dot {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: calc(100% / 6);
	position: relative;
	outline: none;
	text-align: center;
}

/* The circle containing the step number */
.mj-timeline-step-dot::before {
	content: "";
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translate(-50%, -50%);
	width: var(--mj-dot-size);
	height: var(--mj-dot-size);
	border-radius: 50%;
	background-color: var(--mj-bg-white);
	border: 1px solid var(--mj-border-color);
	transition: all 0.4s ease;
	z-index: -1;
}

/* Inner number inside circle */
.mj-timeline-dot-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--mj-dot-size);
	height: var(--mj-dot-size);
	font-family: var(--mj-font-heading);
	font-size: 18px;
	font-weight: 700;
	color: var(--mj-primary-color);
	background-color: var(--mj-bg-white);
	border-radius: 50%;
	border: 1px solid var(--mj-border-color);
	transition: all 0.4s ease;
	box-shadow: 0 0 0 4px var(--mj-bg-white);
}

/* Hover State of Dot */
.mj-timeline-step-dot:hover .mj-timeline-dot-number {
	border-color: var(--mj-primary-color);
	transform: scale(1.05);
}

/* Active State of Dot */
.mj-timeline-step-dot.is-active .mj-timeline-dot-number {
	color: var(--mj-bg-white);
	background-color: var(--mj-primary-color);
	border-color: var(--mj-primary-color);
}

/* Completed/Passed State of Dot */
.mj-timeline-step-dot.is-completed .mj-timeline-dot-number {
	border-color: var(--mj-primary-color);
}

/* Text label below the circle */
.mj-timeline-dot-label-wrapper {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 10px;
}

.mj-timeline-day-label {
	font-size: 11px;
	font-weight: 700;
	color: var(--mj-accent-color);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 6px;
	transition: color 0.3s ease;
}

.mj-timeline-step-title {
	font-family: var(--mj-font-heading);
	font-size: 14px;
	font-weight: 600;
	color: var(--mj-text-dark);
	line-height: 1.3;
	transition: opacity 0.3s ease;
}

/* Faint inactive steps titles */
.mj-timeline-step-dot:not(.is-active) .mj-timeline-step-title {
	opacity: 0.8;
}

/* 2. Main Content Card */
.mj-timeline-body {
	width: 100%;
	position: relative;
	min-height: 400px;
}

.mj-timeline-card {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	background-color: var(--mj-bg-cream);
	border: 1px solid #f2ede2;
	border-radius: 24px;
	padding: 48px;
	box-shadow: 0 12px 40px rgba(15, 34, 63, 0.03);
	width: 100%;
	opacity: 0;
}

/* Keyframe for smooth transition */
@keyframes mjSlideUpFade {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mj-timeline-card.is-active {
	display: grid;
	opacity: 1;
	animation: mjSlideUpFade 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Left Column: Visual Asset Card */
.mj-timeline-card-visual {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 360px;
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mj-timeline-card-visual-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(15, 34, 63, 0.4) 0%, rgba(15, 34, 63, 0.1) 100%);
	z-index: 1;
}

/* Upper tag in left card */
.mj-timeline-card-visual-tag {
	position: absolute;
	top: 24px;
	left: 24px;
	font-size: 11px;
	font-weight: 700;
	color: var(--mj-bg-white);
	letter-spacing: 2px;
	text-transform: uppercase;
	z-index: 2;
	padding: 6px 12px;
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Right Column: Text content details */
.mj-timeline-card-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-right: 20px;
}

.mj-timeline-meta-subtitle {
	font-size: 11px;
	font-weight: 700;
	color: var(--mj-accent-color);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 12px;
}

.mj-timeline-card-title {
	font-family: var(--mj-font-heading);
	font-size: 38px;
	line-height: 1.15;
	color: var(--mj-primary-color);
	margin: 0 0 20px 0;
	font-weight: 500;
}

.mj-timeline-card-description {
	font-size: 15px;
	line-height: 1.65;
	color: var(--mj-text-muted);
	margin-bottom: 28px;
}

.mj-timeline-card-description p {
	margin: 0 0 15px 0;
}

.mj-timeline-card-description p:last-child {
	margin-bottom: 0;
}

/* Checkmark Bullets */
.mj-timeline-card-bullets {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mj-timeline-card-bullets li {
	display: flex;
	align-items: flex-start;
	margin-bottom: 14px;
}

.mj-timeline-card-bullets li:last-child {
	margin-bottom: 0;
}

.mj-timeline-bullet-icon {
	flex-shrink: 0;
	margin-right: 14px;
	display: inline-flex;
	margin-top: 2px;
}

.mj-timeline-bullet-icon svg {
	width: 18px;
	height: 18px;
}

.mj-timeline-bullet-text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--mj-text-dark);
}

/* 3. Footer Navigation */
.mj-timeline-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 35px;
	width: 100%;
}

/* Navigation button styling */
.mj-timeline-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 26px;
	border-radius: 23px;
	border: 1px solid var(--mj-border-color);
	background-color: var(--mj-bg-cream);
	color: var(--mj-text-dark);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	outline: none;
}

.mj-timeline-nav-btn .mj-timeline-arrow {
	font-size: 16px;
	transition: transform 0.3s ease;
}

.mj-timeline-nav-btn.is-prev .mj-timeline-arrow {
	margin-right: 8px;
}

.mj-timeline-nav-btn.is-next .mj-timeline-arrow {
	margin-left: 8px;
}

/* Hover effects with micro-translations */
.mj-timeline-nav-btn:hover {
	background-color: var(--mj-primary-color);
	color: var(--mj-bg-white);
	border-color: var(--mj-primary-color);
	box-shadow: 0 4px 12px rgba(15, 34, 63, 0.15);
}

.mj-timeline-nav-btn.is-prev:hover .mj-timeline-arrow {
	transform: translateX(-4px);
}

.mj-timeline-nav-btn.is-next:hover .mj-timeline-arrow {
	transform: translateX(4px);
}

/* Disabled buttons */
.mj-timeline-nav-btn:disabled,
.mj-timeline-nav-btn[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
	background-color: var(--mj-bg-cream);
	color: var(--mj-text-dark);
	border-color: var(--mj-border-color);
	box-shadow: none;
}

/* Step indicator text */
.mj-timeline-nav-step-indicator {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	color: var(--mj-text-muted);
	text-transform: uppercase;
}

.mj-timeline-nav-step-current {
	color: var(--mj-accent-color);
	margin-left: 3px;
}

.mj-timeline-nav-step-total {
	color: var(--mj-primary-color);
	margin-right: 3px;
}

/* 4. Responsive Queries */

@media (max-width: 900px) {
	.mj-timeline-dots-track {
		min-width: 800px;
	}
	.mj-timeline-line-bg {
		left: 5%;
		right: 5%;
	}
	.mj-timeline-line-active {
		left: 5%;
	}
	.mj-timeline-step-dot {
		width: calc(100% / 6);
	}
}

@media (max-width: 768px) {
	.mj-timeline-header {
		margin-bottom: 30px;
	}
	
	.mj-timeline-card {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: 30px;
		min-height: auto;
	}
	
	.mj-timeline-card-visual {
		min-height: 250px;
		height: 250px;
	}
	
	.mj-timeline-card-content {
		padding-right: 0;
	}
	
	.mj-timeline-card-title {
		font-size: 30px;
		margin-bottom: 15px;
	}
	
	.mj-timeline-footer {
		margin-top: 25px;
	}
}

@media (max-width: 480px) {
	.mj-timeline-wrapper {
		margin: 20px auto;
	}
	
	.mj-timeline-card-visual {
		height: 200px;
		min-height: 200px;
	}
	
	.mj-timeline-card-title {
		font-size: 26px;
	}
	
	.mj-timeline-nav-btn {
		padding: 0 16px;
		height: 40px;
	}
	
	.mj-timeline-nav-btn .mj-timeline-btn-text {
		display: none;
	}
	
	.mj-timeline-nav-btn.is-prev .mj-timeline-arrow {
		margin-right: 0;
	}
	
	.mj-timeline-nav-btn.is-next .mj-timeline-arrow {
		margin-left: 0;
	}
}
