/* --- Global & Container Styles --- */
.success-cycle-diagram {
	position: relative;
	width: 100%;
	/* Set max width for the diagram */
	max-width: 900px;
	margin: 0 auto;
	/* Defines the height of the container to match its width for a perfect circle layout */
	padding-top: 0;
	aspect-ratio: 1 / 1;
	/* Ensures a square container for symmetrical positioning (DESKTOP) */
	min-height: 500px;
	/* Fallback min height */
	font-family: Arial, sans-serif;
	box-sizing: border-box;
	/* NEW: Set the dark blue background color from the image */
	background-color: #384C67;
}

/* Base style for all text blocks - mimicking the dark background from the image */
.step-content-box {
	color: white;
	/* Default color, overridden by control */
}

/* --- Center Hexagon --- */
.cycle-center {
	width: 228px;
	height: 200px;
	/* NEW: Set the bright orange color from the image */
	background-color: #FF7F00;
	position: absolute;
	top: 50%;
	left: 50%;
	/* MODIFICATION: REMOVE ROTATION (back to 0 degrees) to match the image's flat top/bottom */
	transform: translate(-50%, -50%) rotate(0deg);
	z-index: 10;

	/* Hexagon shape using clip-path (Standard, no notch) */
	clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%);

	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px;
	box-sizing: border-box;
	font-weight: 800;
	line-height: 1.2;
	color: white;
}

/* MODIFICATION: REMOVE COUNTER-ROTATION (back to 0 degrees) as the hexagon is now 0 degrees */
.cycle-center .center-text {
	font-size: 1.2em;
	transform: rotate(0deg);
}

/* --- Outer Step Container --- */
.cycle-step {
	position: absolute;
	width: 380px;
	/* Adjusted size */
	display: flex;
	align-items: flex-start;
	z-index: 5;
}

/* --- Outer Hexagon (The Number) --- */
.step-hexagon {
	width: 100px;
	min-width: 80px;
	/* Fixed size */
	height: 80px;
	/* NEW: Set the lighter orange color from the image */
	background-color: #F39C12;
	position: relative;
	/* MODIFICATION: REMOVE ROTATION (back to 0 degrees) to match the image's flat top/bottom */
	transform: rotate(0deg);

	/* NEW Hexagon shape with notch on the RIGHT side (3 o'clock) */
	/* This applies to default flow (Steps 2, 3, 4) and mobile stack */
	clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%);

	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2em;
	font-weight: bold;
	color: white;
	margin-right: 20px;
	z-index: 15;
}

/* MODIFICATION: REMOVE COUNTER-ROTATION (back to 0 degrees) as the hexagon is now 0 degrees */
.step-hexagon .step-number {
	display: inline-block;
	transform: rotate(0deg);
}

/* --- Connecting Line for Right-Aligned Hexagons (Steps 2, 3, 4) --- */
/* The line segment is drawn from the hexagon's notch to the text box */
/* .step-hexagon::after {
	content: '';
	position: absolute;
	right: -20px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 2px;
	background-color: var(--line-color, #F5BB62);
	z-index: 1;
} */

/* --- Content Box --- */
.step-content-box {
	position: relative;
	/* Removed padding for line, as line now starts at hexagon */
	padding: 5px 0 5px 0;
	background-color: transparent;
	flex-grow: 1;
}

.step-content-box .step-title {
	font-size: 1.1em;
	font-weight: bold;
	margin: 0 0 5px 0;
	padding: 0;
	line-height: 1.2;
	text-transform: uppercase;
	/* NEW: Ensure text is white */
	color: white;
}

.step-content-box .step-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
	font-size: 0.9em;
	line-height: 1.4;
	/* NEW: Ensure text is white */
	color: white;
}

.step-content-box .step-list li {
	margin-bottom: 3px;
	/* Use a custom dash for styling purposes */
}


/* --- Desktop Layout (Circular/Hexagonal Positioning) --- */
@media (min-width: 769px) {

	.success-cycle-diagram {
		padding: 0;
		min-height: 550px;
		overflow:hidden;
	}

	/* Ensure Center is perfectly aligned to 50% / 50% */
	.cycle-center {
		top: 50%;
		left: 50%;
		/* Rotation is handled above */
	}

	/* All steps are anchored at their center, then positioned using top/left percentages */
	.cycle-step {
		transform: translate(-50%, -50%);
		/* Anchor the center of the step container */
		width: 380px;
	}
	.step-hexagon{
		margin-right: 5px;
	}

	/* ----------------------------------------------------------------------
       Hexagonal Layout Positioning (Anchored at the Step's Center)
    ---------------------------------------------------------------------- */

	/* Step 1: Top Left (11 o'clock) */
	.step-1 {
		top: 28%;
		left: 63%;
		flex-direction: row;
		/* Hexagon on the left */
	}

	.step-1 .step-content-box {
		text-align: left;
		margin-left:10px;
	}
	
	.cycle-step.step-1::after{
		    content: '';
			position: absolute;
			right: -46px;
			top: 100%;
			transform: translateY(-50%);
			width: inherit;
			height: 2px;
			background-color: var(--line-color, #F5BB62);
			z-index: 1;
	}

	/* Step 2: Top Right (1 o'clock) */
	.step-2 {
		top: 43%;
		left: 83%;
		flex-direction: row;
		/* Hexagon on the right */
	}
	
	.step-2 .step-content-box, .step-3 .step-content-box {
		top: -26px;
	}
	
	.cycle-step.step-2::after {
        content: '';
        position: absolute;
        right: -26px;
        top: 69%;
        transform: translateY(-50%);
        width: inherit;
        height: 2px;
        background-color: var(--line-color, #F5BB62);
        z-index: 1;
    }

	/* Step 3: Middle Right (3 o'clock) */
	.step-3 {
		top: 59%;
		left: 83%;
		flex-direction: row;
	}
	
	.cycle-step.step-3::after {
        content: '';
        position: absolute;
        right: -26px;
        top: 69%;
        transform: translateY(-50%);
        width: inherit;
        height: 2px;
        background-color: var(--line-color, #F5BB62);
        z-index: 1;
    }

	/* Step 4: Bottom Right (5 o'clock) */
	.step-4 {
		top: 76%;
		left: 65%;
		flex-direction: row;
	}
	
	.step-4 .step-content-box {
		top: -54px;
	}
	
	.cycle-step.step-4::after {
		content: '';
		position: absolute;
		right: -26px;
		top: 56%;
		transform: translateY(-50%);
		width: inherit;
		height: 2px;
		background-color: var(--line-color, #F5BB62);
		z-index: 1;
	}

	/* Step 5: Bottom Left (7 o'clock) */
	.step-5 {
		top: 58%;
		left: 17%;
		flex-direction: row-reverse;
		/* Hexagon on the left */
	}

	.step-5 .step-content-box {
		text-align: right;
	}
	
	.cycle-step.step-5::after {
		content: '';
		position: absolute;
		right: 26px;
		top: 88%;
		transform: translateY(-50%);
		width: inherit;
		height: 2px;
		background-color: var(--line-color, #F5BB62);
		z-index: 1;
	}

	/* Step 6: Middle Left (9 o'clock) */
	.step-6 {
		top: 41%;
		left: 17%;
		flex-direction: row-reverse;
	}

	.step-6 .step-content-box {
		text-align: right;
	}
	
	.cycle-step.step-6::after {
		content: '';
		position: absolute;
		right: 26px;
		top: 88%;
		transform: translateY(-50%);
		width: inherit;
		height: 2px;
		background-color: var(--line-color, #F5BB62);
		z-index: 1;
	}

	/* --- Styles for Left-Aligned Hexagons (Steps 1, 5, 6) --- */

	/* Flips the hexagon to have the notch on the left (9 o'clock) */
	.step-1 .step-hexagon,
	.step-5 .step-hexagon,
	.step-6 .step-hexagon {
		/* MODIFICATION: Maintain 0 degrees rotation */
		transform: rotate(0deg);

		/* NEW Hexagon shape with notch on the LEFT side (9 o'clock) - Matches the flat-top orientation */
		clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%);
		margin-right: 0;
		margin-left: 20px;
	}

	/* The number inside these steps already has 0 rotation */

	/* Flips the line segment to connect from the left notch to the text box */
	.step-1 .step-hexagon::after,
	.step-5 .step-hexagon::after,
	.step-6 .step-hexagon::after {
		left: -20px;
		/* Starts just outside the hexagon on the left */
		right: auto;
	}
}


/* --- Mobile Responsiveness (Vertical Stack) --- */
@media (max-width: 768px) {

	.success-cycle-diagram {
		padding: 30px 10px;
		/* Restore mobile padding */
		min-height: auto;
		aspect-ratio: auto;
		/* CRITICAL FIX: Allow container to collapse vertically */
	}

	/* Hide the center piece and use simple block layout */
	.cycle-center {
		position: static;
		transform: none;
		/* Reset transform for mobile block layout */
		margin: 20px auto;
		width: 150px;
		height: 150px;
		padding: 20px;
	}

	/* Reset center text rotation on mobile */
	.cycle-center .center-text {
		transform: none;
		font-size: 1.1em;
	}


	.center-text {
		font-size: 1.1em;
	}

	/* All steps become standard block elements */
	.cycle-step {
		position: relative;
        width: 80%;
        margin-bottom: 20px;
        flex-direction: row;
        align-items: flex-start;
        top: auto;
        left: auto;
        transform: none;
        margin-left: auto;
        margin-right: auto;
	}

	/* CRITICAL FIX: Ensure steps 1, 5, 6 use the default right-notch and left-aligned text on mobile */
	.step-1,
	.step-5,
	.step-6 {
		flex-direction: row;
		/* Force Hexagon | Content order */
	}

	.step-1 .step-content-box,
	.step-5 .step-content-box,
	.step-6 .step-content-box {
		text-align: left !important;
		/* Force text alignment left on mobile */
	}

	.step-1 .step-hexagon,
	.step-5 .step-hexagon,
	.step-6 .step-hexagon {
		/* Reset rotation for mobile stack */
		transform: none;

		/* Reset clip-path to the default right-notch defined globally */
		clip-path: polygon(50% 0%, 100% 25%, 100% 45%, 110% 50%, 100% 55%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
		margin-left: 0;
		/* Clear desktop margin override */
		margin-right: 15px;
		/* Use standard mobile spacing */
	}

	/* Reset number rotation for mobile stack */
	.step-1 .step-hexagon .step-number,
	.step-5 .step-hexagon .step-number,
	.step-6 .step-hexagon .step-number,
	.step-hexagon .step-number {
		transform: none;
	}

	/* All steps need the line pointing right in the mobile stack */
/* 	.step-1 .step-hexagon::after,
	.step-5 .step-hexagon::after,
	.step-6 .step-hexagon::after,
	.step-hexagon::after {
		right: -20px;
		left: auto;
	} */

	.step-hexagon {
		min-width: 60px;
		width: 60px;
		height: 60px;
		font-size: 1.5em;
		position: relative;
		margin-right: 15px;
	}

	.step-content-box {
		padding: 5px 0 5px 0;
		/* Consistent mobile padding */
		text-align: left;
	}

}