/**
 * Stylesheet: CG Why Us Spotlight Widget
 * Sleek corporate design with interactive tabs, circular masked images, pulsing hotspots, and line connections.
 */

.cg-why-us-wrapper {
	position: relative;
	background-color: #ffffff;
	overflow: hidden;
	width: 100%;
	font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cg-why-us-grid {
	display: grid;
	grid-template-columns: 1.1fr 1.3fr;
	gap: 60px;
	align-items: center;
	min-height: 480px;
}

/* ==========================================
 * LEFT COLUMN: CONTENT & TABS
 * ========================================== */

.cg-why-us-content-block {
	display: flex;
	flex-direction: column;
	justify-content: center;
	z-index: 5;
}

.cg-why-us-tabs-navigation {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 35px;
}

.cg-why-us-tab-trigger {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #154683;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
	position: relative;
}

.cg-why-us-tab-trigger::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: #6DC05A;
	transition: width 0.3s ease;
}

.cg-why-us-tab-trigger:hover {
	color: #6DC05A;
}

.cg-why-us-tab-trigger.active {
	color: #6DC05A;
}

.cg-why-us-tab-trigger.active::after {
	width: 100%;
}

.cg-why-us-tab-separator {
	color: #cbd5e1;
	font-weight: 300;
	font-size: 14px;
	user-select: none;
}

/* Slides Content Transitions */
.cg-why-us-slides {
	position: relative;
}

.cg-why-us-slide {
	display: none;
	opacity: 0;
	transform: translateY(15px);
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-why-us-slide.active {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.cg-why-us-heading {
	font-size: 38px;
	font-weight: 700;
	color: #154683;
	line-height: 1.2;
	margin: 0 0 20px 0;
	letter-spacing: -0.5px;
}

.cg-why-us-desc {
	font-size: 16px;
	line-height: 1.65;
	color: #475569;
	margin: 0 0 35px 0;
}

/* Call-to-action button */
.cg-why-us-btn {
	display: inline-flex;
	align-items: center;
	font-size: 16px;
	font-weight: 700;
	color: #154683;
	text-decoration: none;
	border-bottom: 2px solid #154683;
	padding-bottom: 4px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.cg-why-us-btn:hover {
	color: #6DC05A;
	border-bottom-color: #6DC05A;
	transform: translateX(4px);
}

/* ==========================================
 * RIGHT COLUMN: INTERACTIVE VISUALS
 * ========================================== */

.cg-why-us-spotlight-block {
	position: relative;
	height: 480px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Giant background circle */
.cg-why-us-bg-ring {
	position: absolute;
	right: -10%;
	top: 50%;
	transform: translateY(-50%);
	width: 440px;
	height: 440px;
	border-radius: 50%;
	background-color: #f1f5f9;
	z-index: 1;
	pointer-events: none;
	opacity: 0.9;
}

.cg-why-us-slides-visuals {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 2;
}

.cg-why-us-visual-item {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	display: flex;
	align-items: center;
	transition: opacity 0.5s ease, transform 0.5s ease;
	transform: scale(0.97);
}

.cg-why-us-visual-item.active {
	opacity: 1;
	pointer-events: auto;
	z-index: 5;
	transform: scale(1);
}

/* Giant Masked Circular Image */
.cg-why-us-image-wrap {
	position: absolute;
	left: 20%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 320px;
	height: 320px;
	border-radius: 50%;
	border: 6px solid #6DC05A;
	overflow: hidden;
	box-shadow: 0 20px 25px -5px rgba(21, 70, 131, 0.08), 0 10px 10px -5px rgba(21, 70, 131, 0.04);
	z-index: 3;
	background-color: #ffffff;
	transition: border-color 0.4s ease, transform 0.4s ease;
}

.cg-why-us-visual-item:hover .cg-why-us-image-wrap {
	transform: translate(-50%, -50%) scale(1.02);
	border-color: #154683;
}

.cg-why-us-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.6s ease;
}

.cg-why-us-visual-item:hover .cg-why-us-img {
	transform: scale(1.05);
}

/* Hotspot & Connecting Lines Group */
.cg-why-us-hotspot-group {
	position: absolute;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

/* Pulsing Dot */
.cg-why-us-pulse {
	width: 12px;
	height: 12px;
	background-color: #154683;
	border-radius: 50%;
	z-index: 12;
	position: relative;
	box-shadow: 0 0 0 0 rgba(21, 70, 131, 0.4);
	transition: background-color 0.3s ease;
}

.cg-why-us-pulse::after {
	content: '';
	position: absolute;
	top: -6px;
	left: -6px;
	right: -6px;
	bottom: -6px;
	border-radius: 50%;
	border: 2px solid #154683;
	animation: cg-hotspot-pulse 2s infinite cubic-bezier(0.24, 0, 0.38, 1);
	opacity: 0;
}

@keyframes cg-hotspot-pulse {
	0% {
		transform: scale(0.6);
		opacity: 0.9;
	}
	100% {
		transform: scale(2.4);
		opacity: 0;
	}
}

/* Connecting line to the left (to the Label tag) */
.cg-why-us-pointer-line-left {
	position: absolute;
	right: 16px;
	top: 50%;
	height: 1px;
	width: 32px;
	background-color: #cbd5e1;
	z-index: 8;
	transform-origin: right;
	transition: background-color 0.3s ease, width 0.4s ease;
}

/* Connecting line to the right (to the Tooltip content) */
.cg-why-us-pointer-line-right {
	position: absolute;
	left: 16px;
	top: 50%;
	height: 1px;
	width: 32px;
	background-color: #cbd5e1;
	z-index: 8;
	transform-origin: left;
	transition: background-color 0.3s ease, width 0.4s ease;
}

/* Left Label Tag (e.g. Trust) */
.cg-why-us-tag {
	position: absolute;
	right: 48px;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(255, 255, 255, 0.92);
	border: 1px solid #154683;
	color: #154683;
	font-size: 13px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 4px;
	white-space: nowrap;
	z-index: 10;
	box-shadow: 0 4px 12px rgba(21, 70, 131, 0.05);
	backdrop-filter: blur(6px);
	transition: all 0.3s ease;
}

.cg-why-us-visual-item:hover .cg-why-us-tag {
	border-color: #6DC05A;
	color: #6DC05A;
	transform: translateY(-50%) translateY(-2px);
}

.cg-why-us-visual-item:hover .cg-why-us-pointer-line-left,
.cg-why-us-visual-item:hover .cg-why-us-pointer-line-right {
	background-color: #6DC05A;
}

.cg-why-us-visual-item:hover .cg-why-us-pulse {
	background-color: #6DC05A;
}

/* Tooltip container */
.cg-why-us-tooltip {
	position: absolute;
	left: 48px;
	top: 50%;
	transform: translateY(-50%);
	width: 240px;
	z-index: 10;
	transition: all 0.3s ease;
}

.cg-why-us-tooltip-inner {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cg-why-us-tooltip-title {
	font-size: 15px;
	font-weight: 700;
	color: #154683;
	margin: 0;
	line-height: 1.3;
}

.cg-why-us-tooltip-desc {
	font-size: 13px;
	color: #64748b;
	margin: 0;
	line-height: 1.4;
}

.cg-why-us-tooltip-link {
	font-size: 13px;
	font-weight: 700;
	color: #154683;
	text-decoration: none;
	margin-top: 2px;
	transition: color 0.3s ease;
	display: inline-block;
}

.cg-why-us-tooltip-link:hover {
	color: #6DC05A;
	text-decoration: underline;
}

/* ==========================================
 * RESPONSIVE ADJUSTMENTS
 * ========================================== */

@media (max-width: 991px) {
	.cg-why-us-grid {
		grid-template-columns: 1fr;
		gap: 50px;
		min-height: auto;
	}

	.cg-why-us-content-block {
		text-align: center;
		align-items: center;
	}

	.cg-why-us-tabs-navigation {
		justify-content: center;
	}

	.cg-why-us-desc {
		margin-bottom: 25px;
	}

	.cg-why-us-spotlight-block {
		height: 420px;
	}

	.cg-why-us-bg-ring {
		width: 380px;
		height: 380px;
		right: 10%;
	}

	.cg-why-us-image-wrap {
		width: 260px;
		height: 260px;
		left: 25%;
	}
}

@media (max-width: 767px) {
	.cg-why-us-spotlight-block {
		height: auto;
		flex-direction: column;
		align-items: center;
	}

	.cg-why-us-bg-ring {
		display: none; /* Hide background ring on mobile to prevent clipping and clutter */
	}

	.cg-why-us-slides-visuals {
		position: relative;
		width: 100%;
		height: auto;
	}

	.cg-why-us-visual-item {
		position: relative;
		inset: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		opacity: 0;
		height: 0;
		overflow: hidden;
		transform: scale(0.95);
		transition: opacity 0.4s ease, transform 0.4s ease;
	}

	.cg-why-us-visual-item.active {
		opacity: 1;
		height: auto;
		overflow: visible;
		transform: scale(1);
		margin-bottom: 20px;
	}

	.cg-why-us-image-wrap {
		position: relative;
		left: auto;
		top: auto;
		transform: none !important;
		margin: 0 auto 25px auto;
		width: 220px;
		height: 220px;
	}

	/* Restructure the absolute tooltip coordinates to be a clean centered mobile block */
	.cg-why-us-hotspot-group {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		width: 100%;
		height: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 12px;
		text-align: center;
	}

	.cg-why-us-pulse,
	.cg-why-us-pointer-line-left,
	.cg-why-us-pointer-line-right {
		display: none !important; /* Hide dot and connectors on mobile */
	}

	.cg-why-us-tag {
		position: relative !important;
		right: auto !important;
		top: auto !important;
		transform: none !important;
		display: inline-block;
	}

	.cg-why-us-tooltip {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		width: 100%;
		max-width: 320px;
	}

	.cg-why-us-tooltip-inner {
		align-items: center;
	}
}
