/*============================================*/
/*       SDGI STACK CARD CAROUSEL WIDGET      */
/*       Created: 2026/01/16                  */
/*       Version: 1.0.0                       */
/*============================================*/

/* Card Section Variables */
:root {
	--card-bg-dark: #394d42;
	--card-yellow: var(--color-gold);
	--card-radius: 40px;
	--card-transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Section Container */
.card-section {
	background-color: var(--card-bg-dark);
	color: var(--color-white);
	padding: 100px 80px;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.card-page-wrapper {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
}

/*DESKTOP HEADER*/
.card-nav-bar.desktop-only {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 50px;
	width: 100%;
	position: relative;
	z-index: 10;
}

.card-header-text {
	width: 70%;
	padding-right: 20px;
}

.card-eyebrow {
	font-weight: 300;
	font-size: 24px;
	margin: 0 0 12px 0;
	letter-spacing: -0.25px;
}

.card-headline {
	font-size: clamp(20px, 2.2vw, 32px);
	margin: 0;
	padding: 0;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/*NAVIGATION CONTROLS*/
.card-nav-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

.card-counter-circle {
	width: 100px;
	height: 100px;
	background-color: var(--card-yellow);
	border-radius: 50%;
	color: black;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: 700;
	font-size: 18px;
	border: 10px solid rgba(255, 255, 255, 0.1);
	background-clip: padding-box;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-arrow-btn {
	background: none !important;
	border: none !important;
	color: var(--color-white) !important;
	font-size: 24px !important;
	cursor: pointer !important;
	padding: 0 !important;
	line-height: 1 !important;
	transition: opacity 0.3s !important;
	width: 24px;
	height: 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	outline: none !important;
}

.card-arrow-btn:hover {
	opacity: 0.7;
}

/* Desktop Disabled State */
.card-arrow-btn.disabled {
	opacity: 0;
	pointer-events: none;
	cursor: default;
}

.card-hidden-btn {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/*STAIRCASE WRAPPER*/
.card-staircase-wrapper {
	position: relative;
	width: 100%;
	height: 480px;
}

.card-stack-container {
	position: relative;
	width: 100%;
	height: 100%;
}

.stair-card {
	position: absolute;
	bottom: 0px;
	border-radius: var(--card-radius);
	background-size: cover;
	background-position: center;
	transition: var(--card-transition);
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* PAST CARD - Goes BEHIND the stack (far right, behind pos-5) */
.stair-past {
	z-index: 0; /* ← Behind everything */
	width: 46%; /* ← Same size as pos-5 */
	height: 60%;
	left: 60%; /* ← Slightly RIGHT of pos-5 */
	bottom: 0;
	opacity: 0; /* ← Fades out */
	pointer-events: none;
	transform: translateX(0); /* ← SLIDE RIGHT behind stack */
	filter: brightness(0.85);
}

/* FUTURE CARD - Starts behind pos-5, ready to slide in */
.stair-future {
	z-index: 0;
	width: 46%;
	height: 60%;
	left: 60%; /* ← Behind pos-5 */
	bottom: 0;
	opacity: 0;
	pointer-events: none;
	transform: translateX(100px); /* ← START RIGHT */
	filter: brightness(0.85);
}

/* POSITION 5 - Far right, smallest visible */
.stair-pos-5 {
	z-index: 1;
	width: 46%;
	height: 60%;
	left: 55%;
	bottom: 0;
	filter: brightness(0.85);
	opacity: 1;
	transform: translateX(0);
}

/* ACTIVE CARD - Full size, center stage */
.stair-pos-1 {
	z-index: 5;
	width: 66%;
	height: 100%;
	left: 0;
	bottom: 0;
	filter: brightness(1);
	opacity: 1;
	transform: translateX(0);
}

/* NEXT CARDS - Stacked on the right (smaller preview) */
.stair-pos-2 {
	z-index: 4;
	width: 45%;
	height: 90%;
	left: 30%;
	bottom: 0;
	filter: brightness(0.85);
	opacity: 1;
	transform: translateX(0);
}

.stair-pos-3 {
	z-index: 3;
	width: 45%;
	height: 80%;
	left: 40%;
	bottom: 0;
	filter: brightness(0.85);
	opacity: 1;
	transform: translateX(0);
}

.stair-pos-4 {
	z-index: 2;
	width: 45%;
	height: 70%;
	left: 48%;
	bottom: 0;
	filter: brightness(0.85);
	opacity: 1;
	transform: translateX(0);
}

/*CARD CONTENT*/
.stair-card-inner {
	width: 100%;
	height: 100%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 100%, rgba(0, 0, 0, 0) 0%);
	padding: 60px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
}

/* When overlay is disabled */
.stair-card.overlay-disabled .stair-card-inner {
	background: transparent;
}

.stair-content-box h2 {
	font-size: 36px;
	line-height: 1.2;
	letter-spacing: -0.5px;
	font-weight: 700;
	color: var(--color-white);
	margin-bottom: 20px;
}

.stair-content-box p {
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: -0.5px;
	font-weight: 300;
	max-width: 400px;
	margin: 0;
	color: var(--color-white);
}

/*DESKTOP RULES*/
@media (min-width: 1025px) {
	.card-header-text {
		padding-right: unset;
	}
	.stair-card:not(.stair-pos-1) .stair-content-box {
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
	}
	.card-mobile-header {
		display: none !important;
	}
	.stair-card .card-mobile-nav-container {
		display: none !important;
	}
}

/*TABLET & MOBILE STYLES*/
@media (max-width: 1024px) {
	.desktop-only {
		display: none !important;
	}

	.card-section {
		align-items: flex-start;
		padding: 50px 20px;
	}

	.card-page-wrapper {
		height: auto;
		min-height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		width: 100%;
	}

	.card-mobile-header {
		display: block;
		text-align: center;
		margin: 0 0 20px 0;
		width: 100%;
		max-width: 500px;
	}

	.card-mobile-header .card-eyebrow {
		font-size: 14px;
		margin-bottom: 10px;
		opacity: 0.9;
	}

	.card-mobile-header .card-headline {
		font-size: 30px !important;
		/* line-height: 1.3; */
		white-space: normal !important;
		width: 100%;
		max-width: 100%;
	}

	.card-staircase-wrapper {
		width: 100%;
		height: 500px;
		max-width: 380px;
		margin: 0 auto;
		display: flex;
		justify-content: center;
		align-items: center;
		overflow: visible;
	}

	.card-stack-container {
		width: 100%;
		height: 100%;
		position: relative;
	}

	.stair-card {
		width: 100% !important;
		height: 100% !important;
		left: 0 !important;
		bottom: 0 !important;
		opacity: 0;
		transform: scale(0.9);
		border-radius: 30px;
		box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
		pointer-events: none;
	}

	.stair-card.stair-pos-1 {
		opacity: 1;
		transform: scale(1);
		z-index: 10;
		pointer-events: auto;
		filter: brightness(1);
	}

	.stair-card-inner {
		padding: 50px 50px;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 100%, rgba(0, 0, 0, 0) 0%);
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		text-align: center;
	}

	.stair-content-box {
		margin-top: 0px;
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 100%;
	}

	.card-header-text{
		padding-right: 0;
	}

	.stair-content-box h2 {
		font-size: 30px;
		margin-bottom: 20px;
		margin-top: 0;
	}

	.stair-content-box p {
		font-size: 14px;
		line-height: 1.5;
		margin-bottom: auto;
		opacity: 0.9;
		max-width: 100%;
		color: rgba(255, 255, 255, 0.9);
		padding-bottom: 20px;
	}

	.card-mobile-nav-container {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 20px;
		margin-top: 20px;
		width: 100%;
		margin-bottom: 20px;
	}

	.card-mobile-size {
		width: 70px;
		height: 70px;
		font-size: 14px;
		border: none;
		background-color: var(--card-yellow);
		color: black;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		font-weight: 700;
		box-shadow: 0 0 0 10px rgba(243, 255, 21, 0.2);
	}

	.card-mobile-next-btn,
	.card-mobile-prev-btn {
		background: none !important;
		border: none !important;
		color: var(--color-white) !important;
		font-size: 30px !important;
		cursor: pointer !important;
		padding: 10px 0 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		transition: opacity 0.3s ease; /* Added transition */
		outline: none !important;
	}
	.card-mobile-next-btn img,
	.card-mobile-prev-btn img{
		width: 16px;
	}
	.card-mobile-next-btn:focus,
	.card-mobile-prev-btn:focus {
		outline: none !important;
	}

	/* --- FIXED: Mobile Button Disabled State --- */
	.card-mobile-next-btn.disabled,
	.card-mobile-prev-btn.disabled {
		opacity: 0 !important; /* Force opacity to 0 */
		pointer-events: none;
	}

	.card-counter-circle {
		font-size: 12px;
	}
}

/* TABLET SPECIFIC OVERRIDES */
@media (min-width: 600px) and (max-width: 1024px) {
	.card-staircase-wrapper {
		max-width: 600px;
		height: 700px;
	}

	.card-mobile-header {
		max-width: 800px;
	}

	.card-mobile-header .card-eyebrow {
		white-space: nowrap;
		font-size: 14px;
	}

	.card-mobile-header .card-eyebrow br,
	.card-mobile-header .card-headline br {
		display: none;
	}

	.card-mobile-header .card-headline {
		max-width: 400px;
		margin: 0 auto;
	}

	.card-mobile-size {
		width: 100px;
		height: 100px;
	}
}
