/* ==========================================================================
   AAFE Shuffle Hero — Modern Responsive Stylesheet
   ========================================================================== */

.aafe-shuffle-hero-wrapper {
	width: 100%;
	position: relative;
	padding: 50px 30px;
	box-sizing: border-box;
}

.aafe-shuffle-hero-wrapper,
.aafe-shuffle-hero-wrapper * {
	box-sizing: border-box;
}

/* ── Typography Defaults ── */
.aafe-shuffle-hero-wrapper h1,
.aafe-shuffle-hero-wrapper h2,
.aafe-shuffle-hero-wrapper h3,
.aafe-shuffle-hero-wrapper h4,
.aafe-shuffle-hero-wrapper h5,
.aafe-shuffle-hero-wrapper h6 { 
	margin: 0;
	line-height: 1.15;
}

.aafe-shuffle-hero-wrapper p,
.aafe-shuffle-hero-wrapper span,
.aafe-shuffle-hero-wrapper li,
.aafe-shuffle-hero-wrapper a { 
	margin: 0;
}

/* ── Inner Grid Layout ── */
.aafe-shuffle-hero__inner {
	display: grid;
	gap: 40px;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

/* Layout Orientations — Base / Desktop */
.aafe-layout-left-right .aafe-shuffle-hero__inner,
.aafe-shuffle-hero__inner.aafe-layout-left-right {
	grid-template-columns: 1fr 1fr;
}
.aafe-layout-left-right .aafe-shuffle-hero__content,
.aafe-shuffle-hero__inner.aafe-layout-left-right .aafe-shuffle-hero__content {
	order: 1;
	display: flex;
}
.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
.aafe-shuffle-hero__inner.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap {
	order: 2;
}

.aafe-layout-right-left .aafe-shuffle-hero__inner,
.aafe-shuffle-hero__inner.aafe-layout-right-left {
	grid-template-columns: 1fr 1fr;
}
.aafe-layout-right-left .aafe-shuffle-hero__content,
.aafe-shuffle-hero__inner.aafe-layout-right-left .aafe-shuffle-hero__content {
	order: 2;
	display: flex;
}
.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
.aafe-shuffle-hero__inner.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap {
	order: 1;
}

.aafe-layout-top-bottom .aafe-shuffle-hero__inner,
.aafe-shuffle-hero__inner.aafe-layout-top-bottom {
	grid-template-columns: 1fr;
}
.aafe-layout-top-bottom .aafe-shuffle-hero__content,
.aafe-shuffle-hero__inner.aafe-layout-top-bottom .aafe-shuffle-hero__content {
	order: 1;
	display: flex;
}
.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
.aafe-shuffle-hero__inner.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap {
	order: 2;
}

.aafe-layout-bottom-top .aafe-shuffle-hero__inner,
.aafe-shuffle-hero__inner.aafe-layout-bottom-top {
	grid-template-columns: 1fr;
}
.aafe-layout-bottom-top .aafe-shuffle-hero__content,
.aafe-shuffle-hero__inner.aafe-layout-bottom-top .aafe-shuffle-hero__content {
	order: 2;
	display: flex;
}
.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
.aafe-shuffle-hero__inner.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap {
	order: 1;
}

.aafe-layout-grid-only .aafe-shuffle-hero__inner,
.aafe-shuffle-hero__inner.aafe-layout-grid-only {
	grid-template-columns: 1fr;
}
.aafe-layout-grid-only .aafe-shuffle-hero__content,
.aafe-shuffle-hero__inner.aafe-layout-grid-only .aafe-shuffle-hero__content {
	display: none !important;
}

/* ── Content Box ── */
.aafe-shuffle-hero__content {
	display: flex;
	flex-direction: column;
	width: 100%;
	position: relative;
}

/* Alignment */
.aafe-content-align-left .aafe-shuffle-hero__content {
	text-align: left;
	align-items: flex-start;
}
.aafe-content-align-center .aafe-shuffle-hero__content {
	text-align: center;
	align-items: center;
}
.aafe-content-align-right .aafe-shuffle-hero__content {
	text-align: right;
	align-items: flex-end;
}

@media (max-width: 1024px) {
	.aafe-content-align-tablet-left .aafe-shuffle-hero__content {
		text-align: left;
		align-items: flex-start;
	}
	.aafe-content-align-tablet-center .aafe-shuffle-hero__content {
		text-align: center;
		align-items: center;
	}
	.aafe-content-align-tablet-right .aafe-shuffle-hero__content {
		text-align: right;
		align-items: flex-end;
	}
}

@media (max-width: 767px) {
	.aafe-content-align-mobile-left .aafe-shuffle-hero__content {
		text-align: left;
		align-items: flex-start;
	}
	.aafe-content-align-mobile-center .aafe-shuffle-hero__content {
		text-align: center;
		align-items: center;
	}
	.aafe-content-align-mobile-right .aafe-shuffle-hero__content {
		text-align: right;
		align-items: flex-end;
	}
}

/* ── Subtitle ── */
.aafe-shuffle-hero__subtitle {
	display: inline-block;
	color: #4f46e5;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 16px;
	letter-spacing: 0.3px;
	transition: color 0.25s ease;
}

/* Subtitle Badge Style */
.aafe-shuffle-hero__subtitle.aafe-subtitle--badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	border-radius: 999px;
	background: #eef2ff;
	border: 1px solid rgba(79, 70, 229, 0.2);
	width: fit-content;
	margin-bottom: 20px;
}

.aafe-subtitle-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4f46e5;
	display: inline-block;
	position: relative;
	flex-shrink: 0;
}

.aafe-subtitle-dot::after {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: inherit;
	opacity: 0.45;
	animation: aafe-dot-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes aafe-dot-pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 0.45;
	}
	50% {
		transform: scale(1.9);
		opacity: 0;
	}
}

/* ── Title ── */
.aafe-shuffle-hero__title {
	font-size: 54px;
	font-weight: 700;
	color: #111827;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-bottom: 18px;
	transition: color 0.25s ease;
}

.aafe-shuffle-hero__title.aafe-title--gradient {
	background-clip: text !important;
	-webkit-background-clip: text !important;
	-webkit-text-fill-color: transparent !important;
}

/* ── Description ── */
.aafe-shuffle-hero__desc {
	font-size: 17px;
	color: #64748b;
	line-height: 1.6;
	margin-bottom: 28px;
	transition: color 0.25s ease;
}

/* ── Buttons Group ── */
.aafe-shuffle-hero__btns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.aafe-content-align-left .aafe-shuffle-hero__btns {
	justify-content: flex-start;
}
.aafe-content-align-center .aafe-shuffle-hero__btns {
	justify-content: center;
}
.aafe-content-align-right .aafe-shuffle-hero__btns {
	justify-content: flex-end;
}

@media (max-width: 1024px) {
	.aafe-content-align-tablet-left .aafe-shuffle-hero__btns { justify-content: flex-start; }
	.aafe-content-align-tablet-center .aafe-shuffle-hero__btns { justify-content: center; }
	.aafe-content-align-tablet-right .aafe-shuffle-hero__btns { justify-content: flex-end; }
}

@media (max-width: 767px) {
	.aafe-content-align-mobile-left .aafe-shuffle-hero__btns { justify-content: flex-start; }
	.aafe-content-align-mobile-center .aafe-shuffle-hero__btns { justify-content: center; }
	.aafe-content-align-mobile-right .aafe-shuffle-hero__btns { justify-content: flex-end; }
}

/* Base Button */
.aafe-shuffle-hero__btn,
.aafe-shuffle-hero__btn-sec {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	padding: 13px 28px;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	line-height: 1;
	transition: all 0.25s ease;
	border: 1.5px solid transparent;
}

.aafe-shuffle-hero__btn svg,
.aafe-shuffle-hero__btn i,
.aafe-shuffle-hero__btn-sec svg,
.aafe-shuffle-hero__btn-sec i {
	width: 1em;
	height: 1em;
	font-size: 1.1em;
	fill: currentColor;
	flex-shrink: 0;
}

/* Primary Button */
.aafe-shuffle-hero__btn {
	background-color: #4f46e5;
	color: #ffffff;
	border-color: #4f46e5;
	box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.aafe-shuffle-hero__btn:hover {
	background-color: #4338ca;
	border-color: #4338ca;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(79, 70, 229, 0.38);
}
.aafe-shuffle-hero__btn:active {
	transform: translateY(0);
}

/* Secondary Button */
.aafe-shuffle-hero__btn-sec {
	background-color: transparent;
	color: #374151;
	border-color: #cbd5e1;
}
.aafe-shuffle-hero__btn-sec:hover {
	background-color: #f8fafc;
	border-color: #94a3b8;
	color: #0f172a;
	transform: translateY(-2px);
}
.aafe-shuffle-hero__btn-sec:active {
	transform: translateY(0);
}

/* ── Grid Container ── */
.aafe-shuffle-hero__grid-wrap {
	width: 100%;
	position: relative;
}

.aafe-shuffle-hero__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	width: 100%;
	position: relative;
	user-select: none;
}

/* ── Grid Image Item ── */
.aafe-shuffle-hero__img {
	width: 100%;
	aspect-ratio: 1 / 1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #f1f5f9;
	border-radius: 10px;
	display: block;
	position: relative;
	overflow: hidden;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	will-change: transform, box-shadow;
	transform: translate3d(0, 0, 0) scale(1);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transition: transform var(--aafe-img-transition, 350ms) cubic-bezier(0.25, 1, 0.5, 1),
	            box-shadow var(--aafe-img-transition, 350ms) cubic-bezier(0.25, 1, 0.5, 1),
	            border-color var(--aafe-img-transition, 350ms) ease,
	            opacity var(--aafe-img-transition, 350ms) ease,
	            filter var(--aafe-img-transition, 350ms) ease;
}

.aafe-shuffle-hero__img:hover {
	z-index: 10;
	transform: translateY(var(--aafe-img-hover-lift, -5px)) scale(var(--aafe-img-hover-scale, 1.05));
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* FLIP Transition Engine */
.aafe-shuffle-hero__img.is-flipping {
	transition: transform var(--aafe-flip-duration, 1200ms) var(--aafe-flip-easing, cubic-bezier(0.25, 1, 0.5, 1)) !important;
	z-index: 5;
	pointer-events: none !important;
}

/* Easing Modes */
.aafe-easing-spring { --aafe-flip-easing: cubic-bezier(0.34, 1.56, 0.64, 1); }
.aafe-easing-ease-out { --aafe-flip-easing: cubic-bezier(0.25, 1, 0.5, 1); }
.aafe-easing-material { --aafe-flip-easing: cubic-bezier(0.4, 0, 0.2, 1); }
.aafe-easing-linear { --aafe-flip-easing: linear; }

/* ── Responsive Layout Breakpoints ── */
@media (max-width: 1024px) {
	.aafe-shuffle-hero__title {
		font-size: 42px;
	}
	.aafe-shuffle-hero__inner {
		gap: 32px;
	}

	/* Tablet responsive layout overrides */
	.aafe-layout-tablet-left-right .aafe-shuffle-hero__inner {
		grid-template-columns: 1fr 1fr;
	}
	.aafe-layout-tablet-left-right .aafe-shuffle-hero__content { order: 1; display: flex; }
	.aafe-layout-tablet-left-right .aafe-shuffle-hero__grid-wrap { order: 2; }

	.aafe-layout-tablet-right-left .aafe-shuffle-hero__inner {
		grid-template-columns: 1fr 1fr;
	}
	.aafe-layout-tablet-right-left .aafe-shuffle-hero__content { order: 2; display: flex; }
	.aafe-layout-tablet-right-left .aafe-shuffle-hero__grid-wrap { order: 1; }

	.aafe-layout-tablet-top-bottom .aafe-shuffle-hero__inner {
		grid-template-columns: 1fr;
	}
	.aafe-layout-tablet-top-bottom .aafe-shuffle-hero__content { order: 1; display: flex; }
	.aafe-layout-tablet-top-bottom .aafe-shuffle-hero__grid-wrap { order: 2; }

	.aafe-layout-tablet-bottom-top .aafe-shuffle-hero__inner {
		grid-template-columns: 1fr;
	}
	.aafe-layout-tablet-bottom-top .aafe-shuffle-hero__content { order: 2; display: flex; }
	.aafe-layout-tablet-bottom-top .aafe-shuffle-hero__grid-wrap { order: 1; }

	.aafe-layout-tablet-grid-only .aafe-shuffle-hero__inner {
		grid-template-columns: 1fr;
	}
	.aafe-layout-tablet-grid-only .aafe-shuffle-hero__content {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.aafe-shuffle-hero-wrapper {
		padding: 36px 18px;
	}
	.aafe-shuffle-hero__inner {
		grid-template-columns: 1fr !important;
		gap: 28px;
	}

	/* ── Base Order on Mobile (when Reverse on Mobile is NOT active) ── */
	/* Content Left, Grid Right & Content Top, Grid Bottom -> Content (1), Grid (2) */
	.aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-shuffle-hero__inner.aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-layout-top-bottom .aafe-shuffle-hero__content,
	.aafe-shuffle-hero__inner.aafe-layout-top-bottom .aafe-shuffle-hero__content {
		order: 1;
		display: flex;
	}
	.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-shuffle-hero__inner.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
	.aafe-shuffle-hero__inner.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap {
		order: 2;
	}

	/* Content Right, Grid Left & Content Bottom, Grid Top -> Grid (1), Content (2) */
	.aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-shuffle-hero__inner.aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-layout-bottom-top .aafe-shuffle-hero__content,
	.aafe-shuffle-hero__inner.aafe-layout-bottom-top .aafe-shuffle-hero__content {
		order: 2;
		display: flex;
	}
	.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-shuffle-hero__inner.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
	.aafe-shuffle-hero__inner.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap {
		order: 1;
	}

	/* Explicit mobile layout overrides (if chosen in mobile device switcher) */
	.aafe-layout-mobile-left-right .aafe-shuffle-hero__content,
	.aafe-layout-mobile-top-bottom .aafe-shuffle-hero__content {
		order: 1 !important;
		display: flex;
	}
	.aafe-layout-mobile-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-layout-mobile-top-bottom .aafe-shuffle-hero__grid-wrap {
		order: 2 !important;
	}
	.aafe-layout-mobile-right-left .aafe-shuffle-hero__content,
	.aafe-layout-mobile-bottom-top .aafe-shuffle-hero__content {
		order: 2 !important;
		display: flex;
	}
	.aafe-layout-mobile-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-layout-mobile-bottom-top .aafe-shuffle-hero__grid-wrap {
		order: 1 !important;
	}
	.aafe-layout-mobile-grid-only .aafe-shuffle-hero__content {
		display: none !important;
	}

	/* ── REVERSE ON MOBILE ACTIVE (.aafe-reverse-mobile / .aafe-reverse-mobile-yes) ── */
	/* Reverses whichever order was active! */

	/* When base has Content (1) & Grid (2) -> Reverse puts Grid on Top (1), Content below (2) */
	.aafe-reverse-mobile.aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-reverse-mobile.aafe-layout-top-bottom .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-top-bottom .aafe-shuffle-hero__content,
	.aafe-reverse-mobile .aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-reverse-mobile .aafe-layout-top-bottom .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes .aafe-layout-left-right .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes .aafe-layout-top-bottom .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-left-right .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-top-bottom .aafe-shuffle-hero__content {
		order: 2 !important;
	}
	.aafe-reverse-mobile.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile .aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile .aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes .aafe-layout-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes .aafe-layout-top-bottom .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-left-right .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-top-bottom .aafe-shuffle-hero__grid-wrap {
		order: 1 !important;
	}

	/* When base has Grid (1) & Content (2) -> Reverse puts Content on Top (1), Grid below (2) */
	.aafe-reverse-mobile.aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-reverse-mobile.aafe-layout-bottom-top .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-bottom-top .aafe-shuffle-hero__content,
	.aafe-reverse-mobile .aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-reverse-mobile .aafe-layout-bottom-top .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes .aafe-layout-right-left .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes .aafe-layout-bottom-top .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-right-left .aafe-shuffle-hero__content,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-bottom-top .aafe-shuffle-hero__content {
		order: 1 !important;
	}
	.aafe-reverse-mobile.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile .aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile .aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes .aafe-layout-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes .aafe-layout-bottom-top .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-right-left .aafe-shuffle-hero__grid-wrap,
	.aafe-reverse-mobile-yes.aafe-layout-mobile-bottom-top .aafe-shuffle-hero__grid-wrap {
		order: 2 !important;
	}

	.aafe-shuffle-hero__title {
		font-size: 32px;
	}
	.aafe-shuffle-hero__desc {
		font-size: 15px;
	}
	.aafe-shuffle-hero__btns {
		gap: 10px;
	}
}
